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

158 Commits

Author SHA1 Message Date
Russ Cox
5383e28ea0 change string([]byte) to pass array, rather than &a[0],
to string convert.  if the byte array has length 0,
the computation of &a[0] throws an index bounds error.

for fixed size arrays, this ends up invoking arrays2d
unnecessarily, but it works.

R=ken
DELTA=304  (44 added, 28 deleted, 232 changed)
OCL=15674
CL=15678
2008-09-22 20:12:15 -07:00
Ken Thompson
4332e0a546 remove extraneous print
R=r
OCL=15666
CL=15666
2008-09-22 17:29:12 -07:00
Ken Thompson
adaec0c4f4 vectors bug
R=r
OCL=15664
CL=15664
2008-09-22 16:58:30 -07:00
Russ Cox
fb2c66710c compiler changes:
export.c:
		- only expose explicitly exported types to importer
		- fix behind your back
	go.h:
		- add deep() prototype (fixes 64-bit linux crash on time.go)
	go.y:
		- add a new syntax error case
	walk.c:
		- allow a,b = f() where f is func ptr (fixes bug088)

R=ken
OCL=15617
CL=15630
2008-09-22 12:45:01 -07:00
Ken Thompson
8231e94520 now method/interface code
R=r
OCL=15627
CL=15627
2008-09-22 12:16:19 -07:00
Russ Cox
b676b0e125 better yacc rule in Makefile
if y.tab.c is older than y.tab.h, make
interprets doing nothing as a failure,
because y.tab.c hasn't been updated.
so update it.

R=r
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=15615
CL=15622
2008-09-22 10:56:54 -07:00
Ken Thompson
8a9752dcfb another async select bug
R=r
OCL=15599
CL=15599
2008-09-20 19:56:40 -07:00
Ken Thompson
39a4b1421f bug103 - but the fix caused other
things to break. hopefully all fixed
now.

R=r
OCL=15597
CL=15597
2008-09-20 14:59:15 -07:00
Russ Cox
5eb9e0621b avoid dereferencing nil type on undefined name.
R=ken
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=15506
CL=15528
2008-09-19 09:39:09 -07:00
Russ Cox
76036192b9 make Makefiles safe for parallel make
use -j4 (4-way parallel) in make.bash.

halves time for make.bash on r45

also add libregexp, acid to default build

R=r
DELTA=90  (39 added, 37 deleted, 14 changed)
OCL=15485
CL=15487
2008-09-18 15:06:43 -07:00
Russ Cox
13f3149a01 more helpful messages for name-related syntax errors.
R=ken
OCL=15477
CL=15479
2008-09-18 13:32:14 -07:00
Russ Cox
f0635bbfaa Linux bison rejects // comments outside { code snippets }
R=ken
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=15444
CL=15446
2008-09-17 14:09:44 -07:00
Ken Thompson
304440356d assignment in select
with new select operator

R=r
OCL=15418
CL=15418
2008-09-16 20:51:50 -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
721cb9c6a1 redeclaring methods
R=r
OCL=15375
CL=15375
2008-09-15 19:07:23 -07:00
Ken Thompson
d01a1ec260 robs wednesday bug
R=r
OCL=15327
CL=15327
2008-09-14 17:29:50 -07:00
Ken Thompson
2119294af9 methods on any type
-- but only *struct tested

R=r
OCL=15326
CL=15326
2008-09-14 16:57:55 -07:00
Ken Thompson
1ae08bee90 Automated g4 rollback of changelist 15312.
*** Reason for rollback ***

  <enter reason for rollback>

*** Original change description ***

correct signal name thru package rename

R=r
OCL=15313
CL=15313
2008-09-13 14:49:36 -07:00
Ken Thompson
28b9702741 correct signal name thru package rename
R=r
OCL=15312
CL=15312
2008-09-13 14:46:19 -07:00
Ken Thompson
904d4045d3 1 got rid if static 'fn wo return' test
2 added dynamic calls to throw for array bounds
  and 'fn wo return'
3 small optimization on index[constant]

R=r
OCL=15281
CL=15281
2008-09-12 16:48:35 -07:00
Ken Thompson
47580f79b4 bug075
R=r
OCL=15192
CL=15192
2008-09-11 19:09:25 -07:00
Ken Thompson
ff65872fbf function wo return is an error - not warning
R=r
OCL=15169
CL=15169
2008-09-11 15:44:45 -07:00
Ken Thompson
d30c9a4be5 implement discussed function wo return statement
R=r
OCL=15166
CL=15166
2008-09-11 15:23:01 -07:00
Ken Thompson
0a7e4a7415 bug generating duplicate interface signatures
R=r
OCL=15119
CL=15119
2008-09-10 19:49:35 -07:00
Ken Thompson
a0e57201c7 bug in type of first argument to slice
R=r
OCL=15113
CL=15113
2008-09-10 16:45:41 -07:00
Ken Thompson
d40f032d18 fixed bug in certain
evaluation of complex literals

R=r
OCL=15036
CL=15036
2008-09-09 15:47:31 -07:00
Ken Thompson
077fe40867 bug with struct literal with metods
R=r
OCL=14937
CL=14937
2008-09-08 13:10:11 -07:00
Ken Thompson
0194aaf918 T{} syntax for constructors
T(expression) for conversion
FUNC keyword no longer a type

R=r
OCL=14887
CL=14887
2008-09-05 19:50:34 -07:00
Ken Thompson
193eac7917 bugs 29, 61, 62, 74
fixedbugs 49 now (correctly) fails
bugs 32, 41, 68, 77 shouldnt be bugs

R=r
OCL=14842
CL=14842
2008-09-04 17:15:15 -07:00
Ken Thompson
9dbaab54d1 rewriting bugs
R=r
OCL=14810
CL=14810
2008-09-04 12:21:10 -07:00
Ken Thompson
182f91ffe0 map literals
R=r
OCL=14759
CL=14759
2008-09-03 14:40:22 -07:00
Ken Thompson
4539ced714 array literals
R=r
OCL=14756
CL=14756
2008-09-03 14:09:29 -07:00
Ken Thompson
1423bf3dc4 structure literals
R=r
OCL=14735
CL=14735
2008-09-02 19:11:25 -07:00
Ken Thompson
0ffacfd995 order of evaluation in function args
R=r
OCL=14733
CL=14733
2008-09-02 17:12:32 -07:00
Ken Thompson
9c5669bd0b bug in conv(string, bytearray)
R=r
OCL=14732
CL=14732
2008-09-02 16:21:30 -07:00
Ken Thompson
a7f1af81bd minor bugs
R=r
OCL=14702
CL=14702
2008-09-01 14:37:32 -07:00
Ken Thompson
33ee52727f fixed labels/break/continue/goto
R=r
OCL=14675
CL=14675
2008-08-29 20:30:19 -07:00
Ken Thompson
944ad62ecd fix type of (1<<x)
R=r
OCL=14656
CL=14656
2008-08-29 13:24:53 -07:00
Ken Thompson
53010efe01 shift operations to new spec
R=r
OCL=14641
CL=14641
2008-08-28 19:59:42 -07:00
Ken Thompson
c6130e9f1f get rid of static/dynamic array distinction
R=r
OCL=14634
CL=14634
2008-08-28 15:17:37 -07:00
Ken Thompson
66a603c986 arrays
R=r
OCL=14603
CL=14603
2008-08-27 17:28:30 -07:00
Ken Thompson
30fd44cf9d fix fat copy of overlapping data
R=r
OCL=14417
CL=14417
2008-08-21 20:49:04 -07:00
Rob Pike
b59b551be7 allow predefined identifiers (len, etc.) to be exported.
(they were not accepted as names by the import parser)

R=ken
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=14159
CL=14159
2008-08-13 15:24:55 -07:00
Ken Thompson
52861558f4 put i2s, s2i and i2i in convert
R=r
OCL=14143
CL=14143
2008-08-12 19:13:09 -07:00
Ken Thompson
ead7a6d47a i2s and i2i
R=r
OCL=14140
CL=14140
2008-08-12 16:36:18 -07:00
Ken Thompson
c1ab5a554f resolve go.y edits
R=r
OCL=14132
CL=14132
2008-08-12 14:28:58 -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
Rob Pike
72d50900e3 fix a typo in the comments
R=ken
OCL=14104
CL=14104
2008-08-11 21:29:11 -07:00
Ken Thompson
a8a9dbc9c6 print() and field names
R=r
DELTA=86  (61 added, 3 deleted, 22 changed)
OCL=14099
CL=14099
2008-08-11 19:17:28 -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