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

39 Commits

Author SHA1 Message Date
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
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
1163b1db6f diagnose various conversion problems
R=ken
OCL=17320
CL=17320
2008-10-16 15:59:31 -07:00
Ken Thompson
edb1412c50 interface equality
R=r
OCL=17116
CL=17118
2008-10-14 15:08:23 -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
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
Rob Pike
47919799b4 new grammar:
binary <- is send
	unary <- is recv
	-< is gone
	case a := <-ch: works in select
	case a = <-ch: works in select
support for new cases is not yet in the compiler but all non-select
code works

second CL will update affected go source

R=ken
OCL=15414
CL=15414
2008-09-16 19:14:33 -07:00
Ken Thompson
66a603c986 arrays
R=r
OCL=14603
CL=14603
2008-08-27 17:28:30 -07:00
Ken Thompson
ead7a6d47a i2s and i2i
R=r
OCL=14140
CL=14140
2008-08-12 16:36:18 -07:00
Ken Thompson
4797523572 fixed bugs in const/case
R=r
DELTA=138  (75 added, 12 deleted, 51 changed)
OCL=14129
CL=14131
2008-08-12 14:04:03 -07:00
Ken Thompson
2b75556436 export large constants
R=r
DELTA=37  (31 added, 4 deleted, 2 changed)
OCL=14089
CL=14089
2008-08-11 13:22:04 -07:00
Ken Thompson
272ae659db mp fixed arith
R=r
DELTA=149  (80 added, 62 deleted, 7 changed)
OCL=14029
CL=14029
2008-08-09 17:29:26 -07:00
Ken Thompson
9c2ade358d mp constants
R=r
DELTA=381  (142 added, 26 deleted, 213 changed)
OCL=14011
CL=14016
2008-08-08 17:13:31 -07:00
Russ Cox
9aad9fef76 make 6a, 6c, 6g, 6l, libmach_amd64 build on 64-bit gcc.
these guys really really want long to be 32-bits,
so ,s/long/int32/ (and then manual fixup).
still passes all tests.

(i started out looking for just those longs that
needed to be int32 instead, and it was just too hard
to track them down one by one.)

the longs were rare enough that i don't think
it will cause integration problems.

R=ken
OCL=13787
CL=13789
2008-08-03 17:25:15 -07:00
Ken Thompson
b1abcc195d random bug fixes
R=r
DELTA=18  (6 added, 1 deleted, 11 changed)
OCL=13504
CL=13504
2008-07-27 13:09:15 -07:00
Ken Thompson
b78676a49d start of select
random bugs fixed

SVN=128149
2008-07-20 20:13:07 -07:00
Ken Thompson
ac048ce7f4 new chan syntax
SVN=127437
2008-07-15 21:07:59 -07:00
Rob Pike
12c81a0ce8 enable autolib
handle archives with __.PKGDEF elements (although we can't create them yet)
introduce a pkg directory
search the pkg directory for packages during compilation

SVN=126574
2008-07-09 16:05:03 -07:00
Ken Thompson
4528854308 unique import/export names
more on go statement

SVN=126421
2008-07-08 17:19:17 -07:00
Ken Thompson
4d6d4e7f4e random little bugs
SVN=126049
2008-07-05 17:43:25 -07:00
Ken Thompson
417a971f9a output args declared
arguments in first block for diagnostics
thomo return
better syntax error recovery

SVN=126045
2008-07-05 12:49:25 -07:00
Ken Thompson
d3237f9a2a more line numbers
SVN=125265
2008-06-28 17:27:39 -07:00
Ken Thompson
e90ae879d6 autolib (#pragma lib)
added to 6g to autoload
the included import files.

SVN=124759
2008-06-25 20:22:10 -07:00
Ken Thompson
54abac678a redeclarations of variables in the same block.
half-step toward multivalued map indexing

SVN=124019
2008-06-21 15:11:29 -07:00
Ken Thompson
e1a06ccc80 now checks for lvalue/rvalue context of
expressions.
start of generics for calling builtin
     functions
start of map type
'any' demoted from reserved word to type

SVN=122808
2008-06-15 20:24:30 -07:00
Ken Thompson
efec14bc5a plan9 line numbers and line table
SVN=122793
2008-06-13 18:16:23 -07:00
Ken Thompson
343f5aa7b4 better import/export
SVN=122584
2008-06-12 21:48:56 -07:00
Ken Thompson
2254a8ee99 import/export
SVN=122309
2008-06-11 21:06:26 -07:00
Ken Thompson
6a659ebf13 new elf header
SVN=121737
2008-06-09 13:16:50 -07:00
Ken Thompson
f9c58c25e0 more nihan
SVN=121622
2008-06-08 19:02:27 -07:00
Ken Thompson
9abf9e8a37 nihon
SVN=121620
2008-06-08 18:26:23 -07:00
Ken Thompson
feb1c77f9c cafebabe
SVN=121574
2008-06-06 19:16:18 -07:00
Ken Thompson
b6218e6907 '\Ucafebabe'
SVN=121562
2008-06-06 17:42:03 -07:00
Ken Thompson
609cf0c3a7 fixed \\ secape in strings
SVN=121553
2008-06-06 17:08:21 -07:00
Ken Thompson
bbb2073223 goos garch
SVN=121367
2008-06-05 19:38:39 -07:00
Ken Thompson
f1880579ef loaded problem getting main from a library
SVN=121175
2008-06-04 15:33:59 -07:00
Rob Pike
0cafb9ea3d Add compiler source to new directory structure
SVN=121164
2008-06-04 14:37:38 -07:00