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