Rob Pike
2156961bb7
fix build. changing var to const, which it should be anyway,
...
implicitly works around 6g bug.
R=rsc
OCL=33953
CL=33953
2009-08-27 09:58:43 -07:00
Rob Pike
94e691552f
unicode tables for all categories
...
maketables now has a --test option to verify the data.
R=rsc
DELTA=3087 (1982 added, 1001 deleted, 104 changed)
OCL=33947
CL=33950
2009-08-27 09:14:32 -07:00
Nigel Tao
5cbc96d958
Introduce the image package.
...
R=rsc
APPROVED=r,rsc
DELTA=244 (244 added, 0 deleted, 0 changed)
OCL=33733
CL=33940
2009-08-26 21:51:03 -07:00
Ken Thompson
2d73b7f7f0
bug slicing array - cap is huge
...
R=rsc
OCL=33936
CL=33936
2009-08-26 19:19:07 -07:00
David Symonds
3cf330f089
template: Support iterables for repeated fields.
...
R=r,rsc
APPROVED=rsc
DELTA=194 (97 added, 32 deleted, 65 changed)
OCL=33861
CL=33933
2009-08-26 18:30:13 -07:00
Rob Pike
24dfb749c4
change IsDecimalDigit to IsDigit because Decimal is redundant
...
R=rsc
DELTA=792 (398 added, 383 deleted, 11 changed)
OCL=33919
CL=33921
2009-08-26 16:53:07 -07:00
Russ Cox
90dcd5face
add io.LimitReader.
...
use it to limit data read from http.Request Body
R=r
DELTA=32 (8 added, 6 deleted, 18 changed)
OCL=33899
CL=33916
2009-08-26 16:23:54 -07:00
Russ Cox
29415d0557
fix bufio bugs involving readers that return os.EOF with
...
the last bit of data.
add a new iotest.DataErrReader for tests
R=r
DELTA=93 (41 added, 31 deleted, 21 changed)
OCL=33897
CL=33915
2009-08-26 16:23:34 -07:00
Russ Cox
26a2642fc3
fix codec test bug - uint -> uint8
...
R=r
OCL=33913
CL=33913
2009-08-26 16:19:59 -07:00
Ian Lance Taylor
06cac23d28
Implement divWW_g in Go.
...
R=gri
DELTA=105 (77 added, 23 deleted, 5 changed)
OCL=33890
CL=33910
2009-08-26 16:14:17 -07:00
Rob Pike
396b47bbbd
generate the unicode tables directly from web database
...
after this CL, two more to come:
1) add an exhaustive test, probably as a variant of maketables
2) add ToUpper, ToLower, ToTitle and associated tests
R=rsc
DELTA=1578 (1007 added, 559 deleted, 12 changed)
OCL=33902
CL=33907
2009-08-26 16:01:31 -07:00
Russ Cox
2aea4a063b
recycle G structs
...
R=r
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=33887
CL=33904
2009-08-26 15:26:09 -07:00
Ian Lance Taylor
8ce468ea2f
Restore comment line accidentally dropped in CL 33097.
...
R=rsc
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=33891
CL=33891
2009-08-26 14:40:34 -07:00
Robert Griesemer
08a209f387
cleanups before making larger changes
...
R=rsc
DELTA=113 (10 added, 30 deleted, 73 changed)
OCL=33877
CL=33882
2009-08-26 12:55:54 -07:00
Russ Cox
de7920e6fd
finish ChanValue: Len and Cap.
...
R=r
DELTA=45 (45 added, 0 deleted, 0 changed)
OCL=33873
CL=33881
2009-08-26 12:42:22 -07:00
Russ Cox
653cef1ba0
add Close() and Closed() to ChanValue
...
R=r
DELTA=60 (56 added, 3 deleted, 1 changed)
OCL=33868
CL=33872
2009-08-26 10:47:18 -07:00
Robert Griesemer
06c2c89452
added Newton-Raphson Division as an additional bignum testcase
...
R=rsc
DELTA=192 (192 added, 0 deleted, 0 changed)
OCL=33853
CL=33864
2009-08-26 09:46:12 -07:00
Rob Pike
87f2208bda
rename runtime internals to have modern names (array->slice etc)
...
R=rsc
DELTA=444 (179 added, 177 deleted, 88 changed)
OCL=33847
CL=33849
2009-08-25 15:54:25 -07:00
Russ Cox
67815ef65b
checkpoint & test (pidigits) before trying to automate.
...
R=r
DELTA=616 (598 added, 11 deleted, 7 changed)
OCL=33846
CL=33848
2009-08-25 15:37:22 -07:00
Russ Cox
75a38963ca
cgocall bug fix.
...
better FFI demo: compute fibonacci numbers using FFI'ed libgmp.
R=r
DELTA=281 (255 added, 19 deleted, 7 changed)
OCL=33815
CL=33820
2009-08-24 21:16:15 -07:00
David Symonds
429157848f
Wrap kludge text in HTML comments so the text/html output will remain valid HTML.
...
Be more conservative: only mess with text/html and text/plain output.
R=rsc
APPROVED=rsc
DELTA=20 (12 added, 5 deleted, 3 changed)
OCL=33806
CL=33812
2009-08-24 17:31:35 -07:00
Russ Cox
fdc4b4a47f
start of FFI support, and a demo.
...
R=r
DELTA=494 (492 added, 0 deleted, 2 changed)
OCL=33784
CL=33810
2009-08-24 17:30:00 -07:00
Russ Cox
165a99038f
ffi -> dynld.
...
move out of export data into its own section
R=r
DELTA=222 (71 added, 99 deleted, 52 changed)
OCL=33801
CL=33808
2009-08-24 17:27:55 -07:00
Russ Cox
d66d65da96
bug132
...
R=ken
OCL=33792
CL=33803
2009-08-24 17:06:10 -07:00
Russ Cox
92543daff1
change reflect test to avoid bug132
...
R=gri
DELTA=20 (17 added, 0 deleted, 3 changed)
OCL=33793
CL=33802
2009-08-24 17:04:12 -07:00
Russ Cox
8c253bcae5
first attempt at real FFI support.
...
in a .6 file, an export line
//ffi T localfib remotefib remote.so
means the dynamic linker should initialize
localfib, always a pointer, to the address of
remotefib, either text (T) or data (D) after
loading remote.so.
the C compiler will generate an export section
when given the pragmas
#pragma package fib
#pragma ffi T localfib remotefib remote.so
needing #pragma package is a bit of a kludge
and hopefully could go away later.
this is just the 6 tool chain support.
other architectures will happen once 6 settles down.
code using this to do FFI is in a later CL.
R=r
DELTA=161 (141 added, 14 deleted, 6 changed)
OCL=33783
CL=33795
2009-08-24 16:15:21 -07:00
Robert Griesemer
c36fbdf713
- fix for multiple fields at same depth error
...
R=rsc
DELTA=9 (5 added, 0 deleted, 4 changed)
OCL=33768
CL=33785
2009-08-24 15:45:51 -07:00
Russ Cox
89f69bb3be
gc: handle iface == nil in back end
...
R=ken
OCL=33778
CL=33781
2009-08-24 15:20:37 -07:00
Kai Backman
c6fd23ce6d
64bit literal RSH
...
R=rsc
APPROVED=rsc
DELTA=85 (35 added, 0 deleted, 50 changed)
OCL=33761
CL=33767
2009-08-24 13:57:04 -07:00
Russ Cox
14be733a25
bug197
...
R=ken
OCL=33765
CL=33765
2009-08-24 13:41:47 -07:00
Russ Cox
9feee91d79
avoid duplicate field names, so that bug132 can be fixed
...
also fix echo bug that just surfaced in mkerrors.sh
R=r
DELTA=67 (11 added, 19 deleted, 37 changed)
OCL=33743
CL=33757
2009-08-24 11:03:23 -07:00
Russ Cox
1f177cd8b2
linker work
...
* use //ffi comments in package import data
to generate relocation entries and library loads.
* call initffi in rt0.s if present
R=r
DELTA=117 (91 added, 3 deleted, 23 changed)
OCL=33739
CL=33750
2009-08-24 10:19:31 -07:00
Russ Cox
ef3e6810b8
bug189
...
R=ken
OCL=33745
CL=33745
2009-08-24 09:23:04 -07:00
Russ Cox
ac9d833c1e
half of bug193
...
R=ken
OCL=33730
CL=33730
2009-08-23 18:09:44 -07:00
Russ Cox
fd6cdbd807
linker work
...
* more elf constants from FreeBSD
* simple relocation demo
R=r
DELTA=410 (354 added, 49 deleted, 7 changed)
OCL=33689
CL=33729
2009-08-23 18:03:14 -07:00
Austin Clements
bd65739bc2
Implement line-to-PC mapping. Add unit tests for
...
PC/line/aline conversion methods.
R=rsc
APPROVED=rsc
DELTA=458 (434 added, 15 deleted, 9 changed)
OCL=33677
CL=33702
2009-08-21 18:13:35 -07:00
Russ Cox
59e2e54eab
fix bug195
...
R=ken
OCL=33700
CL=33700
2009-08-21 18:07:11 -07:00
Russ Cox
e1c5d179d6
fix crash in bug194; add bug196
...
R=ken
OCL=33694
CL=33697
2009-08-21 17:54:07 -07:00
Kai Backman
f50e7b156e
mostly 64 bit support.
...
- fixed a number of places where we tried to allocate 64bit
regs. added honeypot in regalloc to catch these in the future.
- implemented quad copying in sgen
- cgen64.c, add, mul
- clearfat done
- D_REGREG output from 5g (linker already knew about them)
- gmove done
- optoas almost done, last bit probably not needed
- D_SHIFT support in list.c
R=rsc
APPROVED=rsc
DELTA=963 (711 added, 112 deleted, 140 changed)
OCL=33619
CL=33688
2009-08-21 16:29:19 -07:00
Russ Cox
0e25c1dc6d
linker work
...
* remove now-unused D_SBIG (was for typestrings)
* rename elf64.[ch] to elf.[ch]
* pull in elf headers from FreeBSD instead of writing our own
* emit non-header ELF data in data section
* stub out a few more ELF sections needed for dynamic loading
R=r
DELTA=1928 (1237 added, 635 deleted, 56 changed)
OCL=33642
CL=33658
2009-08-21 13:08:11 -07:00
Kai Backman
005509e367
fix 386/arm builds
...
R=rsc
APPROVED=rsc
DELTA=2 (2 added, 0 deleted, 0 changed)
OCL=33640
CL=33645
2009-08-21 10:53:31 -07:00
Russ Cox
7b29dbb866
symbol bugs.
...
do not emit unreachable data symbols.
R=austin
DELTA=103 (71 added, 4 deleted, 28 changed)
OCL=33325
CL=33622
2009-08-20 17:33:28 -07:00
Russ Cox
bd4161fcba
FFI step 2: can ask for libc.so.6.
...
introduced explicit "data" symbol instead of etext
to mark beginning of data, so that using larger
alignment (i.e. 4MB like GNU loader) doesn't
confuse garbage collector.
split dodata into dodata and dobss in preparation
for putting the dynamic data + headers in the data
segment instead of stuffed at the beginning of the binary.
R=r
DELTA=52 (37 added, 3 deleted, 12 changed)
OCL=33610
CL=33618
2009-08-20 16:09:38 -07:00
Russ Cox
5bd266d1ee
add #include for time and ctime
...
R=r
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=33615
CL=33617
2009-08-20 16:06:06 -07:00
Nigel Tao
b58ecb11b0
Fix inflate.go's decompressing of a fixed Huffman block that has
...
length-distance pairs.
The new test data was generated by "gzip shesells.txt", which is
presumably what you (rsc) did before, for the other test cases in
gunzip_test.go.
R=rsc
APPROVED=rsc
DELTA=21 (17 added, 2 deleted, 2 changed)
OCL=33582
CL=33616
2009-08-20 16:03:34 -07:00
Russ Cox
8a45917f3d
len and cap on chans
...
R=ken
OCL=33599
CL=33599
2009-08-20 11:12:04 -07:00
Russ Cox
52cf67a611
naming cleanup.
...
gzip.GzipInflater -> gzip.Inflater
gzip.NewGzipInflater -> gzip.NewInflater
zlib.NewZlibInflater -> zlib.NewInflater
io.ByteReader deleted in favor of bytes.Buffer
io.NewByteReader -> bytes.NewBuffer
R=r
DELTA=52 (3 added, 0 deleted, 49 changed)
OCL=33589
CL=33592
2009-08-20 10:18:48 -07:00
Russ Cox
364301efc6
exclude _test from godoc as well as _obj.
...
R=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=33586
CL=33590
2009-08-20 09:49:05 -07:00
Kai Backman
8811896597
more work on adding in pieces. fixed my bad assumptions about
...
signed and unsigned integer conversions.
R=rsc
APPROVED=rsc
DELTA=398 (40 added, 230 deleted, 128 changed)
OCL=33546
CL=33569
2009-08-19 20:17:09 -07:00
Kai Backman
40b0786374
change from using /tmp to local directory
...
R=rsc
APPROVED=rsc
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=33534
CL=33567
2009-08-19 19:19:57 -07:00
Russ Cox
5600435fe4
produce diagnostic for
...
import "fmt"
var fmt = 1
R=ken
OCL=33556
CL=33561
2009-08-19 17:27:08 -07:00
Russ Cox
38df5ec58d
try to do better line number reporting
...
in the presence of yacc lookahead.
better but still not perfect
R=ken
OCL=33541
CL=33541
2009-08-19 15:18:08 -07:00
Kai Backman
8e96b45fd6
genembedtramp for arm
...
R=rsc
APPROVED=rsc
DELTA=104 (0 added, 33 deleted, 71 changed)
OCL=33531
CL=33535
2009-08-19 13:57:11 -07:00
Russ Cox
63aeaa2a03
fix import dot bug
...
R=ken
OCL=33526
CL=33528
2009-08-19 11:32:46 -07:00
Kai Backman
0f17fc0e50
temporarily fix linux-arm by building less
...
R=rsc
APPROVED=rsc
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=33518
CL=33527
2009-08-19 11:31:27 -07:00
Rob Pike
4481df645b
fix spelling that is correct but bothers me anyway
...
R=rsc
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=33496
CL=33519
2009-08-19 10:07:31 -07:00
Kai Backman
382a19c3de
pkg/sort compiling and some progress on syscall. mostly
...
re-enabling and massaging code.
R=rsc
APPROVED=rsc
DELTA=2496 (1880 added, 330 deleted, 286 changed)
OCL=33487
CL=33504
2009-08-18 19:20:33 -07:00
David Symonds
6c7e90e7ec
container/list: Add InsertBefore and InsertAfter methods.
...
R=rsc
APPROVED=rsc
DELTA=84 (68 added, 4 deleted, 12 changed)
OCL=33493
CL=33499
2009-08-18 17:49:44 -07:00
Austin Clements
b3062f176d
Add a standard Seeker interface.
...
R=rsc
APPROVED=rsc
DELTA=35 (30 added, 4 deleted, 1 changed)
OCL=33491
CL=33498
2009-08-18 17:47:03 -07:00
Robert Griesemer
116b52d276
- fix performance bug (makeN always allocated a new vector)
...
- removed defs.go (moved declarations into arith.go where they belong)
R=r
DELTA=40 (16 added, 20 deleted, 4 changed)
OCL=33464
CL=33464
2009-08-18 11:48:47 -07:00
Robert Griesemer
ac5093fc22
fix 386 build:
...
- implememted empty stubs for 386 assembly routines
- removed assembly code operating on single words (except for one)
- adjusted tests
R=rsc
DELTA=126 (46 added, 67 deleted, 13 changed)
OCL=33461
CL=33461
2009-08-18 10:41:26 -07:00
Robert Griesemer
88742ef0cc
- implemented Multiplication
...
- changed Cmp to return -1, 0, +1
- added corresponding test cases
R=rsc
DELTA=173 (136 added, 3 deleted, 34 changed)
OCL=33431
CL=33459
2009-08-18 10:06:15 -07:00
Kai Backman
5748c0868c
simple arm continuous build target. will expand with time.
...
R=rsc
APPROVED=rsc
DELTA=61 (61 added, 0 deleted, 0 changed)
OCL=33438
CL=33454
2009-08-18 07:17:34 -07:00
Kai Backman
7a87a3e0df
slashed warnings
...
R=rsc
APPROVED=rsc
DELTA=35 (2 added, 1 deleted, 32 changed)
OCL=33436
CL=33453
2009-08-18 07:16:10 -07:00
Kai Backman
e7acb5df07
fix runtime and compile regression
...
R=rsc
APPROVED=rsc
DELTA=6 (0 added, 0 deleted, 6 changed)
OCL=33434
CL=33452
2009-08-18 07:14:25 -07:00
Bill Neubauer
7f09b0177f
Removing dead tests from chan.c
...
Since pres != nil was already checked and the routine sets *pres to false
and returns, the subsequent tests are unneeded.
R=rsc
APPROVED=rsc
DELTA=4 (0 added, 4 deleted, 0 changed)
OCL=33439
CL=33441
2009-08-17 22:21:48 -07:00
Nigel Tao
0d8ed14528
ZLIB reader for go.
...
R=rsc
APPROVED=rsc
DELTA=204 (204 added, 0 deleted, 0 changed)
OCL=33437
CL=33440
2009-08-17 22:03:13 -07:00
Rob Pike
4d08d91192
fix build (Makefile comment convention)
...
R=rsc
OCL=33418
CL=33418
2009-08-17 15:38:24 -07:00
Robert Griesemer
b2eae40103
- updated Makefile, Make.deps
...
R=rsc,r
DELTA=5 (3 added, 0 deleted, 2 changed)
OCL=33413
CL=33417
2009-08-17 15:20:51 -07:00
Rob Pike
e1325d916e
inline lib9.h
...
R=rsc
DELTA=41 (20 added, 2 deleted, 19 changed)
OCL=33412
CL=33415
2009-08-17 15:14:59 -07:00
Rob Pike
173ca5e7d3
delete old, c-output compiler. won't be open-sourced anyway
...
R=rsc
OCL=33407
CL=33409
2009-08-17 14:45:19 -07:00
Robert Griesemer
350a8e1a86
- rename files to match the data types they implement, adusted Makefile
...
- no other changes
R=r
DELTA=1248 (623 added, 623 deleted, 2 changed)
OCL=33371
CL=33371
2009-08-17 10:01:26 -07:00
Robert Griesemer
e5874223ef
snapshot:
...
- renamed Z -> Int
- made Int ops methods on *Int
- "install" assembly routines dynamically
- replace mulVW functions with mulAddVWW
of equivalent performance but symmetric functionality
to divWVW
- implemented scanN
status:
- need mulNN (trivial)
- need division/modulo after which the set of
elementary operations is complete
- to/from string conversion working
R=rsc
DELTA=320 (124 added, 50 deleted, 146 changed)
OCL=33308
CL=33341
2009-08-15 11:43:54 -07:00
Russ Cox
b21425ddee
runtime gc bug.
...
semacquire might move to another m.
R=r
DELTA=5 (2 added, 2 deleted, 1 changed)
OCL=33317
CL=33326
2009-08-14 20:33:20 -07:00
Rob Pike
b0a0e3c439
remove compat stuff
...
R=rsc
DELTA=70 (16 added, 52 deleted, 2 changed)
OCL=33295
CL=33299
2009-08-14 14:55:22 -07:00
Austin Clements
dc6b4f4767
Zero thread structure so we don't continue with a bogus
...
signal.
R=rsc
APPROVED=rsc
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=33249
CL=33296
2009-08-14 14:47:44 -07:00
Austin Clements
92e8b121a0
Fix build
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=33294
CL=33294
2009-08-14 14:41:50 -07:00
Austin Clements
84852fe220
Make the runtime correctly decode the symbol table history
...
stacks produced by whole-package compilation.
Fix some off-by-ones in PC/line table parsing. Hopefully.
R=rsc
APPROVED=rsc
DELTA=42 (24 added, 6 deleted, 12 changed)
OCL=33250
CL=33293
2009-08-14 14:36:49 -07:00
Russ Cox
ce9b379c90
no debug symbols for internal-only method types.
...
now 15% overhead instead of 30% in binaries.
R=ken
OCL=33235
CL=33288
2009-08-14 13:07:53 -07:00
Robert Griesemer
db3bf9c674
First cut at a more realistic multi-precision package:
...
- implemented low-level operations on word vectors
- implemented corresponding amd64 assembly routines for word vector operations
- implemented first set of operations on unsigned integers
- implemented first set of operations on signed integers
- implemented systematic test cases for each data type
R=rsc
DELTA=1330 (1330 added, 0 deleted, 0 changed)
OCL=33132
CL=33285
2009-08-14 11:53:27 -07:00
Austin Clements
63810f840f
Account for CALL instructions before looking up the function
...
at PC, to deal with functions that end with a CALL
instruction. Special case known call-by-return functions.
R=rsc
APPROVED=rsc
DELTA=12 (6 added, 6 deleted, 0 changed)
OCL=33255
CL=33279
2009-08-14 11:09:53 -07:00
Rob Pike
00274a13cb
rename libmach_amd64 libmach
...
R=rsc
OCL=33273
CL=33276
2009-08-14 10:46:04 -07:00
Robert Griesemer
ce1dd6cce3
- do not accept forward-declarations for structs and interfaces anymore
...
R=r
DELTA=49 (0 added, 14 deleted, 35 changed)
OCL=33272
CL=33272
2009-08-14 09:39:14 -07:00
Rob Pike
137c2204db
add exits
...
R=rsc
DELTA=2339 (19 added, 2303 deleted, 17 changed)
OCL=33239
CL=33253
2009-08-13 18:22:44 -07:00
Austin Clements
dbecfbf86d
Don't try to account for CALL instruction in 0th frame.
...
R=rsc
APPROVED=rsc
DELTA=9 (4 added, 3 deleted, 2 changed)
OCL=33238
CL=33251
2009-08-13 18:10:38 -07:00
Russ Cox
45ce825544
debugging symbols for 8g.
...
backtraces don't work,
but they didn't work when i started either.
R=ken
OCL=33230
CL=33230
2009-08-13 15:45:58 -07:00
Kai Backman
8149a8c666
fix typo
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=33209
CL=33227
2009-08-13 15:14:41 -07:00
Russ Cox
311c0b4807
6g/6l: add go type information to symbol table.
...
archive size +70%
binary size +30%
old
wreck.mtv=; ls -l /Users/rsc/bin/{godoc,gofmt}
-rwxr-xr-x 1 rsc eng 1487922 Aug 13 13:21 /Users/rsc/bin/godoc
-rwxr-xr-x 1 rsc eng 995995 Aug 13 13:21 /Users/rsc/bin/gofmt
wreck.mtv=; du -sh $GOROOT/pkg/
9.5M /home/rsc/go/pkg/
wreck.mtv=;
new
wreck.mtv=; ls -l /Users/rsc/bin/{godoc,gofmt}
-rwxr-xr-x 1 rsc eng 2014390 Aug 13 14:25 /Users/rsc/bin/godoc
-rwxr-xr-x 1 rsc eng 1268705 Aug 13 14:25 /Users/rsc/bin/gofmt
wreck.mtv=; du -sh $GOROOT/pkg
16M /home/rsc/go/pkg
wreck.mtv=;
R=ken
OCL=33217
CL=33220
2009-08-13 14:41:42 -07:00
Russ Cox
090efde407
makefile fixes; convert runtime to use new makefiles
...
R=r
DELTA=67 (17 added, 29 deleted, 21 changed)
OCL=33215
CL=33219
2009-08-13 14:41:10 -07:00
Rob Pike
f8295fcd0d
rename mkasmh to mkasmh.sh
...
R=rsc
DELTA=204 (153 added, 49 deleted, 2 changed)
OCL=33213
CL=33213
2009-08-13 14:23:35 -07:00
Rob Pike
fd774f1a33
fix test
...
R=gri
DELTA=4 (0 added, 4 deleted, 0 changed)
OCL=33202
CL=33204
2009-08-13 13:33:11 -07:00
Rob Pike
cd32498ba5
change the names to have .sh suffixes.
...
also fix the comments in the generated files.
R=rsc
DELTA=949 (470 added, 465 deleted, 14 changed)
OCL=33197
CL=33201
2009-08-13 13:22:37 -07:00
Rob Pike
02cb81ad31
tests, .proto, .cgo
...
R=rsc
DELTA=38 (21 added, 3 deleted, 14 changed)
OCL=33193
CL=33200
2009-08-13 13:06:48 -07:00
Rob Pike
7b366e9c43
fix build
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=33174
CL=33174
2009-08-13 09:35:42 -07:00
Russ Cox
43f29e64a6
mechanism for putting go types into 6.out symbol table.
...
no types yet.
R=ken
OCL=33142
CL=33146
2009-08-12 18:16:24 -07:00
Russ Cox
f63b0d6b71
silence gcc warning
...
R=ken
OCL=33144
CL=33144
2009-08-12 18:14:07 -07:00
Russ Cox
d594639087
rm outfile if 6g exits with an error
...
R=ken
OCL=33134
CL=33141
2009-08-12 17:58:53 -07:00
Russ Cox
57a9bd0ee3
change gotype in symbol table from
...
character string to machine address.
not filled in, just carved out.
R=austin
DELTA=77 (11 added, 34 deleted, 32 changed)
OCL=33122
CL=33124
2009-08-12 16:14:53 -07:00
Russ Cox
3e98a40793
bug188 - sort(x)
...
R=ken
OCL=33123
CL=33123
2009-08-12 15:58:31 -07:00
Russ Cox
7dbb687048
rm gobuild
...
R=r
DELTA=827 (0 added, 826 deleted, 1 changed)
OCL=33117
CL=33120
2009-08-12 15:17:47 -07:00
Russ Cox
a92610208e
delete code for forward type declarations
...
R=ken
OCL=33108
CL=33113
2009-08-12 14:41:13 -07:00
Russ Cox
8db677b0a7
delete heuristic left over from incremental compilation
...
R=r
DELTA=31 (2 added, 28 deleted, 1 changed)
OCL=33064
CL=33112
2009-08-12 14:41:02 -07:00
Russ Cox
b5c57fea96
delete forward type declarations
...
R=r
DELTA=163 (1 added, 149 deleted, 13 changed)
OCL=33106
CL=33111
2009-08-12 14:40:47 -07:00
Russ Cox
ff5618e2e3
avoid unnecessary installs
...
R=r
DELTA=6 (4 added, 0 deleted, 2 changed)
OCL=33107
CL=33110
2009-08-12 14:40:29 -07:00
Rob Pike
96a2a2effd
fix linux build for whole package compilation
...
R=rsc
OCL=33103
CL=33103
2009-08-12 13:51:02 -07:00
Russ Cox
a5bf45e389
convert gob to whole-package compilation.
...
had to reorder some init code.
R=r
DELTA=136 (15 added, 110 deleted, 11 changed)
OCL=33071
CL=33102
2009-08-12 13:19:27 -07:00
Russ Cox
b04ac108fd
convert non-low-level non-google pkg code
...
to whole-package compilation.
R=r
OCL=33070
CL=33101
2009-08-12 13:19:17 -07:00
Russ Cox
eda49f331f
new included Make.pkg for handwritten package makefiles.
...
gobuild is obsolete; don't build it (will delete eventually).
revised gotest for whole-package compilation.
R=r
DELTA=102 (68 added, 6 deleted, 28 changed)
OCL=33067
CL=33098
2009-08-12 13:18:46 -07:00
Russ Cox
3b864e4195
convert low-level (used by testing) packages to
...
whole-package compilation. new Makefiles,
tests now in separate package
bytes
flag
fmt
io
math
once
os
reflect
strconv
sync
time
utf8
delete import "xxx" in package xxx.
inside package xxx, xxx is not declared
anymore so s/xxx.//g
delete file and package level forward declarations.
note the new internal_test.go and sync
and strconv to provide public access to
internals during testing. the installed version
of the package omits that file and thus does
not open the internals to all clients.
R=r
OCL=33065
CL=33097
2009-08-12 13:18:37 -07:00
Russ Cox
dd5f32330c
6g: save all 64 bits of AX/DX
...
8g: save AX/DX around div
R=ken
OCL=33094
CL=33096
2009-08-12 13:18:27 -07:00
Russ Cox
66bb399fdd
whole-package compilation
...
R=ken
OCL=33063
CL=33095
2009-08-12 13:18:19 -07:00
Russ Cox
866b272336
bug186 - f(iota)
...
R=ken
OCL=33051
CL=33051
2009-08-11 17:05:22 -07:00
Rob Pike
68e250516c
make a simpler regexp implementation with fewer dependencies and put it inside testing.
...
remove "regexp." from regexp tests.
R=rsc
DELTA=1173 (1152 added, 1 deleted, 20 changed)
OCL=33028
CL=33037
2009-08-11 13:54:47 -07:00
Rob Pike
d08f0067b5
commentary about extern register
...
R=rsc
DELTA=16 (12 added, 0 deleted, 4 changed)
OCL=33030
CL=33035
2009-08-11 13:30:35 -07:00
Robert Griesemer
fed0435257
renamed fast.arith.s to include $GOARCH
...
R=rsc
DELTA=80 (40 added, 40 deleted, 0 changed)
OCL=33024
CL=33027
2009-08-11 11:23:05 -07:00
Russ Cox
0496040bd6
remove unnecessary pkg. references
...
R=r
DELTA=95 (0 added, 0 deleted, 95 changed)
OCL=33012
CL=33012
2009-08-10 22:02:51 -07:00
Russ Cox
7732f79daa
fix indirect error
...
x.go:3: invalid indirect of X (type int)
was
x.go:3: invalid indirect of nil
R=ken
OCL=33008
CL=33008
2009-08-10 18:19:32 -07:00
Robert Griesemer
8db8682453
- factored out 128-bit muladd and div into arith.go
...
- wrote corresponding fast versions in fast.arith.s
- implemented in-place operations for some routines
- updated existing code to be compatible with in-place
routines
These changes allow the pidigits benchmark to run
approx. 30% faster. Enabling the assembly routines
in fast.arith.s will give another approx. 3%.
R=r
DELTA=486 (252 added, 68 deleted, 166 changed)
OCL=32980
CL=33003
2009-08-10 17:29:55 -07:00
Russ Cox
3f91f80a21
8-bit div and mod
...
R=ken
OCL=32975
CL=32975
2009-08-10 12:46:23 -07:00
Ken Thompson
f70e285178
bug in int8 mod
...
R=rsc
OCL=32971
CL=32971
2009-08-10 11:20:33 -07:00
Stephen Ma
e4603db393
Add methods AllMatches, AllMatchesString, AllMatchesIter,
...
AllMatchesStringIter, based on sawn and sawzall functions in sawzall.
APPROVED=rsc
DELTA=218 (218 added, 0 deleted, 0 changed)
OCL=32408
CL=32949
2009-08-09 19:30:47 -07:00
Ken Thompson
60238e25bf
increase from 3 to 11 floating registers
...
R=rsc
OCL=32947
CL=32947
2009-08-09 16:42:21 -07:00
Ken Thompson
34f76b5de5
1. integer division by a constant done.
...
2. moved functions from 6g to gc
for portability to other families.
3. added rotate-carry instructions to
peek and reg.
R=rsc
OCL=32946
CL=32946
2009-08-09 15:16:06 -07:00
David Symonds
ffed3ade19
Regenerate v7.tar with a real V7 tar.
...
Fix octal parsing that it unearthed.
R=rsc
APPROVED=rsc
DELTA=11 (5 added, 0 deleted, 6 changed)
OCL=32924
CL=32945
2009-08-09 15:03:30 -07:00
Rob Pike
266a2c47e0
run benchmarks in a relatively fast test mode, as part of run.bash/all.bash
...
R=rsc
DELTA=293 (224 added, 0 deleted, 69 changed)
OCL=32917
CL=32944
2009-08-09 14:31:05 -07:00
Ken Thompson
812f06b3ca
another plateau - almost done
...
only need to fix up certain
denominators
R=rsc
OCL=32928
CL=32928
2009-08-08 16:53:21 -07:00
Ken Thompson
07044ba6e5
plateau in divide by a constant
...
still to do - overflow, mod
R=rsc
OCL=32927
CL=32927
2009-08-08 15:26:09 -07:00
Ken Thompson
8b8a2bd945
more work on divide by constant.
...
no real change -- disabled because of bugs
R=rsc
OCL=32923
CL=32923
2009-08-07 20:21:04 -07:00
Russ Cox
6be0f50b97
bug159
...
R=ken
OCL=32902
CL=32914
2009-08-07 16:47:54 -07:00
Russ Cox
002623704f
remove 8.out before creating it.
...
hope this will work around Mac NFS bug
where writing to an 8.out that has crashed
recently sometimes wedges NFS.
R=r
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=32906
CL=32908
2009-08-07 15:22:09 -07:00
Russ Cox
39b12e2dcb
bug185 - return b,a from func() (a,b int)
...
R=ken
OCL=32900
CL=32900
2009-08-07 14:38:31 -07:00
Russ Cox
d1ee5d6e8f
bug184 - assignment compatibility in unpacked multireturn
...
R=ken
OCL=32890
CL=32894
2009-08-07 14:00:18 -07:00
Russ Cox
aa7bd48389
bug183 - embedded vs non-embedded struct field in eqtype
...
R=ken
OCL=32888
CL=32888
2009-08-07 13:23:09 -07:00
Russ Cox
468f244416
bug182 - compiler crash
...
R=ken
OCL=32887
CL=32887
2009-08-07 13:17:28 -07:00
Russ Cox
6c2738eb43
bug181 - type T *struct { T } is an invalid embedded type
...
R=ken
OCL=32886
CL=32886
2009-08-07 13:14:01 -07:00
Russ Cox
99eca57d43
clean up a few error messages;
...
disable func redeclaration mismatch test;
fix golden.out
R=ken
OCL=32883
CL=32883
2009-08-07 13:00:20 -07:00
Russ Cox
76a763e0be
8 shift bug
...
R=ken
OCL=32882
CL=32882
2009-08-07 12:57:44 -07:00
Russ Cox
b648716ee9
forward declarations not necessary.
...
still to do:
* initializer cycle detection
* nicer error for type checking cycles
R=ken
OCL=32855
CL=32880
2009-08-07 12:50:26 -07:00
Ken Thompson
f1baf78247
divide by a constant power of 2
...
R=rsc
OCL=32858
CL=32858
2009-08-06 22:33:12 -07:00
Robert Griesemer
081bc69cde
- initial version of pidigits.go benchmark
...
- extra bignum.go functionality for pidigits.go
- tuned bignum multiplication
R=r
DELTA=193 (186 added, 0 deleted, 7 changed)
OCL=32852
CL=32856
2009-08-06 18:16:51 -07:00
Robert Griesemer
2b87d95f01
- allow more general type switch syntax
...
- support for reverse printing of AST
(for compiler testing)
- added -reverse flag to gofmt
R=rsc
DELTA=163 (125 added, 11 deleted, 27 changed)
OCL=32808
CL=32853
2009-08-06 17:44:56 -07:00
Rob Pike
7955490de2
add runtime.GOMAXPROCS, allowing a program to, in effect, set $GOMAXPROCS
...
R=rsc
DELTA=29 (28 added, 1 deleted, 0 changed)
OCL=32829
CL=32837
2009-08-06 13:07:05 -07:00
Robert Griesemer
5876cb0e63
- bufio.ReadRune fix for empty reads w/o errors
...
- added testcases
R=rsc
DELTA=61 (56 added, 2 deleted, 3 changed)
OCL=32831
CL=32834
2009-08-06 12:05:16 -07:00
Robert Griesemer
2117ad192d
minor fix
...
R=rsc
DELTA=2 (1 added, 1 deleted, 0 changed)
OCL=32828
CL=32830
2009-08-06 10:53:29 -07:00
Robert Griesemer
a288095813
- FieldByName lookup through anonymous fields
...
- FieldByIndex
- changed StructField.Index type from int -> []int
- adjustments to reflect clients
R=rsc,r
DELTA=336 (263 added, 47 deleted, 26 changed)
OCL=32731
CL=32802
2009-08-05 15:56:44 -07:00
Rob Pike
3355cadf3f
support []byte (more efficient) as well as string in the interfaces.
...
change the names; Match is for []byte and MatchString is for string, etc.
R=rsc
DELTA=195 (155 added, 0 deleted, 40 changed)
OCL=32800
CL=32800
2009-08-05 15:44:45 -07:00
Rob Pike
5a4d431dd1
special case: recognize '[^\n]' and make it as fast as '.'
...
R=rsc
DELTA=25 (23 added, 1 deleted, 1 changed)
OCL=32793
CL=32799
2009-08-05 14:40:34 -07:00
Austin Clements
3776f31144
Make os.RemoveAll return no error if path does not exist.
...
This fixes a problem introduced by CL 32684 into gobuild,
which used to use 'rm -rf' to remove the _obj directory.
R=rsc
APPROVED=rsc
DELTA=8 (4 added, 0 deleted, 4 changed)
OCL=32794
CL=32796
2009-08-05 14:18:54 -07:00
Russ Cox
2609731736
delay range processing. old2new is gone
...
R=ken
OCL=32780
CL=32780
2009-08-05 02:33:30 -07:00
Russ Cox
54b403723b
delay := processing
...
R=ken
OCL=32772
CL=32772
2009-08-05 00:42:44 -07:00
Russ Cox
ebdbbe0f49
fix amd64 build
...
R=ken
OCL=32771
CL=32771
2009-08-05 00:11:24 -07:00
Russ Cox
a121410541
make Syms smaller.
...
collapse a lot of duplication in dcl.c
switch to NodeList* from Dcl*
R=ken
OCL=32770
CL=32770
2009-08-04 22:59:23 -07:00
Russ Cox
4dec8ef35a
get function calls out of the way before
...
allocating registers in shift and div.
fix behavior when res == a reserved register.
R=ken
OCL=32765
CL=32767
2009-08-04 19:16:57 -07:00
Russ Cox
aa347c4a0d
move various bits of code around
...
and delete some dead code.
no actual changes here.
R=ken
OCL=32764
CL=32764
2009-08-04 18:43:32 -07:00
Russ Cox
d169dcee3b
fix division bug
...
R=ken
OCL=32760
CL=32760
2009-08-04 17:59:10 -07:00
Russ Cox
dbe004efe4
delayed evaluation of var blocks
...
R=ken
OCL=32750
CL=32753
2009-08-04 16:53:06 -07:00
Rob Pike
b8732215c3
fix build
...
R=gri,rsc
OCL=32748
CL=32748
2009-08-04 15:35:58 -07:00
Russ Cox
7144e2d7f5
trailing newlines
...
R=r
DELTA=0 (0 added, 0 deleted, 0 changed)
OCL=32730
CL=32735
2009-08-04 14:22:23 -07:00
Russ Cox
f7a867e1a6
move select into its own file.
...
split into typecheck + walk
R=ken
OCL=32726
CL=32726
2009-08-04 12:57:48 -07:00
Russ Cox
d8c19c80dc
type checking of assignments, switch, if, for
...
R=ken
OCL=32716
CL=32720
2009-08-04 10:26:29 -07:00
Rob Pike
7deeb5bd78
print profile to stderr. sheesh.
...
R=rsc
DELTA=40 (0 added, 0 deleted, 40 changed)
OCL=32694
CL=32698
2009-08-03 21:03:40 -07:00
Rob Pike
2495c14d5c
WriteString
...
R=rsc
DELTA=41 (41 added, 0 deleted, 0 changed)
OCL=32692
CL=32697
2009-08-03 18:28:05 -07:00
Rob Pike
f17c6bcafb
this time really clean up a TODO
...
R=rsc
DELTA=28 (0 added, 20 deleted, 8 changed)
OCL=32676
CL=32684
2009-08-03 15:27:15 -07:00
Rob Pike
cb9c973829
don't crash printing a nil map
...
R=rsc
DELTA=19 (18 added, 0 deleted, 1 changed)
OCL=32656
CL=32670
2009-08-03 13:34:20 -07:00
Russ Cox
9dc22b6d6f
more 6g reorg; checkpoint.
...
typecheck.c is now responsible for all type checking
except for assignment and function argument "..."
R=ken
OCL=32661
CL=32667
2009-08-03 11:58:52 -07:00
Robert Griesemer
178089056e
printer.go:
...
- emit line tag id's in html mode
- support for general html tags
- better names for a few identifiers
godoc.go:
- emit links from exported names to source code
(actual placement needs fine-tuning)
R=rsc
DELTA=108 (68 added, 4 deleted, 36 changed)
OCL=32639
CL=32654
2009-08-03 09:53:00 -07:00
Robert Griesemer
22ec539920
fix long-standing bug in doc reader:
...
- replace forward-declared types with complete
declaration when it is found
R=rsc
DELTA=23 (15 added, 0 deleted, 8 changed)
OCL=32618
CL=32618
2009-07-31 18:40:11 -07:00
Robert Griesemer
62718fb5d4
printer:
...
- prepare for generation of HTML id tags and links
- do HTML-escaping in central print routine
- move tabwriter setup into printer
- fixed various TODOs
godoc:
- removed tabwriter setup, need for various HTML-escaping
R=rsc
DELTA=210 (107 added, 36 deleted, 67 changed)
OCL=32612
CL=32616
2009-07-31 18:04:53 -07:00
Rob Pike
9f2f8eadb6
add test of invariant in findVar
...
R=rsc
DELTA=23 (23 added, 0 deleted, 0 changed)
OCL=32592
CL=32595
2009-07-31 12:52:03 -07:00
Rob Pike
783986c64b
delete unused arg to empty.
...
add commentary about findVar's invariant.
R=rsc
DELTA=6 (3 added, 0 deleted, 3 changed)
OCL=32583
CL=32594
2009-07-31 12:42:29 -07:00
Rob Pike
318b67cb73
make %v and %p consistent
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=32591
CL=32593
2009-07-31 12:42:21 -07:00
Russ Cox
9953c48dc4
missed in last checkin
...
R=ken
OCL=32581
CL=32581
2009-07-31 09:45:39 -07:00
Russ Cox
a2b8e38766
checkpoint; still plenty to clean up
...
R=ken
OCL=32576
CL=32580
2009-07-31 09:29:28 -07:00
Robert Griesemer
9299ae461d
- don't call String method of AST nodes when converting them to text
...
- make token.Position.String more robust
TBR=rsc
DELTA=20 (10 added, 6 deleted, 4 changed)
OCL=32564
CL=32564
2009-07-30 19:39:47 -07:00
Robert Griesemer
c670dc450b
bug fix
...
R=rsc
OCL=32563
CL=32563
2009-07-30 19:29:31 -07:00
Russ Cox
b754b4348f
delete some code from walkexpr that is now
...
handled by typecheck.
second switch is gone
move floating point minus into back end
R=ken
OCL=32558
CL=32558
2009-07-30 18:56:44 -07:00
Rob Pike
d9c914e985
dotted names
...
R=rsc
DELTA=28 (19 added, 0 deleted, 9 changed)
OCL=32550
CL=32554
2009-07-30 18:17:07 -07:00
Robert Griesemer
90e6656c51
go/ast/filter.go:
...
- more orthogonal functionality of filter functions for better re-use
go/doc/doc.go:
- simplified interface
- collect filenames of packages so that they can be shown
godoc:
- removed TODO, show list of package (linked) files used to create documentation
R=rsc
DELTA=130 (68 added, 24 deleted, 38 changed)
OCL=32549
CL=32552
2009-07-30 18:13:55 -07:00
Austin Clements
9717a794f4
String method for token.Position. Extracted from gri's tree.
...
R=gri
APPROVED=gri
DELTA=33 (20 added, 6 deleted, 7 changed)
OCL=32544
CL=32546
2009-07-30 16:58:19 -07:00
Rob Pike
07a497fee0
fix a long-standing typo
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=32540
CL=32545
2009-07-30 16:57:46 -07:00
Russ Cox
ff3a73b407
typechecking checkpoint.
...
started to move typechecking to another file.
can build entire tree still, but lots of work
is duplicated. much to clean up.
R=ken
OCL=32536
CL=32543
2009-07-30 16:53:08 -07:00
Russ Cox
6ccebe082f
use full path on command line when compiling,
...
so that gdb shows full path in stack traces.
R=r
DELTA=4 (4 added, 0 deleted, 0 changed)
OCL=32522
CL=32528
2009-07-30 12:54:38 -07:00
Russ Cox
517e3457cc
fix build on amd64
...
R=ken
OCL=32521
CL=32521
2009-07-30 11:03:58 -07:00
Rob Pike
98607d01fc
handle unsupported types safely.
...
R=rsc
DELTA=154 (71 added, 6 deleted, 77 changed)
OCL=32483
CL=32492
2009-07-29 17:24:25 -07:00
Robert Griesemer
312bd7a1fc
parser:
...
- Changed filter function for parser.ParsePackage to
take an *os.Dir instead of a filename for more
powerful filters
- Removed TODO in ast.PackageInterface: Now collect
package comments from all package files
- Cleanups in godoc: Use the new ParsePackage and
PackageInterface functions; as a result computing
package information is much simpler now.
R=rsc
DELTA=285 (80 added, 110 deleted, 95 changed)
OCL=32473
CL=32486
2009-07-29 17:01:09 -07:00
Robert Griesemer
f9057c7b59
break tabwriter columns when starting a new block of indented statements
...
R=r
DELTA=16 (15 added, 0 deleted, 1 changed)
OCL=32475
CL=32481
2009-07-29 16:23:17 -07:00
Rob Pike
43c7fc04b8
fix typo
...
R=rsc
OCL=32472
CL=32472
2009-07-29 15:33:12 -07:00
Rob Pike
1fc0960fb4
clean up EOF
...
R=rsc
DELTA=5 (0 added, 1 deleted, 4 changed)
OCL=32465
CL=32467
2009-07-29 15:24:42 -07:00
Rob Pike
1f6e18fdce
handle some error conditions involving bad data.
...
R=rsc
DELTA=32 (24 added, 1 deleted, 7 changed)
OCL=32461
CL=32463
2009-07-29 15:10:29 -07:00
Russ Cox
2946069e3f
break and continue fixes
...
labeled break/continue was using
first loop with any label,
not first loop with the right label.
R=ken
OCL=32453
CL=32458
2009-07-29 14:49:01 -07:00
Rob Pike
75e0569b99
statistics HTML page for rpc
...
R=rsc
DELTA=121 (115 added, 0 deleted, 6 changed)
OCL=32427
CL=32429
2009-07-29 13:26:49 -07:00
Russ Cox
9271c6402e
introduce typecheck pass before walkexpr.
...
not complete but compiler still works.
R=ken
OCL=32424
CL=32426
2009-07-29 12:47:51 -07:00
Russ Cox
056940d84b
convert walkexpr to take Node**; drop indir
...
R=ken
OCL=32421
CL=32421
2009-07-29 12:00:34 -07:00
Russ Cox
4152b925f9
expression printer; %#N
...
R=ken
OCL=32419
CL=32419
2009-07-29 11:51:34 -07:00
Russ Cox
6b8ba5d8fc
quietgcc: do not use -m64 on 32-bit machines
...
R=r
DELTA=9 (8 added, 0 deleted, 1 changed)
OCL=32413
CL=32418
2009-07-29 11:47:11 -07:00
Russ Cox
9346c6d901
make every func literal expression allocate,
...
so that == on func means that the
functions originated in the same
execution of a func literal or definition.
before, there was an inconsistency:
func() {x++} != func() {x++}
but
func() {} == func() {}
this CL makes the second case != too,
just like
make(map[int]int) != make(map[int]int)
R=r
DELTA=202 (71 added, 62 deleted, 69 changed)
OCL=32393
CL=32398
2009-07-28 20:01:00 -07:00
David Symonds
83940d7c4a
Add a unique list ID to list elements, and verify it as necessary.
...
This makes the list closed under its provided operations.
R=rsc,gri
APPROVED=rsc
DELTA=18 (14 added, 0 deleted, 4 changed)
OCL=32388
CL=32395
2009-07-28 18:19:16 -07:00
Robert Griesemer
40a66ef59e
missed changes to Makefiles for container/ring
...
R=rsc
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=32389
CL=32392
2009-07-28 17:52:30 -07:00
Rob Pike
b85147cd70
change the encoding of uints to simplify overflow checking and to make them
...
easier and faster to read. they are now either a one-byte value or a n-byte value
preceded by a byte holding -n.
R=rsc
DELTA=150 (45 added, 7 deleted, 98 changed)
OCL=32381
CL=32387
2009-07-28 17:20:19 -07:00
Russ Cox
189153ed13
fix error that gcc thinks is a warning
...
R=ken
OCL=32264
CL=32386
2009-07-28 17:02:05 -07:00
Russ Cox
123ff2ebb8
bug177: anonymous struct fields in reflect
...
(reported by iant)
R=r
DELTA=50 (32 added, 12 deleted, 6 changed)
OCL=32263
CL=32385
2009-07-28 17:01:46 -07:00
Robert Griesemer
2210a643b7
Intersperse comments nicely when printing an AST.
...
gofmt formatted source code looks pretty good already;
with a bit more fine-tuning it should be great.
printer.go:
- Implemented comment intersperse algorithm.
The approach is a result of many trial-and-error
experiments but at this point reasonably simple
and open to arbitrary fine-tuning.
parser.go:
- Simplified handling of lead and line comments
(formerly called leading and trailing comments).
- Use a comments list instead of an array (I may
change this back - this is not obviously better
and uses more space).
doc.go:
- Remove comments from AST nodes that have been
'consumed' in the documentation to avoid duplicate
printing of them. Allows for better control of
what is printed w/o use of printing control flags
(which are hard to use and not fine-grained enough).
Corresponding adjustments to various clients of these
files.
R=rsc
DELTA=478 (275 added, 108 deleted, 95 changed)
OCL=32185
CL=32380
2009-07-28 16:38:59 -07:00
Robert Griesemer
d27bae5033
Fixed typos in comments.
...
TBR=rsc
OCL=32330
CL=32330
2009-07-28 15:03:05 -07:00
Robert Griesemer
6d3d25de21
Ring ADT.
...
- Provides analogous functionality to a doubly-linked list
implementation.
- Completely symmetric set of operations.
- Operations on the ADT do not lead to results that are
outside the domain of the ADT (closed interface).
- Alternative to container/list.
R=rsc
DELTA=489 (489 added, 0 deleted, 0 changed)
OCL=32284
CL=32323
2009-07-28 14:54:49 -07:00
Russ Cox
e50d3ba7e4
floating-point limits and equations
...
R=r
DELTA=13 (8 added, 2 deleted, 3 changed)
OCL=32291
CL=32322
2009-07-28 14:50:50 -07:00
Russ Cox
92c3627950
fmt boundary bugs.
...
pow10 was giving up too easily.
R=r
DELTA=4 (0 added, 3 deleted, 1 changed)
OCL=32310
CL=32321
2009-07-28 14:50:17 -07:00
Rob Pike
483e4fc409
- clean up code creating keys for type maps
...
- derive int, uint, float, uintptr decoders based on their size
- add overflow checks in decode
R=rsc
DELTA=407 (281 added, 44 deleted, 82 changed)
OCL=32286
CL=32290
2009-07-28 12:59:39 -07:00
Rob Pike
08b5b4843b
constants for integer limits
...
R=rsc
DELTA=16 (16 added, 0 deleted, 0 changed)
OCL=32288
CL=32288
2009-07-28 12:57:33 -07:00
Rob Pike
326de9ca97
constants for floating point limits
...
R=rsc
DELTA=5 (5 added, 0 deleted, 0 changed)
OCL=32283
CL=32287
2009-07-28 11:53:16 -07:00
Phil Pennock
d6f89c69c4
Support use of $GOBINDIR to override $HOME/bin
...
R=r,gri,rsc
APPROVED=rsc
DELTA=53 (12 added, 6 deleted, 35 changed)
OCL=31822
CL=32282
2009-07-28 11:23:24 -07:00
Russ Cox
18840f5429
constant keys for array initializers
...
R=ken
OCL=32261
CL=32261
2009-07-27 17:58:25 -07:00
Rob Pike
5b1d52e81d
document rpc.
...
R=rsc
DELTA=160 (124 added, 0 deleted, 36 changed)
OCL=32233
CL=32256
2009-07-27 17:25:41 -07:00
Russ Cox
b7dd312c93
bug170; fix test for bug175
...
R=ken
OCL=32255
CL=32255
2009-07-27 17:24:07 -07:00
Russ Cox
a587d9a73f
multiple return in := bug
...
R=ken
OCL=32253
CL=32253
2009-07-27 16:59:10 -07:00
Russ Cox
059bbdd340
print(1<<x)
...
R=ken
OCL=32252
CL=32252
2009-07-27 16:17:09 -07:00
Russ Cox
30228a3bc6
avoid register computing len(x), cap(x)
...
for slice or string x.
R=ken
OCL=32249
CL=32249
2009-07-27 15:55:27 -07:00
Russ Cox
811e59f2fa
named string type bugs
...
R=ken
OCL=32244
CL=32244
2009-07-27 15:16:28 -07:00
Russ Cox
03b25a92a3
catch
...
a := true;
a |= a;
in the front end.
R=ken
OCL=32240
CL=32243
2009-07-27 14:55:14 -07:00
Russ Cox
0b2683d1ee
do not insert implicit "return;" in empty function body
...
R=ken
OCL=32239
CL=32239
2009-07-27 14:36:32 -07:00
Ivan Krasin
b388d84013
Fixed a small bug with compress/flate/Inflater. It incorrectly checked
...
the size of chunk with uncompressed data (00 is terms of DEFLATE).
APPROVED=rsc
DELTA=15 (14 added, 0 deleted, 1 changed)
OCL=32105
CL=32238
2009-07-27 14:33:21 -07:00
Russ Cox
7729c3f955
fix gc bug causing make smoketest to die in cmd/gofmt.
...
saving of sp was too far away from use in scanstack;
the stack had changed since the sp was saved.
R=r
DELTA=9 (4 added, 2 deleted, 3 changed)
OCL=32232
CL=32237
2009-07-27 14:16:28 -07:00
Russ Cox
ca01716934
fix build - broke with uint32 -> int change in reflect SliceHeader
...
TBR=r
OCL=32225
CL=32225
2009-07-27 11:23:49 -07:00
Rob Pike
5aa174557a
clean up for public use: make some stuff private, add doc comments.
...
R=rsc
DELTA=298 (202 added, 0 deleted, 96 changed)
OCL=32006
CL=32224
2009-07-27 11:02:06 -07:00
Russ Cox
3ff5e727e2
fix bug in CL 30057: missed if+continue in one place.
...
R=gri
DELTA=2 (2 added, 0 deleted, 0 changed)
OCL=32214
CL=32223
2009-07-27 10:59:59 -07:00
Russ Cox
22ea3f9e49
fix SliceHeader: len and cap are int, not uint32
...
R=r,iant
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=32215
CL=32222
2009-07-27 10:59:37 -07:00
David Symonds
a225706e5f
container/list: Add Len() method to List.
...
R=r
APPROVED=gri
DELTA=23 (23 added, 0 deleted, 0 changed)
OCL=32106
CL=32189
2009-07-25 17:18:05 -07:00
Ian Lance Taylor
b64b75daa7
If we can't parse the package, call Fatalf so that the test
...
fails without crashing.
R=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=32164
CL=32171
2009-07-24 13:07:12 -07:00
Russ Cox
052a66babd
runtime: fix init scheduling bug.
...
if there is a goroutine waiting to run
and the init goroutine enters a system call,
entersyscall was trying to kick off a new
scheduler for the other goroutine, causing
a panic (new goroutines can't run until main.main).
R=r
DELTA=32 (32 added, 0 deleted, 0 changed)
OCL=31982
CL=31982
2009-07-21 19:43:27 -07:00
Russ Cox
335b3855c6
a little more 6l cleanup
...
R=r
DELTA=51 (14 added, 24 deleted, 13 changed)
OCL=31968
CL=31971
2009-07-21 17:18:32 -07:00
Russ Cox
5a74c0b6ba
do not use ONONAMEs for line number information,
...
just like ONAME etc.
R=ken
OCL=31964
CL=31964
2009-07-21 16:38:56 -07:00
Rob Pike
304b7954e8
add a .interp section and fix vaddr in INTERP prog.
...
R=rsc
DELTA=16 (9 added, 3 deleted, 4 changed)
OCL=31956
CL=31963
2009-07-21 16:31:35 -07:00
Rob Pike
3d42e691b9
make 6l produce dynamically linked binaries (although they are fully statically linked as far
...
as go is concerned). the -d flag is now flipped; as on the mac, -d disables dynamic.
much remains to be improved to move the output closer to the gcc format.
R=rsc
DELTA=366 (310 added, 30 deleted, 26 changed)
OCL=31929
CL=31951
2009-07-21 15:10:47 -07:00
Robert Griesemer
ff790f4704
adjust comment for better godoc output
...
R=rsc
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=31944
CL=31950
2009-07-21 15:09:59 -07:00
Robert Griesemer
e62dd7bce9
- split bignum package into 3 files
...
- use array for common small values
- integer.go, rational.go don't contain changes besides the added file header
R=rsc
DELTA=1475 (748 added, 713 deleted, 14 changed)
OCL=31939
CL=31942
2009-07-21 14:28:59 -07:00
Ian Lance Taylor
f0c00f7eee
Don't cast nil to a fixed array type.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31916
CL=31937
2009-07-21 14:06:14 -07:00
Robert Griesemer
2b1ec70d0f
implemented outstanding bit ops on negative integerts
...
R=rsc
DELTA=195 (146 added, 1 deleted, 48 changed)
OCL=31895
CL=31931
2009-07-21 13:35:51 -07:00
Ian Lance Taylor
39808db15a
Make struct field names unique.
...
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=31900
CL=31900
2009-07-20 23:26:03 -07:00
Russ Cox
1d51978fed
fix cut-and-paste bugs in error messages
...
R=ken
OCL=31890
CL=31890
2009-07-20 17:41:18 -07:00
Austin Clements
fb65906367
Fix typo. MUL_ASSIGN is "*=", not "+=".
...
R=gri
APPROVED=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31879
CL=31886
2009-07-20 16:14:48 -07:00
Russ Cox
6e1ad041f7
avoid strncat in formatters.
...
the n argument to strncat is the maximum
number of bytes to read from the src,
not the total size of the destination.
R=ken
OCL=31871
CL=31875
2009-07-20 14:16:25 -07:00
Russ Cox
3913550110
fix memset in fmtnull.
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31863
CL=31870
2009-07-20 13:37:35 -07:00
Robert Griesemer
9e2fa390da
- bignum.AndNot
...
- corresponding test cases
- some cleanups
R=rsc
DELTA=173 (68 added, 3 deleted, 102 changed)
OCL=31866
CL=31869
2009-07-20 13:37:28 -07:00
Russ Cox
f664d0e904
explain selectsend problem
...
R=ken
OCL=31865
CL=31867
2009-07-20 13:29:56 -07:00
Rob Pike
f687fb7e73
6l cleanup: last set of magic numbers for elf64 moved to ld/elf64*.
...
R=rsc
DELTA=68 (21 added, 28 deleted, 19 changed)
OCL=31857
CL=31864
2009-07-20 13:19:47 -07:00
Rob Pike
fe734d8630
clean up generation of exec header.
...
make endianness explicit when writing values.
R=rsc
DELTA=129 (37 added, 7 deleted, 85 changed)
OCL=31826
CL=31854
2009-07-20 10:08:48 -07:00
Rob Pike
94d89ede1c
take care of a few more magic numbers
...
R=rsc
DELTA=51 (41 added, 0 deleted, 10 changed)
OCL=31815
CL=31818
2009-07-17 17:32:34 -07:00
Rob Pike
b63d40a53e
count SHdrs and PHdrs and write them out as a unit
...
R=rsc
DELTA=181 (93 added, 63 deleted, 25 changed)
OCL=31802
CL=31812
2009-07-17 16:34:58 -07:00
Robert Griesemer
821897bc96
- better documentation
...
- code cleanup
R=rsc,austin
DELTA=28 (12 added, 2 deleted, 14 changed)
OCL=31808
CL=31810
2009-07-17 16:22:55 -07:00
Austin Clements
25b4be5a55
Support exponential notation in RatFromString.
...
R=gri
APPROVED=gri
DELTA=30 (25 added, 0 deleted, 5 changed)
OCL=31796
CL=31799
2009-07-17 15:09:43 -07:00
Rob Pike
e86dcf1603
more elf64 support: phdrs, constants
...
R=rsc
DELTA=130 (68 added, 6 deleted, 56 changed)
OCL=31798
CL=31798
2009-07-17 15:09:17 -07:00
Austin Clements
f95a42e6ba
Produce friendlier errors messages for malformed character
...
literals and when the parser hits an unexpected EOF. Also,
disallow newlines in character literals.
R=gri
APPROVED=gri
DELTA=23 (15 added, 1 deleted, 7 changed)
OCL=31790
CL=31797
2009-07-17 14:58:02 -07:00
Russ Cox
35e5906f91
another baby step.
...
excluding import data,
no yacc node has type Type* anymore.
0 reduce/reduce conflicts.
R=ken
OCL=31793
CL=31795
2009-07-17 14:42:14 -07:00
Rob Pike
1593b1fc23
First steps towards cleaner support for ELF64 in 6l.
...
R=rsc
DELTA=337 (165 added, 119 deleted, 53 changed)
OCL=31786
CL=31794
2009-07-17 14:32:37 -07:00
Rob Pike
ba0cf083a2
change reflect.Type.Name() into two functions: Name() and PkgPath() for ease of use.
...
R=rsc
DELTA=31 (8 added, 2 deleted, 21 changed)
OCL=31778
CL=31792
2009-07-17 14:20:33 -07:00
Russ Cox
db508ccbff
baby step: const decls can refer to future
...
consts in the same factored block
const (
X = Y;
Y = 2;
)
R=ken
OCL=31782
CL=31782
2009-07-17 13:38:16 -07:00
Rob Pike
cb0a02f028
ignore missing structs
...
R=rsc
DELTA=113 (74 added, 14 deleted, 25 changed)
OCL=31776
CL=31776
2009-07-17 11:38:31 -07:00
Russ Cox
e52e9ca82e
another step toward eliminating forward declarations.
...
introduce NodeList* type in compiler to replace OLIST.
this clarifies where lists can and cannot occur.
list append and concatenation are now cheap.
the _r rules are gone from yacc.
rev and unrev are gone.
no more lists of lists.
the representation of assignments is a bit clunkier.
split into OAS (1=1) and OAS2 (2 or more on one side).
delete dead chanrecv3 code.
delay construction of func types.
R=ken
OCL=31745
CL=31762
2009-07-17 01:00:44 -07:00
Rob Pike
9b475bd2a4
fix up prints in flag.go
...
R=rsc
DELTA=11 (0 added, 0 deleted, 11 changed)
OCL=31760
CL=31760
2009-07-16 23:14:33 -07:00
Rob Pike
be2cf952a8
clean up the code, flow errors out to decoder.
...
R=rsc
DELTA=99 (32 added, 22 deleted, 45 changed)
OCL=31759
CL=31759
2009-07-16 23:01:10 -07:00
Rob Pike
1737157189
use FieldByName where possible.
...
R=rsc
DELTA=20 (0 added, 12 deleted, 8 changed)
OCL=31758
CL=31758
2009-07-16 21:24:30 -07:00
Rob Pike
a93c5c8550
add FieldByName to the interface of reflect.StructType
...
R=rsc
DELTA=34 (33 added, 0 deleted, 1 changed)
OCL=31752
CL=31754
2009-07-16 18:21:14 -07:00
Rob Pike
1399badb02
- allow wire type and receive type to differ.
...
- still TODO: ignoring struct fields.
R=rsc
DELTA=309 (240 added, 2 deleted, 67 changed)
OCL=31750
CL=31750
2009-07-16 17:55:16 -07:00
Robert Griesemer
f3ffd93a61
ast:
...
- renamed Program -> SourceFile
- added Package node representing the AST for an entire package
- added filter function to create a source file mimicking the
interface of an entire package
parser:
- parser entry to parse entire packages
- unified naming of parser entry points
- factored out entry points into new file (interface.go)
gofmt:
- extended to accept single .go files, and package paths:
gofmt file.go // formatting of a single file
gofmt -x file.go // interface of a single file
gofmt -x ./MyPackage // interface of a local package
gofmt -x math // interface of a $GOROOT relative package
Various adjustments in dependent files, documentation.
R=rsc
DELTA=634 (369 added, 153 deleted, 112 changed)
OCL=31743
CL=31748
2009-07-16 17:11:18 -07:00
Rob Pike
b75df2f695
fix some bad testing prints
...
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=31740
CL=31742
2009-07-16 15:01:21 -07:00
Rob Pike
04ae91cf71
clean up the decode loop and fix a couple of bad prints
...
R=rsc
DELTA=15 (8 added, 2 deleted, 5 changed)
OCL=31738
CL=31738
2009-07-16 13:05:46 -07:00
David Symonds
13960ae8ae
exvar: new Timer var type.
...
R=rsc
APPROVED=r
DELTA=146 (142 added, 0 deleted, 4 changed)
OCL=31654
CL=31716
2009-07-15 23:24:27 -07:00
Rob Pike
a9be3f46c6
add rpc to the build
...
R=rsc
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=31693
CL=31714
2009-07-15 21:28:45 -07:00
Rob Pike
7d94cfdfb9
/usr/local/bin might not exist so use /usr/bin in the chdir test.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31708
CL=31713
2009-07-15 21:28:08 -07:00
Rob Pike
3fc7cfd55f
improve server handling of errors now that Decoder grabs full message.
...
R=rsc
DELTA=23 (4 added, 7 deleted, 12 changed)
OCL=31701
CL=31703
2009-07-15 16:11:14 -07:00
Rob Pike
e76a335ada
make the low-level encoder and decoder private and have them access byte.Buffers rather
...
than io.Readers and io.Writers.
change the Encoder/Decoder protocol so that each message is preceded by its length in bytes.
R=rsc
DELTA=468 (119 added, 23 deleted, 326 changed)
OCL=31700
CL=31702
2009-07-15 16:10:17 -07:00
Rob Pike
dc8c447689
post-submit tweaks to previous cl
...
R=rsc
DELTA=5 (4 added, 1 deleted, 0 changed)
OCL=31690
CL=31692
2009-07-15 12:38:50 -07:00
Rob Pike
8071cdf724
handle errors better:
...
1) terminate outstanding calls on the client when we see EOF from server
2) allow data to drain on server before closing the connection
R=rsc
DELTA=41 (23 added, 4 deleted, 14 changed)
OCL=31687
CL=31689
2009-07-15 11:47:29 -07:00
Russ Cox
aa1e8064b2
change HTTP access for RPC.
...
1. use CONNECT instead of GET.
CONNECT has exactly the meaning
we want; most of the time people
connect to ip:port; we're connecting
to /_goRPC_
2. wait for a successful HTTP response
before assuming we are connected to
the RPC protocol. this allows better
error reporting and also keeps the
protocol alternating between speakers,
so that the buffering in the HTTP request
reader cannot accidentally eat some
RPC bytes too.
gotest sometimes hangs, but not in HTTP.
gotest -match=Unknown hangs every few runs
even in a clean client.
R=r
DELTA=117 (57 added, 44 deleted, 16 changed)
OCL=31656
CL=31685
2009-07-15 10:49:47 -07:00
Robert Griesemer
3d486d0d26
- do not collect BUG comments w/o bug description
...
R=rsc
DELTA=17 (8 added, 0 deleted, 9 changed)
OCL=31670
CL=31674
2009-07-15 10:12:57 -07:00
Austin Clements
8d8245623f
Add a dummy WaitStatus.TrapCause for Darwin to unbreak the build.
...
R=gri
APPROVED=gri
DELTA=5 (5 added, 0 deleted, 0 changed)
OCL=31673
CL=31673
2009-07-15 10:12:06 -07:00
Austin Clements
d0e29f2852
Pretty printer for os.Waitmsg
...
R=rsc
APPROVED=rsc
DELTA=49 (49 added, 0 deleted, 0 changed)
OCL=31568
CL=31671
2009-07-15 09:58:42 -07:00
Rob Pike
964b6cf352
add HTTP support
...
R=rsc
DELTA=159 (110 added, 29 deleted, 20 changed)
OCL=31646
CL=31652
2009-07-14 20:47:39 -07:00
Austin Clements
b6e6663946
Return ptrace event message when there's no error instead of
...
only when there's an error.
R=rsc
APPROVED=rsc
DELTA=3 (0 added, 2 deleted, 1 changed)
OCL=31650
CL=31650
2009-07-14 18:05:29 -07:00
Rob Pike
ba9d697336
allow user to override the Usage function
...
R=gri
DELTA=15 (6 added, 5 deleted, 4 changed)
OCL=31649
CL=31649
2009-07-14 17:44:20 -07:00
Robert Griesemer
eb815c0fa2
fixed typo
...
TBR=r
OCL=31647
CL=31647
2009-07-14 17:08:09 -07:00
Robert Griesemer
4fb8f44ea7
- interface and comments cleanup
...
R=rsc
DELTA=33 (1 added, 3 deleted, 29 changed)
OCL=31620
CL=31642
2009-07-14 16:30:20 -07:00
Robert Griesemer
59ee0373fc
- removed TODO, minor adjustments
...
R=rsc
DELTA=16 (6 added, 1 deleted, 9 changed)
OCL=31638
CL=31641
2009-07-14 16:30:06 -07:00
Russ Cox
f752e909dc
darwin ptrace constants
...
R=austin
DELTA=42 (37 added, 5 deleted, 0 changed)
OCL=31618
CL=31633
2009-07-14 15:29:29 -07:00
Austin Clements
14bb806cb4
Support ptracing of fork'd children.
...
R=rsc
APPROVED=rsc
DELTA=26 (22 added, 1 deleted, 3 changed)
OCL=31613
CL=31629
2009-07-14 15:09:39 -07:00
Austin Clements
40f406afc4
Zero unused syscall arguments.
...
R=rsc
APPROVED=rsc
DELTA=12 (12 added, 0 deleted, 0 changed)
OCL=31619
CL=31621
2009-07-14 13:59:54 -07:00
Rob Pike
b07af158a4
improve rpc code. more robust. more tests.
...
R=rsc
DELTA=186 (133 added, 20 deleted, 33 changed)
OCL=31611
CL=31616
2009-07-14 13:23:14 -07:00
Austin Clements
bc2fda9c89
Regenerate Linux 386 syscall bindings to add ptrace.
...
R=rsc
APPROVED=rsc
DELTA=82 (80 added, 2 deleted, 0 changed)
OCL=31610
CL=31612
2009-07-14 11:59:19 -07:00
Austin Clements
9df528740a
Syscall wrappers for ptrace and supporting wait-related flags.
...
R=rsc
APPROVED=rsc
DELTA=311 (308 added, 3 deleted, 0 changed)
OCL=31569
CL=31606
2009-07-14 10:53:04 -07:00
Robert Griesemer
e48d8fe091
update remaining files to match new scanner/parser interface
...
and use shared error handling infrastructure
R=rsc
DELTA=109 (3 added, 86 deleted, 20 changed)
OCL=31600
CL=31605
2009-07-14 10:46:18 -07:00
Robert Griesemer
5945b25158
- adjust to new token.Position definition
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31574
CL=31604
2009-07-14 10:45:57 -07:00
Robert Griesemer
2d58fa6f18
- use new scanner error handling code
...
R=rsc
DELTA=109 (0 added, 87 deleted, 22 changed)
OCL=31573
CL=31603
2009-07-14 10:45:43 -07:00
Robert Griesemer
a010d45caa
- adjust to new scanner interface (pass filename to Init)
...
- delete error handling code which is not needed anymore
R=rsc
DELTA=83 (0 added, 65 deleted, 18 changed)
OCL=31572
CL=31602
2009-07-14 10:45:22 -07:00
Robert Griesemer
14228f3898
- added Filename field to token.Position
...
- handle //line filename:line comments in scanner
- moved error handling code used by various scanner clients
to errors.go
- added extra tests
R=rsc
DELTA=385 (343 added, 18 deleted, 24 changed)
OCL=31551
CL=31601
2009-07-14 10:44:57 -07:00
Russ Cox
10e995fba8
dead code
...
R=r
DELTA=20 (0 added, 20 deleted, 0 changed)
OCL=31584
CL=31598
2009-07-14 09:28:42 -07:00
Russ Cox
be16caf872
step toward no function prototypes.
...
delay evaluation of most types (all but func)
from parse time to type check time.
R=ken
OCL=31585
CL=31585
2009-07-13 23:38:39 -07:00
Russ Cox
a6799963ef
update 6g to new REGARG convention.
...
silence gcc warning.
R=ken
OCL=31583
CL=31583
2009-07-13 23:30:30 -07:00
Russ Cox
e11447f7da
bug148.
...
R=ken
OCL=31582
CL=31582
2009-07-13 23:29:44 -07:00
Kai Backman
60d223a418
added missing pieces required by reflection
...
R=rsc
APPROVED=rsc
DELTA=61 (40 added, 18 deleted, 3 changed)
OCL=31502
CL=31580
2009-07-13 22:06:28 -07:00
Kai Backman
0e2cce70cb
tiny naming cleanup
...
R=rsc
APPROVED=rsc
DELTA=17 (0 added, 0 deleted, 17 changed)
OCL=31503
CL=31579
2009-07-13 22:04:24 -07:00
Kai Backman
7258bac6e8
fix bug in codegen when we modified move instruction instead
...
of text.
R=rsc
APPROVED=rsc
DELTA=3 (1 added, 2 deleted, 0 changed)
OCL=31575
CL=31575
2009-07-13 20:33:59 -07:00
Austin Clements
ffb4b0d7b7
Avoid clash between os.WRUSAGE and Linux's WALL flag.
...
R=rsc
APPROVED=rsc
DELTA=5 (4 added, 0 deleted, 1 changed)
OCL=31564
CL=31567
2009-07-13 19:28:00 -07:00
Russ Cox
9e2f2fcd2e
compilers were inconsistent about
...
whether no register argument was
REGARG == 0 or REGARG < 0.
use REGARG < 0 because arm needs 0 for R0.
R=ken
OCL=31562
CL=31566
2009-07-13 19:20:43 -07:00
Austin Clements
da1da8d07e
Add accessor for SIGTRAP cause in wait status
...
R=rsc
APPROVED=rsc
DELTA=7 (7 added, 0 deleted, 0 changed)
OCL=31563
CL=31565
2009-07-13 19:20:38 -07:00
Russ Cox
218c393029
add LockOSThread and UnlockOSThread to
...
runtime package for use by debugger,
which needs to make sure that all ptrace calls
about a given pid come from the same thread.
R=r
DELTA=175 (90 added, 63 deleted, 22 changed)
OCL=31546
CL=31558
2009-07-13 17:28:39 -07:00
Rob Pike
9126b75e35
rpc.
...
client library.
muxes on both ends.
R=rsc
DELTA=178 (132 added, 26 deleted, 20 changed)
OCL=31541
CL=31556
2009-07-13 16:52:57 -07:00
Russ Cox
29e93590b0
fix undefined function error.
...
before:
mainstart: undefined: main·init in mainstart
mainstart: branch out of range in mainstart
(95) CALL ,0(PC) [main·init]
mainstart: undefined: main·main in mainstart
mainstart: branch out of range in mainstart
(97) CALL ,0(PC) [main·main]
mainstart: doasm: notfound from=6f to=6f (95) CALL ,
mainstart: doasm: notfound from=6f to=6f (97) CALL ,
mainstart: doasm: notfound from=6f to=6f (95) CALL ,
mainstart: doasm: notfound from=6f to=6f (97) CALL ,
mainstart: doasm: notfound from=6f to=6f (95) CALL ,
mainstart: doasm: notfound from=6f to=6f (97) CALL ,
after:
mainstart: undefined: main·init in mainstart
mainstart: undefined: main·main in mainstart
R=r
DELTA=7 (1 added, 0 deleted, 6 changed)
OCL=31555
CL=31555
2009-07-13 16:48:09 -07:00
Russ Cox
8afc6008a8
add note about once and closures
...
R=r
DELTA=13 (13 added, 0 deleted, 0 changed)
OCL=31535
CL=31549
2009-07-13 15:54:41 -07:00
Robert Griesemer
32cd887574
- handle type forward declarations correctly
...
R=r
DELTA=8 (6 added, 0 deleted, 2 changed)
OCL=31537
CL=31537
2009-07-13 13:55:39 -07:00
Rob Pike
efb918b7db
the beginnings of an rpc service.
...
server side only; no client help yet (but it's easy).
no http yet.
service is synchronous.
all this will improve.
R=rsc
DELTA=403 (403 added, 0 deleted, 0 changed)
OCL=31522
CL=31536
2009-07-13 12:58:14 -07:00
Rob Pike
b2a66adc59
the name of the type was being sent twice. drop the outer instance.
...
R=rsc
DELTA=10 (5 added, 1 deleted, 4 changed)
OCL=31523
CL=31526
2009-07-13 11:41:02 -07:00
Robert Griesemer
7b7b83ba1b
ebnflint command
...
- basic verification of EBNF grammars
- tested with (and has testcase for) go_spec.html
R=rsc
DELTA=150 (148 added, 0 deleted, 2 changed)
OCL=31481
CL=31517
2009-07-13 10:26:58 -07:00
Robert Griesemer
ef4347f19e
Basic EBNF package:
...
- parsing of EBNF grammars
- basic consistency checks
R=rsc
DELTA=695 (695 added, 0 deleted, 0 changed)
OCL=31479
CL=31516
2009-07-13 10:10:56 -07:00
Kai Backman
092d6290d0
fixed typo where output arguments where pushed on to R0
...
instead of SP.
R=rsc
APPROVED=rsc
DELTA=13 (3 added, 7 deleted, 3 changed)
OCL=31488
CL=31501
2009-07-12 22:12:33 -07:00
Kai Backman
7842b03f70
Fixed minor typo in asm file.
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31487
CL=31500
2009-07-12 22:12:19 -07:00
Rob Pike
62011cfcdf
first cut at gob decoder.
...
R=rsc
DELTA=184 (181 added, 1 deleted, 2 changed)
OCL=31474
CL=31486
2009-07-11 15:45:54 -07:00
Russ Cox
92e925778e
reflection for interface set
...
rename map access methods to Elem, SetElem.
R=r
DELTA=95 (66 added, 7 deleted, 22 changed)
OCL=31456
CL=31469
2009-07-10 16:32:26 -07:00
Russ Cox
0dadc4fe4f
cleanup in preparation for new scoping.
...
walkstate -> walkstmt
walktype -> walkexpr; stmts moved to walkstmt
walktype and friends have a final Node **init
argument that can have side effects appended,
making it more explicit when they do and do not happen.
this replaces the old global addtop and addtotop.
delete switch map and interface conversion cases
(dropped from the language months ago).
R=ken
OCL=31465
CL=31468
2009-07-10 16:29:26 -07:00
Ken Thompson
ed124a971e
segfault
...
R=rsc
OCL=31467
CL=31467
2009-07-10 16:12:21 -07:00
Rob Pike
8a9e395f5f
one more piece of testing: 2nd send should not send type info.
...
R=rsc
DELTA=25 (25 added, 0 deleted, 0 changed)
OCL=31460
CL=31460
2009-07-10 13:50:44 -07:00
Rob Pike
f0a9840d04
a better encoder test, with a couple of fixes for bugs it uncovered.
...
R=rsc
DELTA=84 (65 added, 9 deleted, 10 changed)
OCL=31458
CL=31458
2009-07-10 13:44:37 -07:00
Rob Pike
1880b90aff
DeepEqual for maps
...
R=rsc
DELTA=47 (30 added, 16 deleted, 1 changed)
OCL=31455
CL=31455
2009-07-10 11:20:10 -07:00
Robert Griesemer
981f4b43ac
mention file name only once in error message
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31450
CL=31452
2009-07-10 10:01:08 -07:00
Robert Griesemer
a47404bc1c
fix error messages
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=31449
CL=31451
2009-07-10 10:00:25 -07:00
Rob Pike
3928a4e11b
printing maps
...
R=rsc
DELTA=57 (39 added, 3 deleted, 15 changed)
OCL=31424
CL=31430
2009-07-09 17:30:07 -07:00
Russ Cox
12ebbe7463
reflection for methods
...
R=r
DELTA=156 (135 added, 8 deleted, 13 changed)
OCL=31407
CL=31428
2009-07-09 17:27:49 -07:00
Robert Griesemer
f7b92bb45d
fix to scanner_test after change to //-style comment token
...
R=rsc
OCL=31421
CL=31421
2009-07-09 16:54:08 -07:00
Robert Griesemer
38e7fddc21
Show BUG comments in godoc:
...
ast.go:
- rename Comments -> CommentGroup (less confusion)
- change all comments/docs to be *CommentGroup
filter.go:
- do not remove unassociated comments from program as part
of export filtering (they are needed by doc.go for BUG comments)
scanner.go:
- exclude '\n' from //-style comments
parser.go:
- rewrote collection of comments: now all collected comments
are *ast.CommentGroups
- clarified distinction between leading and trailing comments
- fixed a bug in comment collection (parseGenDecl);
corresponding test case is in printer/testdata
- extra documentation
doc.go:
- collect BUG comments
- corresponding fix for parser bug in comment collection
comment.go:
- simplified regex
printer.go:
- adjust comment printing to new representation
printer_test.go, testdata/*:
- enable printing of doc comments
- extended tests
package.html, package.txt:
- added Bugs section
gofmt:
- enable printing of doc comments
R=rsc
DELTA=339 (126 added, 38 deleted, 175 changed)
OCL=31403
CL=31416
2009-07-09 16:38:17 -07:00
Rob Pike
ec23467e65
store ids rather than Types in the structs so they can be encoded.
...
change Type to gobType.
fix some bugs around recursive structures.
lots of cleanup.
add the first cut at a type encoder.
R=rsc
DELTA=400 (287 added, 11 deleted, 102 changed)
OCL=31401
CL=31406
2009-07-09 14:33:43 -07:00
Russ Cox
7472f4c951
bug168 (dsymonds) + fix
...
R=ken
OCL=31399
CL=31399
2009-07-09 12:08:50 -07:00
Ken Thompson
5ff7d84892
segment fault
...
R=rsc
OCL=31396
CL=31396
2009-07-09 11:41:06 -07:00
David Symonds
600d7828a7
archive/tar cleanups:
...
- rename untar{,_test}.go to reader{,_test}.go.
- fix up some comments.
- improve test output if it fails.
R=rsc
APPROVED=rsc
DELTA=821 (400 added, 392 deleted, 29 changed)
OCL=31376
CL=31378
2009-07-08 18:31:14 -07:00
Russ Cox
bba278a43b
reflection for functions
...
add channel send type check (thanks austin).
fix type mismatch message.
R=r
DELTA=241 (225 added, 5 deleted, 11 changed)
OCL=31370
CL=31375
2009-07-08 18:16:09 -07:00
Ken Thompson
a68b1da3cc
another nil reference
...
R=rsc
OCL=31373
CL=31373
2009-07-08 17:58:15 -07:00
David Symonds
d6d0a39050
Basic POSIX-compatible tar writer.
...
R=rsc
APPROVED=rsc
DELTA=456 (382 added, 66 deleted, 8 changed)
OCL=31246
CL=31372
2009-07-08 17:15:18 -07:00
Russ Cox
903d28bd1e
ANY is already checked separately,
...
so remove code from go.y.
show original types in badtype; don't remove pointers.
not sure why this was here but it confuses things
if the bad part involves two named pointer types
with different names but the same pointed-at type.
R=ken
OCL=31369
CL=31369
2009-07-08 16:39:19 -07:00
Russ Cox
5ddaf9a098
reflection for channels
...
R=r
DELTA=188 (171 added, 6 deleted, 11 changed)
OCL=31352
CL=31361
2009-07-08 15:00:54 -07:00
Robert Griesemer
2ad7958b7e
- update functionality for printer test
...
- moved test files from data to testdata
- use tabs instead of spaces for layout
R=rsc
DELTA=129 (67 added, 60 deleted, 2 changed)
OCL=31353
CL=31360
2009-07-08 14:57:51 -07:00
Robert Griesemer
e7af3b8e05
comment change
...
R=r
OCL=31359
CL=31359
2009-07-08 14:56:20 -07:00
Robert Griesemer
ff9e657fb3
WriteFile util function
...
R=rsc
DELTA=41 (41 added, 0 deleted, 0 changed)
OCL=31349
CL=31358
2009-07-08 14:48:09 -07:00
Russ Cox
764b6ec1aa
reflection for maps
...
R=r
DELTA=304 (248 added, 34 deleted, 22 changed)
OCL=31345
CL=31347
2009-07-08 13:55:57 -07:00
Rob Pike
0ae7882b5c
bug fix: encOpFor etc. need to indirect
...
R=rsc
DELTA=28 (7 added, 7 deleted, 14 changed)
OCL=31312
CL=31322
2009-07-07 21:05:24 -07:00
Robert Griesemer
d7f1f53e86
printer_test: first cut
...
R=rsc
DELTA=169 (168 added, 0 deleted, 1 changed)
OCL=31319
CL=31321
2009-07-07 18:09:26 -07:00
Russ Cox
7c534e1bd2
the ld-supplied typestrings are now obsolete
...
R=r
DELTA=167 (0 added, 167 deleted, 0 changed)
OCL=31304
CL=31316
2009-07-07 17:35:45 -07:00
Robert Griesemer
9809d73868
- print comments associated with declarations
...
- fix a bug w/ optional semicolons
R=rsc
DELTA=46 (24 added, 0 deleted, 22 changed)
OCL=31306
CL=31311
2009-07-07 16:07:34 -07:00
Russ Cox
42af80348c
method expansion bugs
...
R=ken
OCL=31310
CL=31310
2009-07-07 16:05:55 -07:00
Austin Clements
17bc836127
Add entry points for parsing statements and expressions.
...
R=gri
APPROVED=gri
DELTA=73 (48 added, 0 deleted, 25 changed)
OCL=31302
CL=31308
2009-07-07 15:47:01 -07:00
Ian Lance Taylor
668fa7f677
Update the unsafe docs for the new type implementation.
...
Please correct as needed.
R=rsc,r
DELTA=10 (4 added, 1 deleted, 5 changed)
OCL=31305
CL=31305
2009-07-07 15:06:29 -07:00
Ian Lance Taylor
dbc6d91d70
typestring.c is no longer needed.
...
R=rsc
DELTA=35 (0 added, 34 deleted, 1 changed)
OCL=31301
CL=31303
2009-07-07 14:50:39 -07:00
Robert Griesemer
61824ff3a4
- ast.FilterExports: filter non-exported anonymous fields
...
- fixed typo in parser.go
- removed test w/ syntax errors from gofmt test script
R=rsc
DELTA=25 (21 added, 0 deleted, 4 changed)
OCL=31296
CL=31298
2009-07-07 12:02:54 -07:00
Russ Cox
a1b64821f8
bug167
...
R=ken
OCL=31295
CL=31295
2009-07-07 11:48:22 -07:00
Russ Cox
877839333e
gob: use new reflect
...
R=r
DELTA=242 (68 added, 69 deleted, 105 changed)
OCL=31239
CL=31289
2009-07-07 11:04:42 -07:00
Russ Cox
e37f81b49c
template: use new reflect interface (CL 31107)
...
R=r
DELTA=16 (3 added, 1 deleted, 12 changed)
OCL=31121
CL=31288
2009-07-07 11:04:34 -07:00
Russ Cox
f1bc712035
net: use new reflect interface (CL 31107)
...
R=r
DELTA=186 (55 added, 8 deleted, 123 changed)
OCL=31117
CL=31287
2009-07-07 11:04:26 -07:00
Russ Cox
1b35969871
json: use new reflect interface (CL 31107)
...
R=r
DELTA=192 (52 added, 43 deleted, 97 changed)
OCL=31116
CL=31286
2009-07-07 11:04:18 -07:00
Russ Cox
65dbe76532
go/printer: use new reflect interface (CL 31107)
...
R=gri
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=31115
CL=31285
2009-07-07 11:04:10 -07:00
Russ Cox
b9b32cab58
datafmt: use new reflect interface (CL 31107)
...
R=gri
DELTA=70 (7 added, 17 deleted, 46 changed)
OCL=31113
CL=31283
2009-07-07 11:03:50 -07:00
Russ Cox
f3ec39d1ea
base64_test: use new reflect interface (CL 31107)
...
R=austin
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=31112
CL=31282
2009-07-07 11:03:40 -07:00
Russ Cox
0d400a7dea
fmt: use new reflect interface (CL 31107)
...
R=r
DELTA=208 (37 added, 63 deleted, 108 changed)
OCL=31111
CL=31281
2009-07-07 11:03:31 -07:00
Russ Cox
64f4e0b197
update reflect supporting functions,
...
tests to use new reflect interface.
also make tests a real gotest.
depends on CL 31107
R=r
DELTA=582 (56 added, 194 deleted, 332 changed)
OCL=31108
CL=31279
2009-07-07 11:03:12 -07:00
Russ Cox
541e638f9b
6g, 8g: generate data structures for new reflect interface (CL 31107)
...
R=ken
OCL=31122
CL=31278
2009-07-07 11:03:04 -07:00
Russ Cox
c7513eac88
runtime: use new reflect data structures (CL 31107)
...
in place of sigi, sigt.
R=ken
OCL=31118
CL=31277
2009-07-07 11:02:54 -07:00
Russ Cox
ce2e450c6b
install new reflect:
...
rename ntype.go and nvalue.go to type.go and value.go
R=r
DELTA=4295 (761 added, 2819 deleted, 715 changed)
OCL=31238
CL=31276
2009-07-07 11:02:44 -07:00
Ian Lance Taylor
5abf395be7
Avoid race condition. Following the left to right rule,
...
s.output.Data() was being retrieved before the synchronization
point, which meant that it could be retrieved before the
goroutine wrote it. Using gccgo this caused random errors.
R=gri
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=31046
CL=31267
2009-07-07 10:15:01 -07:00
Russ Cox
27432d67ec
move 6c/pgen.c, 6c/pswt.c into cc
...
and make 5c, 8c use them.
centralizes reachability analysis
and switch generation.
now 8c doesn't have spurious warnings
in pkg/runtime.
R=ken
OCL=31266
CL=31266
2009-07-07 10:07:15 -07:00
Robert Griesemer
8afeb52cac
- removed implementation restrictions for creation of small
...
Natural, Integer, and Rational numbers
- added Value() methods to access small Natural and Integers
as uint64 or int64 respectively, and to get the components
of Rational numbers
- fixed a bug with Integer creation
- removed some _'s from names
- added more comments in places
- added test cases
R=rsc
DELTA=184 (127 added, 11 deleted, 46 changed)
OCL=31210
CL=31265
2009-07-07 10:03:42 -07:00
Russ Cox
0417aafe75
insert ODCL in type switch case.
...
needed for heap allocation if variable escapes.
package main
func main(){
var i interface{} = 42;
switch v := i.(type) {
case int:
println(&v, v);
}
}
R=ken
OCL=31245
CL=31245
2009-07-06 23:42:57 -07:00
Russ Cox
0aa1b1508a
shift typechecking bugs
...
x << "a"
1 << int(2)
R=ken
OCL=31244
CL=31244
2009-07-06 23:33:17 -07:00
Kai Backman
908cd8f857
cleaned up data generation in 5g, reverted 5l handling of D_ADDR.
...
R=rsc
APPROVED=rsc
DELTA=46 (0 added, 5 deleted, 41 changed)
OCL=31241
CL=31243
2009-07-06 23:04:56 -07:00
David Symonds
52ccdf3510
Add support for v7 tar.
...
R=rsc
APPROVED=rsc
DELTA=32 (26 added, 4 deleted, 2 changed)
OCL=31172
CL=31242
2009-07-06 22:59:31 -07:00
Russ Cox
2acbc37166
various 6g cleanup:
...
* give genwrapper and genembedtramp the same signature.
* move duint8, duint16, duint32, duint64, duintptr into gc.
* tidy genwrapper.
* bug involving struct field symbols in signature list.
(hash-order dependent so hard to trigger)
* new Type print format %#-T like %#T but omits
names on function arguments.
R=ken
OCL=31237
CL=31237
2009-07-06 22:31:20 -07:00
Russ Cox
74b546aefd
statements after panicln are unreachable, just like after panic.
...
missing break after error.
dot symbol bug fix: leave sym alone
(was incorrect for inserted cross-package dots).
R=ken
OCL=31234
CL=31236
2009-07-06 22:25:54 -07:00
Russ Cox
58c4142e74
new reflect Value implementations.
...
for now, canSet stays.
i will look into getting rid of it in
a future CL.
R=r
DELTA=420 (419 added, 0 deleted, 1 changed)
OCL=31231
CL=31235
2009-07-06 22:10:40 -07:00
Russ Cox
ef4ddd63f8
another piece for cross-file forward struct declarations.
...
R=ken
OCL=31233
CL=31233
2009-07-06 21:39:18 -07:00
Russ Cox
a14b28a24d
fix bug involving typed nil constants:
...
interface = (*int)(nil) is not the same as
interface = nil.
package main
func main() {
var x interface{} = (*int)(nil);
println(x.(*int));
}
R=ken
OCL=31232
CL=31232
2009-07-06 21:37:29 -07:00
Russ Cox
7af032b87b
fix forward struct declarations
...
R=ken
OCL=31230
CL=31230
2009-07-06 18:05:11 -07:00
Russ Cox
d436a70193
allow conversion to interface type
...
when implicit assignment would have been okay.
R=ken
OCL=31225
CL=31227
2009-07-06 17:20:48 -07:00
Russ Cox
53ebd163c6
more precise error message
...
package main
func main() {
var x interface {} = 42;
switch x := x.(type) {
case int:
case foo:
}
}
before:
x.go:7: non-type case in type switch
x.go:7: inappropriate case for a type switch
now:
x.go:7: foo: undefined
R=ken
OCL=31221
CL=31221
2009-07-06 16:29:28 -07:00
Russ Cox
a7b4e9f03e
new reflect type.go implementation
...
R=r
DELTA=179 (172 added, 6 deleted, 1 changed)
OCL=31215
CL=31220
2009-07-06 16:06:31 -07:00
Russ Cox
769919c4ee
better error message + line numbers
...
package main
func main() {
var x interface{};
switch x {
case 41:
case "b":
}
}
before:
x.go:5: fatal error: exprcmp
now:
x.go:5: illegal types for operand: EQ
interface { }
int
x.go:6: illegal types for operand: EQ
interface { }
string
R=ken
OCL=31217
CL=31219
2009-07-06 16:05:48 -07:00
Russ Cox
4793400bd1
new reflect library data structures and code declarations
...
* use structs instead of interfaces
* compiler lays out data structures ahead of time,
so no more parsing of strings.
* unified reflect data structures with interface
runtime data structures.
* richer data structures should enable reflection
on chans and maps, but not implemented here.
R=r,iant
DELTA=1179 (1179 added, 0 deleted, 0 changed)
OCL=31107
CL=31213
2009-07-06 15:34:04 -07:00
Robert Griesemer
4f40f5eaab
- bug fix: do not strip lower-case parameter and result names in signatures
...
- display: show '...' if a struct/interface has fields/methods removed; show
struct/interface w/o {}'s if all fields/methods were removed; and show the
{}'s if the struct/interface was empty to begin with
R=rsc
DELTA=41 (36 added, 0 deleted, 5 changed)
OCL=31201
CL=31204
2009-07-06 11:39:48 -07:00
Rob Pike
d3a2925bb2
catch corruption - avoid crash
...
R=rsc
DELTA=4 (4 added, 0 deleted, 0 changed)
OCL=31192
CL=31198
2009-07-06 10:58:55 -07:00
Robert Griesemer
deb954772d
- ast.FilterExports: strips all non-exported nodes from an AST
...
- use FilterExports instead of the various predicates in printer.go and doc.go
which simplifies a lot of code and makes it easier to deal with complex cases
R=rsc
DELTA=445 (197 added, 190 deleted, 58 changed)
OCL=31110
CL=31196
2009-07-06 10:37:33 -07:00
Kai Backman
cd4aab62e3
sudoaddable odot
...
R=rsc
APPROVED=rsc
DELTA=7 (0 added, 1 deleted, 6 changed)
OCL=31189
CL=31191
2009-07-06 09:23:41 -07:00
Russ Cox
6da41be2d3
fix float32 comparison. was doing l op l instead of l op r.
...
R=ken
OCL=31190
CL=31190
2009-07-06 09:05:33 -07:00
Kai Backman
86987055a3
agen, sgen, cgen_callret, cgen_asop, D_ADDR handling, gmove
...
8bit and 16bit, some optoas, replaced Addr.index with
Addr.name
empty function compiles, mutex compiles
R=rsc
APPROVED=rsc
DELTA=908 (83 added, 41 deleted, 784 changed)
OCL=31127
CL=31188
2009-07-06 06:42:37 -07:00
Kai Backman
a7735f8a16
fixed bug that cause -g to segfault
...
R=rsc
APPROVED=rsc
DELTA=48 (30 added, 16 deleted, 2 changed)
OCL=31152
CL=31187
2009-07-06 06:36:25 -07:00
David Symonds
c1edbe9a10
Remove assumption about google.com being the default search domain.
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31151
CL=31168
2009-07-05 15:00:11 -07:00
Ken Thompson
6bb3c48d3d
another seg fault
...
R=r
OCL=31156
CL=31156
2009-07-04 13:59:08 -07:00
Russ Cox
db312fa8de
bug163
...
R=ken
OCL=31149
CL=31149
2009-07-03 13:34:05 -07:00
Rob Pike
3dab3e65d8
put gob into the standard build
...
R=rsc
DELTA=77 (76 added, 0 deleted, 1 changed)
OCL=31147
CL=31147
2009-07-03 12:54:59 -07:00
Russ Cox
75fe1303c1
maps have == so maps are okay as map keys.
...
alignment issue is fixed.
R=ken
OCL=31124
CL=31144
2009-07-03 09:44:59 -07:00
Kai Backman
84ded32817
sys.cas for mutex
...
R=rsc
APPROVED=rsc
DELTA=28 (28 added, 0 deleted, 0 changed)
OCL=31128
CL=31130
2009-07-02 22:05:06 -07:00
Kai Backman
84ef63b9d5
minor comment and debug flag for dumping all oplooks.
...
R=rsc
APPROVED=rsc
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=31016
CL=31126
2009-07-02 21:35:39 -07:00
Russ Cox
29aa3ffbf6
move Structrnd to runtime.h
...
R=ken
OCL=31125
CL=31125
2009-07-02 21:25:46 -07:00
Rob Pike
265674fa57
slices
...
R=rsc
DELTA=59 (44 added, 13 deleted, 2 changed)
OCL=31105
CL=31105
2009-07-02 18:02:42 -07:00
Rob Pike
c1fc4c8f37
indirection on array elements.
...
R=rsc
DELTA=57 (34 added, 10 deleted, 13 changed)
OCL=31098
CL=31101
2009-07-02 17:21:48 -07:00
Russ Cox
b5666a123a
add Uitoa etc.
...
R=r
DELTA=113 (89 added, 9 deleted, 15 changed)
OCL=31087
CL=31096
2009-07-02 16:57:46 -07:00
Rob Pike
0c33d4353e
arrays, not slices, and only with non-pointer elements.
...
(actually slices encode but do not decode yet)
R=rsc
DELTA=221 (82 added, 65 deleted, 74 changed)
OCL=31095
CL=31095
2009-07-02 16:43:46 -07:00
Rob Pike
29e6eb21ec
make a description of the slice header public
...
R=rsc
DELTA=18 (3 added, 0 deleted, 15 changed)
OCL=31086
CL=31094
2009-07-02 16:28:04 -07:00
Russ Cox
c7a9d9818a
fix atoi test
...
R=r
DELTA=28 (5 added, 0 deleted, 23 changed)
OCL=31093
CL=31093
2009-07-02 16:24:44 -07:00
Robert Griesemer
b70563aa0a
- store trailing comments after top-level declarations in ast
...
- remove a test case w/ syntax errors from test suite
R=rsc
DELTA=104 (44 added, 5 deleted, 55 changed)
OCL=31078
CL=31085
2009-07-02 15:38:36 -07:00
Rob Pike
77baac11e1
encode and decode for nested structures.
...
fix a bug in delta encoding: only update the delta-base if something is marshaled.
R=rsc
DELTA=154 (94 added, 56 deleted, 4 changed)
OCL=31069
CL=31071
2009-07-02 13:43:47 -07:00
Rob Pike
1ca1e1befa
encoders and decoders for string, []uint8
...
R=rsc
DELTA=165 (145 added, 6 deleted, 14 changed)
OCL=31051
CL=31056
2009-07-02 11:21:01 -07:00
Rob Pike
519a70da54
fix bug in $GOROOT handling: error calling Getenv.
...
R=gri
OCL=31047
CL=31047
2009-07-02 09:47:25 -07:00
Rob Pike
22b93dfb5c
now that we have a separate indirection test, simplify the scalar tests.
...
R=rsc
DELTA=562 (8 added, 424 deleted, 130 changed)
OCL=31039
CL=31045
2009-07-02 09:22:38 -07:00
Rob Pike
671f807e2e
simplify decoders. error checking is done higher up.
...
if there is an error, we will write one more value into the struct but in return
we do fewer tests in the decode.
R=rsc
DELTA=56 (0 added, 42 deleted, 14 changed)
OCL=31041
CL=31044
2009-07-02 09:22:30 -07:00
Rob Pike
c0271c4bc2
fix bug in decoders: got indirection wrong when allocation not required.
...
write indirection test.
next step: cut down scalar tests since indirection is centralized.
R=rsc
DELTA=114 (83 added, 3 deleted, 28 changed)
OCL=31020
CL=31037
2009-07-02 08:21:42 -07:00
Rob Pike
b1e64585b6
move dereference code out of the ops and into the interpreter loops.
...
R=rsc
DELTA=574 (40 added, 149 deleted, 385 changed)
OCL=31017
CL=31019
2009-07-01 23:04:27 -07:00
Rob Pike
c701af8c80
Encode and decode engines for gobs.
...
R=rsc
DELTA=468 (292 added, 18 deleted, 158 changed)
OCL=31008
CL=31012
2009-07-01 18:25:13 -07:00
Russ Cox
a439f66228
add test, fix bug: structs that differ in their
...
first field were not being handled correctly
because the visited map did not include the type.
R=r
OCL=31006
CL=31006
2009-07-01 16:45:09 -07:00
Russ Cox
55e790a160
clean up some BUG/TODO in go code
...
R=r
DELTA=23 (1 added, 12 deleted, 10 changed)
OCL=30957
CL=30980
2009-07-01 07:32:04 -07:00
Russ Cox
20cfa4a568
change alignment rules: roll receiver into
...
input parameters, move output parameters
into their own struct.
R=ken
OCL=30954
CL=30966
2009-06-30 20:02:07 -07:00
Russ Cox
150a64572b
remove declarations for functions that cannot be called from c
...
(because they return values in the input parameters).
R=iant
DELTA=12 (0 added, 11 deleted, 1 changed)
OCL=30952
CL=30965
2009-06-30 20:01:59 -07:00
Russ Cox
fa40c856ac
convert string runtime to use cgo.
...
now that cgo2c can handle it,
merge x.c and x_go.cgo into
a single x.cgo, for x=float,malloc,sema.
R=r
DELTA=1950 (954 added, 996 deleted, 0 changed)
OCL=30951
CL=30964
2009-06-30 20:01:50 -07:00
Russ Cox
88e7fd5410
in preparation for changing 6g's behavior to
...
align the output args separately from the input args,
change cgo2c to insert the necessary padding
when the two arg lists are concatenated in the c
translation.
for example, there is a runtime
func indexstring(s string, i int32) (b byte)
right now in 6g those arguments are aligned in one
struct with s at offset 0, i at 16, and b at 20.
soon the b byte will be in its own struct and structs
are 8 aligned, so it will be b at 24.
right now cgo2c generates:
void indexstring(string s, int32 i, byte b)
this CL makes it generate, in --6g mode:
void indexstring(string s, int32 i, uint32, byte b)
this is valid 6c input, although not valid gcc input.
(the code is being generated for 6c only anyway.)
also, allow C code to be mixed in among the Go funcs.
every instance of the token `func' is expected to start
a new go func.
R=iant
DELTA=145 (118 added, 0 deleted, 27 changed)
OCL=30949
CL=30963
2009-06-30 20:01:41 -07:00
Rob Pike
b968943332
scalar decoders
...
R=rsc
DELTA=897 (728 added, 14 deleted, 155 changed)
OCL=30955
CL=30955
2009-06-30 17:59:41 -07:00
Rob Pike
79b2cf92d9
pass the state to the encoders and decoders so error handling can be centralized.
...
R=rsc
DELTA=172 (40 added, 6 deleted, 126 changed)
OCL=30941
CL=30944
2009-06-30 16:20:31 -07:00
Rob Pike
f6f825141a
encoders for booleans and numbers.
...
R=rsc
DELTA=610 (597 added, 5 deleted, 8 changed)
OCL=30934
CL=30939
2009-06-30 15:37:46 -07:00
Russ Cox
832e72beff
delete io.ByteBuffer
...
R=r
DELTA=25 (0 added, 15 deleted, 10 changed)
OCL=30892
CL=30892
2009-06-29 20:53:05 -07:00
Russ Cox
5d5904bb4d
bug163 bug164 bug166
...
R=ken
OCL=30889
CL=30889
2009-06-29 17:46:22 -07:00
Russ Cox
d3a412a5ab
io.StringBytes -> strings.Bytes
...
io.ByteBuffer -> bytes.Buffer
left io.ByteBuffer stub around for now,
for protocol compiler.
R=r
OCL=30861
CL=30872
2009-06-29 15:24:23 -07:00
Rob Pike
b948c437a1
integer encode/decode
...
R=rsc
DELTA=185 (175 added, 10 deleted, 0 changed)
OCL=30863
CL=30871
2009-06-29 15:15:07 -07:00
Russ Cox
8f9a953760
make use of forward method declaration
...
R=r
DELTA=11 (0 added, 6 deleted, 5 changed)
OCL=30862
CL=30870
2009-06-29 15:13:56 -07:00
Russ Cox
9435dc2bdf
allow forward declaration of struct in another file
...
(in the same package).
allow forward method declaration to be satisfied
by implementation in another file (in the same package).
all methods must be declared in the same file
as the receiver type.
R=ken
OCL=30864
CL=30869
2009-06-29 15:13:37 -07:00
Russ Cox
b32769b1a3
add os.Hostname
...
R=r
DELTA=188 (182 added, 3 deleted, 3 changed)
OCL=30856
CL=30860
2009-06-29 13:44:46 -07:00
Rob Pike
2b08372710
add []byte as a special case: it will have a special, efficient encoding.
...
R=rsc
DELTA=16 (9 added, 1 deleted, 6 changed)
OCL=30846
CL=30846
2009-06-29 11:29:47 -07:00
Rob Pike
104d0246ea
fix gobuild bug
...
R=rsc
DELTA=4 (3 added, 0 deleted, 1 changed)
OCL=30845
CL=30845
2009-06-29 11:19:38 -07:00
Kai Backman
b2871b727e
working on bgen
...
- removed smallint optimizations
- lifted raddr from 5c
- add back %R, was used in gc/* causing -g to crash
- changed naddr OREGISTER to emit D_REG instead of D_OREG
R=rsc
APPROVED=rsc
DELTA=74 (38 added, 28 deleted, 8 changed)
OCL=30799
CL=30822
2009-06-26 22:04:30 -07:00
Rob Pike
d330c712c1
Getenv: almost no one wants the error, so make it return a string that may be empty.
...
Getenverror is the new name for the old routine that returns an error too.
R=rsc
DELTA=35 (7 added, 7 deleted, 21 changed)
OCL=30818
CL=30821
2009-06-26 20:28:41 -07:00
Rob Pike
ac7f2152eb
the first time a structure type appears when printing, identify it by name:
...
type Foo struct { a int; next *Foo }
produces
"Foo = struct { a int; next Foo }"
R=rsc
OCL=30797
CL=30820
2009-06-26 20:28:06 -07:00
Kai Backman
d6197d94b5
Adding more debug output when 5l encounters a bad op
...
combination.
R=rsc
APPROVED=rsc
DELTA=69 (68 added, 0 deleted, 1 changed)
OCL=30798
CL=30801
2009-06-26 13:44:25 -07:00
Kai Backman
4556c04d8b
more changes to make 5g code generation arm compatible.
...
R=rsc
APPROVED=rsc
DELTA=72 (12 added, 52 deleted, 8 changed)
OCL=30748
CL=30793
2009-06-26 04:08:20 -07:00
Rob Pike
7986de6e51
gobs part 1: types.
...
not ready to be part of the standard build yet; this is just a checkpoint.
R=rsc
DELTA=361 (361 added, 0 deleted, 0 changed)
OCL=30782
CL=30785
2009-06-25 22:08:51 -07:00
David Symonds
a2a827542a
http Request parsing, plus a convenient accessor.
...
R=rsc
APPROVED=rsc
DELTA=95 (40 added, 14 deleted, 41 changed)
OCL=30727
CL=30784
2009-06-25 21:05:44 -07:00
Russ Cox
480f51243c
bug165
...
R=ken
OCL=30783
CL=30783
2009-06-25 21:02:39 -07:00
Russ Cox
a0bcaf4c00
Change os.Error convention:
...
echo back context of call in error if likely to be useful.
For example, if os.Open("/etc/passwd", os.O_RDONLY)
fails with syscall.EPERM, it returns as the os.Error
&PathError{
Op: "open",
Path: "/etc/passwd"
Error: os.EPERM
}
which formats as
open /etc/passwd: permission denied
Not converted:
datafmt
go/...
google/...
regexp
tabwriter
template
R=r
DELTA=1153 (561 added, 156 deleted, 436 changed)
OCL=30738
CL=30781
2009-06-25 20:24:55 -07:00
Russ Cox
70e232e668
separate local path lookup from standard package directories
...
R=ken
OCL=30760
CL=30779
2009-06-25 20:15:56 -07:00
Russ Cox
cf370a6206
add ./ to imports where necessary
...
R=r
DELTA=51 (4 added, 4 deleted, 43 changed)
OCL=30759
CL=30778
2009-06-25 20:13:56 -07:00
Russ Cox
5851a1b5ad
allow
...
package main
type t interface
type t interface{ m(map[t]bool) }
type m map[t] int
making it work without the forward declaration will require a second pass.
R=ken
OCL=30773
CL=30773
2009-06-25 18:19:05 -07:00
Russ Cox
1ea28570ec
the any fix was too aggressive; allow any in any import.
...
R=ken
OCL=30768
CL=30768
2009-06-25 16:57:56 -07:00
Russ Cox
fa6df47986
package main
...
const foo = []int{1,2}
x.go:3: expression must be a constant
instead of
x.go:3: fatal error: gettype: addtop
R=ken
OCL=30767
CL=30767
2009-06-25 16:42:08 -07:00
Russ Cox
70a273476b
better error; clean up lineno in a few places
...
wreck.mtv=; cat x.go
package main
var x = string.Split()
wreck.mtv=; 6g x.go
x.go:2: type string used as expression
x.go:2: undefined DOT Split on string
x.go:3: illegal types for operand: AS
undefined
wreck.mtv=;
BUG=1938751
R=ken
OCL=30766
CL=30766
2009-06-25 16:32:33 -07:00
Russ Cox
4bce6d455f
package main
...
func foo(y) { }
was:
x.go:2: NONAME-y G0 u(1) a(1) l(77) x(-1000000000) is not a type
now:
x.go:2: y is not a type
R=ken
OCL=30764
CL=30764
2009-06-25 16:25:06 -07:00
Russ Cox
30f2799f88
disable "any" except during canned imports.
...
new flag -A enables it during mkbuiltin.
avoids mysterious errors in programs
that refer to any accidentally.
R=ken
OCL=30763
CL=30763
2009-06-25 16:22:46 -07:00
Russ Cox
ae11e9eb88
fix build
...
TBR=r
OCL=30757
CL=30757
2009-06-25 15:15:44 -07:00
Russ Cox
111ae83bb7
6g: update for spec change CL 30586
...
R=ken
OCL=30593
CL=30756
2009-06-25 14:44:45 -07:00
Russ Cox
4866223c2e
add reflect.Typeof; test for and fix nil interface bug in DeepEqual
...
R=r
DELTA=40 (30 added, 2 deleted, 8 changed)
OCL=30742
CL=30753
2009-06-25 14:25:38 -07:00
Russ Cox
6af5775d74
dreg
...
R=r
DELTA=19 (0 added, 19 deleted, 0 changed)
OCL=30739
CL=30751
2009-06-25 14:25:11 -07:00
Kai Backman
111005d32b
Add Gobuf.r0 that stores arg0 or return value of
...
goroutine. arm only.
R=rsc
APPROVED=rsc
DELTA=5 (3 added, 2 deleted, 0 changed)
OCL=30644
CL=30746
2009-06-25 11:26:10 -07:00
Kai Backman
190b5c9ad2
fixes to 5g object file generation. arm specific regalloc.
...
R=rsc
APPROVED=rsc
DELTA=976 (164 added, 237 deleted, 575 changed)
OCL=30705
CL=30743
2009-06-25 11:01:17 -07:00
Russ Cox
a50cbf6c73
style police: parens in if, for, switch, range
...
R=r
DELTA=32 (0 added, 3 deleted, 29 changed)
OCL=30718
CL=30725
2009-06-24 20:12:50 -07:00
David Symonds
30533d607a
Change strings.Split, bytes.Split to take a maximum substring count argument.
...
R=rsc
APPROVED=r
DELTA=131 (39 added, 10 deleted, 82 changed)
OCL=30669
CL=30723
2009-06-24 19:02:29 -07:00
Ken Thompson
466dd8da4e
6g crash re mail from gri jun 18.
...
R=r
OCL=30719
CL=30719
2009-06-24 17:50:25 -07:00
Russ Cox
2ce8b444b9
base64: cut out some middle layers
...
R=austin
DELTA=352 (67 added, 196 deleted, 89 changed)
OCL=30694
CL=30713
2009-06-24 15:52:31 -07:00
Russ Cox
a1646fd50e
make bytes.Copy both src- and dst- limited
...
and return the number of bytes copied.
R=r
DELTA=18 (6 added, 0 deleted, 12 changed)
OCL=30693
CL=30712
2009-06-24 15:35:35 -07:00
Kai Backman
354e61cc52
Fix compile warnings in 5l.
...
R=rsc
APPROVED=rsc
DELTA=8 (0 added, 0 deleted, 8 changed)
OCL=30692
CL=30695
2009-06-24 11:44:06 -07:00
Austin Clements
c3a087a088
Base64 encoder/decoder package.
...
R=rsc
APPROVED=rsc
DELTA=722 (722 added, 0 deleted, 0 changed)
OCL=30660
CL=30691
2009-06-24 11:09:43 -07:00
David Symonds
e6ff6c8e56
Fix http client handling of status messages with spaces (e.g. "HTTP/1.1 400 Bad
...
Request".
Use chunked Transfer-Encoding for all POSTs.
Implement chunked reading.
Change http.Request.write to be HTTP/1.1 only.
R=rsc
APPROVED=rsc
DELTA=178 (123 added, 26 deleted, 29 changed)
OCL=30563
CL=30673
2009-06-23 18:49:47 -07:00
Russ Cox
0d77947a3e
publish strconv.UnquoteChar
...
R=r
DELTA=69 (37 added, 3 deleted, 29 changed)
OCL=30661
CL=30667
2009-06-23 16:44:01 -07:00
Russ Cox
a45c54d1a5
fix gobuild.
...
errors introduced in CL 30601
R=austin
DELTA=6 (3 added, 0 deleted, 3 changed)
OCL=30663
CL=30665
2009-06-23 16:21:05 -07:00
Russ Cox
0aef57e37f
fix a 6g crash after type errors.
...
do not bother warning about marks left
on stack after syntax errors.
leave OCONV nodes in tree to avoid type errors
arising from multiple walks.
R=ken
OCL=30639
CL=30662
2009-06-23 15:30:59 -07:00
Rob Pike
5766553380
fix io.Bytebuffer.Read for new EOF semantics
...
R=rsc
DELTA=7 (5 added, 0 deleted, 2 changed)
OCL=30657
CL=30659
2009-06-23 15:20:40 -07:00
Rob Pike
28ba9777e6
rename Formatter to State and Format to Formatter, for nomenclatural consistency
...
R=rsc
DELTA=9 (0 added, 0 deleted, 9 changed)
OCL=30658
CL=30658
2009-06-23 15:20:30 -07:00
Kai Backman
be639b9a51
Runtime is now starting up with a dummy c program as target:
...
- morestack and gosave/gogo/gocall support
- memclr and memset from inferno
- bugfixes in _rt0_arm
R=rsc
APPROVED=rsc
DELTA=304 (174 added, 36 deleted, 94 changed)
OCL=30636
CL=30642
2009-06-23 11:54:23 -07:00
Rob Pike
b6ce2a72e1
document the verbs for Printf
...
R=rsc
DELTA=61 (48 added, 0 deleted, 13 changed)
OCL=30616
CL=30619
2009-06-22 18:09:40 -07:00
Russ Cox
bede992dd3
set -e does not apply to ( ) blocks,
...
so implement the check manually.
sigh.
R=r
DELTA=17 (6 added, 0 deleted, 11 changed)
OCL=30606
CL=30612
2009-06-22 15:43:50 -07:00
David Symonds
343bfcfca7
Don't prefix Url.Path with a slash in Request.write,
...
because Url.Path already starts with one.
Avoid crashing in Request.ParseForm if there is no body.
R=rsc
APPROVED=rsc
DELTA=5 (4 added, 0 deleted, 1 changed)
OCL=30552
CL=30607
2009-06-22 14:50:12 -07:00
Russ Cox
71f19d66d4
document requirements on Write method
...
R=r
DELTA=7 (6 added, 0 deleted, 1 changed)
OCL=30596
CL=30605
2009-06-22 14:44:07 -07:00
Rob Pike
8d343e2d49
a couple of cosmetic tweaks.
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=30599
CL=30602
2009-06-22 14:26:07 -07:00
Russ Cox
2fcc8f2fb6
avoid pointer-to-slice operations in gobuild
...
R=r
DELTA=19 (3 added, 1 deleted, 15 changed)
OCL=30591
CL=30601
2009-06-22 14:24:32 -07:00
Kai Backman
d281748a6d
add arm support to mkasmh
...
R=rsc
APPROVED=rsc
DELTA=5 (5 added, 0 deleted, 0 changed)
OCL=30587
CL=30595
2009-06-22 14:08:00 -07:00
Russ Cox
da5abb9fb3
changes required if we disallow the implicit *
...
in cap, len, [], and range on maps, strings, and slices.
R=r
DELTA=57 (2 added, 12 deleted, 43 changed)
OCL=30549
CL=30590
2009-06-22 13:34:21 -07:00
Russ Cox
64684cc2a2
introduce os.EOF and io.ErrUnexpectedEOF.
...
remove io.ErrEOF.
rename io.FullRead to io.ReadFull, to match
ReadAtLeast and ReadAll.
remove io.FullReader, because it is now unused.
R=r
DELTA=295 (88 added, 105 deleted, 102 changed)
OCL=30544
CL=30588
2009-06-22 13:26:13 -07:00
David Symonds
022ee0c26f
Add form body parsing to http.Request.
...
better error handling throughout.
R=r,rsc
APPROVED=r
DELTA=254 (201 added, 3 deleted, 50 changed)
OCL=30515
CL=30545
2009-06-19 18:02:15 -07:00
Rob Pike
2805eb9a5e
fix build
...
R=rsc
OCL=30542
CL=30542
2009-06-19 16:45:04 -07:00
Scott Schwartz
08aab44e48
Add ReadByte to bytebuffer
...
R=rsc
APPROVED=rsc
DELTA=24 (24 added, 0 deleted, 0 changed)
OCL=30459
CL=30540
2009-06-19 16:29:30 -07:00
Rob Pike
efc4088ccd
make IP address available
...
R=rsc
DELTA=30 (30 added, 0 deleted, 0 changed)
OCL=30536
CL=30536
2009-06-19 16:03:59 -07:00
Russ Cox
7f3eb2738f
implement new spec language regarding conversions
...
R=ken
OCL=30519
CL=30534
2009-06-19 14:00:53 -07:00
Steve Newman
a6c7a80b5b
Add a ReplaceAll method to Regexp.
...
APPROVED=r,rsc
DELTA=189 (187 added, 0 deleted, 2 changed)
OCL=30205
CL=30517
2009-06-18 17:55:47 -07:00
Robert Griesemer
1b9734b995
1) Fix a problem with tabwriter.Flush: any pending text not yet
...
in a cell makes a final cell in that line
(this showed up as occasionally missing single spaces in
godoc-formatted declarations that fit on a single line)
2) Cleaned up tabwriter implementation a bit:
- replaced local unicodeLen() with utf8.RuneCount()
- instead of having 2 parallel arrays for line widths and sizes,
have a single array of cells containing a width and size
- factored code a bit better
- added more comments
- added testnames to tabwriter tests
- added more test cases and fixed a broken test case that
now works correctly
R=r
DELTA=279 (133 added, 62 deleted, 84 changed)
OCL=30509
CL=30514
2009-06-18 17:06:08 -07:00
Robert Griesemer
5eb5d4d3c0
`` strings may span multiple lines
...
R=rsc
DELTA=3 (2 added, 0 deleted, 1 changed)
OCL=30511
CL=30513
2009-06-18 17:04:39 -07:00
Russ Cox
05240bb290
use multiline string literal in gobuild
...
R=r
DELTA=76 (1 added, 0 deleted, 75 changed)
OCL=30497
CL=30510
2009-06-18 16:32:26 -07:00
Ken Thompson
eba82f4391
better diagnostics for eof in a string.
...
this assumes that embedded newlines are
legal in back-quote strings.
R=r
OCL=30502
CL=30502
2009-06-18 15:49:41 -07:00
Russ Cox
ab7a8d43a4
make pkg/runtime/Makefile behave like the others:
...
make builds; make install installs.
R=r
DELTA=2 (2 added, 0 deleted, 0 changed)
OCL=30489
CL=30491
2009-06-18 13:33:28 -07:00
Russ Cox
5d2ee9d90a
add Addr() string to net.Listener interface.
...
use it to avoid use of fixed ports in tests.
convert google/net/rpc to gotest
R=r
DELTA=523 (275 added, 229 deleted, 19 changed)
OCL=30458
CL=30460
2009-06-17 21:44:26 -07:00
Russ Cox
f39fcd7e42
fix 386 build.
...
some day...
TBR=r
OCL=30453
CL=30453
2009-06-17 16:34:13 -07:00
Russ Cox
380200953a
Forgot to check in 386/asm.h.
...
Rather than do that, fix build by
generating asm.h automatically.
R=r
DELTA=97 (48 added, 36 deleted, 13 changed)
OCL=30449
CL=30452
2009-06-17 16:31:02 -07:00
Russ Cox
da5e962e49
shuffle some Linux system calls around for 386
...
R=r
DELTA=37 (17 added, 15 deleted, 5 changed)
OCL=30428
CL=30444
2009-06-17 15:16:06 -07:00
Russ Cox
8522a478bb
update 386 to new runtime (CL 30381)
...
R=r
DELTA=298 (119 added, 81 deleted, 98 changed)
OCL=30427
CL=30443
2009-06-17 15:15:55 -07:00
Russ Cox
7343e03c43
runtime: stack growth adjustments, cleanup
...
* keep coherent SP/PC in gobuf
(i.e., SP that would be in use at that PC)
* gogocall replaces setspgoto,
should work better in presence of link registers
* delete unused system calls
only amd64; 386 is now broken
R=r
DELTA=548 (183 added, 183 deleted, 182 changed)
OCL=30381
CL=30442
2009-06-17 15:12:16 -07:00
Russ Cox
76c87d58cd
386 system call fixes:
...
* use 64-bit file system calls (Linux, Darwin)
* use 32-bit [sic] uid/gid calls (Linux)
* fix sockets on Linux
Darwin/386 works again.
Linux/386 is better but must never have worked;
there are still bugs surrounding the creation of new
threads in the runtime package.
R=austin
DELTA=1332 (673 added, 614 deleted, 45 changed)
OCL=30327
CL=30380
2009-06-16 17:17:02 -07:00
Robert Griesemer
cb897436eb
fix nesting level for parameters
...
R=rsc
DELTA=8 (4 added, 2 deleted, 2 changed)
OCL=30365
CL=30368
2009-06-16 14:39:19 -07:00
Rob Pike
e15b64e87e
clean gofmt
...
R=rsc
OCL=30363
CL=30363
2009-06-16 14:03:13 -07:00
Rob Pike
6202b0e287
add godoc to clean.bash
...
R=rsc
OCL=30361
CL=30361
2009-06-16 13:57:08 -07:00
Robert Griesemer
4c8fe766af
- some fine-tuning of godoc templates per r's suggestion
...
- removed gratuitous newline in go/printer
R=r
DELTA=15 (2 added, 13 deleted, 0 changed)
OCL=30358
CL=30358
2009-06-16 13:44:15 -07:00
Jacob Baskin
536c2aa6ae
URL should have an empty Scheme if there is an invalid character (i.e.
...
not [a-zA-Z0-9+-.]) before there is a ":".
This is particularly helpful in the erroneous-but-relatively-common
case of relative URLs containing an unescaped colon in the query
string--see the added test for an example.
R=rsc
APPROVED=rsc
DELTA=15 (15 added, 0 deleted, 0 changed)
OCL=30354
CL=30356
2009-06-16 13:23:42 -07:00
Robert Griesemer
d8e4446d12
- install gofmt in src/cmd/gofmt
...
- remove some left-over files
R=rsc
DELTA=1465 (281 added, 1181 deleted, 3 changed)
OCL=30350
CL=30353
2009-06-16 12:03:32 -07:00
Kai Backman
1ac2cfc720
grab bag of changes aimed at getting stack splitting to work:
...
- morestack support for 5l and arm runtime
- argsize support in 5c, 5l, ar and nm. assembly code from 5a
will break in interesting ways unless NOSPLIT is specified
- explicit cond execution constants
- fix 5l output to use %d instead of %ld so that negative
values show.
- added a lot of code to arm/asm.s. runtime entry code almost
working currently aborts at gogo not implemented
R=rsc
APPROVED=rsc
DELTA=305 (125 added, 29 deleted, 151 changed)
OCL=30246
CL=30347
2009-06-16 11:25:58 -07:00
Robert Griesemer
d45442ed65
fix build
...
R=rsc
DELTA=5 (0 added, 1 deleted, 4 changed)
OCL=30343
CL=30343
2009-06-16 09:39:57 -07:00
Robert Griesemer
f05c04146e
forgot to adjust tmproot
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=30342
CL=30342
2009-06-16 09:30:16 -07:00
Robert Griesemer
5071a5a572
move godoc to src/cmd/godoc
...
R=rsc
DELTA=945 (944 added, 0 deleted, 1 changed)
OCL=30315
CL=30341
2009-06-16 09:14:06 -07:00
Russ Cox
8c357ce269
fix another gc bug, one that i have only imagined,
...
not observed: do not use malloc to allocate stacks
during garbage collection, because it would make the
malloc data structures change underfoot.
R=r
DELTA=6 (3 added, 0 deleted, 3 changed)
OCL=30323
CL=30326
2009-06-15 21:31:56 -07:00
Russ Cox
36835c7a47
fix garbage collection race: save stack trace
...
when changing process state to Gsyscall, not after.
R=r
DELTA=8 (4 added, 3 deleted, 1 changed)
OCL=30320
CL=30325
2009-06-15 21:30:53 -07:00
Russ Cox
30a28aec25
b/1909731
...
package main
func f(a *c.b) {}
func main() {}
BUG=1909731
R=ken
OCL=30322
CL=30322
2009-06-15 20:15:59 -07:00
David Symonds
d4e57ff248
Fix a proto encoding crasher whereby a nil in a repeated group field would crash the server.
...
Also fix the reflect bug that was exposed by this bug.
R=r
APPROVED=rsc
DELTA=162 (103 added, 32 deleted, 27 changed)
OCL=30125
CL=30319
2009-06-15 18:35:04 -07:00
Robert Griesemer
a893db8767
gofmt (final resting place TBD):
...
- replacement for pretty; app to format a single .go file
printer.go (pkg/go/printer):
- replacement for astprinter.go; implements AST printing
- also replaces pkg/go/ast/format.go for now
cleanups:
- removed/saved away old code
R=r,rsc,iant
DELTA=2833 (1183 added, 1628 deleted, 22 changed)
OCL=30226
CL=30306
2009-06-15 16:23:16 -07:00
Robert Griesemer
c2faeac8c4
fixed typo (slipped in with previous submit)
...
TBR=rsc
OCL=30300
CL=30300
2009-06-15 15:47:15 -07:00
Robert Griesemer
4a50434a36
Support for line comments trailing a field or declaration:
...
- ast: added extra fields
- parser: extended comment parsing to capture potential trailing comments
Cleanups:
- parser: more documentation, changed various identifiers from _-style to camelCase
R=r,rsc
DELTA=214 (84 added, 13 deleted, 117 changed)
OCL=30259
CL=30299
2009-06-15 15:43:11 -07:00
Robert Griesemer
be87e33b1f
removed bogus if-statement
...
R=iant
DELTA=3 (0 added, 3 deleted, 0 changed)
OCL=30251
CL=30251
2009-06-12 15:17:39 -07:00
David Symonds
cbd0092173
Switch http client_test to use google.com/robots.txt to avoid redirect loop.
...
www.google.com seems to be redirecting requests in an infinite loop. I haven't tracked down whether it's their code or this code that is causing it. This is just a quick fix so that this test passes.
APPROVED=r
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=30178
CL=30210
2009-06-11 15:55:03 -07:00
David Symonds
61d6ad3178
Add support for the basic extension done by Schilling's star.
...
Compute checksums in both ways (unsigned and signed).
R=rsc
APPROVED=rsc
DELTA=188 (145 added, 21 deleted, 22 changed)
OCL=30126
CL=30179
2009-06-10 21:32:36 -07:00
Robert Griesemer
7fd9cfd0cc
- parser bug: return keyword may be followed by case or default keyword as well
...
- fixed unrelated typo
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=30175
CL=30175
2009-06-10 15:40:19 -07:00
Kai Backman
528919520d
Adding a batch of missing system calls.
...
R=rsc
APPROVED=rsc
DELTA=1329 (1264 added, 1 deleted, 64 changed)
OCL=30040
CL=30158
2009-06-10 11:53:07 -07:00
Kai Backman
f2201185ab
Added ld/go.c functionality into 5l, primarily dead code
...
removal and typesigs and strings.
Also added new header support to 5c/5a/5l.
R=rsc
APPROVED=rsc
DELTA=98 (66 added, 10 deleted, 22 changed)
OCL=30103
CL=30123
2009-06-09 20:51:53 -07:00
Kai Backman
1faf06eabf
make 5g use 1 byte per binary asm statement.
...
R=rsc
APPROVED=rsc
DELTA=4 (0 added, 4 deleted, 0 changed)
OCL=30110
CL=30112
2009-06-09 11:34:35 -07:00
Steve Newman
f315fb3d56
Basic HTTP client.
...
R=rsc
APPROVED=rsc
DELTA=392 (386 added, 2 deleted, 4 changed)
OCL=29963
CL=30107
2009-06-09 10:58:58 -07:00
Russ Cox
c4aa021733
bring over deps.bash
...
TBR=r
OCL=30106
CL=30106
2009-06-09 10:47:13 -07:00
Rob Pike
d90e7cbac6
mv src/lib to src/pkg
...
tests: all.bash passes, gobuild still works, godoc still works.
R=rsc
OCL=30096
CL=30102
2009-06-09 09:53:44 -07:00
David Symonds
b05c6fe23a
A basic tar package.
...
R=rsc
APPROVED=rsc
DELTA=371 (370 added, 0 deleted, 1 changed)
OCL=30029
CL=30084
2009-06-08 23:22:56 -07:00
Russ Cox
01b695dbff
mksyscall was treating 64-bit systems as 32-bit,
...
so 64-bit args like the offset in Seek were being
mishandled. fix.
R=dsymonds
DELTA=1269 (645 added, 611 deleted, 13 changed)
OCL=30082
CL=30082
2009-06-08 22:10:48 -07:00
Kai Backman
83632c7359
initial morestack support for 5l. still disabled, doesn't work.
...
R=rsc
APPROVED=rsc
DELTA=245 (167 added, 63 deleted, 15 changed)
OCL=30039
CL=30081
2009-06-08 20:20:35 -07:00
Robert Griesemer
9b480bb78a
bug fix: literals can be empty
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=30080
CL=30080
2009-06-08 19:25:26 -07:00
Russ Cox
0f62ac42a4
add new function io.ReadAll
...
R=gri
DELTA=14 (6 added, 4 deleted, 4 changed)
OCL=30072
CL=30074
2009-06-08 17:22:28 -07:00
Russ Cox
34038e7368
Pad error text for browsers that are too smart.
...
404 page not found
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
Chrome would ignore this error page if this text weren't here.
R=presotto
APPROVED=p
DELTA=50 (50 added, 0 deleted, 0 changed)
OCL=30056
CL=30061
2009-06-08 14:15:13 -07:00
Russ Cox
925183cf1a
Add comment.
...
R=gri
DELTA=2 (2 added, 0 deleted, 0 changed)
OCL=30058
CL=30060
2009-06-08 14:09:04 -07:00
Robert Griesemer
eec4991863
- bug fix: no need to add extra '.' when renaming custom formatters
...
- added corresponding test case
R=rsc
DELTA=10 (7 added, 1 deleted, 2 changed)
OCL=30055
CL=30059
2009-06-08 14:07:20 -07:00
Russ Cox
cd80000d8d
add exec example to http triv.go.
...
fix darwin interrupt bug (race with SIGCHLD).
R=gri
DELTA=46 (40 added, 0 deleted, 6 changed)
OCL=30052
CL=30057
2009-06-08 14:03:21 -07:00
Kai Backman
63c2d52117
Fix Makefile in runtime to create proper /pkg subdir.
...
R=rsc
APPROVED=rsc
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=30043
CL=30043
2009-06-08 10:38:49 -07:00
Russ Cox
b7f0580274
move src/runtime -> src/lib/runtime;
...
hand-edited files.
R=r
DELTA=125 (77 added, 16 deleted, 32 changed)
OCL=30001
CL=30008
2009-06-06 22:04:50 -07:00
Russ Cox
3f6acf1120
move src/runtime -> src/lib/runtime;
...
only automatic g4 mv here.
R=r
OCL=30002
CL=30007
2009-06-06 22:04:39 -07:00
Russ Cox
f52c02641e
gzip package
...
R=dsymonds
DELTA=559 (559 added, 0 deleted, 0 changed)
OCL=29993
CL=30005
2009-06-06 21:56:04 -07:00
Russ Cox
38801e55db
flate package
...
R=dsymonds
DELTA=858 (858 added, 0 deleted, 0 changed)
OCL=29992
CL=30004
2009-06-06 21:51:47 -07:00
Russ Cox
6defc25c83
Publish types PipeReader and PipeWriter
...
to expose new CloseWithError methods.
R=r
DELTA=161 (72 added, 15 deleted, 74 changed)
OCL=29980
CL=30003
2009-06-06 21:51:05 -07:00
Russ Cox
3c06bd6201
an 8g checkpoint.
...
needs cleanup, optimizer,
but all.bash works.
R=ken
OCL=29974
CL=30000
2009-06-06 19:28:16 -07:00
Russ Cox
8abcdee175
implement optional semicolons with help from the lexer,
...
instead of having to double the type and statement grammars.
R=ken
OCL=29987
CL=29998
2009-06-06 19:27:48 -07:00
Russ Cox
e9e388412c
6g: add TODO about float constants back
...
R=ken
OCL=29984
CL=29997
2009-06-06 19:27:30 -07:00
Russ Cox
25a738234e
fix build: testing depends on regexp now; re-ran deps.bash
...
TBR=r
OCL=29991
CL=29994
2009-06-06 19:03:00 -07:00
David Symonds
0cb585f970
Basic HTTP POST support.
...
R=rsc
APPROVED=rsc
DELTA=45 (37 added, 1 deleted, 7 changed)
OCL=29964
CL=29990
2009-06-06 17:30:17 -07:00
Russ Cox
8f4af6d205
gc: grammar cleanup:
...
* no longer distinguishes const, var, type, package names.
* all the predefined names are not tokens anymore.
R=ken
OCL=29326
CL=29985
2009-06-06 12:46:38 -07:00
Russ Cox
ea33ff4067
delete unnecessary newline
...
R=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=29971
CL=29975
2009-06-06 00:01:47 -07:00
Russ Cox
b28d84f644
8l: add AIMULW
...
R=ken
OCL=29972
CL=29972
2009-06-05 23:52:43 -07:00
Russ Cox
8720b4721f
use cc provided xlog2 instead of system log2.
...
(on plan 9 cc calls it log2, but that conflicts here.)
the difference is that xlog2 returns -1 on non powers of 2.
8c was rewriting /10 into /8.
R=ken
OCL=29968
CL=29968
2009-06-05 23:12:07 -07:00
Russ Cox
01fe6a9c58
more build refinements:
...
* use new Make.$GOARCH files in gobuild.
* rename 6ar to arch-generic gopack.
* place objects in $GOROOT/pkg/$GOOS_$GOARCH
(makes cross-compiling easier, and no one
ever types these paths by hand anyway).
R=r
DELTA=29 (6 added, 8 deleted, 15 changed)
OCL=29923
CL=29967
2009-06-05 22:18:32 -07:00
Russ Cox
b90960e01e
rebuilt Makefiles for CL 29923
...
R=r
DELTA=761 (1 added, 433 deleted, 327 changed)
OCL=29927
CL=29966
2009-06-05 22:18:21 -07:00
Steve Newman
031bf2c88b
Add Upper, Lower, Trim methods to strings package.
...
APPROVED=rsc
DELTA=110 (110 added, 0 deleted, 0 changed)
OCL=29766
CL=29951
2009-06-05 13:09:03 -07:00
Russ Cox
6609d2f88d
restructure makefiles, scripts to factor out O= logic.
...
remove a few hardcoded paths elsewhere too.
R=r,gri
DELTA=123 (44 added, 15 deleted, 64 changed)
OCL=29914
CL=29945
2009-06-05 10:59:55 -07:00
Russ Cox
b014be75d2
fix 386 malloc tests,
...
detect 386 darwin breakpoint line.
R=r
DELTA=22 (4 added, 0 deleted, 18 changed)
OCL=29929
CL=29944
2009-06-05 10:59:37 -07:00
Russ Cox
4f30ec7fcb
fix 386 log test
...
R=r
DELTA=13 (0 added, 1 deleted, 12 changed)
OCL=29928
CL=29943
2009-06-05 10:59:25 -07:00
Kai Backman
25ac4d07a2
Rolling galign back to 32 bit.
...
R=rsc
APPROVED=rsc
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=29532
CL=29917
2009-06-04 21:11:55 -07:00
Russ Cox
f6402313d3
don't need these anymore;
...
R=kaib
DELTA=36 (0 added, 36 deleted, 0 changed)
OCL=29908
CL=29916
2009-06-04 21:10:49 -07:00
Russ Cox
a52fb815e4
386-related fixes and guards
...
R=r
DELTA=44 (19 added, 1 deleted, 24 changed)
OCL=29912
CL=29915
2009-06-04 21:09:06 -07:00
Russ Cox
2f2577a4f6
bug161, fixed
...
R=ken
OCL=29907
CL=29907
2009-06-04 16:18:13 -07:00
Robert Griesemer
4019259411
- interpret form feed char as newline + flush
...
- cleanups:
- replaced internal byte buffer implementation with io.ByteBuffer (now that we have one)
- removed all uses of goto statements in favor of structured code
- converted tests into a table-driven test
R=r
DELTA=277 (48 added, 67 deleted, 162 changed)
OCL=29890
CL=29901
2009-06-04 15:47:57 -07:00
Russ Cox
d30f80bad2
rename -chatty to more conventional -v.
...
add -match flag to select tests.
gotest -match 'TestDeepEqual$'
R=r
DELTA=13 (12 added, 0 deleted, 1 changed)
OCL=29900
CL=29900
2009-06-04 15:40:28 -07:00
Rob Pike
424f4f0ff5
use the new bytes package
...
R=rsc
DELTA=61 (8 added, 31 deleted, 22 changed)
OCL=29897
CL=29899
2009-06-04 15:28:09 -07:00
Russ Cox
9a9ffb2b0e
more 8g progress.
...
likely to go back to registers for most temporaries.
most tests in lib pass. these fail:
datafmt
fmt
go/scanner
log
reflect
strconv
template
R=ken
OCL=29896
CL=29898
2009-06-04 15:24:01 -07:00
Rob Pike
52e5d061c7
bytes.Copy
...
R=rsc
DELTA=38 (38 added, 0 deleted, 0 changed)
OCL=29895
CL=29895
2009-06-04 15:00:15 -07:00
Rob Pike
78933226f1
add a bytes package analogous to the strings package.
...
also has Equal and Compare
R=rsc
DELTA=348 (348 added, 0 deleted, 0 changed)
OCL=29892
CL=29894
2009-06-04 14:41:31 -07:00
Robert Griesemer
bd8495f973
- report an error if format is nil instead of crashing
...
- treat '\f' like '\n' ('\f' has special meaning in the
tabwriter now)
R=rsc
DELTA=7 (4 added, 0 deleted, 3 changed)
OCL=29790
CL=29893
2009-06-04 14:31:11 -07:00
Robert Griesemer
becf6222cc
allow &^= in assignments
...
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=29889
CL=29889
2009-06-04 13:43:19 -07:00
Russ Cox
f30fcf32ac
missing darwin files; g4 nothave.
...
R=r
DELTA=115 (115 added, 0 deleted, 0 changed)
OCL=29884
CL=29888
2009-06-04 13:33:57 -07:00
Russ Cox
4be7067f42
machine-generated files for CL 29882
...
R=r
DELTA=1652 (1652 added, 0 deleted, 0 changed)
OCL=29883
CL=29887
2009-06-04 13:33:48 -07:00
Russ Cox
802d6d4455
linux 386 support; now in same state as darwin 386
...
(stuck on 8l bug).
R=r
DELTA=349 (342 added, 1 deleted, 6 changed)
OCL=29882
CL=29886
2009-06-04 13:33:40 -07:00
Russ Cox
f0e6a3caac
dangling pointer bug (thanks valgrind)
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=29881
CL=29885
2009-06-04 13:33:29 -07:00
Russ Cox
3a0df4c451
more 386 runtime fixes.
...
can pass many tests;
current stumbling block is an 8l bug.
R=r
DELTA=122 (83 added, 8 deleted, 31 changed)
OCL=29872
CL=29876
2009-06-04 11:16:03 -07:00
Russ Cox
f51ca384eb
fix handling of floating point zero constant 0p+0
...
R=r
DELTA=25 (25 added, 0 deleted, 0 changed)
OCL=29875
CL=29875
2009-06-04 11:06:37 -07:00
Russ Cox
ea7f5505d1
zero struct in T{}
...
R=ken
OCL=29849
CL=29849
2009-06-03 16:10:13 -07:00
Russ Cox
024c83f2f8
fix build. i would love to know why my other client
...
didn't see this as a diff.
TBR=r
OCL=29827
CL=29831
2009-06-03 10:18:45 -07:00
David Symonds
e02d3e8ed1
Define os.PageSize and syscall.PageSize.
...
R=rsc
APPROVED=rsc
DELTA=13 (13 added, 0 deleted, 0 changed)
OCL=29429
CL=29819
2009-06-03 03:25:34 -07:00
Russ Cox
ab3d40b271
trivial cut and paste: move 64-bit simulation into cgen64.c
...
R=ken
OCL=29812
CL=29812
2009-06-02 23:26:02 -07:00
Russ Cox
a00bfb5b49
8g:
...
* floating point -> integer conversions.
x86 defines that overflow/underflow
results in 1<<15, 1<<31, 1<<63 for
int16, int32, int64. when building the
unsigned conversions out of the native signed
ones, 8g turns overflow/underflow into zero.
the spec does not say what should happen.
* many tiny bug fixes. can run a large number
of files from go/test now, and can fmt.Printf.
* struggling with byte register allocation
and float32 computation.
R=ken
OCL=29642
CL=29811
2009-06-02 23:25:17 -07:00
Russ Cox
7f9d2c8264
mechanically-generated syscall files
...
R=r
DELTA=1615 (1615 added, 0 deleted, 0 changed)
OCL=29803
CL=29810
2009-06-02 23:22:25 -07:00
Russ Cox
73c10dd967
386 library updates
...
R=r
DELTA=161 (153 added, 0 deleted, 8 changed)
OCL=29802
CL=29809
2009-06-02 23:22:12 -07:00
Russ Cox
f1f970ad21
minor cleanup, 64-bit /= and %= on 32-bit
...
R=ken
OCL=29806
CL=29808
2009-06-02 23:21:58 -07:00
Russ Cox
69623890cc
for consistency with syscall, rename files
...
from GOARCH_GOOS -> GOOS_GOARCH.
update os_test and add test of Time.
R=r
DELTA=490 (247 added, 233 deleted, 10 changed)
OCL=29730
CL=29805
2009-06-02 23:02:20 -07:00
Russ Cox
aa3222d88f
32-bit fixes in lessstack.
...
avoid tight coupling between deferreturn and jmpdefer.
before, jmpdefer knew the exact frame size of deferreturn
in order to pop it off the stack. now, deferreturn passes
jmpdefer a pointer to the frame above it explicitly.
that avoids a magic constant and should be less fragile.
R=r
DELTA=32 (6 added, 3 deleted, 23 changed)
OCL=29801
CL=29804
2009-06-02 23:02:12 -07:00
Russ Cox
07393f8706
8l fixes, cut and paste from 6l.
...
move PtrSize value into 6l/8l files.
R=r
DELTA=78 (47 added, 15 deleted, 16 changed)
OCL=29729
CL=29798
2009-06-02 22:33:21 -07:00
David Symonds
bf0a339bf3
Add container/list package.
...
This is imported from //cacheserving/gash/cache/list*.go,
but with style changes to suit the Go standard library.
R=r,rsc
APPROVED=r
DELTA=286 (286 added, 0 deleted, 0 changed)
OCL=29438
CL=29796
2009-06-02 20:26:14 -07:00
Robert Griesemer
aa9ce6148a
change datafmt syntax to use '@' instead of '^' (to match
...
convention used in template.go)
R=rsc
DELTA=22 (3 added, 1 deleted, 18 changed)
OCL=29780
CL=29782
2009-06-02 18:03:47 -07:00
Robert Griesemer
43456b4a7a
remove superfluous indirection
...
R=rsc
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=29776
CL=29778
2009-06-02 17:47:20 -07:00
Robert Griesemer
8083467d62
- renamed format -> datafmt
...
- factored out datafmt-specifics from pretty to ast
R=rsc
DELTA=3580 (1810 added, 1763 deleted, 7 changed)
OCL=29770
CL=29774
2009-06-02 17:18:27 -07:00
Steve Newman
da0a582564
Fixes to URL functionality:
...
- Extend http.URLUnescape to convert '+' to space
- Add http.URLEscape
- Rename URL.Query to EncodedQuery (and stop decoding it, as decoding this field
before separating key/value pairs loses important information)
- Report a clean error on incomplete hex escapes
- Update existing tests, add new ones
APPROVED=rsc
DELTA=293 (256 added, 3 deleted, 34 changed)
OCL=29685
CL=29759
2009-06-02 12:48:18 -07:00
Russ Cox
e11f833bed
auto-generated, renamed, and deleted files
...
associated with CL 29709.
R=r
DELTA=6444 (3476 added, 2958 deleted, 10 changed)
OCL=29710
CL=29724
2009-06-01 22:15:08 -07:00
Russ Cox
602a446b74
new syscall package: manually maintained files and scripts.
...
auto-generated files and deletions are in another CL.
goals for new syscall:
* automate as much as possible
* do not let clients do unsafe things
* use simple types (int not int64)
* fewer files
the files are renamed from foo_amd64_linux to foo_linux_amd64,
both because it reads better (all the linux are related, all the amd64 less so)
and because it made it easier to replace the existing ones.
R=r
DELTA=2336 (2260 added, 6 deleted, 70 changed)
OCL=29709
CL=29723
2009-06-01 22:14:57 -07:00
Russ Cox
9e0fec9c9c
update Go tree to use new syscall package.
...
R=r
DELTA=713 (109 added, 386 deleted, 218 changed)
OCL=29707
CL=29722
2009-06-01 22:14:39 -07:00
Russ Cox
278b1ab053
make godefs work better for generating Go.
...
R=r
DELTA=121 (92 added, 4 deleted, 25 changed)
OCL=29706
CL=29721
2009-06-01 22:14:25 -07:00
Robert Griesemer
d7acfc75cd
format package
...
R=r,rsc
DELTA=2871 (1712 added, 1118 deleted, 41 changed)
OCL=29222
CL=29704
2009-06-01 19:13:44 -07:00
Robert Griesemer
2494bcb4b1
- enable scanner to handle illegal chars w/o returning an error
...
so that it can be used for non-Go chars
- adjust parser accordingly
R=rsc
DELTA=58 (42 added, 2 deleted, 14 changed)
OCL=29688
CL=29703
2009-06-01 19:12:10 -07:00
Robert Griesemer
34d12bfbae
io.ReadFile
...
R=r,rsc
DELTA=64 (63 added, 0 deleted, 1 changed)
OCL=29702
CL=29702
2009-06-01 19:00:07 -07:00
Ken Thompson
c17ce9f94f
prevent multiple similar errors
...
in complex literals. side effect is
fix of error in initializerr.go
R=r
OCL=29667
CL=29667
2009-05-31 13:02:24 -07:00
Russ Cox
d6a9817051
bug157
...
R=ken
OCL=29651
CL=29653
2009-05-30 21:18:15 -07:00
Ken Thompson
be63b6dc44
bug 158
...
R=r
OCL=29646
CL=29646
2009-05-30 17:06:51 -07:00
Russ Cox
91395ae689
make gobuild failures more readable.
...
1. ar reports names of objects with duplicate text symbols.
2. gobuild only shows first line of error output for each failed command.
3. gobuild ignores files that begin with ascii non-alphanumeric non _.
; gobuild
$ 6g -I _obj gobuild.go
gobuild.go:150: PackageImports: undefined
$ 6g -I _obj makefile.go
makefile.go:102: ShellString: undefined
$ 6g -I _obj util.go
util.go:114: syntax error near zzz
gobuild: stalemate
;
; gobuild
$ 6ar grc _obj/gobuild.a util.6 util1.6
duplicate text symbol: util1.6 and util.6: gobuild·Build
$ 6g -I _obj gobuild.go
gobuild.go:150: PackageImports: undefined
$ 6g -I _obj makefile.go
makefile.go:102: ShellString: undefined
gobuild: stalemate
;
R=r
DELTA=95 (49 added, 9 deleted, 37 changed)
OCL=29625
CL=29640
2009-05-29 18:12:04 -07:00
Ken Thompson
fbcbcdbb1d
bug 156
...
R=r
OCL=29623
CL=29623
2009-05-29 15:34:47 -07:00
Ken Thompson
1c7bee0567
bug 155
...
R=r
OCL=29619
CL=29619
2009-05-29 14:42:24 -07:00
Ken Thompson
3b37b02834
bug 149
...
R=r
OCL=29612
CL=29612
2009-05-29 13:44:30 -07:00
Russ Cox
47fe18bf36
Fix godoc deadlock.
...
The code was already careful not to use malloc/free
for stack growth during calls to malloc.
Avoid them during calls to free too.
R=r
DELTA=9 (7 added, 0 deleted, 2 changed)
OCL=29606
CL=29610
2009-05-29 13:31:53 -07:00
Russ Cox
5d1d8a8258
integer conversions and test.
...
R=ken
OCL=29577
CL=29589
2009-05-29 09:17:35 -07:00
Russ Cox
6e1762c06e
64-bit integer arithmetic.
...
passes ridiculous test from CL 29569.
R=ken
OCL=29571
CL=29573
2009-05-29 00:13:09 -07:00
Russ Cox
0a6d83567e
print uint64 as uint64.
...
R=ken
OCL=29568
CL=29570
2009-05-28 22:24:03 -07:00
Ken Thompson
e2613711aa
detect recursive initialization
...
R=r
OCL=29544
CL=29544
2009-05-28 16:00:55 -07:00
Russ Cox
3aa006b8cd
better 64-bit handling in 8g.
...
fewer moves, fewer stupid LEALs.
powser1 runs (with evaln commented out).
beginnings of floating point.
R=ken
OCL=29540
CL=29543
2009-05-28 15:48:47 -07:00
Kai Backman
63e1b714de
Rebooted 5g effort from 6g. Tons of minor fixes and tweaks to
...
get the code going.
R=rsc
APPROVED=rsc
DELTA=4752 (1723 added, 948 deleted, 2081 changed)
OCL=29403
CL=29530
2009-05-28 14:25:54 -07:00
Kai Backman
97fe55720d
Change 5l to use Biobufs for IO.
...
R=rsc
APPROVED=rsc
DELTA=132 (16 added, 45 deleted, 71 changed)
OCL=29468
CL=29497
2009-05-28 07:41:23 -07:00
Russ Cox
e81d97ea84
clean up gmove:
...
* conversions all in one place.
* no separate load, store phases;
direct memory addressing when possible
(this is the x86 after all!).
avoids extra registers, extra MOVQs.
* fixes int32 -> uint64 bug
(was zero-extending)
R=ken
OCL=29482
CL=29484
2009-05-27 23:55:14 -07:00
Ken Thompson
b3f303ec9a
bug 153
...
R=r
OCL=29479
CL=29479
2009-05-27 18:37:02 -07:00
Russ Cox
5e53270a6c
attach package comment
...
R=r
DELTA=1 (0 added, 1 deleted, 0 changed)
OCL=29473
CL=29477
2009-05-27 18:20:26 -07:00
Ken Thompson
77f668a0f1
added protection against race condition
...
between first and second pass of converting
[]int to string.
R=r
OCL=29467
CL=29467
2009-05-27 15:56:44 -07:00
Ken Thompson
64c3fe05bf
string([]int) conversion
...
R=r
OCL=29466
CL=29466
2009-05-27 15:38:02 -07:00
Russ Cox
18890eebbf
fix bug154; tweak bug153 exit status
...
R=ken
OCL=29448
CL=29448
2009-05-27 10:16:13 -07:00
Russ Cox
5f460b38f9
getrusage on darwin; untested but builds.
...
R=dsymonds
DELTA=5 (5 added, 0 deleted, 0 changed)
OCL=29424
CL=29447
2009-05-27 10:05:23 -07:00
Russ Cox
51bb8795cd
8g: missing change from last CL
...
R=ken
OCL=29426
CL=29426
2009-05-26 21:11:31 -07:00
Russ Cox
a8e4ed6a3d
8g: 64-bit arithmetic and assorted bug fixes;
...
can run 64-bit sieve and powser.
interfaces are limping along.
next hurdle is floating point.
R=ken
OCL=29418
CL=29423
2009-05-26 21:07:26 -07:00
David Symonds
afba16f469
Getrusage for linux.
...
R=rsc
APPROVED=rsc
DELTA=40 (38 added, 0 deleted, 2 changed)
OCL=29351
CL=29422
2009-05-26 20:38:57 -07:00
Ken Thompson
b46e7c4d3c
bug 152
...
R=r
OCL=29419
CL=29419
2009-05-26 19:48:39 -07:00
Russ Cox
1a0a6f9d50
add NUL when allocating strings, to make use
...
of getenv by low-level runtime easier.
fix 32-bit bug in gc (there are still more).
R=ken
OCL=29415
CL=29415
2009-05-26 17:39:25 -07:00
Russ Cox
7d73075511
darwin support for 32-bit debugging
...
R=r
DELTA=129 (78 added, 1 deleted, 50 changed)
OCL=29411
CL=29413
2009-05-26 17:20:57 -07:00
Russ Cox
5273868f67
32-bit stack switching bug fix
...
R=ken
OCL=29412
CL=29412
2009-05-26 17:13:39 -07:00
Ken Thompson
51ddddc67e
bug 151
...
R=r
OCL=29409
CL=29409
2009-05-26 16:30:35 -07:00
Russ Cox
5ecd010beb
more 8g.
...
test/turing.go runs if you move the big array off its stack.
finally remembered to g4 add cgen.c gsubr.c
R=ken
OCL=29408
CL=29408
2009-05-26 16:23:54 -07:00
Ken Thompson
850cd6a2fe
bug 150
...
R=r
OCL=29405
CL=29405
2009-05-26 15:56:37 -07:00
Russ Cox
021abfbd28
8g: hello world works again
...
* string format changed
* files got renamed
* new files that i forgot to check in last time
updates are all copy and paste from 6g
R=ken
OCL=29385
CL=29400
2009-05-26 14:46:06 -07:00
Russ Cox
1f0f2e44a9
6ar: explain why __.SYMDEF didn't get put in.
...
people using ar for non-object archives
will just have to deal with the warnings.
R=r
DELTA=3 (2 added, 0 deleted, 1 changed)
OCL=29384
CL=29398
2009-05-26 14:34:32 -07:00
Kai Backman
3c7a1ef208
Added automatic detection of system libraries to 5l.
...
R=rsc
APPROVED=rsc
DELTA=83 (73 added, 3 deleted, 7 changed)
OCL=29276
CL=29382
2009-05-26 12:14:55 -07:00
Kai Backman
7943556970
Added enough arm related scaffolding to create a simple
...
hello.c program linking against the runtime.
R=rsc
APPROVED=rsc
DELTA=178 (175 added, 0 deleted, 3 changed)
OCL=29283
CL=29380
2009-05-26 11:18:42 -07:00
Ken Thompson
802e1a6104
static init reenabled
...
R=r
OCL=29358
CL=29358
2009-05-25 19:40:41 -07:00
David Symonds
ce5bcbe37f
Add os.Getpid and os.Getppid.
...
R=rsc
APPROVED=rsc
DELTA=11 (11 added, 0 deleted, 0 changed)
OCL=29352
CL=29357
2009-05-25 14:38:38 -07:00
David Symonds
5a12b1828d
Add exvar.FuncInt for exporting indirect integer variables.
...
R=r
APPROVED=r
DELTA=21 (21 added, 0 deleted, 0 changed)
OCL=29320
CL=29338
2009-05-24 15:04:43 -07:00
David Symonds
bef1a6439d
If Make.deps is not writable (e.g. in Perforce client and not opened for editing), bail out immediately.
...
R=rsc,r
APPROVED=r
DELTA=7 (5 added, 1 deleted, 1 changed)
OCL=29319
CL=29319
2009-05-23 19:39:25 -07:00
Ken Thompson
798b19bf77
improvement in registerization
...
R=r
OCL=29317
CL=29317
2009-05-23 16:36:43 -07:00
Ken Thompson
4238b18344
1. check for dups in complex literals
...
structtype{a:1, a:2}
maptypetype{"xx":1, "xx":2}
arraytypetype{5:1, 5:2}
2. bug in registerization concerning
alias of a struct and one of its elements
3. code optimization of struct.field
(which exposed bug in 2)
R=r
OCL=29315
CL=29315
2009-05-23 15:34:29 -07:00
Rob Pike
368b42103e
add crypto/hmac to makefile
...
R=rsc
DELTA=4 (3 added, 0 deleted, 1 changed)
OCL=29314
CL=29314
2009-05-23 13:53:36 -07:00
Russ Cox
b3de351681
update Make.deps
...
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=29305
CL=29308
2009-05-22 23:30:48 -07:00
Russ Cox
224b89cafa
typo in hmac comment
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=29307
CL=29307
2009-05-22 23:30:31 -07:00
Russ Cox
4beac9985b
simplifying grammar: delete LBASETYPE and LACONST.
...
take 2
R=ken
OCL=29304
CL=29306
2009-05-22 22:46:06 -07:00
Russ Cox
ca2fe5d8bd
Automated g4 rollback of changelist 29302.
...
*** Reason for rollback ***
too many files included
*** Original change description ***
simplifying grammar: delete LBASETYPE and LACONST
R=ken
OCL=29303
CL=29303
2009-05-22 22:43:57 -07:00
Russ Cox
2a4dcfffc9
simplifying grammar: delete LBASETYPE and LACONST
...
R=ken
OCL=29300
CL=29302
2009-05-22 22:42:12 -07:00
Russ Cox
b112d42ad6
add hmac.NewSHA1 and hmac.NewMD5.
...
fix Reset bug in sha1.
add hmac, sha1, md5 tests.
document hmac.
R=r
DELTA=146 (111 added, 6 deleted, 29 changed)
OCL=29294
CL=29299
2009-05-22 22:40:26 -07:00
Russ Cox
da59dd41c2
simple logging shim reader and writers
...
R=r
DELTA=53 (52 added, 0 deleted, 1 changed)
OCL=29295
CL=29298
2009-05-22 22:40:08 -07:00
Russ Cox
99128fc7ab
move pretty/comment.go into go/doc.
...
extract comment text code out of go/doc/doc.go into comment.go.
no code changes, just rearrangement.
first step so i can write tests.
R=gri
DELTA=633 (318 added, 301 deleted, 14 changed)
OCL=29269
CL=29293
2009-05-22 21:42:16 -07:00
Kai Backman
9c6fd4c144
Added support for .5 files in libmach_64. Copied 5obj.c from
...
plan9 libmach.
R=rsc
APPROVED=rsc
DELTA=142 (139 added, 3 deleted, 0 changed)
OCL=29281
CL=29281
2009-05-22 16:29:22 -07:00
Russ Cox
76f2a9fa48
md5 Reset fix; preliminary hmac
...
TBR=r
OCL=29279
CL=29279
2009-05-22 15:44:29 -07:00
Kai Backman
9a2a2474c6
Force usage of dollar signs to circumvent arm-gcc balking at them.
...
R=rsc
APPROVED=rsc
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=29275
CL=29278
2009-05-22 15:32:43 -07:00
Robert Griesemer
531e3fe311
- fix regexp once more in doc.go:
...
comment markers must only be stripped if they are
at the very beginning otherwise comments that contain
code with comments get screwed up (the ast delivers clean
comments with no junk before or after)
- fix indentation in google/net/rpc/rpc.go which screwed up
godoc formatting
R=rsc
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=29223
CL=29267
2009-05-22 12:40:56 -07:00
Robert Griesemer
fad7791b07
fix regexp to strip comment markers
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=29221
CL=29221
2009-05-21 20:29:22 -07:00
Robert Griesemer
ad8527c4dc
adjustments for relaxed composite literal syntax
...
R=r
DELTA=41 (0 added, 21 deleted, 20 changed)
OCL=29219
CL=29219
2009-05-21 19:50:25 -07:00
Russ Cox
f4d3d22a94
enforce channel direction
...
R=ken
OCL=29209
CL=29216
2009-05-21 17:32:44 -07:00
Russ Cox
a3c17d58df
channel direction fixes
...
R=dsymonds
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=29210
CL=29215
2009-05-21 17:31:13 -07:00
Russ Cox
c2fa45b973
allow type name as key to accomodate anonymous fields.
...
update tests.
R=ken
OCL=29207
CL=29207
2009-05-21 16:31:10 -07:00
Ken Thompson
bba10b3f49
some array init bugs
...
renamed 6g/(gen|align|obj).c
R=r
OCL=29205
CL=29205
2009-05-21 15:44:06 -07:00
Russ Cox
f96662324e
related reflect bug: make copies of big values
...
so that callers cannot edit large values inside interfaces.
R=r
DELTA=52 (42 added, 1 deleted, 9 changed)
OCL=29180
CL=29195
2009-05-21 14:06:43 -07:00
Russ Cox
8b6b380605
stricter rules for assignment.
...
when assigning a multifield object
(structs or arrays of structs) they
must not contain any fields that could
not be assigned individually.
R=ken
OCL=29192
CL=29194
2009-05-21 14:06:24 -07:00
Ken Thompson
a016081f43
added key:val extension to
...
structure and array literals
R=r
OCL=29190
CL=29190
2009-05-21 13:46:07 -07:00
Russ Cox
f2dfc55f34
I guess I forgot there was a unary ^ operator.
...
R=r
DELTA=3 (0 added, 1 deleted, 2 changed)
OCL=29151
CL=29176
2009-05-21 11:52:20 -07:00
Russ Cox
96cfd154d8
direct all interface extraction to InterfaceValue.Get.
...
delete unnecessary reflect. throughout
R=r
DELTA=124 (18 added, 0 deleted, 106 changed)
OCL=29173
CL=29175
2009-05-21 11:50:20 -07:00
Russ Cox
fb5aa46e65
fix build again; this time for sure.
...
(this time i ran g4 nothave)
TBR=r
OCL=29156
CL=29156
2009-05-21 06:54:00 -07:00
Russ Cox
ff45e7bcbd
missed Makefile before; fix build
...
TBR=dsymonds
OCL=29155
CL=29155
2009-05-21 06:49:56 -07:00
Russ Cox
23e62d169f
stricter interface conversion rule: i.(T)
...
must have non-nil i.
R=ken
OCL=29136
CL=29136
2009-05-20 18:23:19 -07:00
Russ Cox
140aed9ab7
hash reorg.
...
* new package hash defining interfaces Hash and Hash32.
* adler32 and crc32 return Hash32 instead of specific types.
* adler32 and crc32 provide non-allocating methods for single slices.
* sha1 and md5 move to crypto, return Hash.
* sum.go, a simple test program, moves to /usr/rsc.
* refresh Make.deps
R=r
DELTA=1908 (935 added, 923 deleted, 50 changed)
OCL=29095
CL=29135
2009-05-20 18:16:38 -07:00
Russ Cox
2d5d4a1b41
reflect bug: NewZeroValue was refusing to create slices.
...
as far as I can tell there's no reason not to.
the Nillable test was succeeding because NewZeroValue
returned the nil interface value and the type guard
was letting it through. the only change in the test is
more detail in the print.
R=r
DELTA=8 (0 added, 7 deleted, 1 changed)
OCL=29124
CL=29126
2009-05-20 15:42:14 -07:00
Russ Cox
a39bae095a
ifaceop was being called with integers
...
that came from two different enums.
spilt into ifacecvt and ifaceop depending
on which enum the argument is.
R=ken
OCL=29122
CL=29122
2009-05-20 15:09:50 -07:00
Russ Cox
2da5022bcf
change representation of interface values.
...
this is not a user-visible change.
before, all interface values were
struct Itype {
Sigt *type;
Sigi *inter;
void *method[n];
}
struct Iface {
void *addr;
Itype *itype;
}
the itype is basically a vtable, but it's unnecessary
if the static type is interface{ }.
for interface values with static type empty, the
new representation is
struct Eface {
void *addr;
Sigt *type;
}
this complicates the code somewhat, but
it reduces the number of Itypes that
have to be computed and cached,
it opens up opportunities to avoid function
calls in a few common cases,
and it will make it possible to lay out
interface{} values at compile time,
which i think i'll need for the new reflection.
R=ken
OCL=28701
CL=29121
2009-05-20 14:57:55 -07:00
Russ Cox
47e5152790
fix implicit star for range on *map, *[].
...
do not update lineno from ONAME nodes,
because they have declaration lineno not use.
show actual name in top-level statement error.
before
runtime.a:7: x.go:5: walkstate: NAME not a top level statement
after
x.go:14: walkstate: runtime.Goexit not a top level statement
R=ken
OCL=29113
CL=29116
2009-05-20 14:24:23 -07:00
Russ Cox
04d8605c21
clear out pkg tree in clean.bash.
...
rename place-holder to _place_holder_ so it can be avoided.
R=r
DELTA=5 (2 added, 2 deleted, 1 changed)
OCL=29093
CL=29097
2009-05-20 11:12:05 -07:00
Robert Griesemer
1b3b51f7db
more useful error string
...
R=r
DELTA=5 (4 added, 0 deleted, 1 changed)
OCL=29088
CL=29090
2009-05-20 11:02:12 -07:00
Russ Cox
02f13e4764
build crypto/block.
...
deps.bash tweak.
R=r
DELTA=95 (95 added, 0 deleted, 0 changed)
OCL=29046
CL=29059
2009-05-19 15:42:00 -07:00
Russ Cox
513faccb6f
final AES: CMAC authentication and EAX authenticated encryption
...
R=r
DELTA=791 (779 added, 0 deleted, 12 changed)
OCL=29045
CL=29058
2009-05-19 15:41:37 -07:00
Russ Cox
d85238635a
deps.bash tweak - no need to sort -u the $O files.
...
R=dsymonds
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=29048
CL=29053
2009-05-19 15:22:42 -07:00
Russ Cox
20ea881c79
Xor-based crypto modes: OFB and CTR stream encryption.
...
R=r
DELTA=643 (643 added, 0 deleted, 0 changed)
OCL=29017
CL=29047
2009-05-19 14:58:49 -07:00
Russ Cox
b0608c1391
Crypto modes: CBC, CFB, ECB.
...
Not ready to link into build yet.
Delta says 1272 lines but only 474
if you subtract the test files,
which are mostly data.
R=r
DELTA=1252 (1249 added, 0 deleted, 3 changed)
OCL=29013
CL=29037
2009-05-19 14:01:03 -07:00
Ken Thompson
da49bfe664
static initialization of strings
...
R=r
OCL=29036
CL=29036
2009-05-19 13:37:36 -07:00
Russ Cox
73c73855ea
testing: add t.Failed() bool
...
R=r
DELTA=18 (10 added, 4 deleted, 4 changed)
OCL=29000
CL=29034
2009-05-19 11:00:55 -07:00
Ken Thompson
b91a043d02
static initialization of slices
...
R=r
OCL=29016
CL=29016
2009-05-18 22:11:22 -07:00
David Symonds
760b778458
Create dependencies automatically for top-level lib directory.
...
It caught a few missing dependencies (bufio/fmt -> utf8, fmt -> os, http -> strconv, etc.).
R=r,rsc
APPROVED=r
DELTA=126 (79 added, 45 deleted, 2 changed)
OCL=28983
CL=29014
2009-05-18 18:42:47 -07:00
Brendan O'Dea
89df071165
tweaks to exvar.Map
...
R=dsymonds,rsc
APPROVED=rsc
DELTA=88 (53 added, 17 deleted, 18 changed)
OCL=28452
CL=29008
2009-05-18 15:42:09 -07:00
Russ Cox
80543aca7e
Public AES block interface.
...
The higher-level stream modes will be in crypto/block.
R=r
DELTA=205 (136 added, 7 deleted, 62 changed)
OCL=29002
CL=29006
2009-05-18 15:27:20 -07:00
Robert Griesemer
1ed725d7cd
- changed parser to return os.Error, removed ErrorHandler
...
- added IsValid predicate to token.Position
- updated pretty, godoc, gobuild
- updated/expanded test cases
R=rsc
DELTA=265 (97 added, 78 deleted, 90 changed)
OCL=28961
CL=29005
2009-05-18 14:59:16 -07:00
Russ Cox
69f55d1487
Getgroups max on Linux is bigger than I thought.
...
R=iant
DELTA=3 (2 added, 0 deleted, 1 changed)
OCL=28994
CL=29003
2009-05-18 14:56:25 -07:00
Russ Cox
be869ba4d6
add io.ByteReader.
...
add testing/iotest package.
make bufio return error on short write.
R=r
DELTA=423 (208 added, 154 deleted, 61 changed)
OCL=28997
CL=28999
2009-05-18 13:31:56 -07:00
Ken Thompson
6b942c68cc
rewrote initialization to save space.
...
fixed bug in seeding. top 11 bits were
not changed by different seeds.
R=r
OCL=28998
CL=28998
2009-05-18 12:11:46 -07:00
Russ Cox
3b36acc71b
move ShortWrite error into io so that other packages can use it.
...
R=r
DELTA=15 (7 added, 1 deleted, 7 changed)
OCL=28996
CL=28996
2009-05-18 11:47:35 -07:00
Russ Cox
23c81f7424
add Getwd, Fchdir, tests
...
R=r
DELTA=215 (186 added, 0 deleted, 29 changed)
OCL=28968
CL=28995
2009-05-18 10:49:34 -07:00
Ken Thompson
62231e91d0
static initialization with DATA statements
...
structs and arrays are done
slices and maps are yet to do
R=r
OCL=28977
CL=28977
2009-05-17 19:16:16 -07:00
Ken Thompson
52b0f77bf9
static initialization
...
structure set up - no change yet
R=r
OCL=28966
CL=28966
2009-05-16 13:29:08 -07:00
Robert Griesemer
8ee7688af6
make Len() == 0 for nil vector.Vector
...
(mimic behavior of slices)
R=r
DELTA=12 (12 added, 0 deleted, 0 changed)
OCL=28960
CL=28962
2009-05-15 21:59:08 -07:00
Robert Griesemer
66cc0d6f60
don't require ()'s around composite literals if the
...
literal type is not a type name
R=rsc
DELTA=41 (2 added, 7 deleted, 32 changed)
OCL=28955
CL=28957
2009-05-15 18:59:09 -07:00
Russ Cox
a343e5ceb1
fix handling of line numbers for first function
...
R=r
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=28949
CL=28951
2009-05-15 17:26:08 -07:00
Rob Pike
c54699c977
s/NewLogger/New/
...
R=rsc
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=28947
CL=28950
2009-05-15 17:22:30 -07:00
Russ Cox
96890d4218
close TODO
...
R=r
DELTA=42 (0 added, 26 deleted, 16 changed)
OCL=28940
CL=28942
2009-05-15 15:51:41 -07:00
Rob Pike
c81d09d92b
implement %#o %#x %#X formats
...
R=rsc
OCL=28936
CL=28936
2009-05-15 15:18:09 -07:00
Russ Cox
66f5e89082
os: MkdirAll, RemoveAll, Chmod, Chown, Truncate, Getgroups.
...
Getuid, etc drop their errors -- they cannot error
R=r
DELTA=605 (547 added, 12 deleted, 46 changed)
OCL=28919
CL=28929
2009-05-15 14:11:24 -07:00
Rob Pike
13fbb1d82e
StringVector specialization of Vector
...
R=gri,rsc
DELTA=197 (194 added, 0 deleted, 3 changed)
OCL=28900
CL=28911
2009-05-15 11:52:58 -07:00
Russ Cox
5e76c032f6
make Stat indicate whether it followed a symlink.
...
R=r
DELTA=61 (34 added, 0 deleted, 27 changed)
OCL=28904
CL=28906
2009-05-15 11:04:49 -07:00
Russ Cox
55b70d6c98
Return error from WriteByte, to match bufio.Writer.
...
R=gri
DELTA=4 (1 added, 0 deleted, 3 changed)
OCL=28868
CL=28899
2009-05-15 10:46:14 -07:00
Robert Griesemer
0fe8487ced
- Remove IntVector methods that are "inherited" with correct type
...
- Faster vector.Delete, removed result value (easy to get via At(i))
R=r
DELTA=40 (6 added, 30 deleted, 4 changed)
OCL=28866
CL=28897
2009-05-15 10:43:00 -07:00
Russ Cox
b725e32c99
add directory argument to os.ForkExec
...
R=iant
DELTA=41 (35 added, 0 deleted, 6 changed)
OCL=28892
CL=28895
2009-05-15 10:32:05 -07:00
Russ Cox
a854c7f993
AES key setup and block ciphers.
...
AES mode wrappers not implemented, so no public interface yet.
R=r
DELTA=918 (918 added, 0 deleted, 0 changed)
OCL=28848
CL=28863
2009-05-14 17:11:11 -07:00
Robert Griesemer
472e191a23
ByteBuffer.WriteByte
...
R=r
DELTA=17 (10 added, 0 deleted, 7 changed)
OCL=28860
CL=28862
2009-05-14 17:03:47 -07:00
Rob Pike
8203a4cb9d
Getuid etc.
...
R=rsc
DELTA=51 (49 added, 0 deleted, 2 changed)
OCL=28859
CL=28859
2009-05-14 16:45:24 -07:00
David Symonds
16387fad39
Hyphens are allowed in filenames. This allows this test to pass for me.
...
R=r
APPROVED=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=28847
CL=28851
2009-05-14 15:42:27 -07:00
Rob Pike
80b5482ab2
fix abstract unix domain sockets
...
R=rsc
DELTA=5 (3 added, 0 deleted, 2 changed)
OCL=28845
CL=28849
2009-05-14 15:20:30 -07:00
Russ Cox
ea79b82e92
fix Truncate comment:
...
* make a complete sentence.
* eliminate reference to byte positions,
which are not a concept exposed by the interface.
R=gri
DELTA=2 (0 added, 1 deleted, 1 changed)
OCL=28838
CL=28838
2009-05-14 13:39:17 -07:00
Robert Griesemer
28db3e8411
ByteBuffer.Truncate(n int)
...
R=r
DELTA=22 (17 added, 0 deleted, 5 changed)
OCL=28781
CL=28815
2009-05-14 10:14:29 -07:00
Rob Pike
a8db4593ab
fix spelling error in message
...
R=ken
OCL=28814
CL=28814
2009-05-14 09:59:16 -07:00
Russ Cox
8f854174c7
reflect: update comment (there is no BoolType)
...
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=28756
CL=28784
2009-05-13 18:03:49 -07:00
Russ Cox
cc1d4b7e1b
Unix domain socket support, Linux and Darwin.
...
R=r
DELTA=534 (353 added, 99 deleted, 82 changed)
OCL=28783
CL=28783
2009-05-13 18:03:41 -07:00
Robert Griesemer
f3b08744a2
Simplified AST:
...
- one node for array and slice types
- one node for index and slice expressions
- simplified parser, astprinter, and ast.txt
R=r
DELTA=71 (0 added, 43 deleted, 28 changed)
OCL=28768
CL=28768
2009-05-13 15:18:05 -07:00
Rob Pike
6fa6f134f1
fix indentation
...
R=rsc
OCL=28752
CL=28752
2009-05-13 10:34:11 -07:00
Ian Lance Taylor
7aabf2d9b1
Add os.Link, os.Symlink, os.Readlink.
...
R=r,rsc
DELTA=161 (161 added, 0 deleted, 0 changed)
OCL=28745
CL=28747
2009-05-13 10:16:46 -07:00
Rob Pike
52f071ed43
Rename ParseError to Error
...
R=rsc
DELTA=13 (6 added, 1 deleted, 6 changed)
OCL=28743
CL=28746
2009-05-13 10:01:55 -07:00
Rob Pike
b66d703941
change name of reflect.NewInitValue to the more descriptive NewZeroValue.
...
R=rsc
DELTA=10 (0 added, 0 deleted, 10 changed)
OCL=28717
CL=28720
2009-05-12 16:16:52 -07:00
Russ Cox
d06a79e31b
no need for compiler to hard-code definition of runtime.
...
use the actual go source instead.
R=r
DELTA=90 (66 added, 18 deleted, 6 changed)
OCL=28708
CL=28719
2009-05-12 16:15:52 -07:00
Russ Cox
28516d4c78
update reflect for upcoming interface representation change.
...
test case for new change.
both work with the current compiler too.
R=r
DELTA=150 (145 added, 2 deleted, 3 changed)
OCL=28703
CL=28715
2009-05-12 16:08:16 -07:00
Russ Cox
daf44e2fa5
fix build: proto depends on fmt now
...
TBR=r,dsymonds
OCL=28711
CL=28711
2009-05-12 15:47:55 -07:00
David Symonds
6c384d2268
Allow http.Redirect to do both temporary (307) and permanent (301) redirects.
...
This also adds a missing 'return' when a malformed URL is passed to it.
R=rsc
APPROVED=rsc
DELTA=30 (13 added, 2 deleted, 15 changed)
OCL=28598
CL=28710
2009-05-12 15:41:19 -07:00
Rob Pike
a8f6e38bce
implement IsNil() bool for those types that can be nil. most of them, anyway.
...
R=rsc
DELTA=97 (96 added, 0 deleted, 1 changed)
OCL=28596
CL=28702
2009-05-12 14:57:44 -07:00
Robert Griesemer
c6da3e5a69
A couple of godoc improvements:
...
- sort directories before printing
- apply filtering to factory functions and methods
- remove a couple of unused files
R=r
DELTA=84 (34 added, 40 deleted, 10 changed)
OCL=28657
CL=28657
2009-05-11 16:52:59 -07:00
Russ Cox
3619f1ea6a
change utf8.FullRuneInString and utf8.DecodeRuneInString
...
to use single string argument instead of string, index.
R=r
DELTA=136 (9 added, 7 deleted, 120 changed)
OCL=28642
CL=28644
2009-05-11 14:10:34 -07:00
Russ Cox
0880593436
gobuild: command printing bug fix
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=28583
CL=28590
2009-05-08 16:38:42 -07:00
Russ Cox
59be46ca35
use exitgroup on linux to exit whole process.
...
R=r
DELTA=60 (38 added, 19 deleted, 3 changed)
OCL=28589
CL=28589
2009-05-08 16:36:46 -07:00
Rob Pike
20850fc014
Package unsafe is undocumented. By installing (but not compiling) this file,
...
which contains only declarations, we can have godoc present documentation
for the package.
R=gri,rsc
DELTA=44 (43 added, 0 deleted, 1 changed)
OCL=28555
CL=28588
2009-05-08 16:24:55 -07:00
Rob Pike
4f21161269
Document runtime functions.
...
R=rsc
DELTA=25 (25 added, 0 deleted, 0 changed)
OCL=28574
CL=28580
2009-05-08 15:55:45 -07:00
Russ Cox
b3533dfd72
6g:
...
new type equality restrictions
better handling of renamed packages
"sys" is no longer available to programs
R=ken
OCL=28553
CL=28578
2009-05-08 15:40:31 -07:00
Russ Cox
917aa35f8f
implications of stricter type equality:
...
if both types are named, they must be
the same type (arising from the same
declaration).
R=r,gri
DELTA=44 (21 added, 4 deleted, 19 changed)
OCL=28436
CL=28577
2009-05-08 15:40:14 -07:00
Russ Cox
cd3ab57a9c
fix comment
...
R=r
DELTA=1 (0 added, 1 deleted, 0 changed)
OCL=28576
CL=28576
2009-05-08 15:39:18 -07:00
Russ Cox
7e235c1e27
fix build - missing file
...
TBR=r
OCL=28575
CL=28575
2009-05-08 15:29:43 -07:00
Russ Cox
918afd9491
move things out of sys into os and runtime
...
R=r
OCL=28569
CL=28573
2009-05-08 15:21:41 -07:00
Rob Pike
c367d1b789
Move sys.Reflect and sys.Unreflect into unsafe.
...
R=rsc
DELTA=19 (4 added, 5 deleted, 10 changed)
OCL=28563
CL=28566
2009-05-08 14:57:56 -07:00
Russ Cox
d4fa253837
eqtype(t1, t2, 0) => eqtype(t1, t2)
...
R=ken
OCL=28559
CL=28562
2009-05-08 14:40:38 -07:00
Russ Cox
1b301bac1a
throw away os._Error.
...
make some error types in a few packages
R=r
DELTA=110 (25 added, 46 deleted, 39 changed)
OCL=28382
CL=28561
2009-05-08 14:40:20 -07:00
Rob Pike
01712ae7d3
embeddability: change bufio.BufRead to bufio.Reader etc.
...
R=rsc
DELTA=112 (0 added, 4 deleted, 108 changed)
OCL=28537
CL=28543
2009-05-08 11:52:39 -07:00
Rob Pike
c8b47c6fce
Name change to improve embeddability:
...
io.Read->io.Reader
io.Write,Close,etc.->io.Writer,Closer etc.
R=rsc
DELTA=190 (0 added, 0 deleted, 190 changed)
OCL=28525
CL=28535
2009-05-08 11:22:57 -07:00
Russ Cox
63629d5307
minor cleanup, not required by compiler changes
...
R=r
DELTA=14 (1 added, 4 deleted, 9 changed)
OCL=28447
CL=28509
2009-05-08 10:14:55 -07:00
Russ Cox
97bc222d5c
another attempt at avoiding IPv6 when it's not supported.
...
dsymonds confirms that this one works.
R=r
DELTA=50 (23 added, 17 deleted, 10 changed)
OCL=28433
CL=28444
2009-05-07 17:36:29 -07:00
Rob Pike
93bbbf90ef
make go/src/lib/hash one directory per package
...
(slipped through the cracks last time)
R=rsc
DELTA=2436 (1337 added, 1090 deleted, 9 changed)
OCL=28427
CL=28443
2009-05-07 17:15:24 -07:00
David Symonds
abdf4853a7
Define Len() for JSON Map.
...
R=rsc
APPROVED=rsc
DELTA=6 (5 added, 0 deleted, 1 changed)
OCL=28398
CL=28430
2009-05-07 15:09:32 -07:00
Russ Cox
401a95aa83
if a struct s contains an anonymous interface value
...
with method m, s.m() is ok and m now shows up
in s's method set for interface runtime.
see http://cl/28419-p2 for new test interface10.go.
R=ken
OCL=28420
CL=28423
2009-05-07 13:42:47 -07:00
Russ Cox
0d33992866
next step for 6.out on Borg: fix and test
...
net code on IPv4-only machines.
R=r
DELTA=27 (25 added, 0 deleted, 2 changed)
OCL=28404
CL=28411
2009-05-07 10:31:48 -07:00
Russ Cox
88a1aa8e1a
6g: error messages
...
part 2; missing files
R=ken
OCL=28408
CL=28410
2009-05-07 10:30:22 -07:00
Russ Cox
b5e212ffdd
6g: error messages
...
replace "shape error across CALL" with more information.
x.go:7: not enough arguments to CALL
a int, b int
int
x.go:10: assignment count mismatch: 3 = 2
x.go:12: too many arguments to RETURN
[no arguments expected]
int, int, int
also leave type alone after conversion failure,
for later errors:
bug049.go:6: cannot convert nil constant to string
bug049.go:6: illegal types for operand: EQ
string
nil # this used to be blank
R=ken
OCL=28405
CL=28407
2009-05-07 10:29:35 -07:00
Russ Cox
5a67ea3883
6g: simplify trampoline by postponing load.
...
TEXT tramp
MOVQ 8(SP), AX
ADDQ $40, AX
MOVQ AX, 8(SP)
JMP oldfunc
is now
TEXT tramp
ADDQ $40, 8(SP)
JMP oldfunc
and if s/40/0/, then it simplifies to
TEXT tramp
JMP oldfunc
(the tramp is still needed to satisfy
symbol references from other object files)
R=ken
OCL=28377
CL=28381
2009-05-06 17:06:06 -07:00
Russ Cox
3071f8c8e5
fix a few type errors, make ErrorString a value
...
will submit with fixed compiler
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=28371
CL=28379
2009-05-06 17:05:46 -07:00
Russ Cox
a6ba5ec535
6g: new interface rules (code got simpler!)
...
R=ken
OCL=28374
CL=28378
2009-05-06 17:05:35 -07:00
Russ Cox
1d1316c885
makefile fixes
...
R=r
OCL=28369
CL=28369
2009-05-06 16:16:55 -07:00
Russ Cox
83cd4ee070
6g: generate string data as individual symbols,
...
so that 6l can discard strings used by dead code.
also, for short strings, generate DUPOK global
symbols so that references to, say, "%s: %s" in
multiple files result in only a single symbol.
R=ken
OCL=28361
CL=28361
2009-05-06 13:47:40 -07:00
Rob Pike
0c3a43e7b2
error handling had a bug in execute: the error channel was being shared.
...
fix that and clean up state handling a little.
R=rsc
DELTA=44 (18 added, 8 deleted, 18 changed)
OCL=28359
CL=28359
2009-05-06 13:42:59 -07:00
Rob Pike
68382ec021
add missing Makefile to repair build
...
TBR=gri
OCL=28320
CL=28320
2009-05-05 21:31:22 -07:00
Ken Thompson
c4de24981a
signs on div and mod
...
R=r
OCL=28319
CL=28319
2009-05-05 21:19:58 -07:00
Robert Griesemer
1d6bd79ceb
new dir structure for lib/go
...
R=r
DELTA=9298 (4760 added, 4536 deleted, 2 changed)
OCL=28317
CL=28317
2009-05-05 18:38:45 -07:00
Russ Cox
3e9b171b79
6g bug: was dropping assignment of nil to globals
...
R=ken
OCL=28314
CL=28314
2009-05-05 17:33:51 -07:00
Rob Pike
86043a87c9
mv container/vector down one level for new rules.
...
simplify run.bash now that lib has make test that recurs.
R=rsc
DELTA=1179 (578 added, 596 deleted, 5 changed)
OCL=28313
CL=28313
2009-05-05 17:24:01 -07:00
Rob Pike
9b2c5da922
directory-per-package step 1: move files from lib/X.go to lib/X/X.go
...
no substantive changes except:
- new Makefiles, all auto-generated
- go/src/lib/Makefile has been extensively edited
R=rsc
OCL=28310
CL=28310
2009-05-05 17:05:39 -07:00
Russ Cox
f821e3c7c3
6g tweaks
...
* byteastring is no longer used
* do not generate ODCL, OAS for globals
(wasn't generating any code but might
save one or two init functions)
* do not call self from Init function
R=ken
OCL=28309
CL=28309
2009-05-05 16:53:46 -07:00
Russ Cox
9cba9c8890
6l: eliminate dead code, not just the symbols
...
editing the firstp list was ineffective,
because follow rebuilds it from the textp list.
the symbols for dead code were being dropped
from the binary but the code was all still there.
text for fmt.Printf("hello, world\n") drops
from 143945 to 128650.
R=r,ken
DELTA=22 (20 added, 0 deleted, 2 changed)
OCL=28255
CL=28290
2009-05-05 12:43:00 -07:00
Robert Griesemer
eea33fc69c
better io.ByteBuffer implementation:
...
- more light-weight
- better buffer management
- added test cases
R=r
DELTA=227 (167 added, 35 deleted, 25 changed)
OCL=28252
CL=28289
2009-05-05 12:00:52 -07:00
Russ Cox
747e26166a
fmt: dead code and data
...
R=r
DELTA=10 (0 added, 10 deleted, 0 changed)
OCL=28258
CL=28287
2009-05-05 11:24:03 -07:00
Rob Pike
2067b9fb92
string slicing is efficient so remove base and bounds arguments from RuneCountInString
...
R=rsc
DELTA=6 (1 added, 0 deleted, 5 changed)
OCL=28242
CL=28256
2009-05-04 22:12:13 -07:00
Ken Thompson
567a7bf664
more code optimization
...
1. dont clear external and heap objects
2. propagate constant assignment
R=r
OCL=28254
CL=28254
2009-05-04 21:48:46 -07:00
David Symonds
2f284948af
Remake exvar package to be more Go-ish.
...
It now exports a Var interface (anyone can export their own custom var types now), so users need to create and manage their own vars and mark them as exportable via the Publish function. They are exposed via /debug/vars.
R=r,rsc
APPROVED=r
DELTA=605 (314 added, 186 deleted, 105 changed)
OCL=28143
CL=28239
2009-05-04 15:14:22 -07:00
Ken Thompson
5963f59067
more morestack fiddling
...
R=r
OCL=28204
CL=28204
2009-05-03 19:09:14 -07:00
Ken Thompson
a5a878986c
more code fiddling
...
R=r
OCL=28201
CL=28201
2009-05-03 15:17:03 -07:00
David Symonds
fc51a98ffb
Fix mismatched quote in a comment.
...
R=gri
APPROVED=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=28184
CL=28192
2009-05-02 17:59:42 -07:00
Ken Thompson
49f7494894
code optmization
...
drip init function if it doesnt do anything
R=r
OCL=28180
CL=28180
2009-05-01 18:55:16 -07:00
Ken Thompson
1ed7f18165
code improvement
...
better calling of morestack
R=r
OCL=28179
CL=28179
2009-05-01 18:07:33 -07:00
Kai Backman
eac5db7f4c
Copied 8g/6g into 5g. Used sharp tools to coax a .5 file out
...
of 5g. 5l balks at the output and running 5g with -S shows
the true extent of the disaster. Still, better than
yesterday. Maybe.
Tested on the canonical:
package main
func main() {
}
R=rsc
APPROVED=rsc
DELTA=4182 (4181 added, 0 deleted, 1 changed)
OCL=27601
CL=28175
2009-05-01 13:21:53 -07:00
Robert Griesemer
68523603e1
- incorporated feedback per rsc
...
- fixed a bug and added corresponding test case
R=rsc
DELTA=114 (18 added, 29 deleted, 67 changed)
OCL=28114
CL=28128
2009-04-30 14:43:06 -07:00
Russ Cox
83e976d53e
bug146: array/slice conversion before I left missed conversions
...
R=ken
OCL=28120
CL=28124
2009-04-30 13:49:58 -07:00
Russ Cox
bd8e25ca57
auto-detect whether to use IPv6 or IPv4 kernel interface
...
R=r
DELTA=12 (9 added, 0 deleted, 3 changed)
OCL=28096
CL=28118
2009-04-30 13:41:36 -07:00
Russ Cox
10817ab9d2
better error messages, not that anyone ever sees them
...
R=r
DELTA=30 (9 added, 1 deleted, 20 changed)
OCL=28104
CL=28117
2009-04-30 13:40:55 -07:00
Russ Cox
48974f553d
change 6l library directory flag to -L,
...
to match traditional c linkers.
R=r
DELTA=42 (8 added, 12 deleted, 22 changed)
OCL=28101
CL=28115
2009-04-30 13:32:39 -07:00
Rob Pike
5dc95206f2
don't print binary data. add TODO for better errors.
...
TBR=rsc
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=28066
CL=28070
2009-04-29 23:33:48 -07:00
Rob Pike
93831d25db
rename variables for clarity.
...
add test for structure alignment/offset.
R=gri
DELTA=49 (35 added, 0 deleted, 14 changed)
OCL=28068
CL=28068
2009-04-29 22:16:53 -07:00
Russ Cox
89f8238a99
don't set CLONE_PTRACE -- it confuses strace
...
R=r
DELTA=4 (3 added, 1 deleted, 0 changed)
OCL=28063
CL=28065
2009-04-29 18:54:44 -07:00
Russ Cox
d2e42f3e48
if the process stops with SIGTRAP (breakpoint),
...
don't relay the signal when restarting it.
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=28060
CL=28064
2009-04-29 18:53:01 -07:00
Rob Pike
c0b8b969ae
Bug in reflect found by gri. Structs in 6g have a minimum alignment.
...
iant: will this be ok in gccgo?
R=rsc
DELTA=9 (8 added, 0 deleted, 1 changed)
OCL=28059
CL=28062
2009-04-29 18:51:12 -07:00
Rob Pike
49eb63cfd5
drop unused result name - trivial change.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=28056
CL=28058
2009-04-29 18:20:09 -07:00
Russ Cox
f7d3eb9db9
exit with error status EPIPE if
...
one fd gets too many EPIPEs in a row
during write.
R=r
DELTA=10 (9 added, 0 deleted, 1 changed)
OCL=28057
CL=28057
2009-04-29 18:18:42 -07:00
Brendan O'Dea
2cf5c809d0
Ignore SIGPIPE such that write returns EPIPE.
...
Currently a http server will be killed on receipt of SIGPIPE
if a client closes a socket which the server is trying to
write to.
R=rsc
APPROVED=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=27959
CL=28055
2009-04-29 17:36:58 -07:00
Brendan O'Dea
7326a389fc
Fix channels used by WaitWrite (http server hangs on writes
...
which hit EAGAIN).
R=rsc
APPROVED=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=27955
CL=28054
2009-04-29 17:36:37 -07:00
Ken Thompson
7a98315c96
allow "defer close(chan)"
...
bug found by anton
R=r
OCL=28001
CL=28001
2009-04-28 17:20:18 -07:00
Ken Thompson
91ce0ef8f3
bug 139
...
R=r
OCL=27987
CL=27987
2009-04-28 13:52:56 -07:00
Ken Thompson
ad36c39211
bug 145
...
R=r
OCL=27979
CL=27979
2009-04-28 12:28:31 -07:00
Robert Griesemer
4fc82c2e1e
fix for broken build
...
TBR=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=27969
CL=27969
2009-04-28 09:56:33 -07:00
David Symonds
a08fb0ff33
Add a HTTP handler to the exvar package.
...
R=r
APPROVED=r
DELTA=20 (11 added, 6 deleted, 3 changed)
OCL=27782
CL=27950
2009-04-28 04:26:07 -07:00
David Symonds
1304183efc
Add more dependencies for lib/go.
...
This makes "make nuke install" work again.
R=r
APPROVED=r
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=27929
CL=27932
2009-04-27 21:52:30 -07:00
Rob Pike
bd3b2f843f
implement .alternates
...
R=rsc
OCL=27928
CL=27928
2009-04-27 21:04:46 -07:00
Stephen Ma
eb5eea9a8f
Fix the chunked encoding - terminate the chunk with CRLF.
...
R=rsc
APPROVED=r
DELTA=11 (10 added, 0 deleted, 1 changed)
OCL=27723
CL=27879
2009-04-27 00:38:04 -07:00
David Symonds
f4b92c8624
Add string-valued variables to exvar.
...
R=r
APPROVED=r
DELTA=62 (58 added, 1 deleted, 3 changed)
OCL=27756
CL=27877
2009-04-26 20:57:01 -07:00
Brendan O'Dea
68b881791f
flags.Usage() calls fmt.Fprintf() with incorrect args
...
R=r
APPROVED=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=27777
CL=27876
2009-04-26 18:36:17 -07:00
Robert Griesemer
bf53e16f6d
- install doc in lib/go
...
- adjust dependent files
R=rsc
DELTA=1132 (567 added, 562 deleted, 3 changed)
OCL=27862
CL=27862
2009-04-25 17:01:41 -07:00
Ken Thompson
b03b541b7a
recognize a defined constant
...
as a new name in a later declaration
(bug 144)
R=r
OCL=27850
CL=27850
2009-04-24 16:43:31 -07:00
Robert Griesemer
9c3a9b71c8
- fixed a couple of potential end-less loops
...
(no progress in presence of syntax errors)
- end parsing early if source doesn't start
proper package clause
R=iant
DELTA=18 (7 added, 6 deleted, 5 changed)
OCL=27840
CL=27842
2009-04-24 12:59:09 -07:00
Ben Eitzen
155ec1d904
Clear upper bits of 64-bit indexing register when using types smaller than 64 bits.
...
APPROVED=ken
OCL=27811
CL=27823
2009-04-23 18:23:34 -07:00
Rob Pike
258a08ed8f
add {.tab}
...
fix a couple of comments
TBR=rsc
OCL=27716
CL=27716
2009-04-22 00:53:35 -07:00
David Symonds
d724092407
Clean up some more code after bug143 was fixed.
...
R=r
APPROVED=r
DELTA=6 (0 added, 5 deleted, 1 changed)
OCL=27708
CL=27708
2009-04-21 20:24:28 -07:00
Ken Thompson
190a540892
2 minor bugs.
...
lv context for some [] operations
calling implicit(*map) before walk.
R=r
OCL=27706
CL=27706
2009-04-21 19:52:13 -07:00
Ken Thompson
c18db5aa18
bug in shift of longer operand
...
by a shorter operand. the bits
in the difference were not cheared.
R=r
OCL=27705
CL=27705
2009-04-21 19:38:58 -07:00
David Symonds
f8931c6ceb
Bug 143 is fixed, so clean up some of exvar.
...
R=r
APPROVED=r
DELTA=8 (3 added, 1 deleted, 4 changed)
OCL=27699
CL=27701
2009-04-21 18:36:53 -07:00
Ken Thompson
b5e7562191
supply default indirection to
...
map indexing - bug 143
R=r
OCL=27695
CL=27695
2009-04-21 17:00:08 -07:00
David Symonds
5cb6843a4e
Change exvar to use a goroutine channel worker instead of a mutex for synchronisation.
...
Also it should be more testable, as there's less global state.
R=r
APPROVED=r
DELTA=113 (38 added, 12 deleted, 63 changed)
OCL=27653
CL=27694
2009-04-21 16:50:09 -07:00
Robert Griesemer
9c456283f3
minor adjustment to comment formatting for better godoc output
...
R=r
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=27687
CL=27689
2009-04-21 15:30:17 -07:00
Robert Griesemer
011bf2b6d3
minor adjustments to comments for better godoc output
...
R=r
DELTA=6 (0 added, 0 deleted, 6 changed)
OCL=27686
CL=27688
2009-04-21 15:14:34 -07:00
Robert Griesemer
3ae849d47d
- documentation for bignum package
...
- removed some constants from public interface
R=r
DELTA=375 (238 added, 14 deleted, 123 changed)
OCL=27636
CL=27668
2009-04-21 10:52:00 -07:00
David Symonds
de489fb38c
Refactor exvar to use interface types, and add mapVar.
...
R=r
APPROVED=r
DELTA=170 (136 added, 6 deleted, 28 changed)
OCL=27628
CL=27652
2009-04-20 22:38:14 -07:00
Rob Pike
a6bc344351
rewrite template library:
...
- separate parsing from execution
- rearrange code for organizational clarity
- provide execution errors and parse-time errors
- implement .or for repeated
TBR=rsc
OCL=27650
CL=27650
2009-04-20 18:51:13 -07:00
David Symonds
8e4b65d041
Move iterable package to usr/dsymonds/.
...
R=r
APPROVED=r
DELTA=598 (330 added, 266 deleted, 2 changed)
OCL=27627
CL=27649
2009-04-20 18:13:14 -07:00
David Symonds
d88fb9f0f6
Oops, forgot to commit this change.
...
R=r
APPROVED=r
DELTA=3 (1 added, 0 deleted, 2 changed)
OCL=27624
CL=27626
2009-04-20 00:43:10 -07:00
David Symonds
dc5cffbeb7
Use the mutex in exvar.Set since map access is not atomic.
...
Imagine your var has a value of zero. If you have a goroutine calling Set(5),
and another calling Increment(+1), then you only want one of these outcomes:
- Set completes first, and then Increment occurs => 6
- Increment completes first, and then Set occurs => 5
However, you could get a sequence:
- read (for Increment) 0
- set (for Set) 5
- write (for Increment) 1
This results in a value of 1, which is undesirable.
Kudos to dnadasi for catching this.
R=r
APPROVED=r
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=27625
CL=27625
2009-04-20 00:42:08 -07:00
David Symonds
a6156873d0
Add Inject function to iterable package.
...
Fix a couple of style mistakes.
R=r,rsc
APPROVED=r
DELTA=34 (30 added, 1 deleted, 3 changed)
OCL=27623
CL=27623
2009-04-19 23:52:29 -07:00
David Symonds
3cc702ba60
Initial cut at an "exported variables" (exvar) package.
...
This handles integer-valued vars in a singleton struct, and exports functions
for incrementing, setting and getting those vars, as well as rendering all the
vars in a standard format.
Demonstrate the use of the exvar package in the http/triv server.
R=dcross,r
APPROVED=r
DELTA=122 (122 added, 0 deleted, 0 changed)
OCL=27617
CL=27622
2009-04-19 21:17:27 -07:00
Rob Pike
7e1cfa7432
Readn is a silly name when there's no n. Change to FullRead.
...
R=gri
DELTA=15 (0 added, 0 deleted, 15 changed)
OCL=27619
CL=27619
2009-04-19 21:02:29 -07:00
Rob Pike
ae08a48719
the Big Error Shift applied to lib/time/zoneinfo.go.
...
R=gri
DELTA=22 (5 added, 0 deleted, 17 changed)
OCL=27608
CL=27614
2009-04-18 16:44:13 -07:00
Ken Thompson
34b6f642de
mixed old/new declaration
...
exact spec:
a) must be a multi-assignment w :=
b) a proper subset of the lhs
can be declared in same block
with the same type with no
"redeclaration" error
R=r
OCL=27610
CL=27610
2009-04-18 13:58:04 -07:00
Rob Pike
bfd5ede78d
add -P pkgdir option to 6l to have it look first in pkgdir for a package.
...
this allows gotest to find the locally built package when doing
make
gotest
without this option, one would have to say
make install
gotest
which kinda defeats the purpose
based on discussions with rsc.
R=ken,rsc
DELTA=12 (10 added, 1 deleted, 1 changed)
OCL=27606
CL=27606
2009-04-17 19:39:45 -07:00
Rob Pike
45ed7297e8
Step 2 of the Big Error Shift.
...
Change the representation of errors in "os" to be cleaner.
(But they are not really representative of the power of the new scheme.)
Step 3 will be to remove all references to os.NewError.
Step 4 will be to delete the second half of lib/os/error.go.
R=rsc
OCL=27587
CL=27587
2009-04-17 00:36:15 -07:00
Rob Pike
aaf63f8d06
Step 1 of the Big Error Shift: make os.Error an interface and replace *os.Errors with os.Errors.
...
lib/template updated to use new setup; its clients also updated.
Step 2 will make os's error support internally much cleaner.
R=rsc
OCL=27586
CL=27586
2009-04-17 00:08:24 -07:00
Russ Cox
3ea8d854a3
make string(array) take []byte only (and thus *[10]byte but not [10]byte)
...
R=ken
OCL=27581
CL=27585
2009-04-16 23:07:30 -07:00
Russ Cox
ea12ed4fdd
regenerate makefile with installed gobuild
...
R=r
DELTA=23 (8 added, 0 deleted, 15 changed)
OCL=27577
CL=27583
2009-04-16 23:07:00 -07:00
Rob Pike
3a8ff8237a
fix linux build
...
R=rsc
OCL=27579
CL=27579
2009-04-16 22:43:34 -07:00
Russ Cox
1f6463f823
Convert go tree to hierarchical pkg directory:
...
import (
"vector" -> "container/vector"
"ast" -> "go/ast"
"sha1" -> "hash/sha1"
etc.
)
and update Makefiles. Because I did the conversion
semi-automatically, I sorted all the import blocks
as a post-processing. Some files have therefore
changed that didn't strictly need to.
Rename local packages to lower case.
The upper/lower distinction doesn't work on OS X
and complicates the "single-package directories
with the same package name as directory name"
heuristic used by gobuild and godoc to create
the correlation between source and binary locations.
Now that we have a plan to avoid globally unique
names, the upper/lower is unnecessary.
The renamings will cause trouble for a few users,
but so will the change in import paths.
This way, the two maintenance fixes are rolled into
one inconvenience.
R=r
OCL=27573
CL=27575
2009-04-16 20:52:37 -07:00
Russ Cox
0f153ec6b4
build packages in obj/ subdirectory that mimics $GOROOT/pkg.
...
for example, if building in src/lib/container,
objects go in obj/container/, so that 6g -Iobj
will find "container/vector".
install packages in hierarchy in $GOROOT.
this change only updates gobuild.
another change will have to update all
the sources to refer to "container/vector" etc
and regenerate all the Makefiles.
there are some pretty lame functions here
(e.g., Mkdir, Remove, the Getenv("PWD"))
but i will implement better ones in another CL.
R=r
DELTA=117 (99 added, 2 deleted, 16 changed)
OCL=27550
CL=27574
2009-04-16 20:52:13 -07:00
Rob Pike
3761da2d01
document template
...
R=rsc
DELTA=92 (73 added, 0 deleted, 19 changed)
OCL=27566
CL=27572
2009-04-16 17:44:23 -07:00
Russ Cox
c8f9378889
regenerate Makefiles.
...
fix bug in RPC.go (import "RPC" not "rpc.pb")
R=r
DELTA=483 (261 added, 64 deleted, 158 changed)
OCL=27547
CL=27549
2009-04-16 00:18:37 -07:00
Russ Cox
7847056dfb
rewrite gobuild in go.
...
R=r
DELTA=1305 (704 added, 590 deleted, 11 changed)
OCL=27546
CL=27548
2009-04-16 00:18:11 -07:00
Russ Cox
1cb3b7d124
panicln: emit just one newline
...
R=ken
OCL=27537
CL=27545
2009-04-15 22:38:09 -07:00
Rob Pike
57bff962d9
fix gotest by fixing nm -s to print in file order by storing a sequence number
...
as the .6 file is read. now tests will be run in file order.
R=rsc
DELTA=9 (6 added, 1 deleted, 2 changed)
OCL=27542
CL=27544
2009-04-15 21:57:55 -07:00
Russ Cox
60ce95d7a1
code changes for array conversion.
...
as a reminder, the old conversion
was that you could write
var arr [10]byte;
var slice []byte;
slice = arr;
but now you have to write
slice = &arr;
the change eliminates an implicit &, so that
the only implicit &s left are in the . operator
and in string(arr).
also, removed utf8.EncodeRuneToString
in favor of string(rune).
R=r
DELTA=83 (1 added, 23 deleted, 59 changed)
OCL=27531
CL=27534
2009-04-15 20:27:45 -07:00
Russ Cox
65d397f747
compiler implementation of array slice change
...
R=ken
OCL=27533
CL=27533
2009-04-15 20:27:22 -07:00
Russ Cox
37a5374c81
document and partially fix a race
...
R=r
DELTA=24 (21 added, 0 deleted, 3 changed)
OCL=27527
CL=27527
2009-04-15 19:01:48 -07:00
Russ Cox
1605176e25
godoc: use data-driven templates for html, text generation
...
R=gri
DELTA=1341 (668 added, 282 deleted, 391 changed)
OCL=27485
CL=27526
2009-04-15 18:53:43 -07:00
Russ Cox
bafd1787fe
fix traceback prints - %S was not advancing pointer enough
...
R=r
DELTA=6 (5 added, 1 deleted, 0 changed)
OCL=27500
CL=27525
2009-04-15 18:52:28 -07:00
Russ Cox
cff99ba167
make Location translate relative path to absolute
...
(HTTP requires absolute in protocol).
add URL tests
R=r
DELTA=243 (242 added, 0 deleted, 1 changed)
OCL=27472
CL=27523
2009-04-15 18:40:55 -07:00
Russ Cox
17c290ffb9
tweak flag comment
...
R=r
DELTA=36 (1 added, 0 deleted, 35 changed)
OCL=27484
CL=27522
2009-04-15 18:39:35 -07:00
Russ Cox
64627b04fb
check for type equality in deepequal
...
R=r,dnadasi
DELTA=9 (8 added, 0 deleted, 1 changed)
OCL=27473
CL=27486
2009-04-15 00:55:58 -07:00
Russ Cox
19692beee8
treat "" as empty
...
R=r
DELTA=10 (10 added, 0 deleted, 0 changed)
OCL=27479
CL=27481
2009-04-15 00:26:49 -07:00
Russ Cox
816f5b3124
better html support.
...
turn on error reporting; not enough info otherwise.
R=r
DELTA=49 (43 added, 6 deleted, 0 changed)
OCL=27476
CL=27478
2009-04-15 00:05:47 -07:00
Rob Pike
1cb1251436
configurable delimiters.
...
R=rsc
DELTA=139 (90 added, 7 deleted, 42 changed)
OCL=27475
CL=27477
2009-04-14 22:35:18 -07:00
Russ Cox
cf8b9ce580
test & fix template used twice
...
R=r
DELTA=30 (30 added, 0 deleted, 0 changed)
OCL=27470
CL=27474
2009-04-14 21:25:33 -07:00
Russ Cox
fa60226073
http additions
...
file system server
add NotFound, Redirect functions
method on a string
R=r
DELTA=212 (199 added, 4 deleted, 9 changed)
OCL=27467
CL=27471
2009-04-14 20:31:31 -07:00
Russ Cox
935953a9f8
tweak interface warning heuristic.
...
some day i will fix this for real.
R=ken
OCL=27468
CL=27468
2009-04-14 19:57:27 -07:00
Russ Cox
4b8c13dc20
do not create interfaces containing interfaces
...
R=r
DELTA=16 (14 added, 0 deleted, 2 changed)
OCL=27464
CL=27466
2009-04-14 19:03:57 -07:00
Russ Cox
ff73221d6f
fix infinite loop in Readdirnames: bufp > nbuf can happen
...
after EOF has been hit, because nbuf is now 0 or -1.
discard old comment.
R=r
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=27463
CL=27465
2009-04-14 18:52:39 -07:00
Ian Lance Taylor
ca9765d83a
Make the reflection library match the reflection string which
...
6g generates for functions: expect the keyword "func". The
older reflection syntax, without the "func", is still
recognized for simplicity in parsing interface reflection
strings.
R=r,rsc
DELTA=66 (31 added, 8 deleted, 27 changed)
OCL=27396
CL=27422
2009-04-14 06:46:01 -07:00
Russ Cox
e21d981a2f
add type in not-found error messages.
...
delay indirection so that values passed to
formatters preserve pointer-ness.
R=r
OCL=27410
CL=27414
2009-04-14 01:12:20 -07:00
Rob Pike
ff12f2effd
add (stub) parser to template code, enabling rewrite.
...
update pretty to use it.
change stdout to stderr in pretty.
R=rsc
DELTA=173 (52 added, 24 deleted, 97 changed)
OCL=27405
CL=27409
2009-04-14 00:06:49 -07:00
Rob Pike
c1ed7d7d25
enable test and fix bug in white space before {
...
R=rsc
DELTA=6 (0 added, 0 deleted, 6 changed)
OCL=27404
CL=27404
2009-04-13 20:37:24 -07:00
Russ Cox
fa7be65bc0
template bug
...
--- FAIL: template.TestAll
for "{.section data}{.end} {header}\n": expected " 77\n" got " {header}\n"
R=r
DELTA=20 (14 added, 0 deleted, 6 changed)
OCL=27395
CL=27402
2009-04-13 19:29:38 -07:00
Russ Cox
6d617a881a
change template function interface to
...
func(w io.Write, value interface{}, format string)
R=r
DELTA=16 (3 added, 3 deleted, 10 changed)
OCL=27399
CL=27401
2009-04-13 19:29:23 -07:00
Rob Pike
a20a50b0b2
\r is white space
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=27397
CL=27400
2009-04-13 19:27:35 -07:00
Russ Cox
9b3f43774a
fix error return in Remove
...
change canexec to canExec.
R=r
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=27393
CL=27398
2009-04-13 19:14:09 -07:00
Russ Cox
5eae3b2102
lib misc
...
* exec.LookPath
* flag.Args
* os.Remove
* strings.HasPrefix
* strings.HasSuffix
* syscall.Rmdir
TBR=r
DELTA=100 (100 added, 0 deleted, 0 changed)
OCL=27373
CL=27392
2009-04-13 16:50:42 -07:00
Russ Cox
4011733d3c
allow nil user map
...
R=r
DELTA=5 (3 added, 0 deleted, 2 changed)
OCL=27371
CL=27389
2009-04-13 15:23:57 -07:00
Russ Cox
a9996d0f89
runtime nits: variable name and comments
...
R=r
DELTA=10 (0 added, 0 deleted, 10 changed)
OCL=27374
CL=27388
2009-04-13 15:22:36 -07:00
Russ Cox
73aadff8eb
add strconv.Unquote
...
R=r
DELTA=229 (227 added, 0 deleted, 2 changed)
OCL=27200
CL=27366
2009-04-13 13:27:39 -07:00
Russ Cox
a62467af93
fix stringrange test
...
R=ken
OCL=27353
CL=27353
2009-04-13 05:31:44 -07:00
Ken Thompson
907509de4a
tweak
...
R=r
OCL=27344
CL=27344
2009-04-12 22:34:36 -07:00
Rob Pike
54ec719391
fix string range to have full unicode range (up to 10FFFF).
...
add test for string range.
test has minor failure: after loop the index == len(s); should be len(s)-1
in this case. according to spec, vars are left at position at last
iteration.
R=ken,rsc
DELTA=259 (161 added, 96 deleted, 2 changed)
OCL=27343
CL=27343
2009-04-12 17:01:17 -07:00
Rob Pike
9ddeb2105f
change replacement rune to its correct value, fffd
...
R=ken
OCL=27342
CL=27342
2009-04-12 16:13:34 -07:00
Ken Thompson
a91a8042b4
range over strings
...
R=r
OCL=27332
CL=27332
2009-04-10 19:49:31 -07:00
Kai Backman
35a775d045
Fixed optab to support SWI with long constant (the mode used
...
for linux system calls).
R=rsc
APPROVED=rsc
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=27325
CL=27328
2009-04-10 16:44:01 -07:00
Kai Backman
4e1896a1b5
Adding ARM elf support to the 5l linker.
...
R=rsc
APPROVED=rsc
DELTA=312 (312 added, 0 deleted, 0 changed)
OCL=27133
CL=27326
2009-04-10 16:35:36 -07:00
Ken Thompson
cb15bbe748
bug in stack size used in
...
extending segmented stack
R=r
OCL=27319
CL=27319
2009-04-10 15:23:19 -07:00
Rob Pike
870c91aec2
fix typo breaking linux build
...
R=rsc
OCL=27304
CL=27304
2009-04-10 02:50:22 -07:00
Ken Thompson
f9854978e2
bug 142
...
order of evaluation && and ||
R=r
OCL=27294
CL=27294
2009-04-09 19:11:24 -07:00
Ken Thompson
3657061550
change representation of strings
...
R=r
OCL=27293
CL=27293
2009-04-09 18:16:21 -07:00
Rob Pike
9192dd8e86
Start list of default formatters for template variables.
...
The HTML one here is just a stub - should use an HTML library to do the right thing.
R=rsc
DELTA=54 (47 added, 2 deleted, 5 changed)
OCL=27250
CL=27250
2009-04-09 00:10:46 -07:00
Rob Pike
4482801477
move template into its own directory so it can have more files
...
R=rsc
DELTA=1421 (736 added, 685 deleted, 0 changed)
OCL=27249
CL=27249
2009-04-08 23:43:02 -07:00
Rob Pike
3a7df4dde0
add support for variable formatters
...
R=rsc
DELTA=134 (75 added, 41 deleted, 18 changed)
OCL=27245
CL=27247
2009-04-08 23:33:31 -07:00
Russ Cox
f95da9a639
yet another attempt at auto-linking
...
store only the original import path string (+ .a)
if 6g resolves it to an archive file.
let 6l re-resolve the .a at link time.
this lets libraries build against an archive
in the current directory but get used
against an installed archive.
R=r
OCL=27244
CL=27244
2009-04-08 22:45:33 -07:00
Rob Pike
91a2ac1f1e
undo workaround pending real fix
...
R=rsc
OCL=27243
CL=27243
2009-04-08 22:24:40 -07:00
Rob Pike
a029f1eb7e
work around link bug
...
R=rsc
OCL=27242
CL=27242
2009-04-08 22:17:09 -07:00
Rob Pike
df0b471533
First cut at templating library for text generation
...
R=rsc
DELTA=663 (663 added, 0 deleted, 0 changed)
OCL=27239
CL=27241
2009-04-08 22:08:55 -07:00
David Symonds
03fbd72ddb
Add new functions to the iterable package:
...
- Filter
- Find
- Partition
R=rsc
APPROVED=rsc
DELTA=117 (92 added, 17 deleted, 8 changed)
OCL=27135
CL=27240
2009-04-08 21:50:40 -07:00
Russ Cox
3067781ab9
func f() (int, int);
...
x := f();
used to give
fatal error: dowidth fn struct struct { int; int }
now gives
assignment count mismatch: 1 = 2
R=ken
OCL=27198
CL=27201
2009-04-07 22:20:37 -07:00
Russ Cox
7cbec417b1
fumbly fingers + non-working ^C
...
submitted CL without applying edits.
make changes from CL 27142 review
R=r
DELTA=26 (17 added, 3 deleted, 6 changed)
OCL=27155
CL=27199
2009-04-07 21:53:39 -07:00
Russ Cox
f13ce3ab34
throw away . and .. in directory listings
...
R=r
DELTA=13 (11 added, 0 deleted, 2 changed)
OCL=27147
CL=27154
2009-04-07 00:40:50 -07:00
Russ Cox
61ba160120
Chdir
...
R=r
DELTA=17 (17 added, 0 deleted, 0 changed)
OCL=27146
CL=27153
2009-04-07 00:40:36 -07:00
Russ Cox
16b38b554f
add path.Clean and other utilities.
...
use path.Clean in web server to sanitize URLs.
http://triv/go/../../../etc/passwd
no longer serves the password file.
it redirects to
http://triv/etc/passwd
which then gets a 404.
R=r
DELTA=288 (286 added, 0 deleted, 2 changed)
OCL=27142
CL=27152
2009-04-07 00:40:07 -07:00
Rob Pike
640f3f25dc
add error case in doc for Index. simplify code slightly.
...
R=rsc
DELTA=5 (1 added, 0 deleted, 4 changed)
OCL=27148
CL=27151
2009-04-07 00:32:16 -07:00
Russ Cox
d50c70d261
set line number for errors produced during walkstate.
...
R=ken
OCL=27145
CL=27145
2009-04-06 22:17:46 -07:00
Rob Pike
ee19695cfc
make NewBufRead etc. idempotent
...
R=rsc
DELTA=63 (59 added, 0 deleted, 4 changed)
OCL=27143
CL=27143
2009-04-06 21:42:14 -07:00
Russ Cox
ac6ebfdea9
add method Value() Value to InterfaceValue.
...
use Value() in print to print underlying value
from interface.
before:
package main
import "fmt"
func main() {
x := []interface{} {1, "hello", 2.5};
fmt.Println(x[0], x[1], x[2], x);
}
1 hello 2.5 [<non-nil interface> <non-nil interface> <non-nil interface>]
after:
1 hello 2.5 [1 hello 2.5]
R=r
DELTA=44 (22 added, 16 deleted, 6 changed)
OCL=27139
CL=27141
2009-04-06 21:28:04 -07:00
Russ Cox
b80fdd1e3b
an early 6g limitation forced the use of
...
string(b)[0:n]
instead of the more direct string(b[0:n]).
convert to the more direct form.
R=r
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=27082
CL=27140
2009-04-06 21:14:38 -07:00
Peter McKenzie
0ea0919534
Extremely minor fix to ByteBuffer.
...
R=r
APPROVED=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=27123
CL=27130
2009-04-06 17:03:07 -07:00
David Symonds
7b77851275
Add an Iterable package with handy functions like All, Any and Map.
...
Add a Data method to vector.Vector.
R=r,rsc
APPROVED=rsc
DELTA=173 (170 added, 0 deleted, 3 changed)
OCL=26980
CL=27098
2009-04-05 22:40:40 -07:00
Russ Cox
907cb4f1e6
fix both of anton's bugs:
...
* make([100]int) was being compiled to
make([]int), kind of.
* []this = [100]that was working for any this, that.
turned up a typo in pipe_test.go
R=ken
OCL=27081
CL=27081
2009-04-03 23:20:51 -07:00
Robert Griesemer
461fb39367
change in negation
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=27061
CL=27061
2009-04-02 23:26:55 -07:00
Robert Griesemer
27d1159ab4
require ";" separator after function literals
...
R=rsc
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=27057
CL=27059
2009-04-02 22:59:57 -07:00
Russ Cox
39436f2a74
special case check for this situation
...
; cat >http.go
package main
import "http" // intended the library, not this file
^D
; 6g http.go
; 6g http.go
http.go:4: export/package mismatch: init
;
new error:
http.6:7 http.go:3: cannot import package main
R=ken
OCL=27053
CL=27053
2009-04-02 21:46:19 -07:00
Russ Cox
07687705a4
type n t;
...
was copying a bit too much about t into n,
like whether the signature was queued to be printed.
(bug reported by anton)
was also editing t, meaning you could do
type T int;
func (p int) Meth() { }
both fixed.
R=ken
OCL=27052
CL=27052
2009-04-02 21:38:11 -07:00
Russ Cox
416b27548e
use _f007·filename for func literals.
...
this avoids problems people have run into with
multiple closures in the same package.
when preparing filename, only cut off .go, not .anything.
this fixes a bug tgs ran into with foo.pb.go and foo.go
in the same package.
also turn bad identifier chars from filename into
underscores: a-b.pb.go => a_b_pb
R=ken
OCL=27050
CL=27050
2009-04-02 18:32:57 -07:00
Ken Thompson
9efd6b8a3d
compiler falut for forgetting
...
the assignment on a type switch
R=r
OCL=27048
CL=27048
2009-04-02 18:06:43 -07:00
Russ Cox
58f5f4f18d
use separate lex buf for better errors:
...
package main
func main() { func(){}() + + }
x.go:2: syntax error near _f001
becomes
x.go:2: syntax error near func
R=ken
OCL=27047
CL=27047
2009-04-02 17:59:09 -07:00
Russ Cox
8d8225d529
turn gc of unused data/code back on in loaders.
...
turned it off while debugging 8 runtime problem,
checked in the change accidentally.
R=r
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=27040
CL=27046
2009-04-02 17:56:23 -07:00
Russ Cox
6b07021a2b
implement some more 8g
...
package main
func main() {
println("hello,", 123);
}
R=ken
OCL=27043
CL=27043
2009-04-02 16:48:06 -07:00
Russ Cox
d6c59ad7b8
clarification suggested by rob
...
R=r
DELTA=4 (4 added, 0 deleted, 0 changed)
OCL=26983
CL=27041
2009-04-02 16:41:53 -07:00
Robert Griesemer
e3fdcdfea7
- Ident node now takes a string Value instead of a []bytes
...
(this removes a lot of string() conversions down the road)
- a few minor adjustments
R=rsc
DELTA=11 (0 added, 0 deleted, 11 changed)
OCL=27029
CL=27038
2009-04-02 15:58:38 -07:00
Robert Griesemer
3ba69bf08b
Some AST tuning:
...
- have explicit XSpec nodes for declarations
- have a general GenDecl node instead of DeclList
R=rsc
DELTA=164 (52 added, 52 deleted, 60 changed)
OCL=27005
CL=27027
2009-04-02 10:15:58 -07:00
Daniel Nadasi
c4ad4f9fcf
Add a DeepEqual function to the reflect package
...
R=r,rsc
APPROVED=rsc
DELTA=167 (166 added, 0 deleted, 1 changed)
OCL=26982
CL=27017
2009-04-01 22:20:18 -07:00
Ken Thompson
2450c590e9
typeswitch - expression evaluated
...
twice instead of once.
R=r
OCL=27015
CL=27015
2009-04-01 21:28:59 -07:00
Rob Pike
62d11a3302
use range in vector iterator
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=27003
CL=27003
2009-04-01 16:34:25 -07:00
Russ Cox
95100344d3
fix runtime stack overflow bug that gri ran into:
...
160 - 75 was just barely not enough for deferproc + morestack.
added enum names and bumped to 256 - 128.
added explanation.
changed a few mal() (garbage-collected) to
malloc()/free() (manually collected).
R=ken
OCL=26981
CL=26981
2009-04-01 00:26:00 -07:00
David Symonds
c025cf64dc
Bail out of gotest immediately if compiling fails.
...
R=rsc
APPROVED=rsc
DELTA=4 (2 added, 2 deleted, 0 changed)
OCL=26978
CL=26978
2009-03-31 22:35:55 -07:00
Russ Cox
4b536c1e07
test for and fix bug involving reflect v.Interface() and ==.
...
R=r
DELTA=156 (149 added, 2 deleted, 5 changed)
OCL=26973
CL=26973
2009-03-31 17:33:04 -07:00
Robert Griesemer
07513c2599
1) Move parser.go into src/lib/go
...
- minor adjustments as suggested by rsc
2) Added parser_test fragment
3) Renamed some types in AST.go per rsc request
R=rsc
DELTA=2053 (2027 added, 0 deleted, 26 changed)
OCL=26963
CL=26971
2009-03-31 16:53:37 -07:00
Russ Cox
4702c0e5ef
more 386 runtime:
...
remove use of _subv in vlrt.c
darwin/386/signal.c
darwin/386/*
linux/386/* (forgotten before)
can run empty program on darwin/386 now.
R=r
DELTA=1140 (1021 added, 114 deleted, 5 changed)
OCL=26942
CL=26968
2009-03-31 15:45:12 -07:00
Russ Cox
42546f4812
multiple bugs in bitfield handling
...
R=r
DELTA=6 (3 added, 0 deleted, 3 changed)
OCL=26944
CL=26967
2009-03-31 15:44:43 -07:00
Russ Cox
dc5b4678e2
minimal 8g. can compile
...
package main
func main() {
}
and not much else.
R=ken
OCL=26943
CL=26943
2009-03-31 00:22:59 -07:00
Russ Cox
b87e3e8b7f
* move go-specific loader code
...
into gc directory, where it gets included as ../gc/ldbody
this is similar to the assemblers including ../cc/lexbody
and ../cc/macbody.
* hook go-specific loader code into 8l.
* make current 8.out.h and 6.out.h backward compatible
with plan 9's versions. i had added some constants in
the middle of enums and have now moved them to the end.
this keeps us from invalidating old .8 and .6 files.
not sure how much it really matters, but easy to do.
R=r
DELTA=1314 (667 added, 623 deleted, 24 changed)
OCL=26938
CL=26941
2009-03-31 00:20:07 -07:00
Russ Cox
b199035ba8
move tiny gsubr functions together at the top of the file.
...
delete unused mkenam file
R=ken
OCL=26940
CL=26940
2009-03-31 00:19:38 -07:00
Ian Lance Taylor
4e84174816
Separate the alignment of a field from the alignment of the
...
type of the field. Use the field alignment to compute the
size of a structure.
This may help 8g but is mainly for gccgo. gccgo maintains the
standard C/C++ ABI for structure field alignment. For the
i386, this requires that a float64 field in a struct be
aligned on a 32-bit boundary, although for efficiency a
variable of type float64 or []float64 should be aligned on a
64-bit boundary.
I also removed the unused size field from structField.
R=r
DELTA=117 (75 added, 2 deleted, 40 changed)
OCL=26842
CL=26936
2009-03-30 23:19:31 -07:00
Russ Cox
aacdc25399
fix http://b/1748082
...
package main
var f = func(a, b int) int { return a + b }
R=ken
OCL=26935
CL=26935
2009-03-30 22:26:00 -07:00
Russ Cox
441da9af0d
fix build (moved decl to go.h earlier
...
and changed vlong to int64).
R=ken
OCL=26934
CL=26934
2009-03-30 21:39:10 -07:00
Russ Cox
5e792b6c09
move portable object routines (especially
...
signature generation) into gc.
R=ken
OCL=26933
CL=26933
2009-03-30 21:31:29 -07:00
Russ Cox
941ed00b1d
closure bug: carry along outnamed flag.
...
R=ken
OCL=26930
CL=26930
2009-03-30 19:21:36 -07:00
Russ Cox
bac922c6e1
move portable code generation (basic statements) to gc.
...
R=ken
OCL=26929
CL=26929
2009-03-30 19:15:07 -07:00
David Symonds
79b55e226a
log.Stderr should actually go to stderr.
...
R=r
APPROVED=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=26926
CL=26928
2009-03-30 19:01:59 -07:00
Russ Cox
d30285a6f5
move some portable pieces of 6g/gsubr.c into gc/subr.c
...
int brcom(int);
int brrev(int);
void setmaxarg(Type*);
Sig* lsort(Sig*, int(*)(Sig*, Sig*));
int dotoffset(Node*, int*, Node**);
void stringpool(Node*);
void tempname(Node*, Type*);
R=ken
OCL=26922
CL=26922
2009-03-30 17:52:21 -07:00
Russ Cox
e5ba266e93
delete dregs: inarggen, genpanic, regret
...
R=ken
OCL=26916
CL=26918
2009-03-30 17:15:54 -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
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
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
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
Rob Pike
d1ac21849e
delete bogus vestige
...
R=rsc
OCL=25730
CL=25730
2009-03-04 22:03:35 -08:00
Rob Pike
927678694c
typos
...
R=gri
DELTA=3 (0 added, 1 deleted, 2 changed)
OCL=25728
CL=25728
2009-03-04 21:41:12 -08:00
Russ Cox
8ba287585a
sync: add documentation
...
R=r
DELTA=63 (57 added, 1 deleted, 5 changed)
OCL=25727
CL=25727
2009-03-04 21:30:07 -08:00
Rob Pike
a0feb32567
remove some incorrect capitalizations.
...
add commentary.
R=rsc
DELTA=231 (41 added, 24 deleted, 166 changed)
OCL=25724
CL=25726
2009-03-04 21:06:38 -08:00
Russ Cox
98b34e5bbd
reject invalid map key types at compile time
...
R=ken
OCL=25720
CL=25720
2009-03-04 17:38:37 -08:00
Robert Griesemer
bd4f5af107
- missing makefile
...
R=r
OCL=25714
CL=25714
2009-03-04 17:16:58 -08:00
Robert Griesemer
b4802dd568
Created new directory lib/lang:
...
- move scanner to into lib/lang
- added test
- adjusted various make and build files
R=r
DELTA=1731 (973 added, 753 deleted, 5 changed)
OCL=25668
CL=25713
2009-03-04 17:13:12 -08:00
Russ Cox
955638e2fb
disallow ordinary-type.(T), as in spec.
...
R=ken
OCL=25705
CL=25705
2009-03-04 14:50:25 -08:00
Rob Pike
e8e894bff3
enable pretty in run.bash
...
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=25651
CL=25655
2009-03-03 16:09:40 -08:00
Russ Cox
49cc649e59
back to T{x}, stricter handling of T(x) vs x.(T)
...
R=ken
DELTA=131 (60 added, 41 deleted, 30 changed)
OCL=25617
CL=25633
2009-03-03 08:41:02 -08:00
Russ Cox
be2edb5761
Automated g4 rollback of changelist 25024,
...
plus significant hand editing.
Back to T{x} for composite literals.
R=r
OCL=25612
CL=25632
2009-03-03 08:39:12 -08:00
Robert Griesemer
ea3d4540b3
- itob
...
- more test cases
R=rsc
DELTA=97 (52 added, 4 deleted, 41 changed)
OCL=25585
CL=25607
2009-03-02 17:52:58 -08:00
Russ Cox
e9b40580ba
fix names: s/fd/r/
...
R=r
DELTA=9 (0 added, 0 deleted, 9 changed)
OCL=25593
CL=25593
2009-03-02 16:12:04 -08:00
Ken Thompson
751d13cbce
bug 130 (go/defer) interface.method()
...
R=r
OCL=25356
CL=25356
2009-02-23 22:43:04 -08:00
Ken Thompson
a665e2924c
bug with select :=
...
R=r
OCL=25278
CL=25278
2009-02-21 12:41:34 -08:00
Russ Cox
ebc10db3e1
allow parens to disambiguate types.
...
examples:
chan <- (chan int)
chan (<- chan int)
(map[string]func())("a": main)
R=ken
OCL=25151
CL=25151
2009-02-18 10:07:46 -08:00
Rob Pike
6950491b4f
drop trailing slashes - missed comment from last review
...
TBR=rsc
OCL=25135
CL=25135
2009-02-17 19:59:23 -08:00
Rob Pike
03d6909ff7
more fun with triv.go: flags and arguments
...
R=rsc
DELTA=23 (23 added, 0 deleted, 0 changed)
OCL=25088
CL=25134
2009-02-17 19:35:01 -08:00
Russ Cox
d0424faf17
few more Sizeof.
...
R=r
DELTA=3 (0 added, 1 deleted, 2 changed)
OCL=25106
CL=25106
2009-02-17 13:40:28 -08:00
Ken Thompson
3c0fc400fb
fix unsafe.Sizeof("abc")
...
R=rsc
OCL=25105
CL=25105
2009-02-17 13:10:57 -08:00
Rob Pike
575257d503
use proper strconv in string values.
...
make test a little stronger.
R=rsc
DELTA=94 (27 added, 39 deleted, 28 changed)
OCL=25085
CL=25087
2009-02-16 21:55:37 -08:00
Russ Cox
c19468d8df
comment nit
...
R=r
DELTA=2 (0 added, 2 deleted, 0 changed)
OCL=25081
CL=25084
2009-02-16 20:44:29 -08:00
Russ Cox
eb3823a44d
allow hex, octal in Atoi, etc.
...
R=r
DELTA=169 (79 added, 23 deleted, 67 changed)
OCL=25079
CL=25083
2009-02-16 20:44:21 -08:00