1
0
mirror of https://github.com/golang/go synced 2024-10-04 13:21:22 -06:00
Commit Graph

469 Commits

Author SHA1 Message Date
Russ Cox
360151d4e2 gobuild changes.
* handles multiple packages per directory
	* scans directory for files if given no arguments
	* infers package name
	* includes test rule invoking gotest

R=r
DELTA=746  (444 added, 150 deleted, 152 changed)
OCL=19504
CL=19521
2008-11-18 17:11:56 -08:00
Rob Pike
8b8630c6cf allow files to be named on the command line
R=rsc
DELTA=3  (1 added, 1 deleted, 1 changed)
OCL=19485
CL=19485
2008-11-18 14:17:13 -08:00
Rob Pike
d495372509 new gotest shell script (will be a proper command some day, probably)
automates construction and execution of unit tests.

R=rsc
DELTA=60  (58 added, 0 deleted, 2 changed)
OCL=19482
CL=19484
2008-11-18 14:12:14 -08:00
Russ Cox
6b7dd4c020 add build step to install debuggers setgid procmod.
they have to go in /usr/local/bin
because the setgid bit is ignored in /Users.

R=r
DELTA=54  (49 added, 0 deleted, 5 changed)
OCL=19424
CL=19463
2008-11-18 10:08:46 -08:00
Russ Cox
4656686cf5 use correct lineno in nod even if yacc has looked ahead.
makes lineno correct for statements without semicolons.

R=ken
OCL=19454
CL=19454
2008-11-18 09:32:05 -08:00
Russ Cox
4d1d5e8a88 work around more commonly-unreachable 6g code sequences.
R=r
DELTA=23  (23 added, 0 deleted, 0 changed)
OCL=19405
CL=19420
2008-11-17 17:16:50 -08:00
Russ Cox
3f548cd2d9 add gobuild to build
R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=19404
CL=19415
2008-11-17 16:59:04 -08:00
Russ Cox
a1585b676b fix the easy parts of bug120
R=r,ken
DELTA=66  (52 added, 3 deleted, 11 changed)
OCL=19386
CL=19389
2008-11-17 13:58:45 -08:00
Ken Thompson
b7f01f9f41 silence compiler warning
R=r
OCL=19382
CL=19382
2008-11-17 12:55:22 -08:00
Russ Cox
9c7b064043 fix bugs in package locals
R=ken
OCL=19299
CL=19299
2008-11-14 17:31:29 -08:00
Rob Pike
fd47cb9af5 conflicting scopes should cause error exit
TBR=rsc
OCL=19297
CL=19297
2008-11-14 17:28:11 -08:00
Russ Cox
d3f6093931 package-local declarations using keyword "package".
R=r
DELTA=129  (81 added, 0 deleted, 48 changed)
OCL=19283
CL=19291
2008-11-14 16:35:08 -08:00
Ken Thompson
e875055461 switch
R=r
OCL=19288
CL=19288
2008-11-14 16:24:27 -08:00
Russ Cox
f8b20e4083 add cov, prof to default build; clean up compiler warnings
R=r
DELTA=8  (1 added, 0 deleted, 7 changed)
OCL=19245
CL=19245
2008-11-14 10:57:48 -08:00
Russ Cox
7832ab5ba0 code coverage tool
$ 6cov -g 235.go 6.out
	235.go:62,62 main·main 0x27c9-0x2829 MOVL	$main·.stringo(SB),AX
	235.go:30,30 main·main 0x2856-0x285e ADDQ	$6c0,SP
	$

and assorted fixes.

R=r
DELTA=743  (732 added, 8 deleted, 3 changed)
OCL=19226
CL=19243
2008-11-14 10:45:23 -08:00
Russ Cox
c5f21c0dc2 * 6l:
if an object in an archive tries to refer
	to a file in its original source directory,
	ignore it.

* 6ar:
	fix bug if archive is empty.

* gobuild:
	build archive in current directory.

* math:
	use new gobuild Makefile.

* test/math.go:
	rename to mathest.go, add // run line, make it run.

R=r
DELTA=494  (277 added, 203 deleted, 14 changed)
OCL=19090
CL=19171
2008-11-13 13:42:26 -08:00
Rob Pike
2f4d35ffb9 converting uint bits back into floats
R=rsc
DELTA=32  (32 added, 0 deleted, 0 changed)
OCL=19084
CL=19091
2008-11-12 11:51:34 -08:00
Ken Thompson
902a4d5f29 6c bug with large constants
R=r
OCL=19056
CL=19056
2008-11-11 18:15:36 -08:00
Russ Cox
b682f924d7 don't try interface/structure conversion until
last resort, because it assumes every call is a
real use of the conversion.

R=ken
OCL=19026
CL=19026
2008-11-11 15:55:32 -08:00
Russ Cox
792145723e width fixes.
* check for uncomputed struct offsets
* distinguish function structs from ordinary structs
* make sure function structs are not examined in isolation

R=ken
OCL=19005
CL=19005
2008-11-11 13:46:55 -08:00
Rob Pike
0e544fa0e3 fix error-handling bug.
add newline after stack traces.

R=rsc
DELTA=3  (2 added, 1 deleted, 0 changed)
OCL=18945
CL=18953
2008-11-10 18:13:20 -08:00
Rob Pike
10137e7f1d fix start/stop bug in prof.
also only time-limit if a value is provided.

R=rsc
DELTA=9  (4 added, 2 deleted, 3 changed)
OCL=18917
CL=18920
2008-11-10 14:53:32 -08:00
Ken Thompson
79f5697b02 byte multiply
R=r
OCL=18830
CL=18830
2008-11-07 16:05:17 -08:00
Ken Thompson
dc78c64f23 byte multiply
R=r
OCL=18807
CL=18807
2008-11-07 14:20:32 -08:00
Rob Pike
335a5236e7 add sys.float32bits, sys.float64bits
R=rsc
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=18709
CL=18718
2008-11-06 15:48:36 -08:00
Russ Cox
ec81145565 s/gins/gbranch/
R=ken
OCL=18713
CL=18713
2008-11-06 15:05:19 -08:00
Russ Cox
0eda21a2fd change minimum sethi/ullman number to 1
to distinguish not computed (0) vs trivial (1).

add missing ullmancalc on function args.

R=ken
OCL=18711
CL=18711
2008-11-06 14:50:58 -08:00
Russ Cox
9906bfc7bb 6g ninit fixes - fixes the two test cases
i isolated last night.  does not fix rob's
interface-smashing bug.

R=ken
OCL=18698
CL=18698
2008-11-06 13:31:13 -08:00
Ken Thompson
79fbbe37a7 select default
R=r
OCL=18646
CL=18646
2008-11-05 21:50:28 -08:00
Russ Cox
d6a7cefd1e allow any type at all in sys.unreflect;
accomodate empty type table in 6l.

R=r
DELTA=10  (2 added, 8 deleted, 0 changed)
OCL=18601
CL=18605
2008-11-05 16:09:12 -08:00
Russ Cox
553c98dca4 fix renamed-package bug in exported names:
always show original name

R=ken
OCL=18603
CL=18603
2008-11-05 15:59:34 -08:00
Ken Thompson
83a798513c more on t,ok = I.(T)
R=r
OCL=18599
CL=18599
2008-11-05 15:33:01 -08:00
Ken Thompson
a8b56a73a4 T,ok = I.(T)
R=r
OCL=18580
CL=18582
2008-11-05 14:27:07 -08:00
Russ Cox
1983121bbb 6g interface changes:
* allow conversion between nil interface and any type.
	* mark signatures as DUPOK so that multiple .6 can
	  contain sigt.*[]byte and only one gets used.

R=ken
OCL=18538
CL=18542
2008-11-05 11:27:50 -08:00
Russ Cox
e5d9a5c9f0 runtime support for interface ok,
whatever the final syntax ends up being.

R=ken
OCL=18414
CL=18414
2008-11-03 17:34:37 -08:00
Russ Cox
47caf6424c 6l: generate gotypesigs on demand.
add sys.unreflect, which uses gotypesigs.

R=r
DELTA=170  (152 added, 12 deleted, 6 changed)
OCL=18396
CL=18404
2008-11-03 16:03:12 -08:00
Russ Cox
c249a8de32 rename various magic names.
sigi and sigt:
	sys·sigi_inter -> sigi·inter
	sys·sigt_int -> sigt·int
	Package·sigt_Type -> sigt·Package.Type

	local type T in file x.go T_x -> T·x
	second one T_x_1 -> T·x·1

	method names M on T  T_M -> T·M

correctly handle local embedded types

init functions are the only place left that use underscores

R=ken
OCL=18377
CL=18377
2008-11-03 15:36:08 -08:00
Ken Thompson
90e5574f1c treat ... as agreed
only unencapsulated if passing one ddd
argument to one ddd parameter.

R=r
OCL=18376
CL=18376
2008-11-03 15:32:49 -08:00
Ken Thompson
250ec1665a unsigned divide by fn()
R=r
OCL=18351
CL=18351
2008-11-03 13:27:16 -08:00
Russ Cox
6b05518553 silence gcc warnings
R=ken
OCL=18348
CL=18348
2008-11-03 13:09:30 -08:00
Ken Thompson
d2472eb812 >>= and <<= shift bug
R=r
OCL=18322
CL=18322
2008-11-01 17:53:12 -07:00
Ken Thompson
2fef4c7198 DOTDOTDOT import/export
R=r
OCL=18319
CL=18319
2008-11-01 16:52:12 -07:00
Ken Thompson
74427c6346 DOTDOTDOT
R=r
OCL=18317
CL=18317
2008-11-01 16:36:46 -07:00
Ken Thompson
6fff0efdd8 sprint changed to snprint
R=r
OCL=18316
CL=18316
2008-11-01 15:56:06 -07:00
Russ Cox
8a1ad75644 make %Z handle embedded NULs; remove fixed-size buffer
R=r
DELTA=44  (2 added, 15 deleted, 27 changed)
OCL=18270
CL=18273
2008-10-31 14:57:57 -07:00
Russ Cox
57804f1d2d escape \ in %Z
R=ken
OCL=18202
CL=18202
2008-10-30 17:28:33 -07:00
Russ Cox
4958d41d3b change from $$ to \n$$ for .6 meta section delimiter
R=r
DELTA=13  (5 added, 0 deleted, 8 changed)
OCL=18190
CL=18192
2008-10-30 16:33:50 -07:00
Russ Cox
dc6bd11ce8 make %Z escape "
R=ken
OCL=18180
CL=18180
2008-10-30 15:35:56 -07:00
Russ Cox
f2b1536328 annotations on embedded types
R=ken
OCL=18179
CL=18179
2008-10-30 15:29:55 -07:00
Russ Cox
1850b29da6 struct annotations in imports.
distribute tag across multiple names.

R=ken
OCL=18178
CL=18178
2008-10-30 15:25:26 -07:00
Russ Cox
f27aaf4819 structure field annotation strings
R=ken
OCL=18176
CL=18176
2008-10-30 15:13:09 -07:00
Ken Thompson
fd922c875d shift bug
R=r
OCL=18166
CL=18166
2008-10-30 14:32:04 -07:00
Ken Thompson
2c050571d8 shift bugs
R=r
OCL=18095
CL=18095
2008-10-29 20:25:34 -07:00
Ken Thompson
2f5a05a859 bug 113
R=r
OCL=18081
CL=18081
2008-10-29 16:55:52 -07:00
Ken Thompson
4fdf3d6247 bug 113
R=r
OCL=18077
CL=18077
2008-10-29 16:38:23 -07:00
Ken Thompson
4a3ce5f19e sigt_int
R=r
OCL=18030
CL=18030
2008-10-29 13:40:00 -07:00
Ken Thompson
89f341db23 new(chan)
R=r
OCL=18027
CL=18027
2008-10-29 13:18:21 -07:00
Ken Thompson
c21d9a1ec9 the end of life as we know it
int is new type

R=r
OCL=18023
CL=18023
2008-10-29 12:46:44 -07:00
Russ Cox
b5c739bd1b Uncomment the name/type error checking.
R=ken
OCL=17928
CL=17928
2008-10-28 01:02:33 -07:00
Ken Thompson
e8278bcb29 allow len := 0
R=r
OCL=17869
CL=17869
2008-10-26 14:04:09 -07:00
Ken Thompson
a3cdd2e802 bug
R=r
OCL=17853
CL=17853
2008-10-25 14:24:51 -07:00
Ken Thompson
6d3d56d55a bug
R=r
OCL=17852
CL=17852
2008-10-25 13:50:18 -07:00
Ken Thompson
b642cf8c00 embedded methods
R=r
OCL=17851
CL=17851
2008-10-25 13:31:25 -07:00
Ken Thompson
b379d54dea another step toward interface subtypes
put explicit ./ on some runtime tests

R=r
OCL=17839
CL=17839
2008-10-24 20:14:28 -07:00
Russ Cox
cc4dc5a22a avoid JMP to ATEXT in xfol
R=ken
OCL=17833
CL=17833
2008-10-24 17:10:51 -07:00
Russ Cox
e2fa41ab3b fix JMP main(SB)
R=ken
OCL=17832
CL=17832
2008-10-24 16:43:12 -07:00
Russ Cox
689b28fd96 fix method function type compare bug (again)
R=ken
OCL=17819
CL=17819
2008-10-24 14:56:54 -07:00
Russ Cox
c14c961ae4 Automated g4 rollback of changelist 17815.
*** Reason for rollback ***

  now it's comparing function parameter names...

*** Original change description ***

fix method function type compare bug

R=ken
OCL=17816
CL=17816
2008-10-24 14:32:48 -07:00
Russ Cox
0be746d581 fix method function type compare bug
R=ken
OCL=17815
CL=17815
2008-10-24 14:29:01 -07:00
Ken Thompson
7ed8fc611d embedded types
auto & on methods

R=r
OCL=17682
CL=17682
2008-10-22 18:18:08 -07:00
Russ Cox
ad48706a24 do not use fake names on anonymous function return values
R=ken
OCL=17679
CL=17679
2008-10-22 17:45:47 -07:00
Ken Thompson
6fecb76eea embedded types
R=r
OCL=17676
CL=17676
2008-10-22 17:25:10 -07:00
Russ Cox
21617250f4 import/export of embedded types
R=ken
OCL=17643
CL=17643
2008-10-22 13:22:56 -07:00
Russ Cox
40fa690d75 fix handling of *f() = 1
R=ken
OCL=17625
CL=17641
2008-10-22 13:13:01 -07:00
Ken Thompson
14c639161a elided dots
R=r
OCL=17601
CL=17601
2008-10-21 20:55:40 -07:00
Russ Cox
dbabeb1d7a reject new of function type
R=ken
OCL=17598
CL=17598
2008-10-21 18:03:25 -07:00
Russ Cox
beee6915f8 rewrite &Point{1, 2} as allocation
R=ken
OCL=17592
CL=17592
2008-10-21 16:53:54 -07:00
Russ Cox
2c3ddf5ef6 include local types in typestrings
R=r
DELTA=16  (14 added, 1 deleted, 1 changed)
OCL=17584
CL=17584
2008-10-21 15:57:38 -07:00
Russ Cox
44b0ecc5ca 6g: use full type in sigt[0].name
sys: add sys.reflect
runtime: add canfail flag for later

R=ken
OCL=17583
CL=17583
2008-10-21 15:38:26 -07:00
Ken Thompson
0347e95b63 changes to imbedded
R=r
OCL=17572
CL=17572
2008-10-21 15:04:10 -07:00
Russ Cox
1a149ca1be stop looking for type names beginning with _.
they're gone.

R=ken
OCL=17569
CL=17569
2008-10-21 14:44:31 -07:00
Russ Cox
aacfbb461b 6g:
* print int as int, not P.int
	* write type info for non-exported types
	   in its own new section.

ar:
	skip over rest of line after $$

R=ken
OCL=17568
CL=17568
2008-10-21 14:34:45 -07:00
Russ Cox
0532f89b1f 6l: invent gotypestrings if needed
R=r
DELTA=419  (409 added, 5 deleted, 5 changed)
OCL=17524
CL=17530
2008-10-21 10:40:16 -07:00
Russ Cox
a570eaabcd 6l:
use libbio instead of maintaining own buffer

libbio:
	always use vlong offsets; die if off_t is too small

R=r
DELTA=163  (23 added, 63 deleted, 77 changed)
OCL=17508
CL=17512
2008-10-20 17:33:51 -07:00
Russ Cox
28912ce03f fix compiler warnings
R=r
DELTA=44  (10 added, 9 deleted, 25 changed)
OCL=17502
CL=17502
2008-10-20 15:26:38 -07:00
Russ Cox
bfc70d0f0a use Biobuf not fd for reading objects.
will make reading type info easier.

R=r
DELTA=21  (2 added, 1 deleted, 18 changed)
OCL=17491
CL=17501
2008-10-20 15:21:59 -07:00
Russ Cox
ef40d9435b 6g:
make sure methods end up immediately following
	the struct they are methods on.
ar:
	eliminate duplicate definitions from __.PKGDEF.
	check that multiple .6 do not give different defs for same
		exported type/var/func/const.
	increase ar header name size from 16 to 64 bytes

R=r
DELTA=379  (333 added, 18 deleted, 28 changed)
OCL=17477
CL=17481
2008-10-20 13:53:56 -07:00
Ken Thompson
61361af9e8 unnamed substructures - not complete
R=r
OCL=17437
CL=17437
2008-10-19 20:13:37 -07:00
Russ Cox
5fe4cd83a8 do not set t->recur on basic types.
the comment talked about printing, but now
t->recur is only used for typehash.
in typehash it is important to compute different
hashes for the different basic types.

add test that makes sure an interface { X() int8 }
cannot be used as interface { X() int64 }

R=ken
OCL=17396
CL=17396
2008-10-17 17:51:29 -07:00
Russ Cox
ab9db8a5f8 cleanup - delete unneeded vargen++
R=ken
OCL=17394
CL=17394
2008-10-17 17:45:32 -07:00
Russ Cox
ba46bd1e5a export prereq for interface types
R=ken
OCL=17377
CL=17377
2008-10-17 16:13:17 -07:00
Ian Lance Taylor
907fea6b54 Link against -lm so that we can find the function "floor".
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=17375
CL=17375
2008-10-17 15:52:49 -07:00
Russ Cox
1163b1db6f diagnose various conversion problems
R=ken
OCL=17320
CL=17320
2008-10-16 15:59:31 -07:00
Russ Cox
493a9d2f42 put toplevel & check back and add test
R=ken
OCL=17307
CL=17307
2008-10-16 14:02:20 -07:00
Ken Thompson
2e4b8d94cd diagnosed some incorrect
inputs for method receivers.

R=r
OCL=17304
CL=17304
2008-10-16 13:29:03 -07:00
Russ Cox
59167e5bdb diagnose export of incomplete type
R=ken
OCL=17253
CL=17253
2008-10-15 17:51:23 -07:00
Russ Cox
7cd173a4f8 error about & at top level until it is safe
R=ken
OCL=17241
CL=17241
2008-10-15 17:09:42 -07:00
Ken Thompson
1bf38484d1 interface on arbitrary types
global signatures for basic types

R=r
OCL=17238
CL=17240
2008-10-15 17:08:10 -07:00
Russ Cox
4248607ffe simplify comma code per ken's suggestion
R=ken
OCL=17164
CL=17164
2008-10-14 18:47:24 -07:00
Russ Cox
82e41cc533 allow trailing comma in braced initialized list
R=ken
OCL=17141
CL=17143
2008-10-14 17:10:39 -07:00
Rob Pike
5933dbda3a delete hack for interface equality now that it supported by the 6g compiler
R=rsc
DELTA=21  (0 added, 21 deleted, 0 changed)
OCL=17123
CL=17136
2008-10-14 16:33:11 -07:00
Ken Thompson
e2e8aa0ee1 interface equality (strings specifically)
R=r
OCL=17134
CL=17134
2008-10-14 16:10:44 -07:00
Ken Thompson
edb1412c50 interface equality
R=r
OCL=17116
CL=17118
2008-10-14 15:08:23 -07:00
Ken Thompson
1836541566 bug with struct-type { 1 }
R=r
OCL=17096
CL=17096
2008-10-14 12:48:14 -07:00
Ken Thompson
1ea5bc7533 stack allocation for the init function
R=r
OCL=17063
CL=17063
2008-10-13 20:14:09 -07:00
Russ Cox
0adc1db757 until 6g implements it, warn about using int in interface.
R=ken
OCL=16935
CL=16935
2008-10-10 16:14:13 -07:00
Russ Cox
827dcb86b7 add sys.BUG_intereq to compare interfaces for equality
R=r
OCL=16929
CL=16929
2008-10-10 15:30:32 -07:00
Russ Cox
5f1202428b add empty var ( ), type ( ), const ( ) factorings
suggested by rob (could make programs generating
go easier to write).

R=ken
DELTA=13  (13 added, 0 deleted, 0 changed)
OCL=16766
CL=16766
2008-10-08 15:33:09 -07:00
Russ Cox
b4f8e01acb more interface checks:
- pointer to interface cannot have methods
	- record type names for better runtime error

R=r,ken
DELTA=85  (80 added, 0 deleted, 5 changed)
OCL=16658
CL=16722
2008-10-08 09:21:57 -07:00
Russ Cox
02d184b303 remove support for *T as an implicit declaration of T
R=ken
OCL=16651
CL=16653
2008-10-07 13:00:10 -07:00
Russ Cox
96da920f1a fix bug:
type T struct
	export type T struct { a int }

was not exporting T

R=ken
OCL=16650
CL=16650
2008-10-07 12:42:57 -07:00
Russ Cox
d364d28142 implement new semicolon rules:
*  1. all statements and declarations are terminated by semicolons
 *  2. semicolons can be omitted at top level.
 *  3. semicolons can be omitted before and after the closing ) or }
 *	on a list of statements or declarations.

now that semicolons are in, uncomment forward declaration
	of interfaces

R=ken
DELTA=285  (124 added, 114 deleted, 47 changed)
OCL=16638
CL=16646
2008-10-07 12:36:30 -07:00
Rob Pike
7ee60b174d sys.stringtorune doesn't need a length parameter.
R=rsc
DELTA=7  (0 added, 0 deleted, 7 changed)
OCL=16600
CL=16630
2008-10-07 10:03:34 -07:00
Russ Cox
74e2e087e2 change type names to go live at the name, so that
type T struct {
		next *T
	}

and

	type T *struct {
		next T
	}

are valid without needing forward declarations.

add "type T struct" syntax for forward struct declarations.

add "type T interface" syntax, but commented out
	(need to fix semicolons first)

R=ken
DELTA=452  (259 added, 115 deleted, 78 changed)
OCL=16580
CL=16584
2008-10-06 16:44:17 -07:00
Russ Cox
1b257b2bb3 silence gcc warning - initialize two variables
R=ken
OCL=16550
CL=16550
2008-10-06 13:52:23 -07:00
Ken Thompson
6499fbe734 bug060
R=r
OCL=16497
CL=16497
2008-10-04 17:11:01 -07:00
Ken Thompson
f25843e65e bug 026
R=r
OCL=16494
CL=16494
2008-10-04 15:17:49 -07:00
Russ Cox
c8b9970e16 change *a1++; to plain a1++
R=ken
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=16489
CL=16489
2008-10-04 02:54:19 -07:00
Russ Cox
2e1bb4a4cf add method test & fix method name bugs
R=ken,r
DELTA=86  (72 added, 9 deleted, 5 changed)
OCL=16488
CL=16488
2008-10-04 02:51:03 -07:00
Russ Cox
45f4e38506 silence gcc warnings
R=ken
OCL=16449
CL=16466
2008-10-03 16:23:02 -07:00
Russ Cox
b8babed7c2 new import/export format
package flag
	export type flag.Flag struct { name flag.string; usage flag.string; \
		value flag.Value; next *flag.Flag }
	type flag.string string
	type flag.Value interface { AsBool () (? *flag.BoolValue); \
		AsInt () (? *flag.IntValue); AsString () (? *flag.StringValue); \
		IsBool () (? flag.bool); IsInt () (? flag.bool); IsString () (? flag.bool); \
		Str () (? flag.string); ValidValue (str flag.string) (? flag.bool) }
	type flag.BoolValue struct { val flag.bool; p *flag.bool }
	type flag.IntValue struct { val flag.int64; p *flag.int64 }
	type flag.StringValue struct { val flag.string; p *flag.string }
	type flag.bool bool
	func (e *flag.StringValue) AsBool () (? *flag.BoolValue)
	func (e *flag.StringValue) AsInt () (? *flag.IntValue)
	...

the \ continuations are for this message, not real.

changed delimiter for import from (( )) to $$ $$.

replaced mksys.bash with mksys.c

changed sys.go to use leading export,
	fake package name is now SYS not foop

don't always require ; on forward func decls

R=ken,r
DELTA=1827  (446 added, 1083 deleted, 298 changed)
OCL=16433
CL=16463
2008-10-03 16:15:55 -07:00
Ken Thompson
8877d27b40 interfaces of all types
R=r
OCL=16462
CL=16462
2008-10-03 16:12:21 -07:00
Rob Pike
bbb908fef0 allow prof to launch the process
R=rsc
DELTA=32  (30 added, 0 deleted, 2 changed)
OCL=16440
CL=16445
2008-10-03 14:49:10 -07:00
Ken Thompson
ed139c1e37 more on arbitrary receiver types
this CL passes the tests, but should
be considered unstable

R=r
OCL=16390
CL=16390
2008-10-02 20:51:10 -07:00
Ken Thompson
53a22770a7 names now println/panicln
bug fix in named-return

R=r
OCL=16377
CL=16377
2008-10-02 15:37:15 -07:00
Ken Thompson
f21e731c71 added printn and panicn
prints that insert spaces and new line

R=r
OCL=16370
CL=16370
2008-10-02 14:38:07 -07:00
Russ Cox
0216273c7a add values to some "return" statements.
delete unused variables

R=ken
OCL=16360
CL=16360
2008-10-02 11:34:04 -07:00
Ken Thompson
d015f896bb clear output parameters
R=r
OCL=16345
CL=16345
2008-10-01 20:00:58 -07:00
Ken Thompson
970d6a14c4 initialization of
var a,b int;

R=r
OCL=16318
CL=16318
2008-10-01 14:16:57 -07:00
Russ Cox
8dc08788ef remove ( ) around mismatch type prints,
so that they don't look like functions.

R=ken
OCL=16244
CL=16244
2008-09-30 15:38:41 -07:00
Russ Cox
387c1bc31e pretty types; use 6g -t to disable
R=ken
OCL=16240
CL=16242
2008-09-30 15:35:40 -07:00
Russ Cox
a05c59fe91 cleanup export
R=ken
OCL=16219
CL=16219
2008-09-30 13:52:44 -07:00
Russ Cox
b033c581db fix export bug for /usr/r/rpc
R=ken
OCL=16218
CL=16218
2008-09-30 13:49:31 -07:00
Russ Cox
4d571c9093 fix up arg list parsing to handle any names:
type t1 int;
type t2 int;
type t3 int;
func f1(t1, t2, t3);
func f2(t1, t2, t3 bool);
func f3(t1, t2, x t3);
func f4(*t2, x t3);	// error: cannot mix
func f5(t1, *t3);
func (x *t1) f6(y *[]t2) (t1, *t3);
func f7() (int, *string);
func f8(t1, *t2, x t3);	// error: cannot mix
func f9() (x int, *string);
func f10(*t2, t3);

R=ken
OCL=16202
CL=16210
2008-09-30 12:53:11 -07:00
Ken Thompson
b6f59358b5 minor bugs
R=r
OCL=16163
CL=16163
2008-09-29 20:33:51 -07:00
Ken Thompson
89ac5618ac toward methods on any type
R=r
OCL=16068
CL=16068
2008-09-28 20:22:31 -07:00
Ken Thompson
3a884d76ac bug in simul assignment
R=r
OCL=16053
CL=16053
2008-09-27 17:46:40 -07:00
Ken Thompson
7be2b9fdf6 bug in argument passing
R=r
OCL=16044
CL=16044
2008-09-27 13:32:38 -07:00
Ken Thompson
9f3d600be6 export
syntax for inheritance

R=r
OCL=16028
CL=16028
2008-09-26 21:27:26 -07:00
Ken Thompson
fb86c39362 bug with array bounds
R=r
OCL=16021
CL=16023
2008-09-26 17:41:43 -07:00
Ken Thompson
8545700af8 export
R=r
OCL=16018
CL=16022
2008-09-26 17:41:23 -07:00
Russ Cox
c3d841f5d4 handle negative numeric constants in import.
(fixes bugs/bug106)

package bug0
export const A = -1

package bug1
import "bug0"

R=ken
DELTA=21  (19 added, 0 deleted, 2 changed)
OCL=15901
CL=15968
2008-09-26 11:44:20 -07:00
Russ Cox
2c52881a85 fix ELF bugs found by iant
- .text begins at INITTEXT, not 0
	   and does not include HEADR
	- .shstrtab, .gosymtab, .gopclntab have alignment 1
	- .gosymtab, .gopclntab have type SHT_PROGBITS

R=r
DELTA=9  (0 added, 0 deleted, 9 changed)
OCL=15953
CL=15956
2008-09-26 10:25:13 -07:00
Russ Cox
a0e7937243 6ar: exit with error status if files cannot be opened.
R=r
DELTA=15  (8 added, 0 deleted, 7 changed)
OCL=15952
CL=15954
2008-09-26 10:13:57 -07:00
Russ Cox
d4edee3dd0 prototype nit
R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=15906
CL=15909
2008-09-25 17:07:24 -07:00
Russ Cox
34bb7a0bb2 gobuild -m: replace value of $GOARCH and $GOOS
in Makefile with $(GOARCH) and $(GOOS)

R=r
DELTA=40  (38 added, 0 deleted, 2 changed)
OCL=15905
CL=15908
2008-09-25 17:07:06 -07:00
Ken Thompson
bcd07252e1 export
R=r
OCL=15805
CL=15805
2008-09-24 16:20:01 -07:00
Russ Cox
afd04fdb98 cleanup; sys.sleep can go.
R=r
OCL=15786
CL=15792
2008-09-24 15:28:03 -07:00
Ken Thompson
5f0a5e7a13 more export
R=r
OCL=15771
CL=15771
2008-09-24 14:12:21 -07:00
Russ Cox
3f106f976a make prof work on linux
R=r
DELTA=18  (11 added, 1 deleted, 6 changed)
OCL=15752
CL=15755
2008-09-24 11:07:21 -07:00