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

54 Commits

Author SHA1 Message Date
Rob Pike
6e395cfecf slightly better code for the frog fix
R=ken
OCL=24025
CL=24025
2009-01-31 16:44:52 -08:00
Rob Pike
2538cf747b Complain about control characters that are not white space.
Bitten by invisible chars too many times.

R=ken
OCL=24024
CL=24024
2009-01-31 16:42:10 -08:00
Russ Cox
4a43198390 update compiler to new func rules
R=ken
OCL=23958
CL=23961
2009-01-30 14:39:42 -08:00
Ken Thompson
1e1cc4eb57 defer
R=r
OCL=23592
CL=23592
2009-01-27 12:03:53 -08:00
Russ Cox
61590c4c44 disallow P.t for lowercase t and not our package P.
implement hiding lowercase methods m in
signatures by adding in a hash of the package name
to the type hash code.

remove remaining checks for internally-generated _ names:
they are all gone.

R=ken
OCL=23236
CL=23238
2009-01-21 14:51:57 -08:00
Russ Cox
a91af04c06 6g cleanup suggested by ken.
remove TPTR wrapper around TMAP, TCHAN, TSTRING.

R=ken
OCL=22406
CL=22409
2009-01-09 11:13:39 -08:00
Russ Cox
e512481b17 second pass on interface fixes and tests.
R=ken
OCL=22370
CL=22372
2009-01-08 18:06:06 -08:00
Ken Thompson
88b5c5f0f8 make for slice/map/chan
new for pointers

R=r
OCL=22158
CL=22158
2009-01-06 14:52:26 -08:00
Russ Cox
c3077f7606 [] and struct in interfaces.
other [] cleanup.

convert() is gone.

R=r
DELTA=352  (144 added, 68 deleted, 140 changed)
OCL=21660
CL=21662
2008-12-19 17:11:54 -08:00
Ken Thompson
1d4daa2d39 foundation for import unsafe
R=r
OCL=20794
CL=20794
2008-12-08 19:46:39 -08:00
Ken Thompson
f8797daa9f import/export of exact mp floating constants
new syntax for exact mp floating constants
     decimal_int ( "p" | "P" ) [ "+" | "-" ] decimal_int
     the value is decimal1 * 2^decimal2

R=r
OCL=20357
CL=20357
2008-12-03 13:17:26 -08:00
Ken Thompson
3fa4610601 multi precision floating point
R=r
OCL=20185
CL=20185
2008-12-01 17:22:05 -08:00
Russ Cox
63a84348cc look for .6 before .a; accept archives with 0 length __.SYMDEF
TBR=r
OCL=19612
CL=19612
2008-11-19 14:21:44 -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
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
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