Russ Cox
b0009bef20
bug064
...
make f(g()) work when g returns multiple
args with names different than f expects.
func swap(a, b int) (c, d int) {
return b, a
}
swap(swap(1,2))
R=ken
OCL=24474
CL=24476
2009-02-05 15:22:49 -08:00
Russ Cox
7a3877aa0c
take advantage of methods on funcs
...
R=r
DELTA=14 (0 added, 13 deleted, 1 changed)
OCL=24458
CL=24470
2009-02-05 15:09:08 -08:00
Russ Cox
aab26a5248
do not generate Init proto for sys and unsafe.
...
R=ken
OCL=24455
CL=24455
2009-02-05 14:49:53 -08:00
Robert Griesemer
89fc8465a8
- caseify parser functions (all but a few should not be exported)
...
- more elegant tracing code
- removed some dead code, cleanups
R=r
OCL=24452
CL=24452
2009-02-05 14:22:09 -08:00
Russ Cox
fc8dca9dac
heuristic to stop pulling .6 in from .a
...
is not right if the .6 is only for data and
the init function.
instead of that, pick up everything and
let the dead code/data eliminator throw
away the parts that weren't useful.
R=r
DELTA=25 (0 added, 22 deleted, 3 changed)
OCL=24446
CL=24446
2009-02-05 13:58:43 -08:00
Russ Cox
5e2c05877d
allow methods on funcs.
...
R=ken
OCL=24442
CL=24442
2009-02-05 13:33:07 -08:00
Russ Cox
7fd04676ad
fix build on thresher - missing constants
...
TBR=r
OCL=24439
CL=24439
2009-02-05 13:00:12 -08:00
Ian Lance Taylor
58c277955a
Rename function to avoid function redefinition error. Remove
...
.* from regexp since it confuses DejaGNU which runs gcc's
testsuite.
R=rsc
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=24435
CL=24438
2009-02-05 12:54:15 -08:00
Robert Griesemer
5d571cc67e
snapshot:
...
- ast statements now use interfaces
- deleted old (now unused) code
R=r
OCL=24422
CL=24422
2009-02-05 11:05:02 -08:00
Robert Griesemer
1595a1947c
today's snapshot: steps towards using interfaces for statements in ast
...
R=r
OCL=24380
CL=24380
2009-02-04 18:28:41 -08:00
Rob Pike
6aabf31a83
a few tweaks triggered by tgs's comments
...
DELTA=46 (25 added, 1 deleted, 20 changed)
OCL=24342
CL=24354
2009-02-04 15:13:07 -08:00
Rob Pike
689c808c12
clean up flags package a bit.
...
fix a bug in Usage message - would print current value instead of default.
R=rsc
DELTA=53 (7 added, 4 deleted, 42 changed)
OCL=24323
CL=24323
2009-02-04 11:46:39 -08:00
Russ Cox
360f0aacee
fix interface not satisifed message:
...
x.go:13: T is not I - missing M()
NOT
x.go:13: T is not I - missing Mfunc()
R=ken
OCL=24316
CL=24316
2009-02-04 10:37:11 -08:00
Robert Griesemer
c048ee21ad
- converted expr representation of ast into a new representation
...
using interfaces properly => much cleaner code
- converted tracing code to use 'defer' statement
- next steps: convert rest of ast as well
R=r
OCL=24277
CL=24277
2009-02-03 17:44:01 -08:00
Rob Pike
f9cc900ae8
bugs cleanup, including deleting one near-identical duplicate bug
...
R=rsc
DELTA=52 (15 added, 37 deleted, 0 changed)
OCL=24274
CL=24274
2009-02-03 16:59:26 -08:00
Russ Cox
c55d310cd2
fix build. missed this file
...
TBR=r
OCL=24269
CL=24269
2009-02-03 15:58:13 -08:00
Russ Cox
736903c170
libmach:
...
* heuristic to go farther during stack traces.
* significantly improved Linux thread handing.
acid:
* update to new libmach interface.
prof:
* use new libmach interface.
* multiple thread support (derived from Rob's copy).
* first steps toward pprof-like graphs:
keep counters indexed by pc,callerpc pairs.
R=r
DELTA=909 (576 added, 123 deleted, 210 changed)
OCL=24240
CL=24259
2009-02-03 15:00:09 -08:00
Russ Cox
9aa28f9231
bufio:
...
* avoid large copies
* NewBufRead, NewBufWrite never fail
* add BufReadWrite
io:
* add io.Close
http, google/net/rpc:
* add, use http.Conn.Hijack
R=r
DELTA=416 (202 added, 123 deleted, 91 changed)
OCL=24153
CL=24238
2009-02-03 14:16:22 -08:00
Russ Cox
535dcf77c8
minor tweaks
...
R=r
DELTA=9 (2 added, 5 deleted, 2 changed)
OCL=24107
CL=24152
2009-02-02 18:59:20 -08:00
Russ Cox
e73acc1b35
flesh out http server.
...
convert to uppercase names.
R=r
DELTA=613 (460 added, 61 deleted, 92 changed)
OCL=24139
CL=24145
2009-02-02 18:01:32 -08:00
Russ Cox
f61639d4e2
6g return struct fix:
...
make t->width of funarg struct be width of struct.
emit MOVSL for 4-byte copy.
R=ken
OCL=24108
CL=24111
2009-02-02 13:41:38 -08:00
Russ Cox
fb88a01cc2
marginally better thread debugging on Linux.
...
if you clone inside a traced pid, the child
is automatically attached and stopped,
apparently.
R=r
DELTA=63 (41 added, 12 deleted, 10 changed)
OCL=24096
CL=24106
2009-02-02 13:26:40 -08:00
Robert Griesemer
b67603dfef
- added experimental flag '-def': will print (not parse!)
...
'def' instead of 'func', 'const', or 'type'
R=r
OCL=24092
CL=24094
2009-02-02 11:51:07 -08:00
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
6fdb18f900
can finally close this TODO - 6l was broken
...
R=r
DELTA=2 (0 added, 2 deleted, 0 changed)
OCL=23993
CL=23995
2009-01-30 17:14:39 -08:00
Russ Cox
47e27758db
keep line number history even when
...
throwing away dead code at end of file.
also fix an uninitialized memory error
found by valgrind.
R=r
DELTA=7 (5 added, 2 deleted, 0 changed)
OCL=23991
CL=23994
2009-01-30 17:10:10 -08:00
Russ Cox
9e735985d4
avoid memcpy(x, x),
...
which valgrind complains about.
R=ken
OCL=23990
CL=23990
2009-01-30 16:31:26 -08:00
Robert Griesemer
6dd93bbfbc
- changed pretty parser to parse and print new function type syntax
...
- added more test cases
- fixed a bug in test script which prevented errors to show up...
R=r
OCL=23832
CL=23974
2009-01-30 15:31:04 -08:00
Russ Cox
7b6bdfb735
two uses of uninitialized memory,
...
picked up by valgrind.
fixes test/escape.go on linux.
R=ken
OCL=23971
CL=23971
2009-01-30 15:11:46 -08:00
Rob Pike
25a2b3626d
needless semicolons
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=23967
CL=23970
2009-01-30 15:10:22 -08:00
Russ Cox
122ed3e988
print format bug
...
R=ken
OCL=23965
CL=23965
2009-01-30 14:54:49 -08:00
Robert Griesemer
2b9fe0ea24
Test balloon: Changed the spec to see the implications of changing the
...
syntax of function types and making them "reference types" like slice,
map, and chan. First step in Russ' proposal.
DELTA=111 (32 added, 15 deleted, 64 changed)
OCL=23669
CL=23964
2009-01-30 14:48:29 -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
Russ Cox
4cf7711568
update go code tree to new func rules.
...
R=r
DELTA=367 (111 added, 59 deleted, 197 changed)
OCL=23957
CL=23960
2009-01-30 14:39:31 -08:00
Rob Pike
b59dbd7fe0
rename variable at rsc's request
...
R=rsc
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=23896
CL=23928
2009-01-30 11:14:48 -08:00
Rob Pike
96777ea2a7
clean up server code in tutorial
...
R=rsc
DELTA=15 (1 added, 0 deleted, 14 changed)
OCL=23889
CL=23889
2009-01-30 10:18:58 -08:00
Russ Cox
391425ae55
if take address of local, move to heap.
...
heuristic to not print bogus strings.
fix one error message format.
R=ken
OCL=23849
CL=23851
2009-01-29 17:38:58 -08:00
Robert Griesemer
699721a0ea
- removed obsolete files from repository
...
(most of this has been integrated into pretty,
the rest has been archived).
R=r
OCL=23842
CL=23842
2009-01-29 17:00:18 -08:00
Robert Griesemer
eecce5f130
- make test work with 6g
...
R=r
OCL=23821
CL=23823
2009-01-29 15:16:22 -08:00
Ken Thompson
4f49b88dda
optimizer bug w STOstring
...
R=r
OCL=23820
CL=23820
2009-01-29 15:13:36 -08:00
Russ Cox
6ee6d6ec55
add stack test
...
R=r
DELTA=48 (48 added, 0 deleted, 0 changed)
OCL=23715
CL=23732
2009-01-28 16:58:48 -08:00
Russ Cox
282bf8cc8c
fix possible infinite recursion in eqtype.
...
don't use intermediate register to move
32-or-fewer-bit immediate constants
into memory.
R=ken
OCL=23726
CL=23726
2009-01-28 16:42:26 -08:00
Russ Cox
3ec4675220
clean up range grammar
...
R=ken
OCL=23712
CL=23714
2009-01-28 15:41:50 -08:00
Russ Cox
9f726c2c8b
Use explicit allspan list instead of
...
trying to find all the places where
spans might be recorded.
Free can cascade into complicated
span manipulations that move them
from list to list; the old code had the
possibility of accidentally processing
a span twice or jumping to a different
list, causing an infinite loop.
R=r
DELTA=70 (28 added, 25 deleted, 17 changed)
OCL=23704
CL=23710
2009-01-28 15:22:16 -08:00
Robert Griesemer
cb659ece0e
additions to array container:
...
- added Slice, Cut, InsertArray, AppendArray
- renamed Remove -> Delete (so we have: Insert, Delete, Cut)
- more factoring of code
- extra tests (could use some more)
R=r,rsc
DELTA=179 (127 added, 22 deleted, 30 changed)
OCL=23648
CL=23685
2009-01-28 13:32:31 -08:00
Rob Pike
712522a6d8
bug135 is fixed
...
TBR=ken
OCL=23650
CL=23650
2009-01-27 19:30:44 -08:00
Ken Thompson
4b8e030762
bug 135
...
R=r
OCL=23646
CL=23646
2009-01-27 18:21:03 -08:00
Russ Cox
7fa5941fad
make "size 6.out" work on mac.
...
R=r
DELTA=11 (6 added, 0 deleted, 5 changed)
OCL=23629
CL=23631
2009-01-27 15:40:36 -08:00
Rob Pike
c8476472d9
test for defer
...
R=rsc
DELTA=48 (48 added, 0 deleted, 0 changed)
OCL=23624
CL=23626
2009-01-27 15:08:08 -08:00