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

1200 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Ken Thompson
79fa5b65cb rewrote switch
fixed bug 141

R=r
OCL=26627
CL=26627
2009-03-22 20:54:21 -07:00
Russ Cox
2bd101c4b1 update 8a, 8c, 8l to use new object format.
add "extern register" support to 8c.
extern register means allocate in the FS-relative segment.

make 8l generate segmented stack checks.

R=ken
OCL=26600
CL=26606
2009-03-20 16:40:00 -07:00
Russ Cox
c1e748bd2e embarassing bug in allocator:
was applying wrong waste check,
resulting in many more size classes
than necessary.

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=26602
CL=26605
2009-03-20 16:34:13 -07:00
Russ Cox
7d443bb67a make 8l generate Darwin Mach-O and Linux ELF binaries
R=ken
OCL=26584
CL=26589
2009-03-20 14:22:59 -07:00
Russ Cox
997b6f9d89 don't need two names for the same function (vputl and llputl).
also use thechar, to make copy/paste easier.

R=ken
OCL=26583
CL=26588
2009-03-20 14:22:46 -07:00
Russ Cox
0932b1f9b8 move pragtextflag into lexbody
R=ken
OCL=26581
CL=26587
2009-03-20 14:22:37 -07:00
Russ Cox
54aa835b44 range over channels.
also fix multiple-evaluation bug in range over arrays.

R=ken
OCL=26576
CL=26576
2009-03-20 11:32:58 -07:00
Russ Cox
f7772627ad fix b/1722502
BUG=1722502
R=ken
OCL=26526
CL=26526
2009-03-18 19:20:54 -07:00
Tom Szymanski
658ca49898 Make adler32 cleaner.
R=rsc
APPROVED=rsc
DELTA=22  (9 added, 6 deleted, 7 changed)
OCL=26498
CL=26500
2009-03-18 14:57:55 -07:00
Ken Thompson
1cdcfda140 remove assignment cases from switch
R=r
OCL=26480
CL=26480
2009-03-18 12:13:42 -07:00
Ken Thompson
1e0c17e294 switch on false error
R=r
OCL=26434
CL=26434
2009-03-17 19:10:32 -07:00
Ken Thompson
0f469a99a3 binary search on type switches.
new feature 'case nil:' in type switch
will match iff the interface is nil.

R=r
OCL=26404
CL=26404
2009-03-17 13:58:38 -07:00
Ken Thompson
5136a9e1f7 change format of Sigt and Sigi
to allow room for type hash
needed for log-time type switch.

R=r
OCL=26354
CL=26354
2009-03-16 15:27:08 -07:00
Robert Griesemer
1b141ca068 added &^ and &^=
R=rsc
DELTA=14  (12 added, 0 deleted, 2 changed)
OCL=26278
CL=26348
2009-03-16 14:20:08 -07:00
Ken Thompson
4523ee9ac8 close/closed on chans
R=r
OCL=26281
CL=26285
2009-03-13 16:47:54 -07:00
Kai Backman
db3a21d7c6 5a 5c 5l from inferno distribution
R=rsc
APPROVED=rsc
DELTA=19042  (19042 added, 0 deleted, 0 changed)
OCL=26268
CL=26270
2009-03-13 15:03:07 -07:00
Russ Cox
5fbadf0bc3 warn -> yyerror in mparith.
close two more bugs.

R=ken
OCL=26226
CL=26226
2009-03-12 19:57:30 -07:00
Russ Cox
8f194bf5ff make 6g constants behave as ken proposes. (i hope.)
various bug fixes and tests involving constants.

test/const1.go is the major new test case.

R=ken
OCL=26216
CL=26224
2009-03-12 19:04:38 -07:00
Ken Thompson
6eb54cb05b chan flags close/closed installed
runtime not finished.

R=r
OCL=26217
CL=26217
2009-03-12 17:55:11 -07:00
Robert Griesemer
6f321e28f4 - remove special handling of '\n' characters (used to be treated as comments
for pretty printer purposes - now properly ignored as white space since we
have line/col information)
- changed sample use in comment to an actually compiled function to make sure
sample is actually working
- added extra tests (checking line and column values, and the tokenize function)

R=rsc
DELTA=253  (61 added, 67 deleted, 125 changed)
OCL=26143
CL=26181
2009-03-12 11:04:11 -07:00
Ken Thompson
bb02e481d2 added bitclear operators &^ and &^=
R=r
OCL=26152
CL=26152
2009-03-11 19:59:35 -07:00
Ken Thompson
767845b6fa bug 125
R=r
OCL=26146
CL=26146
2009-03-11 17:37:04 -07:00
Ken Thompson
48f6b516e2 bug 137
R=r
OCL=26142
CL=26142
2009-03-11 16:25:45 -07:00
Russ Cox
4eb7ceba58 complain when trying to put T into an interface
if T has pointer methods.  this is just a heuristic
but it catches the problem robert ran into and
lets me put the larger interface issues aside for
now.  found one bug in pretty.

R=ken
OCL=26141
CL=26141
2009-03-11 16:06:17 -07:00
Russ Cox
7a706fb3d7 Rename os.FD to os.File.
Make Fstat, Readdirnames, and Readdir methods
on os.File.

R=r
DELTA=281  (79 added, 3 deleted, 199 changed)
OCL=25891
CL=26130
2009-03-11 12:51:10 -07:00
Russ Cox
6479d89378 document json
R=r
DELTA=115  (102 added, 0 deleted, 13 changed)
OCL=25953
CL=26128
2009-03-11 12:50:58 -07:00
Robert Griesemer
68c69fac9e - scanner to track line/col number instead of byte position only
- fixed a parameter name in tabwriter

R=rsc
DELTA=110  (21 added, 17 deleted, 72 changed)
OCL=26123
CL=26127
2009-03-11 12:48:45 -07:00
Russ Cox
32bf48c6d8 document http
R=r
DELTA=84  (63 added, 4 deleted, 17 changed)
OCL=25950
CL=26126
2009-03-11 12:45:53 -07:00
Rob Pike
5559ff6ece fix old-style print call in constant
R=rsc
OCL=26093
CL=26093
2009-03-10 20:47:42 -07:00
Ian Lance Taylor
062d6998ab Add support for a -I option. -I DIR searches for packages in
DIR.

R=ken,rsc
DELTA=49  (41 added, 2 deleted, 6 changed)
OCL=26057
CL=26092
2009-03-10 20:03:31 -07:00
Ken Thompson
d27e9f528d bug086
R=r
OCL=26090
CL=26090
2009-03-10 19:16:31 -07:00
Robert Griesemer
915f176f7f - fixing (internal) capitalization
R=rsc
DELTA=7  (0 added, 0 deleted, 7 changed)
OCL=26080
CL=26080
2009-03-10 18:09:13 -07:00
Robert Griesemer
d671daf7f7 - allow unicode digits in identifiers
- fixed a bug with character escapes (before: allowed arbitrary long sequences)

R=r
DELTA=63  (33 added, 19 deleted, 11 changed)
OCL=26010
CL=26070
2009-03-10 17:08:05 -07:00
Ken Thompson
0c4f4587d7 bug with interaction of variables
declared in cases and heap allocation

R=r
OCL=26064
CL=26064
2009-03-10 16:49:34 -07:00
Rob Pike
4cbfcae3d8 add unicode data for decimal digit, preparatory to allowing them in identifiers.
R=rsc
DELTA=431  (430 added, 0 deleted, 1 changed)
OCL=25975
CL=26059
2009-03-10 16:30:27 -07:00
Robert Griesemer
6906e3b884 - incorporate suggestions from previous code review
R=rsc
DELTA=64  (18 added, 3 deleted, 43 changed)
OCL=26046
CL=26058
2009-03-10 16:30:26 -07:00
Robert Griesemer
e7980732ee tabwriter documentation
R=rsc
DELTA=62  (31 added, 5 deleted, 26 changed)
OCL=26022
CL=26040
2009-03-10 14:55:04 -07:00
Robert Griesemer
efbb120d8e - more documentation adjustments
R=rsc
DELTA=6  (0 added, 1 deleted, 5 changed)
OCL=25970
CL=25973
2009-03-09 18:53:11 -07:00
Rob Pike
1fe42e2d4d delete float80 from libraries
R=rsc
DELTA=40  (0 added, 38 deleted, 2 changed)
OCL=25969
CL=25969
2009-03-09 18:00:41 -07:00
Rob Pike
3bc6fd63fe document reflect.
R=rsc
DELTA=201  (90 added, 0 deleted, 111 changed)
OCL=25904
CL=25966
2009-03-09 17:47:15 -07:00
Robert Griesemer
5bd5242bcc Fixing comment.
R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=25956
CL=25960
2009-03-09 17:30:38 -07:00
Robert Griesemer
2aa77352fc scanner.go documentation
R=r
DELTA=22  (8 added, 3 deleted, 11 changed)
OCL=25947
CL=25955
2009-03-09 17:16:42 -07:00
Robert Griesemer
cdd9539362 token.go documentation
R=r
DELTA=34  (24 added, 2 deleted, 8 changed)
OCL=25946
CL=25954
2009-03-09 17:13:15 -07:00
Robert Griesemer
dc5ddd7d84 - directory rename lang -> go
R=rsc
DELTA=2070  (1035 added, 1035 deleted, 0 changed)
OCL=25939
CL=25939
2009-03-09 12:41:53 -07:00
Ken Thompson
820f42d977 binary search for constant case statements.
R=r
OCL=25890
CL=25890
2009-03-07 17:33:42 -08:00
Rob Pike
5dd4ef5716 document bufio
R=rsc
DELTA=61  (27 added, 2 deleted, 32 changed)
OCL=25877
CL=25889
2009-03-07 16:57:01 -08:00
Rob Pike
333cdd8f2a document os
R=rsc
DELTA=143  (96 added, 0 deleted, 47 changed)
OCL=25876
CL=25888
2009-03-07 16:56:44 -08:00
Rob Pike
1910a7c595 document hash
R=rsc
DELTA=50  (33 added, 4 deleted, 13 changed)
OCL=25878
CL=25887
2009-03-07 16:56:21 -08:00
Rob Pike
c5560d3aaa document time
R=rsc
DELTA=42  (23 added, 1 deleted, 18 changed)
OCL=25881
CL=25886
2009-03-07 16:56:05 -08:00
Russ Cox
1e37e8a417 document Conn interface better, in preparation
for per-method interface documentation
by mkdoc.pl.

implement timeouts on network reads
and use them in dns client.

also added locks on i/o to ensure writes
are not interlaced.

R=r
DELTA=340  (272 added, 25 deleted, 43 changed)
OCL=25799
CL=25874
2009-03-06 17:51:31 -08:00
Ken Thompson
a4a10ed856 1. type switches
2. fixed fault on bug128
3. got rid of typeof
4. fixed bug in t,ok = I2T

R=r
OCL=25873
CL=25873
2009-03-06 17:50:43 -08:00
Rob Pike
b0609f14d2 document sort
R=rsc
DELTA=20  (20 added, 0 deleted, 0 changed)
OCL=25869
CL=25872
2009-03-06 17:29:25 -08:00
Rob Pike
6f07796e86 document syscall. all we do is redirect elsewhere.
R=rsc
DELTA=7  (7 added, 0 deleted, 0 changed)
OCL=25859
CL=25871
2009-03-06 17:20:53 -08:00
Rob Pike
99d00eae3c delete vestigial references to package syscall
R=rsc
DELTA=8  (0 added, 5 deleted, 3 changed)
OCL=25857
CL=25861
2009-03-06 16:03:59 -08:00
Rob Pike
7bb335c7de document io
R=rsc
DELTA=44  (30 added, 4 deleted, 10 changed)
OCL=25819
CL=25835
2009-03-06 03:43:44 -08:00
Rob Pike
5b4fa1ad22 document once
R=rsc
DELTA=14  (7 added, 5 deleted, 2 changed)
OCL=25818
CL=25834
2009-03-06 03:36:50 -08:00
Rob Pike
85647c94e6 document fmt.
the description of the format verbs still needs to be done.

R=rsc
DELTA=288  (88 added, 12 deleted, 188 changed)
OCL=25814
CL=25833
2009-03-06 03:35:38 -08:00
Rob Pike
b18e418410 document unicode, such as it is
R=rsc
DELTA=18  (9 added, 0 deleted, 9 changed)
OCL=25817
CL=25832
2009-03-06 03:22:02 -08:00
Rob Pike
6b8ac0a9e4 document rand
R=rsc
DELTA=27  (16 added, 8 deleted, 3 changed)
OCL=25804
CL=25813
2009-03-05 19:26:27 -08:00
Rob Pike
37656ad568 document container/intvector
R=rsc
DELTA=15  (15 added, 0 deleted, 0 changed)
OCL=25794
CL=25812
2009-03-05 19:22:06 -08:00
Rob Pike
dfe0853255 document utf8
R=rsc
DELTA=18  (12 added, 0 deleted, 6 changed)
OCL=25807
CL=25811
2009-03-05 19:15:13 -08:00
Russ Cox
af678a593d new approach for generating sysimport.c
(renamed to avoid any conflict with old p4 copies).

this approach doesn't require auto-generating
files also kept in p4, so it should be easier on
go users who don't sync very often.

this approach will be more work for go developers:
builtin.c needs to be copied to builtin.c.boot in p4
as new functions are added.  mkbuiltin does this
for certain $USERs to help us remember.

R=r
DELTA=343  (176 added, 162 deleted, 5 changed)
OCL=25803
CL=25805
2009-03-05 18:26:12 -08:00
Rob Pike
681299a444 document testing and incidentally gotest
R=rsc
DELTA=25  (25 added, 0 deleted, 0 changed)
OCL=25798
CL=25802
2009-03-05 17:50:36 -08:00
Rob Pike
0f7306b78c document strings
R=rsc
DELTA=9  (4 added, 0 deleted, 5 changed)
OCL=25793
CL=25795
2009-03-05 17:02:34 -08:00
Russ Cox
63985b489b bug085 bug129
R=ken
OCL=25787
CL=25791
2009-03-05 15:57:03 -08:00
Ken Thompson
bf983477a2 new switch implementation
in preparation of type switch.
no functional change (yet).

R=r
OCL=25784
CL=25788
2009-03-05 15:49:34 -08:00
Russ Cox
c93da7c70a net: doc, doc-inspired cleanup
R=r
DELTA=368  (87 added, 14 deleted, 267 changed)
OCL=25773
CL=25786
2009-03-05 15:48:12 -08:00
Russ Cox
5bf0fbe7a8 strconv: doc
R=r
DELTA=110  (64 added, 19 deleted, 27 changed)
OCL=25761
CL=25782
2009-03-05 15:29:04 -08:00
Russ Cox
8a7eb77880 misc doc
R=r
DELTA=50  (28 added, 0 deleted, 22 changed)
OCL=25763
CL=25770
2009-03-05 13:35:45 -08:00
Rob Pike
5b814d02f2 delete deprecated files.
deletion beats documentation for deprecation.

R=rsc,gri
DELTA=509  (2 added, 490 deleted, 17 changed)
OCL=25737
CL=25768
2009-03-05 13:31:03 -08:00
Russ Cox
dfc3910afa math: doc
R=r
DELTA=173  (74 added, 14 deleted, 85 changed)
OCL=25753
CL=25767
2009-03-05 13:31:01 -08:00
Rob Pike
83de0698d6 document vector
R=rsc
DELTA=36  (30 added, 0 deleted, 6 changed)
OCL=25740
CL=25766
2009-03-05 13:30:39 -08:00
Rob Pike
26cb4df726 log: document
R=rsc
DELTA=26  (17 added, 1 deleted, 8 changed)
OCL=25731
CL=25734
2009-03-04 22:46:44 -08:00
Rob Pike
0ea27e345e flag: document
also write to stderr not stdout

R=rsc
DELTA=48  (38 added, 2 deleted, 8 changed)
OCL=25729
CL=25733
2009-03-04 22:43:51 -08:00