Robert Griesemer
8971cf2354
daily snapshot:
...
- separating printing of AST and documentation
- astprinter: will subsume ast printing functionality of printer
- docprinter: will subsume doc printing functionality of printer
also: more logic to collect all the documentation pertaining
to all files of a package
- parser: some cleanups, stricter syntax checks
- gds: hooks to test new doc printer (disabled)
R=r
OCL=26915
CL=26915
2009-03-30 17:13:11 -07:00
Russ Cox
8e54729b5a
move alignment calculations into gc
...
R=ken
OCL=26914
CL=26914
2009-03-30 17:09:28 -07:00
Russ Cox
e224b1ebdb
don't crash on
...
unsafe.Alignof(struct{x float}{0}.x)
R=ken
OCL=26911
CL=26913
2009-03-30 17:07:30 -07:00
Russ Cox
531f242f5d
move bits.c from 6g to gc
...
R=ken
OCL=26909
CL=26909
2009-03-30 16:13:11 -07:00
Rob Pike
f538760552
fix last 3 references to 'type guards'
...
R=gri
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=26908
CL=26908
2009-03-30 16:08:41 -07:00
Russ Cox
a99a7f60c3
tests changed - throw calls panic directly now
...
instead of dereferencing nil, so no more SIGSEGVs.
R=r
DELTA=28 (0 added, 14 deleted, 14 changed)
OCL=26881
CL=26881
2009-03-30 00:28:08 -07:00
Russ Cox
47fbb7639a
new tool godefs.
...
uses gcc to determine system header layouts and
emits simple C or Go. see comment in main.c.
R=r
DELTA=1069 (1067 added, 0 deleted, 2 changed)
OCL=26682
CL=26880
2009-03-30 00:21:25 -07:00
Russ Cox
a2cbc2998d
don't write cmp's output to the c file.
...
cope better with p4 not found.
R=r
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=26877
CL=26879
2009-03-30 00:12:56 -07:00
Russ Cox
0d3a043de9
more 386 runtime - can run tiny c programs.
...
R=r
DELTA=1926 (1727 added, 168 deleted, 31 changed)
OCL=26876
CL=26878
2009-03-30 00:01:07 -07:00
Robert Griesemer
de9cf52835
- receiver syntax verification
...
- removed left-over panic() call
- fixed a couple of bugs
R=r
OCL=26856
CL=26856
2009-03-27 23:11:54 -07:00
Robert Griesemer
75a5d6cd2d
Significant parser cleanup:
...
- commented public interface
- much better and very precise error messages
- much better tracing output
- many more checks (still permits more than just syntactically legal
programs, but much more is checked that can be checked w/o semantic information)
- updated with respect to updated AST
- general cleanup throughout
Parser almost ready for move into lib/go.
R=r
OCL=26853
CL=26855
2009-03-27 19:27:09 -07:00
Robert Griesemer
7cba8e6f72
- have explicit KeyValueExpr node instead of BinaryExpr ':' (as discussed)
...
- remove ':' token from operator precedence levels
R=rsc
DELTA=25 (13 added, 8 deleted, 4 changed)
OCL=26850
CL=26854
2009-03-27 19:26:03 -07:00
Ian Lance Taylor
5617028ab6
Verify that "byte" is an alias for "uint8".
...
R=r
DELTA=6 (6 added, 0 deleted, 0 changed)
OCL=26836
CL=26841
2009-03-27 13:43:50 -07:00
Robert Griesemer
c5c577c1ff
- minor tweak to composite literal production:
...
renamed PairExpr -> KeyValueExpr and PairExprList -> KeyValueList
(to match corresponding nodes in AST per rsc' suggestion)
- added a couple of TODOs
R=r,rsc
DELTA=10 (2 added, 0 deleted, 8 changed)
OCL=26837
CL=26840
2009-03-27 13:43:28 -07:00
Robert Griesemer
5019a8db7f
integrate feedback from rsc
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=26810
CL=26834
2009-03-27 09:49:11 -07:00
Ian Lance Taylor
a52d6fb73a
Add a few tests which weren't being run.
...
R=r
DELTA=4 (4 added, 0 deleted, 0 changed)
OCL=26797
CL=26814
2009-03-26 22:20:27 -07:00
Robert Griesemer
34050ca8de
- adjustments to match slightly changed scanner interface
...
- more comments on parser, various cleanups
TBR=r
OCL=26813
CL=26813
2009-03-26 22:16:06 -07:00
Robert Griesemer
3f9da82904
minor tweaks:
...
- permit scanner to run w/o error handler
- provide an error counter
R=iant
DELTA=43 (25 added, 0 deleted, 18 changed)
OCL=26804
CL=26812
2009-03-26 22:13:49 -07:00
Rob Pike
8e39472e3b
rename redefined symbols
...
R=iant
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=26802
CL=26811
2009-03-26 22:04:34 -07:00
Robert Griesemer
b499da48a4
move AST into src/lib/go
...
R=r
DELTA=1509 (756 added, 751 deleted, 2 changed)
OCL=26799
CL=26801
2009-03-26 17:51:44 -07:00
Robert Griesemer
e4db08d26d
fix scanner initialization, add test
...
R=r
DELTA=27 (25 added, 0 deleted, 2 changed)
OCL=26798
CL=26798
2009-03-26 17:40:51 -07:00
Robert Griesemer
eeddc8e73b
- adjustments to match new token/scanner/ast
...
R=r
OCL=26794
CL=26794
2009-03-26 16:10:07 -07:00
Robert Griesemer
5a72ca45fb
- renamed scanner.Location to token.Position
...
- by moving Position into token, scanner dependencies
are removed from several files
- clearer field names in token.Position, now possible to
have a Pos() accessor w/o naming conflicts
- added Pos() accessor
- use anonymous token.Position field in AST nodes
R=r
DELTA=244 (28 added, 55 deleted, 161 changed)
OCL=26786
CL=26793
2009-03-26 16:08:44 -07:00
Robert Griesemer
b923b01665
EncodeRuneToString
...
R=rsc
DELTA=22 (22 added, 0 deleted, 0 changed)
OCL=26779
CL=26792
2009-03-26 16:05:30 -07:00
Robert Griesemer
cc8e4fb485
- introduce explicit Token type
...
- convert some functions into methods
- corresponding changes in pretty
R=r
DELTA=57 (3 added, 0 deleted, 54 changed)
OCL=26764
CL=26777
2009-03-26 10:53:14 -07:00
Kai Backman
99cc2fee81
This is really two changes in one but given interdependencies
...
and expected review latency I needed to combine the CLs.
1. Made the 5* toolpath build using the go build
system. Hooked the subdirectories to clean.bash but added a
separate make5.bash for now. Minor massage to make the code
more similar to the current structure of 6c/6a/6l.
2. Change all references from long to int32 in line with
similar change for the other toolchains.
The end result is that 5c, 5a and 5l can now be compiled and
the executables start up properly. Haven't thrown any input at
them yet.
R=rsc
APPROVED=rsc
DELTA=1052 (392 added, 328 deleted, 332 changed)
OCL=26757
CL=26761
2009-03-25 16:31:38 -07:00
Robert Griesemer
62fd90ab76
use FunctionType in FunctionLit production
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=26738
CL=26753
2009-03-25 13:58:44 -07:00
Robert Griesemer
ba620d5027
adjustments matching updated ast
...
R=r
OCL=26746
CL=26746
2009-03-25 12:45:06 -07:00
Robert Griesemer
bafd8c390a
AST for Go programs
...
R=rsc,r
DELTA=309 (67 added, 51 deleted, 191 changed)
OCL=26611
CL=26745
2009-03-25 12:44:18 -07:00
Rob Pike
21d03496e7
add some words (written by rsc) about the state of typed constants.
...
DELTA=31 (31 added, 0 deleted, 0 changed)
OCL=26709
CL=26716
2009-03-24 19:16:42 -07:00
Russ Cox
fcd536d801
add .8 support to libmach_amd64 [sic].
...
add code to handle 32-bit Mach-O and ELF binaries.
R=r
DELTA=452 (365 added, 29 deleted, 58 changed)
OCL=26696
CL=26712
2009-03-24 18:04:50 -07:00
Russ Cox
58f7fc331f
make 8a, 8c build again.
...
add 8a 8c 8l to the build to keep us honest.
R=r
DELTA=33 (28 added, 0 deleted, 5 changed)
OCL=26694
CL=26711
2009-03-24 18:04:19 -07:00
Russ Cox
34a5537edb
drop rt0 object from 8l (already dropped from 6l).
...
remove debugging print.
R=r
DELTA=8 (0 added, 8 deleted, 0 changed)
OCL=26695
CL=26710
2009-03-24 18:02:24 -07:00
Rob Pike
1141716c5c
change notation: s/Stat/Stmt/ in grammatical productions
...
DELTA=26 (0 added, 0 deleted, 26 changed)
OCL=26703
CL=26705
2009-03-24 17:45:53 -07:00
Rob Pike
94b67eb8d8
delete incorrect, dreg example of select on type
...
R=gri,rsc
DELTA=48 (28 added, 11 deleted, 9 changed)
OCL=26630
CL=26701
2009-03-24 17:40:47 -07:00
Ken Thompson
a805e54a38
golden
...
R=r
OCL=26699
CL=26699
2009-03-24 16:47:33 -07:00
Ken Thompson
b8be809c10
^ type(const) now inverts "enough" bits
...
^ signed(const) becomes illegal
^ unsigned(const) becomes legal
R=r
OCL=26697
CL=26697
2009-03-24 16:40:38 -07:00
Russ Cox
85e014a27e
fix build:
...
install runtime lib in correct location.
fix one bad type definition in defs.h.
clear out $GOROOT/lib in clean.bash.
TBR=r
OCL=26691
CL=26691
2009-03-24 16:04:25 -07:00
Russ Cox
80f4ab47ee
split heapmap, which is specific to 64-bit pointer addresses,
...
out of malloc proper.
TBR=r
OCL=26689
CL=26689
2009-03-24 15:11:56 -07:00
Russ Cox
209865be7c
convert Linux to auto-generated defs.h
...
TBR=r
OCL=26686
CL=26688
2009-03-24 15:04:18 -07:00
Russ Cox
08cfcd1dd6
convert darwin to use godefs-generated defs.h.
...
this change is much smaller if you ignore
the machine-generated defs.h.
TBR=r
OCL=26684
CL=26684
2009-03-24 13:51:48 -07:00
Russ Cox
8ee041dc24
split rt1.c into signal.c and thread.c.
...
move out of arch-specific directory: only os-specific.
rm sys_types.h (unused).
TBR=r
OCL=26681
CL=26681
2009-03-24 13:17:10 -07:00
Russ Cox
878822f355
move darwin specific code into runtime/darwin/
...
move darwin-amd64 specific code into runtime/darwin/amd64/
repeat for linux.
move rt0 into runtime.a instead of keeping a separate .6 file.
6l seems to have no problem with that.
TBR=r
OCL=26680
CL=26680
2009-03-24 13:06:51 -07:00
Russ Cox
5a68303a15
throw away most of the compat.h compatibility layer
...
in favor of the lib9 compatibility layer. no need for two.
now that mycreate is gone, .6 files are 0644 not 0755.
TBR=r
OCL=26679
CL=26679
2009-03-24 12:12:57 -07:00
Russ Cox
fcd76f7dc9
move amd64-specific (but os-independent) pieces of runtime
...
into amd64/ directory.
split rt2_amd64.c into closure.c and traceback.c.
TBR=r
OCL=26678
CL=26678
2009-03-24 11:49:22 -07:00
Russ Cox
13584f4a23
add test for close/closed, fix a few implementation bugs.
...
R=ken
OCL=26664
CL=26664
2009-03-23 18:50:35 -07:00
Russ Cox
86145611b0
allow range on nil maps
...
R=ken
OCL=26663
CL=26663
2009-03-23 18:32:37 -07:00
Rob Pike
8d44052b6d
iterator for vector
...
R=rsc
DELTA=35 (35 added, 0 deleted, 0 changed)
OCL=26662
CL=26662
2009-03-23 17:46:59 -07:00
Rob Pike
482cbb1f33
change file name so it can be copied without name change to a more public place.
...
R=rsc
DELTA=1090 (545 added, 545 deleted, 0 changed)
OCL=26629
CL=26629
2009-03-22 21:53:40 -07:00
Rob Pike
7525e085d2
bug141 is fixed
...
R=ken
DELTA=56 (26 added, 30 deleted, 0 changed)
OCL=26628
CL=26628
2009-03-22 21:02:17 -07:00