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
Russ Cox
9e3e61627d
proposed XML parser design.
...
inspired by expat's callback interface,
but a bit simpler thanks to go interfaces.
also serves as reference notes about XML.
the parser itself is unimplemented.
not in Makefiles, though it does build.
R=r
DELTA=425 (425 added, 0 deleted, 0 changed)
OCL=25077
CL=25080
2009-02-16 20:14:21 -08:00
Rob Pike
bbc190b3ee
make interface to the flags themselves more public.
...
add visitor functions to scan the flags.
add a way to set a flag.
add a flag test.
R=rsc
DELTA=169 (99 added, 19 deleted, 51 changed)
OCL=25076
CL=25078
2009-02-16 19:43:15 -08:00
Russ Cox
d3d0c256be
bug123
...
R=ken
OCL=25075
CL=25075
2009-02-16 17:44:05 -08:00
Russ Cox
aa35aee07c
fix build - missed this file before
...
TBR=r
OCL=25074
CL=25074
2009-02-16 17:07:11 -08:00
Russ Cox
dfad8ea647
use embedded interface types
...
R=r
DELTA=205 (1 added, 157 deleted, 47 changed)
OCL=25071
CL=25073
2009-02-16 16:37:49 -08:00
Russ Cox
b4af09ab56
embedded interface types in interfaces.
...
R=ken
OCL=25072
CL=25072
2009-02-16 16:36:18 -08:00
Russ Cox
78906c3836
io.Pipe
...
assorted underscore cleanup
R=r
DELTA=488 (410 added, 3 deleted, 75 changed)
OCL=25070
CL=25070
2009-02-16 16:32:30 -08:00
Russ Cox
ff3173849e
assorted changes:
...
- use a lock instead of a thread in once
avoids deadlock in recursive once calls
- implement os.Setenv
- remove "export" from some scripts
- remove _ from names in time package
- fix time test for non-MTV machines
R=r
DELTA=265 (87 added, 58 deleted, 120 changed)
OCL=25057
CL=25057
2009-02-15 22:12:35 -08:00
Rob Pike
55d13cf139
change the URL in the test to avoid a redirection that breaks it in sydney.
...
R=rsc
OCL=25054
CL=25054
2009-02-15 19:58:00 -08:00
Russ Cox
91ceda5c18
add os.ForkExec, os.Exec, os.Wait, exec.OpenCmd.
...
as thread-safe as possible, given the surrounding system.
add stub RWLock implementation.
R=r
DELTA=852 (834 added, 6 deleted, 12 changed)
OCL=25046
CL=25053
2009-02-15 19:35:52 -08:00
Russ Cox
97dcc68f1e
insert ${GOOS} and ${GOARCH} in
...
command-line comment.
R=r
DELTA=11 (6 added, 0 deleted, 5 changed)
OCL=25051
CL=25051
2009-02-15 19:20:35 -08:00
Russ Cox
d8921c5294
cleanups:
...
get rid of _ on private names in net.
fix os_test file name list.
newline not needed on Errorf.
R=r
DELTA=305 (34 added, 2 deleted, 269 changed)
OCL=25047
CL=25047
2009-02-15 14:18:39 -08:00
Russ Cox
78a6d68c86
build nits
...
R=r
DELTA=8 (0 added, 6 deleted, 2 changed)
OCL=25045
CL=25045
2009-02-15 13:41:48 -08:00
Russ Cox
3b3e63735e
bug fix for &x[0] when x is slice
...
R=ken
OCL=25044
CL=25044
2009-02-15 13:15:46 -08:00
Robert Griesemer
070738c30c
- added Makefile change again (lost due to to p4 misuse)
...
R=rsc
OCL=25026
CL=25026
2009-02-13 15:10:35 -08:00
Robert Griesemer
127526649f
- vector package (identical to array except for names)
...
- updated some file (but not all - left array package in place for now)
R=rsc
DELTA=530 (483 added, 0 deleted, 47 changed)
OCL=25025
CL=25025
2009-02-13 15:07:56 -08:00
Russ Cox
9f8f2e6130
convert composite literals from { } to ( ).
...
only non-trivial changes are in
convlit1.go
golden.out
R=gri
OCL=25019
CL=25024
2009-02-13 14:48:32 -08:00
Russ Cox
07244f7c80
add composite literal ( ) syntax.
...
warn about composite literal { } syntax.
R=ken
OCL=25018
CL=25023
2009-02-13 14:48:16 -08:00
Russ Cox
20b6de135b
fix build
...
TBR=r
OCL=25021
CL=25021
2009-02-13 14:35:36 -08:00
Russ Cox
5f4f5647ef
require type assertions when narrowing.
...
R=ken
OCL=24350
CL=24914
2009-02-11 17:57:29 -08:00
Russ Cox
49e2087848
insert type assertions when narrowing.
...
R=r
OCL=24349
CL=24913
2009-02-11 17:55:16 -08:00
Russ Cox
7cd24361bd
fix gc bug. i think this is tgs's second bug.
...
i stumbled across it in all.bash.
TBR=r
OCL=24912
CL=24912
2009-02-11 17:54:03 -08:00
Rob Pike
0c4010a747
change DirInfo->dirInfo now that 6g export bug is fixed
...
R=rsc
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=24788
CL=24805
2009-02-10 16:44:04 -08:00
Rob Pike
6017895659
drop the os_ prefix on the file names in os. os_test.go can stay.
...
R=rsc
DELTA=793 (392 added, 392 deleted, 9 changed)
OCL=24777
CL=24804
2009-02-10 16:40:06 -08:00
Russ Cox
73dd4a37f9
fix export bug Rob tripped over.
...
the lexer is already hiding names,
so this clumsy hack is no longer necessary.
R=ken
OCL=24783
CL=24783
2009-02-10 13:57:31 -08:00
Rob Pike
00b3d48f13
Make Readdirnames work properly on Linux.
...
Refactor so Readdir is portable code.
R=rsc
DELTA=192 (50 added, 130 deleted, 12 changed)
OCL=24770
CL=24772
2009-02-10 11:55:48 -08:00
Ian Lance Taylor
651972b31f
Implement unsafe.Alignof.
...
R=ken
DELTA=20 (19 added, 0 deleted, 1 changed)
OCL=24719
CL=24771
2009-02-10 11:46:26 -08:00
Rob Pike
d94c5aba12
Fix Readdirnames to behave properly if reading in little pieces. Requires storing some
...
state in the FD.
This is Darwin only. Next CL will make Readdir use Readdirnames to generate its files
and move Readdir into portable code, as well as fix Readdirnames for Linux.
R=rsc
DELTA=116 (79 added, 12 deleted, 25 changed)
OCL=24756
CL=24768
2009-02-10 11:27:45 -08:00
Robert Griesemer
668bf81b00
- removed obsolete comments
...
R=r
DELTA=2 (0 added, 1 deleted, 1 changed)
OCL=24755
CL=24760
2009-02-10 10:37:11 -08:00
Rob Pike
2f147992b4
fix Getdirentries: base comes back in r2.
...
R=rsc
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=24727
CL=24727
2009-02-09 20:04:36 -08:00
Rob Pike
cad7a3aefc
simple accessors for Dir mode bits
...
R=rsc
DELTA=71 (71 added, 0 deleted, 0 changed)
OCL=24687
CL=24694
2009-02-09 12:50:54 -08:00
Rob Pike
a948fdd626
typo. this split-os building thing is frustrating.
...
R=rsc
OCL=24681
CL=24681
2009-02-09 11:25:47 -08:00
Rob Pike
aba4c75408
add Readdir: returns an array of Dir structures
...
R=rsc
DELTA=200 (176 added, 12 deleted, 12 changed)
OCL=24680
CL=24680
2009-02-09 11:24:35 -08:00
Rob Pike
c8d59c1fb2
fix int64/int error - build broken
...
R=gri
OCL=24678
CL=24678
2009-02-09 10:20:15 -08:00
Russ Cox
a81870badf
add error to catch 6g alignment bug.
...
the fix appears to be to align the
out struct on an 8 boundary, but that
is a bit involved.
R=ken
OCL=24657
CL=24657
2009-02-08 11:19:45 -08:00
Russ Cox
a6c59ce274
gc funarg return fix.
...
change type (to satisfy OAS) after nodarg:
nodarg uses offset from type too,
and must use correct offset.
R=ken
OCL=24656
CL=24656
2009-02-08 11:01:52 -08:00
Rob Pike
b5aba026f8
First pass at reading directories.
...
Syscall support.
Readdirnames returns array of strings of contents of directory.
R=rsc
DELTA=216 (201 added, 0 deleted, 15 changed)
OCL=24642
CL=24655
2009-02-08 10:18:50 -08:00
Rob Pike
6506148850
a few small cleanups
...
R=rsc
DELTA=21 (2 added, 2 deleted, 17 changed)
OCL=24638
CL=24654
2009-02-08 10:17:23 -08:00
Rob Pike
9526f3b841
use unsafe.Sizeof
...
R=rsc
DELTA=9 (3 added, 3 deleted, 3 changed)
OCL=24640
CL=24653
2009-02-08 10:16:32 -08:00
Rob Pike
8f2b774ee1
update sysimport.c for unsafe.Offset and Sizeof
...
R=ken
DELTA=2 (2 added, 0 deleted, 0 changed)
OCL=24643
CL=24643
2009-02-07 14:48:32 -08:00
Ken Thompson
56003374d3
change array padding in structures
...
to pad to size of element rather
than size of array.
R=r
OCL=24641
CL=24641
2009-02-07 13:31:34 -08:00
Ken Thompson
8a70545b57
unsafe.Sizeof and unsafe.Offsetof
...
R=r
OCL=24639
CL=24639
2009-02-07 12:34:45 -08:00
Rob Pike
bcf48076e5
fix up syscall for darwin after StringToBytes change
...
R=rsc
DELTA=30 (0 added, 18 deleted, 12 changed)
OCL=24628
CL=24628
2009-02-06 18:03:13 -08:00
Rob Pike
704bc9d5c9
portable stat for os
...
add name to os.FD
clean up some interfaces
R=rsc
DELTA=318 (231 added, 44 deleted, 43 changed)
OCL=24624
CL=24627
2009-02-06 17:54:26 -08:00
Rob Pike
69c41d7f5f
fstat used wrong system call, lstat used wrong type of name
...
R=rsc
DELTA=7 (4 added, 0 deleted, 3 changed)
OCL=24617
CL=24617
2009-02-06 17:10:30 -08:00
Russ Cox
3e02987508
tgs's gc bug.
...
R=r
DELTA=10 (7 added, 0 deleted, 3 changed)
OCL=24577
CL=24577
2009-02-06 14:41:21 -08:00
Rob Pike
39d05ae808
add a trivial visitor method, just for fun
...
R=gri
DELTA=31 (30 added, 1 deleted, 0 changed)
OCL=24568
CL=24575
2009-02-06 14:32:09 -08:00
Russ Cox
0970c46863
closures - 6g support
...
R=ken
OCL=24501
CL=24566
2009-02-06 13:47:10 -08:00
Russ Cox
0f4f2a6183
closures - runtime and debugger support, test case
...
R=r
DELTA=257 (250 added, 1 deleted, 6 changed)
OCL=24509
CL=24565
2009-02-06 13:46:56 -08:00
Russ Cox
5e5476c2fe
6c: byte* - byte* should be int64, not int32.
...
R=ken
OCL=24507
CL=24507
2009-02-05 19:09:04 -08:00
Rob Pike
f95a11e27f
further pedagogy: a channel that satisfies the HTTP server interface
...
R=rsc
DELTA=18 (18 added, 0 deleted, 0 changed)
OCL=24482
CL=24484
2009-02-05 15:56:31 -08:00
Russ Cox
b0009bef20
bug064
...
make f(g()) work when g returns multiple
args with names different than f expects.
func swap(a, b int) (c, d int) {
return b, a
}
swap(swap(1,2))
R=ken
OCL=24474
CL=24476
2009-02-05 15:22:49 -08:00
Russ Cox
7a3877aa0c
take advantage of methods on funcs
...
R=r
DELTA=14 (0 added, 13 deleted, 1 changed)
OCL=24458
CL=24470
2009-02-05 15:09:08 -08:00
Russ Cox
aab26a5248
do not generate Init proto for sys and unsafe.
...
R=ken
OCL=24455
CL=24455
2009-02-05 14:49:53 -08:00
Russ Cox
fc8dca9dac
heuristic to stop pulling .6 in from .a
...
is not right if the .6 is only for data and
the init function.
instead of that, pick up everything and
let the dead code/data eliminator throw
away the parts that weren't useful.
R=r
DELTA=25 (0 added, 22 deleted, 3 changed)
OCL=24446
CL=24446
2009-02-05 13:58:43 -08:00
Russ Cox
5e2c05877d
allow methods on funcs.
...
R=ken
OCL=24442
CL=24442
2009-02-05 13:33:07 -08:00
Russ Cox
7fd04676ad
fix build on thresher - missing constants
...
TBR=r
OCL=24439
CL=24439
2009-02-05 13:00:12 -08:00
Rob Pike
689c808c12
clean up flags package a bit.
...
fix a bug in Usage message - would print current value instead of default.
R=rsc
DELTA=53 (7 added, 4 deleted, 42 changed)
OCL=24323
CL=24323
2009-02-04 11:46:39 -08:00
Russ Cox
360f0aacee
fix interface not satisifed message:
...
x.go:13: T is not I - missing M()
NOT
x.go:13: T is not I - missing Mfunc()
R=ken
OCL=24316
CL=24316
2009-02-04 10:37:11 -08:00
Russ Cox
c55d310cd2
fix build. missed this file
...
TBR=r
OCL=24269
CL=24269
2009-02-03 15:58:13 -08:00
Russ Cox
736903c170
libmach:
...
* heuristic to go farther during stack traces.
* significantly improved Linux thread handing.
acid:
* update to new libmach interface.
prof:
* use new libmach interface.
* multiple thread support (derived from Rob's copy).
* first steps toward pprof-like graphs:
keep counters indexed by pc,callerpc pairs.
R=r
DELTA=909 (576 added, 123 deleted, 210 changed)
OCL=24240
CL=24259
2009-02-03 15:00:09 -08:00
Russ Cox
9aa28f9231
bufio:
...
* avoid large copies
* NewBufRead, NewBufWrite never fail
* add BufReadWrite
io:
* add io.Close
http, google/net/rpc:
* add, use http.Conn.Hijack
R=r
DELTA=416 (202 added, 123 deleted, 91 changed)
OCL=24153
CL=24238
2009-02-03 14:16:22 -08:00
Russ Cox
535dcf77c8
minor tweaks
...
R=r
DELTA=9 (2 added, 5 deleted, 2 changed)
OCL=24107
CL=24152
2009-02-02 18:59:20 -08:00
Russ Cox
e73acc1b35
flesh out http server.
...
convert to uppercase names.
R=r
DELTA=613 (460 added, 61 deleted, 92 changed)
OCL=24139
CL=24145
2009-02-02 18:01:32 -08:00
Russ Cox
f61639d4e2
6g return struct fix:
...
make t->width of funarg struct be width of struct.
emit MOVSL for 4-byte copy.
R=ken
OCL=24108
CL=24111
2009-02-02 13:41:38 -08:00
Russ Cox
fb88a01cc2
marginally better thread debugging on Linux.
...
if you clone inside a traced pid, the child
is automatically attached and stopped,
apparently.
R=r
DELTA=63 (41 added, 12 deleted, 10 changed)
OCL=24096
CL=24106
2009-02-02 13:26:40 -08:00
Rob Pike
6e395cfecf
slightly better code for the frog fix
...
R=ken
OCL=24025
CL=24025
2009-01-31 16:44:52 -08:00
Rob Pike
2538cf747b
Complain about control characters that are not white space.
...
Bitten by invisible chars too many times.
R=ken
OCL=24024
CL=24024
2009-01-31 16:42:10 -08:00
Russ Cox
6fdb18f900
can finally close this TODO - 6l was broken
...
R=r
DELTA=2 (0 added, 2 deleted, 0 changed)
OCL=23993
CL=23995
2009-01-30 17:14:39 -08:00
Russ Cox
47e27758db
keep line number history even when
...
throwing away dead code at end of file.
also fix an uninitialized memory error
found by valgrind.
R=r
DELTA=7 (5 added, 2 deleted, 0 changed)
OCL=23991
CL=23994
2009-01-30 17:10:10 -08:00
Russ Cox
9e735985d4
avoid memcpy(x, x),
...
which valgrind complains about.
R=ken
OCL=23990
CL=23990
2009-01-30 16:31:26 -08:00
Russ Cox
7b6bdfb735
two uses of uninitialized memory,
...
picked up by valgrind.
fixes test/escape.go on linux.
R=ken
OCL=23971
CL=23971
2009-01-30 15:11:46 -08:00
Russ Cox
122ed3e988
print format bug
...
R=ken
OCL=23965
CL=23965
2009-01-30 14:54:49 -08:00
Russ Cox
4a43198390
update compiler to new func rules
...
R=ken
OCL=23958
CL=23961
2009-01-30 14:39:42 -08:00
Russ Cox
4cf7711568
update go code tree to new func rules.
...
R=r
DELTA=367 (111 added, 59 deleted, 197 changed)
OCL=23957
CL=23960
2009-01-30 14:39:31 -08:00
Russ Cox
391425ae55
if take address of local, move to heap.
...
heuristic to not print bogus strings.
fix one error message format.
R=ken
OCL=23849
CL=23851
2009-01-29 17:38:58 -08:00
Ken Thompson
4f49b88dda
optimizer bug w STOstring
...
R=r
OCL=23820
CL=23820
2009-01-29 15:13:36 -08:00
Russ Cox
282bf8cc8c
fix possible infinite recursion in eqtype.
...
don't use intermediate register to move
32-or-fewer-bit immediate constants
into memory.
R=ken
OCL=23726
CL=23726
2009-01-28 16:42:26 -08:00
Russ Cox
3ec4675220
clean up range grammar
...
R=ken
OCL=23712
CL=23714
2009-01-28 15:41:50 -08:00
Russ Cox
9f726c2c8b
Use explicit allspan list instead of
...
trying to find all the places where
spans might be recorded.
Free can cascade into complicated
span manipulations that move them
from list to list; the old code had the
possibility of accidentally processing
a span twice or jumping to a different
list, causing an infinite loop.
R=r
DELTA=70 (28 added, 25 deleted, 17 changed)
OCL=23704
CL=23710
2009-01-28 15:22:16 -08:00
Robert Griesemer
cb659ece0e
additions to array container:
...
- added Slice, Cut, InsertArray, AppendArray
- renamed Remove -> Delete (so we have: Insert, Delete, Cut)
- more factoring of code
- extra tests (could use some more)
R=r,rsc
DELTA=179 (127 added, 22 deleted, 30 changed)
OCL=23648
CL=23685
2009-01-28 13:32:31 -08:00
Ken Thompson
4b8e030762
bug 135
...
R=r
OCL=23646
CL=23646
2009-01-27 18:21:03 -08:00
Russ Cox
7fa5941fad
make "size 6.out" work on mac.
...
R=r
DELTA=11 (6 added, 0 deleted, 5 changed)
OCL=23629
CL=23631
2009-01-27 15:40:36 -08:00
Russ Cox
743ac07cc3
change dotdotdot interfaces to be structs,
...
not pointers to structs.
fix defered dotdotdot.
R=r,ken
DELTA=25 (7 added, 5 deleted, 13 changed)
OCL=23620
CL=23625
2009-01-27 15:05:25 -08:00
Ken Thompson
e90314d024
pragma textflag
...
fixes latent bugs in go and defer
R=r
OCL=23613
CL=23613
2009-01-27 14:12:35 -08:00
Russ Cox
53e69e1db5
various race conditions.
...
R=r
DELTA=43 (29 added, 5 deleted, 9 changed)
OCL=23608
CL=23611
2009-01-27 14:01:20 -08:00
Ken Thompson
47ab1c1e99
spelling
...
R=r
OCL=23602
CL=23602
2009-01-27 13:23:28 -08:00
Ken Thompson
1e1cc4eb57
defer
...
R=r
OCL=23592
CL=23592
2009-01-27 12:03:53 -08:00
Russ Cox
1ce17918e3
gc #0 . mark and sweep collector.
...
R=r,gri
DELTA=472 (423 added, 2 deleted, 47 changed)
OCL=23522
CL=23541
2009-01-26 17:37:05 -08:00
Russ Cox
5b129cda5f
assignment count mismatch: 2 = 1.
...
R=ken
OCL=23534
CL=23534
2009-01-26 17:20:29 -08:00
Russ Cox
f1fe21a08f
bug134
...
R=ken
OCL=23532
CL=23532
2009-01-26 17:06:20 -08:00
Russ Cox
4efad58d0a
bug133
...
R=ken
OCL=23528
CL=23528
2009-01-26 16:57:24 -08:00
Russ Cox
9ed2960de8
in hash implementation, if data >= 8, align to 8.
...
R=ken
OCL=23519
CL=23521
2009-01-26 15:36:39 -08:00
Russ Cox
3c5f3a8641
print(map) and print(chan) as pointers.
...
R=ken
OCL=23520
CL=23520
2009-01-26 15:36:28 -08:00
Rob Pike
646b3b5c02
improved logging formats.
...
R=rsc
DELTA=210 (118 added, 60 deleted, 32 changed)
OCL=23508
CL=23518
2009-01-26 15:34:16 -08:00
Russ Cox
9b6d385cb5
interface speedups and fixes.
...
more caching, better hash functions, proper locking.
fixed a bug in interface comparison too.
R=ken
DELTA=177 (124 added, 10 deleted, 43 changed)
OCL=23491
CL=23493
2009-01-26 12:36:21 -08:00
Ken Thompson
7859ae8a2f
removed a:b in range syntax
...
added another channel test
R=r
OCL=23488
CL=23488
2009-01-26 11:34:38 -08:00
Russ Cox
65ad3ce179
make time fields public
...
R=r
DELTA=49 (0 added, 0 deleted, 49 changed)
OCL=23480
CL=23487
2009-01-26 11:22:21 -08:00
Ian Lance Taylor
a01bdb4ae0
Add an accessor function os.FD.Fd() to get the file
...
descriptor. Use it in the PollServer code.
6g currently accepts this code without this change, but it
should not. Test case for the bug is bug133.go.
R=rsc
DELTA=10 (0 added, 0 deleted, 10 changed)
OCL=23451
CL=23486
2009-01-26 11:10:14 -08:00
Russ Cox
a7f6d4066e
implement new restrictions on what
...
can be compared/hashed.
R=r
DELTA=351 (201 added, 80 deleted, 70 changed)
OCL=23423
CL=23481
2009-01-26 09:56:42 -08:00
Rob Pike
806d00fc63
add start to a logging package.
...
R=rsc
DELTA=205 (205 added, 0 deleted, 0 changed)
OCL=23448
CL=23478
2009-01-26 09:28:07 -08:00
Ken Thompson
3338c71fc6
bug in async select read
...
buganizer 1589219
channel is returning same values multiple times
R=r
OCL=23447
CL=23447
2009-01-24 15:58:44 -08:00
Rob Pike
d8819569eb
fix typo in comment. s/put/Put/
...
R=ken
OCL=23419
CL=23419
2009-01-23 15:57:52 -08:00
Rob Pike
9a7332fb5b
remove the "open" concept from reflect and go with slices and arrays.
...
the two still share an interface and Kind; that's probably ok but might be worth revisiting.
R=rsc
DELTA=74 (1 added, 8 deleted, 65 changed)
OCL=23416
CL=23418
2009-01-23 15:56:04 -08:00
Rob Pike
1b3299ed0b
change the representation of arrays in protobufs from *[]item to []item.
...
for simplicity of user's code, optional arrays of bytes also don't have a pointer.
requires adding a "Set()" method to arrays in reflect.
still to do: protocol compilers, google/net/rpc.
R=rsc
DELTA=227 (36 added, 95 deleted, 96 changed)
OCL=23387
CL=23389
2009-01-23 12:40:55 -08:00
Russ Cox
f4279f587a
fix build - missed this file
...
TBR=r
OCL=23335
CL=23335
2009-01-22 16:49:11 -08:00
Russ Cox
1f8a40d85c
move math routines from package sys to package math,
...
though they still build in src/runtime.
use cgo instead of hand-written wrappers.
R=r
DELTA=740 (289 added, 300 deleted, 151 changed)
OCL=23326
CL=23331
2009-01-22 16:23:44 -08:00
Russ Cox
8c5bc7e93a
use $GC, $GL in gotest, to match gccgo's gotest.
...
use $GC in all_test.go for portability.
R=r
DELTA=19 (12 added, 0 deleted, 7 changed)
OCL=23305
CL=23325
2009-01-22 15:41:12 -08:00
Russ Cox
d9abca81c0
let test sources specify commands to run
...
before their compilation.
R=r
OCL=23300
CL=23300
2009-01-22 14:23:50 -08:00
Rob Pike
c5f99ccbdd
change reflect.CopyArray into a method on ArrayValue called CopyFrom
...
R=rsc
DELTA=16 (12 added, 0 deleted, 4 changed)
OCL=23242
CL=23242
2009-01-21 15:45:54 -08:00
Russ Cox
61590c4c44
disallow P.t for lowercase t and not our package P.
...
implement hiding lowercase methods m in
signatures by adding in a hash of the package name
to the type hash code.
remove remaining checks for internally-generated _ names:
they are all gone.
R=ken
OCL=23236
CL=23238
2009-01-21 14:51:57 -08:00
Russ Cox
c3fa54c48b
delete unused code and data from 6.outs.
...
cuts simple test binary by 7%.
would be more except for reflection.
R=r
DELTA=126 (117 added, 4 deleted, 5 changed)
OCL=23163
CL=23237
2009-01-21 14:50:27 -08:00
Russ Cox
35e37bbf41
6g: better genembedtramp fatal error,
...
and don't put inaccessible private methods
in signature.
R=ken
OCL=23138
CL=23140
2009-01-20 15:36:57 -08:00
Russ Cox
a3c4faf83f
6l: do not link in objects from an archive just for init functions.
...
(makes go libraries behave more like c libraries.)
R=r
DELTA=85 (67 added, 12 deleted, 6 changed)
OCL=23133
CL=23139
2009-01-20 15:36:43 -08:00
Russ Cox
839a68469b
delete export
...
TBR=r
OCL=23121
CL=23127
2009-01-20 14:40:40 -08:00
Russ Cox
0183baaf44
* delete export
...
* rename init functions
R=ken
OCL=23122
CL=23126
2009-01-20 14:40:00 -08:00
Russ Cox
8f14451fe5
6l: ignore undefined symbols in gotypesigs.
...
they end up in the symbol table with type==0
if they are in a library but not pulled in.
also add a few debugging prints.
R=r
DELTA=11 (5 added, 1 deleted, 5 changed)
OCL=23104
CL=23108
2009-01-20 13:21:22 -08:00
Rob Pike
b74e3b95cf
add a couple of helper methods to io.ByteBuffer
...
R=rsc
DELTA=456 (9 added, 2 deleted, 445 changed)
OCL=23107
CL=23107
2009-01-20 12:57:25 -08:00
Russ Cox
f48cbfdf56
convert tests; nothing interesting.
...
R=r
OCL=23012
CL=23014
2009-01-16 16:12:14 -08:00
Russ Cox
aec4d3194a
disallow other package's names in method calls
...
R=ken
OCL=22999
CL=22999
2009-01-16 15:35:07 -08:00
Russ Cox
aedf121e30
casify struct fields in entire tree.
...
TBR=r
OCL=22997
CL=22997
2009-01-16 15:28:33 -08:00
Russ Cox
06869eedf9
disallow other package's names in struct field dot.
...
R=ken
OCL=22996
CL=22996
2009-01-16 15:25:52 -08:00
Ian Lance Taylor
03c40f5122
Change malloc.Lookup to return the size as uintptr rather than
...
uint64. This changes the Go code to be consistent with the C
code.
R=rsc
DELTA=6 (0 added, 0 deleted, 6 changed)
OCL=22983
CL=22987
2009-01-16 15:03:22 -08:00
Ian Lance Taylor
6e4b9c696f
Remove types from constants, since they didn't match what
...
Tick() expected.
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=22979
CL=22986
2009-01-16 14:59:27 -08:00
Russ Cox
360962420c
casify, cleanup sys
...
R=r
OCL=22978
CL=22984
2009-01-16 14:58:14 -08:00
Rob Pike
ec9f2b0cd4
casify linux syscall dependents, plus a few stragglers
...
R=rsc
DELTA=97 (0 added, 0 deleted, 97 changed)
OCL=22971
CL=22973
2009-01-16 14:16:31 -08:00
Rob Pike
605ee5a3ef
s/split/Split/ to get compiling again
...
R=rsc
OCL=22967
CL=22967
2009-01-16 13:55:55 -08:00
Rob Pike
db1656f3e6
two more casifications in fmt
...
R=rsc
DELTA=14 (0 added, 0 deleted, 14 changed)
OCL=22960
CL=22962
2009-01-16 13:29:43 -08:00
Rob Pike
55ebef615b
casify flag.
...
R=rsc
DELTA=16 (0 added, 9 deleted, 7 changed)
OCL=22959
CL=22961
2009-01-16 13:19:43 -08:00
Rob Pike
ed2ac9b8b0
casify reflect.
...
R=rsc
DELTA=513 (0 added, 2 deleted, 511 changed)
OCL=22954
CL=22956
2009-01-16 12:48:07 -08:00
Russ Cox
aedfb397ae
casify misc
...
R=r
DELTA=247 (20 added, 50 deleted, 177 changed)
OCL=22951
CL=22955
2009-01-16 12:47:24 -08:00
Robert Griesemer
116a6e9c9c
- more bignum_test letter case fixes
...
R=r
OCL=22952
CL=22952
2009-01-16 12:04:40 -08:00
Rob Pike
1a91b9a8a9
casify syscall and sequelae
...
R=rsc
DELTA=337 (0 added, 1 deleted, 336 changed)
OCL=22950
CL=22950
2009-01-16 11:36:44 -08:00
Russ Cox
5d41f55acc
casify http
...
R=r
DELTA=33 (0 added, 0 deleted, 33 changed)
OCL=22947
CL=22949
2009-01-16 11:06:42 -08:00
Russ Cox
c840657fe1
casify DNS
...
R=r
DELTA=221 (0 added, 0 deleted, 221 changed)
OCL=22946
CL=22948
2009-01-16 11:04:44 -08:00
Russ Cox
dec12d3654
re-export of bools was changing
...
format from hex to decimal, confusing
ar's strcmp-based value comparison.
switched export format to "true" or "false"
to keep bools separate from ints.
R=ken
OCL=22944
CL=22944
2009-01-16 10:45:28 -08:00
Rob Pike
794efd7e78
recasify regexp to use underscores and clean up the tests more
...
R=rsc
DELTA=174 (0 added, 0 deleted, 174 changed)
OCL=22917
CL=22942
2009-01-16 10:34:36 -08:00
Rob Pike
4b590bf985
casify a few more
...
R=rsc
DELTA=72 (0 added, 9 deleted, 63 changed)
OCL=22918
CL=22941
2009-01-16 10:34:21 -08:00
Russ Cox
393df07914
casify json
...
R=r
DELTA=163 (0 added, 0 deleted, 163 changed)
OCL=22910
CL=22939
2009-01-16 10:14:38 -08:00
Russ Cox
d2cdcfc1c8
casify hash
...
R=r
DELTA=235 (6 added, 26 deleted, 203 changed)
OCL=22907
CL=22938
2009-01-16 10:14:28 -08:00
Russ Cox
e83c85accb
casify time
...
R=r
DELTA=103 (1 added, 0 deleted, 102 changed)
OCL=22914
CL=22937
2009-01-16 10:14:12 -08:00
Russ Cox
2c8d9a5619
redo and clean up math.
...
R=r
DELTA=243 (60 added, 72 deleted, 111 changed)
OCL=22909
CL=22912
2009-01-15 19:11:32 -08:00
Russ Cox
c1e7e270f1
don't crash on:
...
package main
var x int
type x struct { a int }
R=ken
OCL=22903
CL=22903
2009-01-15 17:32:31 -08:00
Russ Cox
8a7cbadbbe
convert strconv
...
R=r
DELTA=568 (0 added, 9 deleted, 559 changed)
OCL=22898
CL=22901
2009-01-15 17:22:17 -08:00
Rob Pike
74a60ed08a
casify lib/regexp
...
R=rsc
DELTA=259 (0 added, 0 deleted, 259 changed)
OCL=22897
CL=22900
2009-01-15 17:22:15 -08:00
Russ Cox
605d0746c5
catch export on func.
...
print names in message.
R=ken
OCL=22891
CL=22891
2009-01-15 16:43:51 -08:00
Rob Pike
33f3ed7710
casify fixup for bufio
...
R=rsc
DELTA=88 (0 added, 12 deleted, 76 changed)
OCL=22884
CL=22890
2009-01-15 16:22:57 -08:00
Russ Cox
3decb42e6f
add warning for export of lowercase too.
...
R=ken
OCL=22887
CL=22887
2009-01-15 16:20:21 -08:00
Russ Cox
07d344e442
remove export name-list statement.
...
make package local the default.
warn about name case not matching export keyword.
R=ken
OCL=22881
CL=22886
2009-01-15 16:16:52 -08:00
Russ Cox
b54133d200
make safe for new package local defaults
...
R=r
DELTA=462 (9 added, 33 deleted, 420 changed)
OCL=22879
CL=22885
2009-01-15 16:16:42 -08:00
Rob Pike
1d74892178
more casifying fixups
...
R=rsc
DELTA=213 (0 added, 0 deleted, 213 changed)
OCL=22878
CL=22882
2009-01-15 16:03:27 -08:00
Rob Pike
497bb9c07d
casify fmt and its dependents.
...
R=rsc
DELTA=224 (0 added, 2 deleted, 222 changed)
OCL=22875
CL=22875
2009-01-15 15:40:27 -08:00
Rob Pike
8559e3ad54
diagnose missing symbols instead of
...
silently miscompiling.
R=rsc
OCL=22872
CL=22872
2009-01-15 15:21:12 -08:00
Robert Griesemer
e28692f07d
- converted tabwriter to new naming scheme
...
R=r
OCL=22870
CL=22870
2009-01-15 15:10:46 -08:00
Robert Griesemer
f4babf6931
- missed a few identifiers
...
R=r
OCL=22864
CL=22864
2009-01-15 14:49:40 -08:00
Robert Griesemer
364a852027
- lowercase non-exported functions in bignum
...
R=r
DELTA=117 (1 added, 0 deleted, 116 changed)
OCL=22764
CL=22863
2009-01-15 14:46:31 -08:00
Rob Pike
61f3302044
printf->Printf etc.
...
the raw fmt routines will be another, smaller but subtler pass.
R=rsc
DELTA=157 (0 added, 0 deleted, 157 changed)
OCL=22851
CL=22851
2009-01-15 13:48:11 -08:00
Russ Cox
5ea8ac78a8
add unicode library stub with just
...
IsUpper and IsLetter.
R=r
DELTA=746 (746 added, 0 deleted, 0 changed)
OCL=22743
CL=22750
2009-01-14 14:05:00 -08:00
Ian Lance Taylor
2b57a1124e
Add cgo2c program to translate mixed Go/C code into C. This
...
lets us use a single source file for both 6c and gcc, handling
the incompatible handling of return values.
R=rsc
DELTA=649 (613 added, 35 deleted, 1 changed)
OCL=22682
CL=22730
2009-01-14 08:21:25 -08:00
Russ Cox
58b280db3b
change another yacc reference to bison.
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=22662
CL=22691
2009-01-13 16:32:46 -08:00
Russ Cox
8fb60768c3
in 6g -r (the rsc flag),
...
rewrite heap pointer moves as xchg.
R=ken
OCL=22665
CL=22665
2009-01-13 13:46:09 -08:00
Ian Lance Taylor
1a0bde24ae
Add USED declarations for SysUnused parameters.
...
R=rsc
DELTA=2 (2 added, 0 deleted, 0 changed)
OCL=22640
CL=22642
2009-01-13 10:24:06 -08:00
Ian Lance Taylor
9b8da82d72
Tweak code to make it easier to compile with gcc.
...
+ Use macros to name symbols with non-ASCII characters.
+ Make some variables unsigned, because they are compared
against unsigned values.
+ Fix a few void* pointers to be MLink*.
R=rsc
DELTA=94 (44 added, 3 deleted, 47 changed)
OCL=22303
CL=22638
2009-01-13 09:55:24 -08:00
Russ Cox
0c32430534
free(nil)
...
R=iant
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=22467
CL=22471
2009-01-09 16:22:13 -08:00
Russ Cox
a3ed4e716a
add sys.caller
...
R=r
DELTA=139 (101 added, 38 deleted, 0 changed)
OCL=22462
CL=22466
2009-01-09 15:52:43 -08:00
Russ Cox
ae167bf08f
clean up automatic indirect, delete some dead code.
...
R=ken
OCL=22454
CL=22457
2009-01-09 15:21:41 -08:00
Russ Cox
316d377ac2
now that TCHAN, TMAP, and TSTRING are real types,
...
can do methods on them without pointer worries.
R=ken
OCL=22434
CL=22436
2009-01-09 13:50:58 -08:00
Rob Pike
c45d2a767c
simplify flag interface. no more BVal etc. you just get a pointer.
...
fixed everything except the tutorial.
R=rsc
DELTA=404 (94 added, 139 deleted, 171 changed)
OCL=22414
CL=22422
2009-01-09 13:42:46 -08:00
Russ Cox
863dafb9ae
typo
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=22411
CL=22411
2009-01-09 11:17:13 -08:00
Russ Cox
8f5bba0d82
silence gcc warnings.
...
not sure if the warning in reg.c was a real bug.
R=ken
OCL=22408
CL=22410
2009-01-09 11:13:59 -08:00
Russ Cox
a91af04c06
6g cleanup suggested by ken.
...
remove TPTR wrapper around TMAP, TCHAN, TSTRING.
R=ken
OCL=22406
CL=22409
2009-01-09 11:13:39 -08:00
Russ Cox
484ba939d2
update sys.reflect and sys.unreflect to accomodate
...
the possibility of large objects in interface values.
R=r
DELTA=171 (97 added, 22 deleted, 52 changed)
OCL=22382
CL=22382
2009-01-09 00:17:46 -08:00
Russ Cox
e512481b17
second pass on interface fixes and tests.
...
R=ken
OCL=22370
CL=22372
2009-01-08 18:06:06 -08:00
Robert Griesemer
8b8a862da8
- removed temporary work-arounds from bignum_test, not needed anymore
...
R=r
DELTA=93 (0 added, 61 deleted, 32 changed)
OCL=22348
CL=22366
2009-01-08 17:38:24 -08:00
Rob Pike
ab331f7a7d
new sort interface - no structs, just slices.
...
R=rsc
DELTA=37 (0 added, 7 deleted, 30 changed)
OCL=22330
CL=22342
2009-01-08 15:12:00 -08:00
Russ Cox
1b7881adb4
fix:
...
type T []int
var a []int
var t = T(a)
R=ken
OCL=22341
CL=22341
2009-01-08 15:01:22 -08:00
Russ Cox
c0b8a7965a
typo
...
R=ken
OCL=22327
CL=22327
2009-01-08 14:31:11 -08:00
Russ Cox
20595ac4b0
many interface bug fixes.
...
also, after
func g() (int, int)
func f(int, int)
allow
f(g())
and
func h() (int, int) { return g() }
R=ken
DELTA=356 (252 added, 26 deleted, 78 changed)
OCL=22319
CL=22325
2009-01-08 14:30:00 -08:00
Ian Lance Taylor
7843a14df1
Remove duplicate typedef declarations.
...
R=rsc
DELTA=7 (0 added, 7 deleted, 0 changed)
OCL=22267
CL=22281
2009-01-08 09:45:42 -08:00
Rob Pike
289ff7d0e4
Cache *os.Error values across all users.
...
R=rsc
DELTA=27 (23 added, 0 deleted, 4 changed)
OCL=22245
CL=22245
2009-01-07 16:37:43 -08:00
Ken Thompson
eed3addb9d
more
...
R=r
OCL=22240
CL=22240
2009-01-07 15:54:08 -08:00
Ken Thompson
3f135be389
conversion from closed array to slice
...
R=r
OCL=22236
CL=22236
2009-01-07 15:26:11 -08:00
Russ Cox
1b1f1b53ea
correct signature generation decision
...
for non-pointer types with methods.
R=r
DELTA=37 (13 added, 14 deleted, 10 changed)
OCL=22217
CL=22219
2009-01-07 13:29:03 -08:00
Ken Thompson
c458c98388
[...] bug
...
R=r
OCL=22218
CL=22218
2009-01-07 13:20:10 -08:00
Russ Cox
855495eab6
iscomposite test in OCONV is unnecessary
...
now that OCOMP exists
R=ken
OCL=22216
CL=22216
2009-01-07 12:39:48 -08:00
Ken Thompson
179af0bb19
clear automatic arrays created with literals
...
R=r
OCL=22215
CL=22215
2009-01-07 12:28:23 -08:00
Ken Thompson
b0f627a6e1
closed arrays including [...]
...
R=r
OCL=22182
CL=22182
2009-01-06 17:31:24 -08:00
Robert Griesemer
af065a0c77
- make code in gosrc compile again, check in all pending changes
...
(this code doesn't match the existing language at this point,
but it's a large code base which compiles - will eventually go
away)
- enable compilation of it again in run.bash
R=r
DELTA=1147 (534 added, 311 deleted, 302 changed)
OCL=22176
CL=22176
2009-01-06 16:26:45 -08:00
Rob Pike
8d21004b41
make the tutorial programs run again.
...
(the text still needs fixing)
add the tutorial programs to the test run.
R=rsc
DELTA=41 (6 added, 0 deleted, 35 changed)
OCL=22174
CL=22174
2009-01-06 15:49:27 -08:00
Russ Cox
84953bdaa8
fix newfn
...
R=ken
OCL=22173
CL=22173
2009-01-06 15:39:28 -08:00
Rob Pike
344b16512c
update utf8_test.go
...
R=rsc
OCL=22170
CL=22170
2009-01-06 15:30:07 -08:00
Russ Cox
dabdfa6cce
new new &Point{1,2}
...
R=ken
OCL=22168
CL=22168
2009-01-06 15:24:12 -08:00
Russ Cox
5564504507
new new & make
...
R=r
OCL=22166
CL=22166
2009-01-06 15:19:02 -08:00
Ken Thompson
88b5c5f0f8
make for slice/map/chan
...
new for pointers
R=r
OCL=22158
CL=22158
2009-01-06 14:52:26 -08:00
Rob Pike
1da03aaef7
A richer interface for regexps. Simple boolean matcher, a vector of strings rather than
...
indexes, and a global boolean function for quick action.
R=rsc
DELTA=152 (127 added, 12 deleted, 13 changed)
OCL=22140
CL=22142
2009-01-06 13:54:53 -08:00
Russ Cox
af0143ce03
make 8a, 8c, 8l build in go environment.
...
,s/int32/long/g in 8a, 8c, 8l.
delete dead code.
move enam.c, 8.out.h, mkenam from 8c to 8l.
R=r
DELTA=1850 (581 added, 983 deleted, 286 changed)
OCL=22119
CL=22129
2009-01-06 11:34:02 -08:00
Russ Cox
d8c7980514
comment sudoaddable;
...
remove unused second parameter.
R=ken
OCL=22126
CL=22126
2009-01-06 11:23:58 -08:00
Russ Cox
8318187f77
delete blyacc
...
R=r
DELTA=3562 (0 added, 3560 deleted, 2 changed)
OCL=22112
CL=22114
2009-01-06 09:53:38 -08:00
Russ Cox
859ba57bbb
make acid build with bison.
...
ask for bison explicitly in cc, gc to try to
avoid problems with other yaccs that
might be installed.
R=r
DELTA=29 (10 added, 2 deleted, 17 changed)
OCL=22110
CL=22113
2009-01-06 09:53:30 -08:00
Russ Cox
4dee747fb9
8a, 8c, and 8l from inferno distribution
...
R=r
DELTA=19539 (19539 added, 0 deleted, 0 changed)
OCL=22109
CL=22109
2009-01-06 09:41:38 -08:00
Russ Cox
2d259c817a
add comments and delete dead code
...
R=ken
OCL=22078
CL=22080
2009-01-05 17:32:23 -08:00
Russ Cox
be76898cb3
change time.Tick test to use 100ms intervals.
...
now passes even under loaded conditions on r45.
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=22019
CL=22022
2009-01-05 11:18:20 -08:00
Russ Cox
c14c2b231f
fix 6a line number bug -
...
was incrementing lineno twice for
the \n after a // comment.
R=r
DELTA=3 (0 added, 2 deleted, 1 changed)
OCL=21984
CL=22021
2009-01-05 11:18:15 -08:00
Ken Thompson
4991f20b3f
one bignum test fails
...
has to do with printing
patched it out
R=r
OCL=21921
CL=21923
2008-12-30 14:03:54 -08:00
Ken Thompson
b2dfd787d7
allow slices (open arrays) to be
...
receivers in methods.
put back original code for hilbert/bignum
R=r
OCL=21910
CL=21920
2008-12-30 14:02:20 -08:00
Ken Thompson
85815fe0ad
diagnostic to catch pointer to
...
rvalue promoted to method receiver.
fixes to bignum that failed.
R=r
OCL=21827
CL=21827
2008-12-26 14:42:20 -08:00
Rob Pike
b90b4157d1
put array test in table, with TODO to fix when arrays work in interfaces.
...
TBR=rsc
OCL=21766
CL=21766
2008-12-23 09:34:38 -08:00
Rob Pike
b0d62676d2
print array (not just *array) using %v
...
TBR=rsc
DELTA=34 (33 added, 0 deleted, 1 changed)
OCL=21718
CL=21718
2008-12-22 11:04:17 -08:00
Rob Pike
eb32228627
hilbert now runs.
...
it's 25% faster and runs with 40% less memory allocation than before
R=rsc
DELTA=20 (15 added, 0 deleted, 5 changed)
OCL=21690
CL=21690
2008-12-20 18:15:34 -08:00
Rob Pike
9ccf39bd68
update to new regime.
...
lines marked BUG are rewrites working around 6g bug.
R=rsc
DELTA=161 (42 added, 2 deleted, 117 changed)
OCL=21689
CL=21689
2008-12-20 17:25:43 -08:00
Russ Cox
af5e16cfd9
fix new(T) if type T []int.
...
make sure type of expr is T not just []int
R=ken
OCL=21688
CL=21688
2008-12-20 16:30:44 -08:00
Ken Thompson
2b33a134a8
regfree
...
R=r
OCL=21685
CL=21687
2008-12-20 16:07:56 -08:00
Ken Thompson
7cfe782a69
LEAQ bug
...
R=r
OCL=21684
CL=21684
2008-12-20 16:05:12 -08:00
Russ Cox
c3077f7606
[] and struct in interfaces.
...
other [] cleanup.
convert() is gone.
R=r
DELTA=352 (144 added, 68 deleted, 140 changed)
OCL=21660
CL=21662
2008-12-19 17:11:54 -08:00
Russ Cox
33907d1346
allow Listen on ":9999" as an alias for "0.0.0.0:9999"
...
R=r
DELTA=21 (12 added, 0 deleted, 9 changed)
OCL=21653
CL=21653
2008-12-19 15:52:21 -08:00
Ken Thompson
a91a0a6a7a
array compare (except = != nil) are illegal
...
R=r
OCL=21637
CL=21637
2008-12-19 14:26:52 -08:00
Ken Thompson
6fa74e0973
portability bug
...
cant assign to closed array
R=r
OCL=21634
CL=21634
2008-12-19 14:04:25 -08:00
Russ Cox
cd40cd2435
fix new(bool) error message
...
R=ken
OCL=21616
CL=21616
2008-12-19 12:18:44 -08:00
Russ Cox
eee50ae1ac
chan and map of [] and struct
...
R=r
DELTA=192 (145 added, 8 deleted, 39 changed)
OCL=21609
CL=21614
2008-12-19 12:05:22 -08:00
Russ Cox
cbff09d666
g4 open sysimport.c before writing it
...
R=r
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=21577
CL=21603
2008-12-19 09:03:44 -08:00
Russ Cox
c4416ac06b
new error messages
...
x.go:11: illegal types for operand: AS
*I
*T
(*interface vs *struct)
R=r
DELTA=10 (8 added, 0 deleted, 2 changed)
OCL=21457
CL=21602
2008-12-19 09:03:24 -08:00
Russ Cox
da0a7d7b8f
malloc bug fixes.
...
use malloc by default.
free stacks.
R=r
DELTA=424 (333 added, 29 deleted, 62 changed)
OCL=21553
CL=21584
2008-12-19 03:13:39 -08:00
Russ Cox
ba882f9940
fmt and reflect updates for recent changes
...
TBR=r
OCL=21580
CL=21583
2008-12-19 03:06:19 -08:00
Russ Cox
dc7b2e98d2
compiler changes for *chan -> chan; *map -> map; new(T) -> new(*T)
...
mainly a syntactic change: the compiler representations don't change
(chan and map are now hidden pointers like string).
R=ken
OCL=21578
CL=21582
2008-12-19 03:05:54 -08:00
Russ Cox
08ca30bbfa
change *map to map; *chan to chan; new(T) to new(*T)
...
fix bugs left over from *[] to [] conversion.
TBR=r
OCL=21576
CL=21581
2008-12-19 03:05:37 -08:00
Russ Cox
d47d888ba6
convert *[] to [].
...
R=r
OCL=21563
CL=21571
2008-12-18 22:37:22 -08:00
Ken Thompson
9786f69f74
print(array)
...
R=r
OCL=21570
CL=21570
2008-12-18 22:17:05 -08:00
Ken Thompson
c9954c63a8
bug in [const]
...
R=r
OCL=21569
CL=21569
2008-12-18 22:01:46 -08:00
Russ Cox
f38d2b80a4
new []int literal
...
R=ken
OCL=21568
CL=21568
2008-12-18 21:59:12 -08:00
Ken Thompson
dcc064fe94
cmp [] to nil
...
R=r
OCL=21567
CL=21567
2008-12-18 21:33:45 -08:00
Russ Cox
78fc888e64
another [] fix
...
R=ken
OCL=21566
CL=21566
2008-12-18 21:15:26 -08:00
Russ Cox
92f74ca7e2
[] fixes
...
R=ken
OCL=21565
CL=21565
2008-12-18 21:11:56 -08:00
Ken Thompson
4026500d18
arrays
...
R=r
OCL=21564
CL=21564
2008-12-18 20:06:28 -08:00
Russ Cox
eaa2a364a7
libmach: always print 0x on hex numbers
...
R=r
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=21558
CL=21558
2008-12-18 18:23:48 -08:00
Russ Cox
83348f956e
host and port name lookup
...
R=r,presotto
DELTA=1239 (935 added, 281 deleted, 23 changed)
OCL=21041
CL=21539
2008-12-18 15:42:39 -08:00
Russ Cox
e29ce175ed
malloc in runtime (not used by default)
...
R=r
DELTA=1551 (1550 added, 0 deleted, 1 changed)
OCL=21404
CL=21538
2008-12-18 15:42:28 -08:00
Robert Griesemer
ab0d2582b4
- fixed a bug in Natural.And()
...
- removed some non-beneficial factorization and reduced number of array slices per
operations significantly
- reduced line count
- benchhil benchmark time reduced by ~2%
R=r
DELTA=313 (106 added, 163 deleted, 44 changed)
OCL=21473
CL=21497
2008-12-18 09:55:33 -08:00
Ken Thompson
61e0fcce8a
small bug
...
new printarray
R=r
OCL=21429
CL=21429
2008-12-17 12:13:19 -08:00
Russ Cox
697cb17b30
trailing white space
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=21403
CL=21415
2008-12-17 10:14:29 -08:00
Russ Cox
e53d5ad620
fix type/name thing, again
...
R=r
DELTA=8 (7 added, 0 deleted, 1 changed)
OCL=21379
CL=21379
2008-12-16 17:45:28 -08:00
Russ Cox
99435cac09
another "want type got name" error case
...
R=ken
OCL=21377
CL=21377
2008-12-16 17:37:07 -08:00
Russ Cox
67a7abad7f
clear flags so that %+v does not pass the +
...
to the first field it prints.
R=r
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=21324
CL=21328
2008-12-16 14:39:29 -08:00
Rob Pike
a10267adcd
If ByteBuffer has never been used, b.buf is nil but Data() should still work.
...
Fix the bug using a (safe) shared global empty array.
R=rsc
DELTA=8 (8 added, 0 deleted, 0 changed)
OCL=21303
CL=21303
2008-12-16 13:01:39 -08:00
Ken Thompson
8f53bc0612
new convention, direction bit is
...
always left cleared. changed
compiler generated memcpy and
memset to assume CLD.
R=r
OCL=21215
CL=21215
2008-12-15 15:07:35 -08:00
Ken Thompson
ae5a475e20
range clause must have = or :=
...
:= illegal in for-increment
R=r
OCL=21204
CL=21204
2008-12-15 13:44:27 -08:00
Russ Cox
7df571aef7
off-by-one error assigning src files to functions
...
R=r
DELTA=2 (2 added, 0 deleted, 0 changed)
OCL=21178
CL=21187
2008-12-15 10:50:41 -08:00
Russ Cox
5bb0c4f88b
check printf format strings
...
R=r
DELTA=18 (16 added, 0 deleted, 2 changed)
OCL=21177
CL=21185
2008-12-15 10:50:33 -08:00
Russ Cox
7ca5a0d323
correct arg register in bsdthread_create
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=21040
CL=21176
2008-12-15 08:56:32 -08:00
Russ Cox
8fb837d96d
add test for once
...
R=r
DELTA=31 (31 added, 0 deleted, 0 changed)
OCL=21043
CL=21175
2008-12-15 08:56:17 -08:00
Ken Thompson
42d89ac02c
even more code improvement
...
R=r
OCL=21160
CL=21160
2008-12-14 18:45:00 -08:00
Ken Thompson
23fc0ac061
more code optimization
...
R=r
OCL=21159
CL=21159
2008-12-14 17:06:06 -08:00
Ken Thompson
719b088697
code generation
...
R=r
OCL=21146
CL=21146
2008-12-13 16:41:47 -08:00
Ken Thompson
937ac13f26
code improvement
...
R=r
OCL=21144
CL=21144
2008-12-13 13:16:14 -08:00
Ken Thompson
e683fb7a54
bug104
...
R=r
OCL=21082
CL=21082
2008-12-12 13:10:36 -08:00
Russ Cox
a3155bdb09
remove implicit int -> string
...
R=ken
OCL=21020
CL=21020
2008-12-11 17:04:12 -08:00
Russ Cox
bf67afc84e
print field names on struct members.
...
also don't concatenate strings next
to each other in the struct,
like p.doprint does.
expose additional print flags to formatters
R=r
DELTA=128 (111 added, 11 deleted, 6 changed)
OCL=20991
CL=21018
2008-12-11 16:53:33 -08:00
Ken Thompson
c7ab332744
restrict declarations of type map/chan/string
...
(they must be pointers)
R=r
OCL=21009
CL=21009
2008-12-11 16:09:45 -08:00
Russ Cox
73653841af
reject struct to interface conversion for now
...
R=ken
OCL=21007
CL=21007
2008-12-11 15:56:13 -08:00
Rob Pike
9ba97ca308
add uintptr to reflect and print
...
R=rsc
DELTA=70 (35 added, 4 deleted, 31 changed)
OCL=20993
CL=20998
2008-12-11 14:41:12 -08:00
Rob Pike
546f269c3b
if the typestring gives a field name of "?", drop it.
...
R=rsc
DELTA=11 (7 added, 0 deleted, 4 changed)
OCL=20988
CL=20988
2008-12-11 13:24:04 -08:00
Rob Pike
ac09eb4f49
handle the nil interface better in reflect and print
...
R=rsc
DELTA=25 (19 added, 0 deleted, 6 changed)
OCL=20985
CL=20985
2008-12-11 12:59:49 -08:00
Russ Cox
793a6effcf
add JSON library
...
R=r
DELTA=1127 (1127 added, 0 deleted, 0 changed)
OCL=20975
CL=20983
2008-12-11 12:25:58 -08:00
Russ Cox
fa945d5bf8
fix race with fresh perforce checkouts
...
R=r
DELTA=15 (9 added, 0 deleted, 6 changed)
OCL=20977
CL=20981
2008-12-11 11:58:45 -08:00
Russ Cox
cb64ec5bb6
only generate non-trivial signatures in the
...
file in which they occur. avoids duplicate
trampoline generation across multiple files.
R=ken
OCL=20976
CL=20980
2008-12-11 11:54:33 -08:00
Russ Cox
a9e890d5cf
looks like i broke the build
...
TBR=r
OCL=20963
CL=20963
2008-12-10 21:20:48 -08:00
Russ Cox
b927ad8835
DNS messages
...
R=r
DELTA=685 (683 added, 0 deleted, 2 changed)
OCL=20926
CL=20951
2008-12-10 17:17:59 -08:00
Ken Thompson
a4459c5520
bug
...
R=r
OCL=20940
CL=20940
2008-12-10 16:23:29 -08:00
Russ Cox
d0e30cdaa9
assorted cleanup and fixes
...
R=r
DELTA=209 (109 added, 79 deleted, 21 changed)
OCL=20930
CL=20934
2008-12-10 15:55:59 -08:00
Rob Pike
a238087aa2
StringBytes help routine, common functionality put into package io for sharing.
...
R=rsc
DELTA=10 (10 added, 0 deleted, 0 changed)
OCL=20928
CL=20931
2008-12-10 15:46:45 -08:00
Ken Thompson
5f1a3be9dd
bug120
...
R=r
OCL=20921
CL=20921
2008-12-10 14:17:24 -08:00
Ken Thompson
e956429166
string hash function faults w empty string
...
fixes maps[""]
R=r
OCL=20909
CL=20911
2008-12-10 13:28:46 -08:00
Ken Thompson
7dd62cb3bc
2 minor bugs
...
R=r
OCL=20906
CL=20906
2008-12-10 12:38:16 -08:00
Ken Thompson
57bd0da375
bug126
...
R=r
OCL=20879
CL=20879
2008-12-09 18:31:31 -08:00
Ken Thompson
8bce3b5658
bug127
...
R=r
OCL=20874
CL=20874
2008-12-09 17:52:41 -08:00
Rob Pike
436fcc68e0
fix historical editing glitch
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=20871
CL=20873
2008-12-09 17:43:11 -08:00
Rob Pike
f5cfadde47
implement two TODOs in reflect:
...
- delete vestigial SetString method
- make type map use interface instead of *interface
R=rsc
DELTA=31 (0 added, 7 deleted, 24 changed)
OCL=20861
CL=20863
2008-12-09 16:33:02 -08:00
Russ Cox
3935610e35
chans and maps of interfaces
...
R=r
DELTA=746 (729 added, 1 deleted, 16 changed)
OCL=20858
CL=20858
2008-12-09 16:16:07 -08:00
Rob Pike
50d0695ccf
use unsafe.pointer in reflection objects
...
R=rsc
DELTA=326 (4 added, 259 deleted, 63 changed)
OCL=20853
CL=20856
2008-12-09 15:41:21 -08:00
Robert Griesemer
6cbdeb3f88
- fixed bug with unicode text formatting: the number of bytes
...
per rune cannot be computed correctly if we have only parts
of a rune - delay computation
- added html filtering mode: html tags and entities are ignored
for width computations
- expanded tests:
- extra tests for html text
- extra tests that write text in various portions
R=r
DELTA=227 (126 added, 20 deleted, 81 changed)
OCL=20833
CL=20835
2008-12-09 13:03:15 -08:00
Ken Thompson
92a1190c6c
robs bug converting unsafe.pointer
...
R=r
OCL=20834
CL=20834
2008-12-09 13:00:50 -08:00
Russ Cox
0d9c1abb58
replace assembly casts with unsafe.pointer
...
R=r
DELTA=178 (18 added, 101 deleted, 59 changed)
OCL=20822
CL=20826
2008-12-09 10:57:55 -08:00
Russ Cox
f58567d6e2
more impossible time errors
...
R=r
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=20788
CL=20818
2008-12-09 10:27:30 -08:00
Ken Thompson
bf6164719a
conversion to/from
...
any pointer or uintptr
and unsafe.pointer
R=r
OCL=20795
CL=20795
2008-12-08 20:50:17 -08:00
Ken Thompson
1d4daa2d39
foundation for import unsafe
...
R=r
OCL=20794
CL=20794
2008-12-08 19:46:39 -08:00
Russ Cox
6478df1c41
avoid skew in time.Tick; remove errors from time.Seconds, time.Nanoseconds
...
R=r
DELTA=46 (21 added, 10 deleted, 15 changed)
OCL=20785
CL=20787
2008-12-08 17:45:50 -08:00
Russ Cox
be629138ab
use Note sched.stopped correctly
...
R=r
DELTA=6 (5 added, 0 deleted, 1 changed)
OCL=20777
CL=20779
2008-12-08 17:14:08 -08:00
Russ Cox
4d6bccb0f1
pick up symbol for JMP main(SB)
...
but not JMP main (label).
R=ken
OCL=20724
CL=20724
2008-12-08 11:33:04 -08:00
Ken Thompson
b79272d9a2
allowed syntax for range
...
a range m (implies :=)
a,b range m (implies :=)
a:b range m (implies :=)
a := range m
a,b := range m
a:b := range m
a = range m
a,b = range m
a:b = range m
R=r
OCL=20676
CL=20676
2008-12-06 13:40:30 -08:00
Ken Thompson
26b357ca5b
range statement
...
R=r
OCL=20667
CL=20667
2008-12-05 18:24:05 -08:00
Russ Cox
3f8aa662e9
add support for ref counts to memory allocator.
...
mark and sweep, stop the world garbage collector
(intermediate step in the way to ref counting).
can run pretty with an explicit gc after each file.
R=r
DELTA=502 (346 added, 143 deleted, 13 changed)
OCL=20630
CL=20635
2008-12-05 15:24:18 -08:00
Rob Pike
73120ee81d
use sync.Mutex instead of a channel for locking
...
R=rsc
DELTA=12 (3 added, 1 deleted, 8 changed)
OCL=20631
CL=20634
2008-12-05 15:18:07 -08:00
Robert Griesemer
8aeb8647c5
- handle UTF-8 text in tabwriter
...
R=r
DELTA=84 (27 added, 3 deleted, 54 changed)
OCL=20539
CL=20584
2008-12-05 09:22:13 -08:00
Russ Cox
0d1cbaf225
strings.utflen -> utf8.RuneCount, RuneCountInString
...
R=r
DELTA=94 (52 added, 33 deleted, 9 changed)
OCL=20547
CL=20552
2008-12-04 21:00:34 -08:00
Ken Thompson
a0a14b98fa
empty switches -- bug128
...
R=r
OCL=20520
CL=20522
2008-12-04 16:05:40 -08:00
Ken Thompson
c597845e13
const/var/iota declarations as discussed
...
R=r
OCL=20506
CL=20506
2008-12-04 15:33:40 -08:00
Russ Cox
afa6424078
don't warn anymore about missing imports
...
(happens legitimately in c and assembly objects).
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=20497
CL=20499
2008-12-04 14:59:38 -08:00
Russ Cox
cfb9425460
emit dynamically linked 6.out on darwin instead of static,
...
unless given -d flag.
the resulting binary doesn't *use* any dynamic libraries,
it just has a reference to the dynamic linker and an
empty list of needed symbols and libraries.
this is enough to make 6.out binaries that can be run
under dtrace / dtruss.
R=r
DELTA=39 (34 added, 0 deleted, 5 changed)
OCL=20476
CL=20482
2008-12-04 13:49:45 -08:00
Ian Lance Taylor
1a19cb8ec0
Make run.bash run all the current tests.
...
R=r,rsc
DELTA=8 (8 added, 0 deleted, 0 changed)
OCL=20468
CL=20473
2008-12-04 13:14:09 -08:00
Russ Cox
bf3dd3f0ef
add mutex.Mutex
...
R=r
DELTA=349 (348 added, 0 deleted, 1 changed)
OCL=20380
CL=20472
2008-12-04 12:51:36 -08:00
Russ Cox
3e8faa640f
fix build - forgot these files
...
TBR=r
OCL=20448
CL=20448
2008-12-04 10:18:53 -08:00
Russ Cox
79e1db2da1
add stub routines stackalloc() and stackfree().
...
run oldstack on g0's stack, just like newstack does,
so that oldstack can free the old stack.
R=r
DELTA=53 (44 added, 0 deleted, 9 changed)
OCL=20404
CL=20433
2008-12-04 08:30:54 -08:00
Russ Cox
c7bab46d0f
add time.Tick()
...
R=r
DELTA=130 (115 added, 1 deleted, 14 changed)
OCL=20376
CL=20385
2008-12-03 16:40:00 -08:00
Russ Cox
dfa5893d4f
preparation for exec.
...
* syscall:
add syscall.RawSyscall, which doesn't use sys.entersyscall/sys.exitsyscall
add syscall.dup2
add syscall.BytePtrPtr
add syscall.Rusage, RusagePtr
add syscall.F_GETFD, F_SETFD, FD_CLOEXEC
* runtime:
clean up, correct signal handling.
can now survive (continue running after) a signal.
R=r
DELTA=394 (286 added, 51 deleted, 57 changed)
OCL=20351
CL=20369
2008-12-03 14:21:28 -08:00
Russ Cox
2b39165f1e
clean stack trace code.
...
format is unchanged but shows all frames
(old loop stopped one frame early).
wreck=; 6.out
cannot convert type *main.S·interface2 to interface main.I·interface2: missing method Foo
throw: interface conversion
SIGSEGV: segmentation violation
Faulting address: 0x0
pc: 0x256d
throw+0x46 /home/rsc/go/src/runtime/runtime.c:68
throw(0x863a, 0x0)
hashmap+0x188 /home/rsc/go/src/runtime/iface.c:167
hashmap(0x8760, 0x0, 0x85b0, 0x0, 0x0, ...)
sys·ifaceT2I+0xa8 /home/rsc/go/src/runtime/iface.c:201
sys·ifaceT2I(0x8760, 0x0, 0x85b0, 0x0, 0x0, ...)
main·main+0x4e /home/rsc/go/src/runtime/rt0_amd64_darwin.s:87
main·main()
mainstart+0xf /home/rsc/go/src/runtime/rt0_amd64.s:70
mainstart()
sys·goexit /home/rsc/go/src/runtime/proc.c:110
sys·goexit()
R=r
DELTA=44 (5 added, 15 deleted, 24 changed)
OCL=20358
CL=20368
2008-12-03 14:20:23 -08:00
Russ Cox
32a1ee85b1
Make strconv.atof("-0") return -0
...
and update test.
R=iant
DELTA=11 (3 added, 1 deleted, 7 changed)
OCL=20350
CL=20362
2008-12-03 13:29:13 -08:00
Ken Thompson
f8797daa9f
import/export of exact mp floating constants
...
new syntax for exact mp floating constants
decimal_int ( "p" | "P" ) [ "+" | "-" ] decimal_int
the value is decimal1 * 2^decimal2
R=r
OCL=20357
CL=20357
2008-12-03 13:17:26 -08:00
Ken Thompson
c8a66a98ff
small code improvement to
...
used scaled indexing
R=r
OCL=20308
CL=20310
2008-12-02 19:54:51 -08:00
Ken Thompson
89996e1fb1
truncating of float constants when
...
used in float64 or float32 contexts
R=r
OCL=20297
CL=20297
2008-12-02 17:03:47 -08:00
Russ Cox
28a30254e7
remove reference to non-existent mparith.h
...
R=ken
OCL=20188
CL=20188
2008-12-01 17:35:15 -08:00
Ken Thompson
3fa4610601
multi precision floating point
...
R=r
OCL=20185
CL=20185
2008-12-01 17:22:05 -08:00
Russ Cox
5486096543
be more precise in ftoa_test.
...
R=ken
OCL=20173
CL=20173
2008-12-01 16:03:09 -08:00
Russ Cox
d154f8a9e2
add blank line (response to post-submit review of CL 19422)
...
TBR=r
OCL=20127
CL=20127
2008-12-01 10:26:23 -08:00
Russ Cox
d040d26863
new stacktrace format
...
sys·gosched+0x25 /home/rsc/go/src/runtime/proc.c:477
sys·gosched()
chanrecv+0x29e /home/rsc/go/src/runtime/chan.c:277
chanrecv(0x4be80, 0x0, 0x4cf88, 0x0, 0x0, ...)
sys·chanrecv1+0x5b /home/rsc/go/src/runtime/chan.c:355
sys·chanrecv1(0x4be80, 0x0)
once·Server+0x26 /home/rsc/go/src/lib/strconv/atoi.go:-41
once·Server()
the last line is broken (atoi.go:-41) but that's not new.
R=r
DELTA=46 (19 added, 14 deleted, 13 changed)
OCL=20018
CL=20026
2008-11-25 17:17:54 -08:00
Russ Cox
efc86a74e4
change meaning of $GOMAXPROCS to number of cpus to use,
...
not number of threads. can still starve all the other threads,
but only by looping, not by waiting in a system call.
fix darwin syscall.Syscall6 bug.
fix chanclient bug.
delete $GOMAXPROCS from network tests.
add stripped down printf, sys.printhex to runtime.
R=r
DELTA=355 (217 added, 36 deleted, 102 changed)
OCL=20017
CL=20019
2008-11-25 16:48:10 -08:00
Robert Griesemer
7cfa7eebf3
- fixed a problem with flushing
...
- added extra tests
R=r
DELTA=164 (107 added, 20 deleted, 37 changed)
OCL=20002
CL=20004
2008-11-25 14:06:59 -08:00
Russ Cox
92cff8557e
gotest: change pattern to Test([^a-z].*)?
...
warn about files with no tests
be clear about where testing warnings come from
R=r
DELTA=18 (12 added, 3 deleted, 3 changed)
OCL=19988
CL=19993
2008-11-25 12:49:17 -08:00
Robert Griesemer
480b962df5
- delete vector.go - not needed anymore
...
- runs all.bash
R=r
DELTA=121 (0 added, 121 deleted, 0 changed)
OCL=19960
CL=19983
2008-11-25 10:08:49 -08:00
Rob Pike
5f9254c11a
make a (rudimentary) ByteBuffer and put it in package "io".
...
fix up protocol buffers to use it.
R=rsc
DELTA=1232 (612 added, 572 deleted, 48 changed)
OCL=19964
CL=19981
2008-11-25 09:41:58 -08:00
Russ Cox
a5433369aa
use pc/ln table to print source lines in traceback
...
r45=; 6.out
oops
panic PC=0x400316
0x400316?zi /home/rsc/go/src/runtime/rt0_amd64_linux.s:83
main·g(4195177, 0, 4205661, ...)
main·g(0x400369, 0x402c5d, 0x403e49, ...)
0x40034c?zi /home/rsc/go/src/runtime/x.go:24
main·f(4205661, 0, 4210249, ...)
main·f(0x402c5d, 0x403e49, 0x1, ...)
0x400368?zi /home/rsc/go/src/runtime/x.go:37
main·main(4210249, 0, 1, ...)
main·main(0x403e49, 0x1, 0x7fff9d894bd8, ...)
0x402c5c?zi /home/rsc/go/src/runtime/rt0_amd64.s:70
mainstart(1, 0, 2643020760, ...)
mainstart(0x1, 0x7fff9d894bd8, 0x0, ...)
r45=;
R=r
DELTA=251 (198 added, 25 deleted, 28 changed)
OCL=19965
CL=19979
2008-11-25 09:23:36 -08:00
Russ Cox
afff0ff1b8
% x inserts spaces between hex bytes in string/*[]byte
...
R=r
DELTA=7 (7 added, 0 deleted, 0 changed)
OCL=19967
CL=19978
2008-11-25 09:23:13 -08:00
Russ Cox
ed490dbed8
add author lines
...
R=r
DELTA=150 (147 added, 0 deleted, 3 changed)
OCL=19968
CL=19977
2008-11-25 09:22:58 -08:00
Ken Thompson
9a5c7eab16
better code for += -= ^= |= and &=
...
R=r
OCL=19953
CL=19953
2008-11-24 17:51:26 -08:00
Russ Cox
bbe9bb65c7
add hash to build; rm pkg/* in clean.bash
...
R=r
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=19935
CL=19937
2008-11-24 15:18:29 -08:00
Russ Cox
0f83fa3a0c
convert tests.
...
refine gotest's test selection criteria.
R=r
DELTA=1590 (745 added, 844 deleted, 1 changed)
OCL=19903
CL=19936
2008-11-24 15:17:47 -08:00
Russ Cox
387df5e176
replay CL 19916 and CL 19913 now that the build can handle them
...
TBR=r
OCL=19924
CL=19934
2008-11-24 14:51:33 -08:00
Russ Cox
0a20746cac
remove old .6 after install,
...
so that compilation of other .6
will use the copy in goroot/pkg
R=r
DELTA=3 (1 added, 0 deleted, 2 changed)
OCL=19931
CL=19933
2008-11-24 14:51:01 -08:00
Rob Pike
d7c1048771
really restore helpful error rules
...
R=rsc
OCL=19929
CL=19929
2008-11-24 14:23:53 -08:00
Rob Pike
46f89d53c6
restore helpful error rules
...
R=rsc
OCL=19928
CL=19928
2008-11-24 14:15:53 -08:00
Ken Thompson
8e3fe10ee3
1. retract general field names
...
2. array bounds bug
3. ... optimization bug
R=r
OCL=19927
CL=19927
2008-11-24 14:01:12 -08:00
Rob Pike
2a874603ae
add missing file
...
R=rsc
OCL=19926
CL=19926
2008-11-24 13:47:52 -08:00
Russ Cox
c00295d115
Automated g4 rollback of changelist 19913.
...
*** Reason for rollback ***
broke build
*** Original change description ***
bufio.ReadRune
TBR=r
OCL=19923
CL=19923
2008-11-24 13:29:59 -08:00
Russ Cox
85fea81d70
Automated g4 rollback of changelist 19916.
...
*** Reason for rollback ***
broke build
*** Original change description ***
utf8: add InString routines for decoding in strings
reflect: add InterfaceValue.Get(), remove Empty
strconv: add Quote, CanBackquote
fmt:
* %q go-quoted " string
* %#q go-quoted ` string if possible, " string otherwise
* %x hexadecimal string
* anywhere a string is okay, *[]byte is okay
* flags # 0 - + space
* print value inside interface, not interface itself
* tests
TBR=r
OCL=19920
CL=19920
2008-11-24 13:24:15 -08:00
Russ Cox
b65a930453
utf8: add InString routines for decoding in strings
...
reflect: add InterfaceValue.Get(), remove Empty
strconv: add Quote, CanBackquote
fmt:
* %q go-quoted " string
* %#q go-quoted ` string if possible, " string otherwise
* %x hexadecimal string
* anywhere a string is okay, *[]byte is okay
* flags # 0 - + space
* print value inside interface, not interface itself
* tests
R=r
DELTA=756 (597 added, 121 deleted, 38 changed)
OCL=19888
CL=19916
2008-11-24 13:04:27 -08:00
Robert Griesemer
508277debe
bufio.ReadRune
...
R=rsc
DELTA=32 (29 added, 0 deleted, 3 changed)
OCL=19809
CL=19913
2008-11-24 12:35:07 -08:00
Russ Cox
0432a34383
make bignum_test a test
...
R=gri
DELTA=967 (468 added, 499 deleted, 0 changed)
OCL=19906
CL=19912
2008-11-24 12:32:31 -08:00
Russ Cox
e3b793004f
hash writers: adler32, crc32, md5, sha1.
...
all could probably be made faster.
R=r
DELTA=929 (929 added, 0 deleted, 0 changed)
OCL=19879
CL=19911
2008-11-24 12:30:40 -08:00
Russ Cox
6c4d8f8309
gobuild:
...
recognize "// package foo" in non-go files
recognize "gobuild: ignore" to exclude from build
R=r
DELTA=10 (7 added, 2 deleted, 1 changed)
OCL=19878
CL=19905
2008-11-24 11:21:56 -08:00
Russ Cox
0e198da634
fix %g 20 -> "2e+01" want "20"
...
R=r
DELTA=11 (10 added, 0 deleted, 1 changed)
OCL=19885
CL=19887
2008-11-23 17:27:44 -08:00
Ken Thompson
a6182dab47
indexing optimizations and bug fix
...
R=r
OCL=19886
CL=19886
2008-11-23 17:26:49 -08:00
Russ Cox
3aa063d79c
delete stack mark strings
...
in favor of using in-memory copy of symbol table.
$ ls -l pretty pretty.big
-rwxr-xr-x 1 rsc eng 439516 Nov 21 16:43 pretty
-rwxr-xr-x 1 rsc eng 580984 Nov 21 16:20 pretty.big
$
R=r
DELTA=446 (238 added, 178 deleted, 30 changed)
OCL=19851
CL=19884
2008-11-23 17:08:55 -08:00
Ken Thompson
ffafad1919
setup for keywords in fieldnames
...
R=r
OCL=19883
CL=19883
2008-11-23 15:58:48 -08:00
Ken Thompson
e081f25c3e
reg and peep
...
R=r
OCL=19871
CL=19871
2008-11-22 17:58:53 -08:00
Russ Cox
5169bb44e6
utf8 routines in go; a start.
...
also:
* parse flags in testing.Main.
* add make test in src/lib.
R=r
DELTA=323 (323 added, 0 deleted, 0 changed)
OCL=19831
CL=19850
2008-11-21 16:13:31 -08:00
Russ Cox
284a50c109
fix 6l bug - moved symbol table without
...
recording correct place in mach tables
used by debuggers.
R=r
DELTA=4 (0 added, 2 deleted, 2 changed)
OCL=19810
CL=19849
2008-11-21 16:13:11 -08:00
Russ Cox
c4bba4b1fd
fix build - missed update that added tabwriter
...
TBR=r
OCL=19804
CL=19804
2008-11-21 13:05:09 -08:00
Russ Cox
5a863a4ece
convert lib to a Makefile,
...
mainly for "make bufio.install".
R=r
DELTA=144 (80 added, 62 deleted, 2 changed)
OCL=19760
CL=19799
2008-11-21 12:36:16 -08:00
Robert Griesemer
130e6f42f1
- implemented arbitrary padding char for tabwriter
...
- implemented right-to-left alignment (numerical results)
- better comments and error handling
- added more tests
- updated dependent files
R=r
DELTA=232 (175 added, 11 deleted, 46 changed)
OCL=19761
CL=19780
2008-11-21 09:35:49 -08:00
Rob Pike
60db3d6d3f
don't print (incorrect anyway) line numbers in panic.
...
R=rsc
DELTA=4 (0 added, 2 deleted, 2 changed)
OCL=19757
CL=19763
2008-11-20 23:16:31 -08:00
Rob Pike
0444d697c1
automatically add tabs after newlines
...
R=gri
DELTA=12 (10 added, 0 deleted, 2 changed)
OCL=19758
CL=19758
2008-11-20 18:10:46 -08:00
Robert Griesemer
01b44bbfc8
- move tabwriter into library
...
- added preliminary tests (more to do)
- renamed type from TabWriter -> Writer
- adjusted my code where necessary
R=r
DELTA=825 (474 added, 346 deleted, 5 changed)
OCL=19744
CL=19753
2008-11-20 17:39:41 -08:00
Russ Cox
67addd4e11
symbol table changes
...
* add gotype string to symbol table
* fill in gotype in 6l for known funcs/vars
* print gotype with nm -t
* load symbol and pc/ln tables into memory at magic address 0x99<<32.
* add sys.symdat() to retrieve raw bytes of symbol table
and pc/ln table.
most of this should be considered experimental
and subject to change.
R=r
DELTA=157 (128 added, 0 deleted, 29 changed)
OCL=19746
CL=19750
2008-11-20 17:32:18 -08:00
Rob Pike
ec913c42b3
tweak pcs in traceback so they point to calling line instead of line after call.
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=19745
CL=19745
2008-11-20 17:19:45 -08:00
Rob Pike
bd6e0bc8ba
run tests in file order, not alphabetical
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=19723
CL=19727
2008-11-20 15:22:32 -08:00
Russ Cox
4af8ef6519
new flags to 6cov
...
-s print source lines
-n x don't print about sections < x lines long.
R=r
DELTA=69 (57 added, 1 deleted, 11 changed)
OCL=19697
CL=19708
2008-11-20 11:58:07 -08:00
Russ Cox
2e7e76073a
slightly simpler math.Pow per gri's suggestion
...
R=gri
DELTA=28 (2 added, 9 deleted, 17 changed)
OCL=19707
CL=19707
2008-11-20 11:56:48 -08:00
Russ Cox
5014da7cb0
add math to tests; clean a bit
...
R=r
DELTA=33 (12 added, 9 deleted, 12 changed)
OCL=19688
CL=19696
2008-11-20 10:54:11 -08:00
Russ Cox
f379ea0b07
more accurate Log, Exp, Pow.
...
move test.go to alll_test.go.
R=r
DELTA=1024 (521 added, 425 deleted, 78 changed)
OCL=19687
CL=19695
2008-11-20 10:54:02 -08:00
Rob Pike
c0a01e9665
refine gobuild: the files must be *_test.go not *test.go
...
this causes complications
R=rsc
DELTA=1724 (849 added, 856 deleted, 19 changed)
OCL=19667
CL=19667
2008-11-19 19:43:32 -08:00
Rob Pike
12254b6c0b
change naming convention for tests from
...
test*.go
to
*test.go
R=rsc
DELTA=1747 (864 added, 855 deleted, 28 changed)
OCL=19666
CL=19666
2008-11-19 19:11:01 -08:00
Rob Pike
64023e7b7d
a few Errorfs should have been Error
...
R=rsc
DELTA=6 (0 added, 0 deleted, 6 changed)
OCL=19662
CL=19664
2008-11-19 18:43:04 -08:00
Robert Griesemer
9af3ee5471
- full support for sorting (assumes array elements implement LessInterface
...
- better test reporting
R=r
DELTA=43 (24 added, 0 deleted, 19 changed)
OCL=19641
CL=19645
2008-11-19 16:23:45 -08:00
Russ Cox
88daac7862
gotestify & gostylify math.
...
R=r
DELTA=682 (275 added, 301 deleted, 106 changed)
OCL=19638
CL=19642
2008-11-19 16:14:31 -08:00
Rob Pike
be7e0f8160
gotestify regexp
...
R=rsc
DELTA=101 (53 added, 25 deleted, 23 changed)
OCL=19635
CL=19637
2008-11-19 15:38:46 -08:00
Robert Griesemer
9195c22e7c
use new test framework in array test
...
R=r
DELTA=30 (2 added, 5 deleted, 23 changed)
OCL=19627
CL=19632
2008-11-19 15:17:58 -08:00
Robert Griesemer
bef9b1713a
- removed uses of vector in favor of array in a few places
...
- fixed make.bash
R=r
DELTA=21 (1 added, 3 deleted, 17 changed)
OCL=19624
CL=19629
2008-11-19 15:16:20 -08:00
Rob Pike
6d30efc772
add a type testing.T and use it in tests.
...
update uses of gotest.
minor tweak to testing structure for protobuf.
R=rsc
DELTA=276 (71 added, 75 deleted, 130 changed)
OCL=19614
CL=19621
2008-11-19 14:38:05 -08:00
Robert Griesemer
165d78717d
- adjust sort.go to use new naming conventions
...
R=rsc
DELTA=31 (0 added, 0 deleted, 31 changed)
OCL=19618
CL=19620
2008-11-19 14:32:15 -08:00
Russ Cox
10002bb0fb
accept empty list of package imports.
...
R=ken
OCL=19617
CL=19617
2008-11-19 14:27:48 -08:00
Robert Griesemer
93dcc2c248
new Makefile generated by gobuild
...
R=rsc
DELTA=9 (7 added, 0 deleted, 2 changed)
OCL=19613
CL=19613
2008-11-19 14:24:53 -08:00
Russ Cox
63a84348cc
look for .6 before .a; accept archives with 0 length __.SYMDEF
...
TBR=r
OCL=19612
CL=19612
2008-11-19 14:21:44 -08:00
Robert Griesemer
b548e73460
- array lib (essentially vector, more complete)
...
- TODO replace vector
R=r
DELTA=314 (313 added, 0 deleted, 1 changed)
OCL=19592
CL=19609
2008-11-19 14:05:21 -08:00
Russ Cox
aa1ede15cc
avoid problem overwriting read-only quietgcc
...
TBR=r
OCL=19600
CL=19600
2008-11-19 13:01:32 -08:00
Russ Cox
d2dfd76b3d
build with warnings enabled.
...
new script "quietgcc" installed in $HOME/bin during make.bash
runs gcc with warnings, turns off inappropriate ones,
greps out useless output.
quietgcc also makes sure to run the correct 64-bit gcc.
R=r
DELTA=38 (36 added, 0 deleted, 2 changed)
OCL=17493
CL=19599
2008-11-19 12:54:44 -08:00
Russ Cox
87b1124407
gobuild: add coverage rule, ignore files in package main.
...
R=r
DELTA=55 (41 added, 11 deleted, 3 changed)
OCL=19594
CL=19598
2008-11-19 12:52:30 -08:00
Russ Cox
692a5dbb9e
coverage tweaks
...
* handle new 6g shift sequence
* assume 6.out
R=r
DELTA=24 (20 added, 0 deleted, 4 changed)
OCL=19593
CL=19596
2008-11-19 12:51:25 -08:00
Russ Cox
cf9b7f7534
essentially 100% coverage of strconv in tests.
...
fix a few bugs.
R=r
DELTA=294 (275 added, 9 deleted, 10 changed)
OCL=19595
CL=19595
2008-11-19 12:50:34 -08:00
Rob Pike
572cad8719
gotest, via testing.go, should warn you if you failed to create any tests.
...
when chatty, it should tell you how many there are.
R=rsc
DELTA=5 (5 added, 0 deleted, 0 changed)
OCL=19590
CL=19590
2008-11-19 11:50:58 -08:00
Robert Griesemer
60ee27d96c
saving 2 lines :-)
...
R=rsc
DELTA=5 (0 added, 2 deleted, 3 changed)
OCL=19562
CL=19585
2008-11-19 10:20:52 -08:00
Russ Cox
9a6fd41a01
silence gcc warnings: missing prototypes and unused variables
...
R=ken
OCL=19583
CL=19583
2008-11-19 09:49:06 -08:00
Russ Cox
f1547e511b
leave 6.out around after gotest;
...
delete it in make clean.
R=r
DELTA=10 (0 added, 0 deleted, 10 changed)
OCL=19542
CL=19581
2008-11-19 09:40:54 -08:00
Russ Cox
9b8a6dc7da
change array slice error to include bounds
...
$ 6.out
slice[5:12] of [10] array
throw: array slice
SIGSEGV: segmentation violation
R=r
DELTA=15 (13 added, 0 deleted, 2 changed)
OCL=19540
CL=19580
2008-11-19 09:35:36 -08:00
Rob Pike
addd6fa846
read and write never return -1 now: error return is through the error variable only
...
R=rsc
DELTA=13 (9 added, 0 deleted, 4 changed)
OCL=19538
CL=19570
2008-11-18 22:32:01 -08:00
Ken Thompson
497e648e7e
perm is [] instead of map
...
R=r
OCL=19569
CL=19569
2008-11-18 19:59:56 -08:00
Ken Thompson
b2b4e7fa55
need ./ on local files
...
R=rsc
OCL=19567
CL=19567
2008-11-18 19:36:36 -08:00
Ken Thompson
64718ec262
oops
...
R=r
OCL=19566
CL=19566
2008-11-18 19:27:15 -08:00
Ken Thompson
2dd16a3208
first cut at optimizing
...
R=r
OCL=19564
CL=19564
2008-11-18 19:24:37 -08:00
Russ Cox
9dc4b1ca90
make Copyn take and return int64.
...
add Copy.
R=gri
DELTA=52 (37 added, 1 deleted, 14 changed)
OCL=19557
CL=19559
2008-11-18 18:45:51 -08:00
Robert Griesemer
79d94d504f
Copyn
...
R=rsc
DELTA=34 (34 added, 0 deleted, 0 changed)
OCL=19541
CL=19545
2008-11-18 18:08:05 -08:00
Russ Cox
23bd1298f7
add -chatty flag to test.
...
was supposed to be in some other cl but got dropped.
R=r
DELTA=21 (16 added, 2 deleted, 3 changed)
OCL=19531
CL=19539
2008-11-18 17:52:05 -08:00
Russ Cox
c5f4867ffa
stop flag reading before lone - arg.
...
R=r
DELTA=5 (3 added, 0 deleted, 2 changed)
OCL=19520
CL=19529
2008-11-18 17:23:11 -08:00
Russ Cox
866c08ff20
fix build for newbies
...
R=r
OCL=19526
CL=19528
2008-11-18 17:22:31 -08:00
Ken Thompson
93c8d3c41b
another shift bug
...
R=r
OCL=19525
CL=19525
2008-11-18 17:15:42 -08:00
Russ Cox
92a4fe1dd5
more tests for strconv; convert to gotest.
...
R=r
DELTA=219 (186 added, 32 deleted, 1 changed)
OCL=19508
CL=19523
2008-11-18 17:12:14 -08:00
Russ Cox
6cc001c312
return *os.Error instead of bool from strconv.ato*
...
R=r
DELTA=137 (56 added, 4 deleted, 77 changed)
OCL=19505
CL=19522
2008-11-18 17:12:07 -08:00
Russ Cox
360151d4e2
gobuild changes.
...
* handles multiple packages per directory
* scans directory for files if given no arguments
* infers package name
* includes test rule invoking gotest
R=r
DELTA=746 (444 added, 150 deleted, 152 changed)
OCL=19504
CL=19521
2008-11-18 17:11:56 -08:00
Russ Cox
c1efd7d6e5
roll tests into one binary
...
R=r
DELTA=145 (27 added, 27 deleted, 91 changed)
OCL=19423
CL=19502
2008-11-18 16:13:25 -08:00
Rob Pike
7969860126
testing support library
...
R=rsc
OCL=19496
CL=19496
2008-11-18 15:29:10 -08:00
Rob Pike
8b8630c6cf
allow files to be named on the command line
...
R=rsc
DELTA=3 (1 added, 1 deleted, 1 changed)
OCL=19485
CL=19485
2008-11-18 14:17:13 -08:00
Rob Pike
d495372509
new gotest shell script (will be a proper command some day, probably)
...
automates construction and execution of unit tests.
R=rsc
DELTA=60 (58 added, 0 deleted, 2 changed)
OCL=19482
CL=19484
2008-11-18 14:12:14 -08:00
Russ Cox
6b7dd4c020
add build step to install debuggers setgid procmod.
...
they have to go in /usr/local/bin
because the setgid bit is ignored in /Users.
R=r
DELTA=54 (49 added, 0 deleted, 5 changed)
OCL=19424
CL=19463
2008-11-18 10:08:46 -08:00
Russ Cox
4656686cf5
use correct lineno in nod even if yacc has looked ahead.
...
makes lineno correct for statements without semicolons.
R=ken
OCL=19454
CL=19454
2008-11-18 09:32:05 -08:00
Russ Cox
ed628ca79b
* faster atof for common cases
...
(gets 3x speedup in go; got 40x in c)
* handle and test overflow
R=r
DELTA=217 (200 added, 0 deleted, 17 changed)
OCL=19399
CL=19422
2008-11-17 17:22:51 -08:00
Russ Cox
4d1d5e8a88
work around more commonly-unreachable 6g code sequences.
...
R=r
DELTA=23 (23 added, 0 deleted, 0 changed)
OCL=19405
CL=19420
2008-11-17 17:16:50 -08:00
Russ Cox
3f548cd2d9
add gobuild to build
...
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=19404
CL=19415
2008-11-17 16:59:04 -08:00
Russ Cox
a1585b676b
fix the easy parts of bug120
...
R=r,ken
DELTA=66 (52 added, 3 deleted, 11 changed)
OCL=19386
CL=19389
2008-11-17 13:58:45 -08:00
Ken Thompson
b7f01f9f41
silence compiler warning
...
R=r
OCL=19382
CL=19382
2008-11-17 12:55:22 -08:00
Russ Cox
079c00a475
correctly rounded floating-point conversions
...
in new package strconv.
move atoi etc to strconv too.
update fmt, etc to use strconv.
R=r
DELTA=2232 (1691 added, 424 deleted, 117 changed)
OCL=19286
CL=19380
2008-11-17 12:34:03 -08:00
Russ Cox
75647d2024
First pieces of malloc.
...
R=r
DELTA=756 (754 added, 0 deleted, 2 changed)
OCL=19266
CL=19378
2008-11-17 12:32:35 -08:00
Russ Cox
5aa7dc5daf
adopt suggestions from Bentley and McIlroy (SP&E Nov 1993)
...
to make qsort more robust:
* use "ninther" to choose pivot.
* use three-way partition to avoid quadratic
behavior on all-one-value arrays.
also add tests suggested in that paper.
the immediate cause of the slowness we observed was
in fact none of these: the recursive call was sorting
data[0:m] instead of data[a:m].
also rename package to "sort" to match convention.
R=r,gri
DELTA=358 (255 added, 21 deleted, 82 changed)
OCL=19341
CL=19373
2008-11-17 11:51:34 -08:00
Ken Thompson
2567c073ea
random permutation function
...
func perm(n int) *map[int]int
R=r
OCL=19340
CL=19340
2008-11-16 13:02:47 -08:00
Russ Cox
9c7b064043
fix bugs in package locals
...
R=ken
OCL=19299
CL=19299
2008-11-14 17:31:29 -08:00
Rob Pike
fd47cb9af5
conflicting scopes should cause error exit
...
TBR=rsc
OCL=19297
CL=19297
2008-11-14 17:28:11 -08:00
Russ Cox
d3f6093931
package-local declarations using keyword "package".
...
R=r
DELTA=129 (81 added, 0 deleted, 48 changed)
OCL=19283
CL=19291
2008-11-14 16:35:08 -08:00
Ken Thompson
e875055461
switch
...
R=r
OCL=19288
CL=19288
2008-11-14 16:24:27 -08:00
Robert Griesemer
23c8faaf85
buf fix: make FD.Read, FD.Write work for empty buffers
...
R=r
DELTA=8 (6 added, 0 deleted, 2 changed)
OCL=19273
CL=19275
2008-11-14 15:13:29 -08:00
Rob Pike
f3e354ec26
clean up make script
...
reorder pieces so io is earlier
R=rsc
DELTA=66 (27 added, 24 deleted, 15 changed)
OCL=19248
CL=19255
2008-11-14 12:53:44 -08:00
Robert Griesemer
0c4c842eb0
- added Init() function so that vectors can be used w/o New():
...
var v Vector.Vector;
v.Init();
...
- clear vector elements in Reset
- removed some comments that seem redundant
R=r
DELTA=16 (9 added, 5 deleted, 2 changed)
OCL=19247
CL=19247
2008-11-14 11:22:39 -08:00
Russ Cox
f8b20e4083
add cov, prof to default build; clean up compiler warnings
...
R=r
DELTA=8 (1 added, 0 deleted, 7 changed)
OCL=19245
CL=19245
2008-11-14 10:57:48 -08:00
Russ Cox
7832ab5ba0
code coverage tool
...
$ 6cov -g 235.go 6.out
235.go:62,62 main·main 0x27c9-0x2829 MOVL $main·.stringo(SB),AX
235.go:30,30 main·main 0x2856-0x285e ADDQ $6c0,SP
$
and assorted fixes.
R=r
DELTA=743 (732 added, 8 deleted, 3 changed)
OCL=19226
CL=19243
2008-11-14 10:45:23 -08:00
Rob Pike
2355395550
handle nils safely
...
R=rsc
DELTA=38 (14 added, 10 deleted, 14 changed)
OCL=19242
CL=19242
2008-11-14 10:42:45 -08:00
Robert Griesemer
3c2f0ae132
* pretty printing snapshot: towards printing comments nicely
...
- implemented elastic tabstops algorithm, now correct and documented
- first cut at printing comments (use -comments flag, disabled for now)
- struct field types are now aligned (using elastic tab stops)
- needs more fine-tuning
* fixed a bug in test script
* added quick smoke test to makefile and invoke it in run.bash
instead of the full test
R=r
OCL=19220
CL=19220
2008-11-13 17:50:46 -08:00
Rob Pike
e2621b8037
add a %v format to print an arbitrary value in its "println" form.
...
also add code to print (pointers to) arrays, through %v.
R=rsc
DELTA=108 (70 added, 33 deleted, 5 changed)
OCL=19184
CL=19192
2008-11-13 15:20:52 -08:00
Russ Cox
e4f4ab0b8d
more array methods
...
R=r
OCL=19172
CL=19172
2008-11-13 13:42:59 -08:00
Russ Cox
c5f21c0dc2
* 6l:
...
if an object in an archive tries to refer
to a file in its original source directory,
ignore it.
* 6ar:
fix bug if archive is empty.
* gobuild:
build archive in current directory.
* math:
use new gobuild Makefile.
* test/math.go:
rename to mathest.go, add // run line, make it run.
R=r
DELTA=494 (277 added, 203 deleted, 14 changed)
OCL=19090
CL=19171
2008-11-13 13:42:26 -08:00
Ken Thompson
9795c9e727
temp fix for map not multiple of 8
...
R=r
OCL=19166
CL=19166
2008-11-13 13:20:18 -08:00
Ken Thompson
bc0b4f0d2a
mike's map code
...
R=r
OCL=19146
CL=19146
2008-11-13 10:35:44 -08:00
Rob Pike
419e1e05a1
add some support for modifying what pointers point to
...
R=rsc
DELTA=27 (16 added, 11 deleted, 0 changed)
OCL=19130
CL=19132
2008-11-12 19:05:05 -08:00
Rob Pike
6e70c2c74f
fix bug in FullyReader
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=19131
CL=19131
2008-11-12 19:04:56 -08:00
Rob Pike
b1d37b74d9
reflect.PtrValue.SetSub() to set pointers
...
R=rsc
OCL=19101
CL=19101
2008-11-12 14:19:39 -08:00
Rob Pike
2f4d35ffb9
converting uint bits back into floats
...
R=rsc
DELTA=32 (32 added, 0 deleted, 0 changed)
OCL=19084
CL=19091
2008-11-12 11:51:34 -08:00
Robert Griesemer
2727abe4fc
- lowercased package name (Bignum -> bignum)
...
- implemented some missing functionality (and, or, xor of positive ints)
R=r
OCL=19087
CL=19087
2008-11-12 11:00:11 -08:00
Ken Thompson
902a4d5f29
6c bug with large constants
...
R=r
OCL=19056
CL=19056
2008-11-11 18:15:36 -08:00
Rob Pike
6ee7fe5808
Implement a "full reader" wrapper for io.Read, guaranteeing that
...
either the buffer is full, zero bytes were read, or an error is returned.
R=rsc
DELTA=44 (42 added, 0 deleted, 2 changed)
OCL=19027
CL=19047
2008-11-11 17:28:36 -08:00
Russ Cox
b682f924d7
don't try interface/structure conversion until
...
last resort, because it assumes every call is a
real use of the conversion.
R=ken
OCL=19026
CL=19026
2008-11-11 15:55:32 -08:00
Russ Cox
792145723e
width fixes.
...
* check for uncomputed struct offsets
* distinguish function structs from ordinary structs
* make sure function structs are not examined in isolation
R=ken
OCL=19005
CL=19005
2008-11-11 13:46:55 -08:00
Rob Pike
0e544fa0e3
fix error-handling bug.
...
add newline after stack traces.
R=rsc
DELTA=3 (2 added, 1 deleted, 0 changed)
OCL=18945
CL=18953
2008-11-10 18:13:20 -08:00
Russ Cox
600ee088b6
* accept all NaNs, not just the one sys.NaN() returns.
...
* use union, not cast, to convert between uint64 and float64,
to avoid possible problems with gcc in future.
R=r
DELTA=75 (39 added, 15 deleted, 21 changed)
OCL=18926
CL=18926
2008-11-10 15:17:56 -08:00
Russ Cox
e8766354a4
handle Inf, NaN in float print
...
R=r
DELTA=48 (23 added, 14 deleted, 11 changed)
OCL=18707
CL=18922
2008-11-10 14:54:10 -08:00
Rob Pike
842e1a9aa7
Add a cache to avoid unnecessary parsing of type strings when constructing values
...
R=rsc
DELTA=12 (9 added, 0 deleted, 3 changed)
OCL=18916
CL=18921
2008-11-10 14:53:40 -08:00
Rob Pike
10137e7f1d
fix start/stop bug in prof.
...
also only time-limit if a value is provided.
R=rsc
DELTA=9 (4 added, 2 deleted, 3 changed)
OCL=18917
CL=18920
2008-11-10 14:53:32 -08:00
Rob Pike
091fb779a1
Protocol buffer encoding.
...
R=rsc
DELTA=1075 (1028 added, 31 deleted, 16 changed)
OCL=18865
CL=18918
2008-11-10 14:47:28 -08:00
Robert Griesemer
176e256b26
Added missing Set method for Vector
...
BUG=1474670
TBR=r
DELTA=6 (6 added, 0 deleted, 0 changed)
OCL=18839
CL=18843
2008-11-07 18:31:50 -08:00
Rob Pike
4328d44254
wrong system call number for stat
...
TBR=rsc
OCL=18833
CL=18833
2008-11-07 16:17:42 -08:00
Ken Thompson
79f5697b02
byte multiply
...
R=r
OCL=18830
CL=18830
2008-11-07 16:05:17 -08:00
Ken Thompson
dc78c64f23
byte multiply
...
R=r
OCL=18807
CL=18807
2008-11-07 14:20:32 -08:00
Ken Thompson
9b827cf9a0
bug in select default
...
R=r
OCL=18741
CL=18741
2008-11-06 17:50:28 -08:00
Robert Griesemer
483e031525
- binomial implementation (fixing broken build)
...
R=r
OCL=18738
CL=18738
2008-11-06 17:29:07 -08:00
Rob Pike
175dd773e6
simpleminded ascii to floating point conversion
...
R=rsc
DELTA=111 (107 added, 0 deleted, 4 changed)
OCL=18720
CL=18725
2008-11-06 16:32:28 -08:00
Rob Pike
335a5236e7
add sys.float32bits, sys.float64bits
...
R=rsc
DELTA=21 (21 added, 0 deleted, 0 changed)
OCL=18709
CL=18718
2008-11-06 15:48:36 -08:00
Russ Cox
ec81145565
s/gins/gbranch/
...
R=ken
OCL=18713
CL=18713
2008-11-06 15:05:19 -08:00
Russ Cox
0eda21a2fd
change minimum sethi/ullman number to 1
...
to distinguish not computed (0) vs trivial (1).
add missing ullmancalc on function args.
R=ken
OCL=18711
CL=18711
2008-11-06 14:50:58 -08:00
Russ Cox
9906bfc7bb
6g ninit fixes - fixes the two test cases
...
i isolated last night. does not fix rob's
interface-smashing bug.
R=ken
OCL=18698
CL=18698
2008-11-06 13:31:13 -08:00
Robert Griesemer
66c6b13b03
- implemented String() and Format functionality in Bignum
...
- added a test
R=r
OCL=18687
CL=18687
2008-11-06 12:13:52 -08:00
Robert Griesemer
3a2c0a9615
- fixes to sprintf (by rob)
...
R=r
OCL=18685
CL=18685
2008-11-06 11:56:08 -08:00
Rob Pike
91212bd1ad
If a value implements String(), use that in fmt.print (not fmt.printf)
...
R=rsc
DELTA=13 (9 added, 0 deleted, 4 changed)
OCL=18682
CL=18684
2008-11-06 11:38:44 -08:00
Rob Pike
f15dfa7802
Polymorphic printing.
...
R=rsc
DELTA=100 (70 added, 10 deleted, 20 changed)
OCL=18663
CL=18669
2008-11-06 10:40:57 -08:00
Ken Thompson
79fbbe37a7
select default
...
R=r
OCL=18646
CL=18646
2008-11-05 21:50:28 -08:00
Russ Cox
a6af484328
more runtime support for chan select default
...
R=ken
OCL=18630
CL=18630
2008-11-05 18:04:24 -08:00
Russ Cox
b69e80d8dd
runtime support for default in select.
...
assumes cas->send == 2 for default case.
R=ken
OCL=18628
CL=18628
2008-11-05 17:57:18 -08:00
Russ Cox
d6a7cefd1e
allow any type at all in sys.unreflect;
...
accomodate empty type table in 6l.
R=r
DELTA=10 (2 added, 8 deleted, 0 changed)
OCL=18601
CL=18605
2008-11-05 16:09:12 -08:00
Russ Cox
553c98dca4
fix renamed-package bug in exported names:
...
always show original name
R=ken
OCL=18603
CL=18603
2008-11-05 15:59:34 -08:00
Ken Thompson
83a798513c
more on t,ok = I.(T)
...
R=r
OCL=18599
CL=18599
2008-11-05 15:33:01 -08:00
Ken Thompson
a8b56a73a4
T,ok = I.(T)
...
R=r
OCL=18580
CL=18582
2008-11-05 14:27:07 -08:00
Russ Cox
6f07ec721a
new interface error messages
...
package main
func main() {
var i interface { } = 1;
a := i.(*[]byte);
}
interface { } is int, not *[]uint8
throw: interface conversion
package main
func main() {
var i interface { };
a := i.(*[]byte);
}
interface is nil, not *[]uint8
throw: interface conversion
package main
func main() {
i := sys.unreflect(0, "*bogus");
a := i.(*[]byte);
}
interface { } is *bogus, not *[]uint8
throw: interface conversion
R=r
DELTA=30 (24 added, 2 deleted, 4 changed)
OCL=18548
CL=18565
2008-11-05 13:05:01 -08:00
Rob Pike
5a1cbe8b64
trim tags from type strings for structure fields.
...
R=rsc
DELTA=28 (14 added, 4 deleted, 10 changed)
OCL=18561
CL=18563
2008-11-05 13:01:33 -08:00
Russ Cox
1983121bbb
6g interface changes:
...
* allow conversion between nil interface and any type.
* mark signatures as DUPOK so that multiple .6 can
contain sigt.*[]byte and only one gets used.
R=ken
OCL=18538
CL=18542
2008-11-05 11:27:50 -08:00
Rob Pike
44a82746a1
minor tweak to still non-portable alignment calculation
...
R=rsc
DELTA=4 (1 added, 1 deleted, 2 changed)
OCL=18528
CL=18533
2008-11-05 11:02:55 -08:00
Rob Pike
554d0aa589
make sizes and offsets int, not uint64
...
add Value.Interface, to extract an empty interface
that can be converted to a regular Go value of the
appropriate type, if known.
R=rsc
DELTA=49 (2 added, 0 deleted, 47 changed)
OCL=18526
CL=18526
2008-11-05 10:17:38 -08:00
Rob Pike
bdbb958895
fix bugs parsing functions in reflect library.
...
parsed interfaces wrong.
could not handle a function with a single type as a return value.
R=rsc
DELTA=34 (20 added, 2 deleted, 12 changed)
OCL=18511
CL=18520
2008-11-05 08:17:01 -08:00
Rob Pike
a45f947c34
type strings through the reflection library.
...
R=rsc
DELTA=187 (107 added, 28 deleted, 52 changed)
OCL=18510
CL=18510
2008-11-04 22:54:11 -08:00
Rob Pike
3200b06b14
prepare for recursive printfs
...
R=rsc
DELTA=31 (9 added, 6 deleted, 16 changed)
OCL=18470
CL=18472
2008-11-04 13:57:21 -08:00
Robert Griesemer
e2eccf3bd0
install bignum as library
...
R=r
DELTA=3501 (1752 added, 1749 deleted, 0 changed)
OCL=18460
CL=18471
2008-11-04 13:55:18 -08:00
Russ Cox
e5d9a5c9f0
runtime support for interface ok,
...
whatever the final syntax ends up being.
R=ken
OCL=18414
CL=18414
2008-11-03 17:34:37 -08:00
Russ Cox
47caf6424c
6l: generate gotypesigs on demand.
...
add sys.unreflect, which uses gotypesigs.
R=r
DELTA=170 (152 added, 12 deleted, 6 changed)
OCL=18396
CL=18404
2008-11-03 16:03:12 -08:00
Russ Cox
bcd6403cc9
remove unnecessary 6g workaround
...
R=r
DELTA=51 (0 added, 0 deleted, 51 changed)
OCL=18399
CL=18402
2008-11-03 16:00:08 -08:00
Rob Pike
1ff61cefaa
move DotDotDot into next case - hit submit too fast last time.
...
R=rsc
DELTA=5 (1 added, 2 deleted, 2 changed)
OCL=18395
CL=18398
2008-11-03 15:57:12 -08:00
Rob Pike
730fd707cb
support ... as a special type in the reflection library.
...
R=rsc
DELTA=17 (17 added, 0 deleted, 0 changed)
OCL=18386
CL=18393
2008-11-03 15:50:11 -08:00
Russ Cox
c4969a3b93
update names after 6g change
...
TBR=r
OCL=18381
CL=18383
2008-11-03 15:38:27 -08:00
Russ Cox
c249a8de32
rename various magic names.
...
sigi and sigt:
sys·sigi_inter -> sigi·inter
sys·sigt_int -> sigt·int
Package·sigt_Type -> sigt·Package.Type
local type T in file x.go T_x -> T·x
second one T_x_1 -> T·x·1
method names M on T T_M -> T·M
correctly handle local embedded types
init functions are the only place left that use underscores
R=ken
OCL=18377
CL=18377
2008-11-03 15:36:08 -08:00
Ken Thompson
90e5574f1c
treat ... as agreed
...
only unencapsulated if passing one ddd
argument to one ddd parameter.
R=r
OCL=18376
CL=18376
2008-11-03 15:32:49 -08:00
Rob Pike
63f38d62ac
in traceback, handle the case where we've called through a nil function pointer
...
R=rsc
DELTA=7 (7 added, 0 deleted, 0 changed)
OCL=18372
CL=18372
2008-11-03 15:22:15 -08:00
Ken Thompson
250ec1665a
unsigned divide by fn()
...
R=r
OCL=18351
CL=18351
2008-11-03 13:27:16 -08:00
Russ Cox
6b05518553
silence gcc warnings
...
R=ken
OCL=18348
CL=18348
2008-11-03 13:09:30 -08:00
Rob Pike
6524b82fed
ascii to unsigned integer
...
R=rsc
DELTA=60 (35 added, 17 deleted, 8 changed)
OCL=18339
CL=18343
2008-11-03 11:40:33 -08:00
Rob Pike
2d4f7ba0cd
printf as we know and love it.
...
Plus print[ln] with the ability to print struct values.
Note for language mavens: if a "..." function passes its argument
to another "..." function, the argument is not wrapped again. This
allows printf to call fprintf without extra manipulation. It's good
but needs to go in the spec.
This code works:
///
package main
import fmt "fmt"
import os "os"
type T struct { s string; a, b int }
func main() {
P := fmt.Printer();
P.printf("%s = %d with float value %.4f\n", "hi there", 7, 123.456);
P.println("hi there", 7, 123.456);
P.fprintf(os.Stdout, "%s = %d with float value %.4f\n", "hi there", 7, 123.456);
P.println(T{"x", 7, 234}, "end of struct", 8, 9);
}
R=rsc
DELTA=28 (7 added, 3 deleted, 18 changed)
OCL=18321
CL=18324
2008-11-02 12:33:02 -08:00
Rob Pike
178e37e766
add creator for missing types, to avoid crashes when
...
signature is absent from object file.
R=rsc
DELTA=18 (18 added, 0 deleted, 0 changed)
OCL=18315
CL=18323
2008-11-02 12:32:14 -08:00
Ken Thompson
d2472eb812
>>= and <<= shift bug
...
R=r
OCL=18322
CL=18322
2008-11-01 17:53:12 -07:00
Ken Thompson
2fef4c7198
DOTDOTDOT import/export
...
R=r
OCL=18319
CL=18319
2008-11-01 16:52:12 -07:00
Rob Pike
59f029cbf2
a couple of bugs in print.
...
1) bool wasn't handled (added '%t' for 'truth').
2) float64 had a typo.
TBR=rsc
DELTA=11 (10 added, 0 deleted, 1 changed)
OCL=18314
CL=18318
2008-11-01 16:37:53 -07:00
Ken Thompson
74427c6346
DOTDOTDOT
...
R=r
OCL=18317
CL=18317
2008-11-01 16:36:46 -07:00
Ken Thompson
6fff0efdd8
sprint changed to snprint
...
R=r
OCL=18316
CL=18316
2008-11-01 15:56:06 -07:00
Ian Lance Taylor
16fd356679
Add support for the basic type "bool".
...
R=r
DELTA=51 (51 added, 0 deleted, 0 changed)
OCL=18283
CL=18290
2008-10-31 16:34:47 -07:00
Rob Pike
613a5c8bc6
\x00 for NUL in type string.
...
R=rsc
DELTA=14 (9 added, 0 deleted, 5 changed)
OCL=18281
CL=18281
2008-10-31 15:26:14 -07:00
Russ Cox
8a1ad75644
make %Z handle embedded NULs; remove fixed-size buffer
...
R=r
DELTA=44 (2 added, 15 deleted, 27 changed)
OCL=18270
CL=18273
2008-10-31 14:57:57 -07:00
Rob Pike
15fa1e4033
add mention of tag string to grammar comment
...
R=rsc
DELTA=3 (2 added, 0 deleted, 1 changed)
OCL=18232
CL=18232
2008-10-31 09:59:29 -07:00
Rob Pike
12a3435869
reflection support for tag strings
...
R=rsc
DELTA=86 (77 added, 0 deleted, 9 changed)
OCL=18201
CL=18203
2008-10-30 17:29:53 -07:00
Russ Cox
57804f1d2d
escape \ in %Z
...
R=ken
OCL=18202
CL=18202
2008-10-30 17:28:33 -07:00
Russ Cox
4958d41d3b
change from $$ to \n$$ for .6 meta section delimiter
...
R=r
DELTA=13 (5 added, 0 deleted, 8 changed)
OCL=18190
CL=18192
2008-10-30 16:33:50 -07:00
Russ Cox
dc6bd11ce8
make %Z escape "
...
R=ken
OCL=18180
CL=18180
2008-10-30 15:35:56 -07:00
Russ Cox
f2b1536328
annotations on embedded types
...
R=ken
OCL=18179
CL=18179
2008-10-30 15:29:55 -07:00
Russ Cox
1850b29da6
struct annotations in imports.
...
distribute tag across multiple names.
R=ken
OCL=18178
CL=18178
2008-10-30 15:25:26 -07:00
Russ Cox
f27aaf4819
structure field annotation strings
...
R=ken
OCL=18176
CL=18176
2008-10-30 15:13:09 -07:00
Ken Thompson
fd922c875d
shift bug
...
R=r
OCL=18166
CL=18166
2008-10-30 14:32:04 -07:00
Ken Thompson
2c050571d8
shift bugs
...
R=r
OCL=18095
CL=18095
2008-10-29 20:25:34 -07:00
Ken Thompson
2f5a05a859
bug 113
...
R=r
OCL=18081
CL=18081
2008-10-29 16:55:52 -07:00
Russ Cox
d0abe4cbb2
./6.out
...
R=ken
OCL=18079
CL=18079
2008-10-29 16:41:01 -07:00
Ken Thompson
4fdf3d6247
bug 113
...
R=r
OCL=18077
CL=18077
2008-10-29 16:38:23 -07:00
Rob Pike
fe79e436b6
update fmt to int/int32 etc split
...
R=rsc
DELTA=9 (6 added, 0 deleted, 3 changed)
OCL=18072
CL=18075
2008-10-29 16:05:10 -07:00
Rob Pike
282493bbf6
update reflection library to int/int32 etc. split
...
fmt still to come
R=rsc
DELTA=168 (141 added, 19 deleted, 8 changed)
OCL=18064
CL=18071
2008-10-29 15:31:02 -07:00
Russ Cox
c5e7e19604
update linux for int/int32
...
R=r
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=18050
CL=18069
2008-10-29 15:23:36 -07:00
Russ Cox
527669e6b1
set -e doesn't apply to ( ) blocks
...
R=r
DELTA=6 (0 added, 0 deleted, 6 changed)
OCL=18044
CL=18068
2008-10-29 15:23:29 -07:00
Russ Cox
cc5a382802
update Fmt interface: d=int, ud=uint, d32=int32, d64=int64, etc.
...
R=r
DELTA=202 (60 added, 24 deleted, 118 changed)
OCL=18029
CL=18038
2008-10-29 14:28:19 -07:00
Ken Thompson
4a3ce5f19e
sigt_int
...
R=r
OCL=18030
CL=18030
2008-10-29 13:40:00 -07:00
Ken Thompson
89f341db23
new(chan)
...
R=r
OCL=18027
CL=18027
2008-10-29 13:18:21 -07:00
Russ Cox
9d20756dde
fix strings bug from CL 18024
...
R=r
OCL=18026
CL=18026
2008-10-29 13:17:04 -07:00
Russ Cox
bc67ea4f8f
adapt to new compiler types
...
R=r
OCL=18024
CL=18024
2008-10-29 13:09:39 -07:00
Ken Thompson
c21d9a1ec9
the end of life as we know it
...
int is new type
R=r
OCL=18023
CL=18023
2008-10-29 12:46:44 -07:00
Russ Cox
b5c739bd1b
Uncomment the name/type error checking.
...
R=ken
OCL=17928
CL=17928
2008-10-28 01:02:33 -07:00
Robert Griesemer
2e777b44b8
- created staging area for getting bignum package up-to-speed again,
...
now using up-to-date language features
- moved old code away from pkg (defunct anyway because of language changes)
R=r
OCL=17916
CL=17916
2008-10-27 15:44:32 -07:00
Ken Thompson
e8278bcb29
allow len := 0
...
R=r
OCL=17869
CL=17869
2008-10-26 14:04:09 -07:00
Rob Pike
c4af3e7c2a
use embedded types to save boilerplate - almost 300 lines' worth
...
R=rsc
DELTA=427 (53 added, 302 deleted, 72 changed)
OCL=17857
CL=17868
2008-10-26 08:28:33 -07:00
Rob Pike
db25e787fe
fix top-level comments
...
R=rsc
DELTA=14 (13 added, 0 deleted, 1 changed)
OCL=17858
CL=17867
2008-10-26 08:27:50 -07:00
Rob Pike
84b66d25de
delete unused reflection playpen
...
R=rsc
DELTA=442 (0 added, 442 deleted, 0 changed)
OCL=17854
CL=17866
2008-10-26 08:27:27 -07:00
Ken Thompson
a3cdd2e802
bug
...
R=r
OCL=17853
CL=17853
2008-10-25 14:24:51 -07:00
Ken Thompson
6d3d56d55a
bug
...
R=r
OCL=17852
CL=17852
2008-10-25 13:50:18 -07:00
Ken Thompson
b642cf8c00
embedded methods
...
R=r
OCL=17851
CL=17851
2008-10-25 13:31:25 -07:00
Rob Pike
a785e8ac6d
replaced baked-in address with @ so test passes on linux
...
R=rsc
OCL=17841
CL=17841
2008-10-24 21:02:51 -07:00
Ken Thompson
b379d54dea
another step toward interface subtypes
...
put explicit ./ on some runtime tests
R=r
OCL=17839
CL=17839
2008-10-24 20:14:28 -07:00
Russ Cox
cc4dc5a22a
avoid JMP to ATEXT in xfol
...
R=ken
OCL=17833
CL=17833
2008-10-24 17:10:51 -07:00
Russ Cox
e2fa41ab3b
fix JMP main(SB)
...
R=ken
OCL=17832
CL=17832
2008-10-24 16:43:12 -07:00
Rob Pike
418b97c670
add printf to fmt.
...
uses reflection to determine arguments.
for now, the arguments must be provided as a struct; the compiler
will soon do the packaging automatically for "..." parameters.
R=rsc
DELTA=1436 (909 added, 520 deleted, 7 changed)
OCL=17823
CL=17831
2008-10-24 16:33:29 -07:00
Russ Cox
689b28fd96
fix method function type compare bug (again)
...
R=ken
OCL=17819
CL=17819
2008-10-24 14:56:54 -07:00
Russ Cox
c14c961ae4
Automated g4 rollback of changelist 17815.
...
*** Reason for rollback ***
now it's comparing function parameter names...
*** Original change description ***
fix method function type compare bug
R=ken
OCL=17816
CL=17816
2008-10-24 14:32:48 -07:00
Russ Cox
0be746d581
fix method function type compare bug
...
R=ken
OCL=17815
CL=17815
2008-10-24 14:29:01 -07:00
Robert Griesemer
ad863046f8
- set initial value in flag variable if provided
...
R=r
DELTA=10 (9 added, 0 deleted, 1 changed)
OCL=17806
CL=17812
2008-10-24 14:05:42 -07:00
Rob Pike
7466b61ba4
make fmt a directory
...
some build dependencies need rearrangement because fmt will depend on reflect
R=rsc
DELTA=1091 (567 added, 521 deleted, 3 changed)
OCL=17792
CL=17796
2008-10-24 10:42:54 -07:00
Rob Pike
8327b54169
make reflect compile again
...
R=rsc
DELTA=9 (4 added, 4 deleted, 1 changed)
OCL=17753
CL=17755
2008-10-23 17:39:15 -07:00
Rob Pike
536b1f2e98
add reflect to build, clean up test
...
R=rsc
DELTA=341 (188 added, 151 deleted, 2 changed)
OCL=17678
CL=17750
2008-10-23 17:13:34 -07:00
Russ Cox
de13727f0f
use &T{1,2,3} constructor for simple new cases
...
R=r
OCL=17691
CL=17719
2008-10-23 12:41:06 -07:00
Ken Thompson
7ed8fc611d
embedded types
...
auto & on methods
R=r
OCL=17682
CL=17682
2008-10-22 18:18:08 -07:00
Russ Cox
ad48706a24
do not use fake names on anonymous function return values
...
R=ken
OCL=17679
CL=17679
2008-10-22 17:45:47 -07:00
Ken Thompson
6fecb76eea
embedded types
...
R=r
OCL=17676
CL=17676
2008-10-22 17:25:10 -07:00
Rob Pike
5d30161ca7
move reflection code into final place.
...
this is just a branch.
next cl will update and add to build
R=rsc
DELTA=4528 (2264 added, 2264 deleted, 0 changed)
OCL=17670
CL=17672
2008-10-22 17:12:07 -07:00
Russ Cox
21617250f4
import/export of embedded types
...
R=ken
OCL=17643
CL=17643
2008-10-22 13:22:56 -07:00
Russ Cox
40fa690d75
fix handling of *f() = 1
...
R=ken
OCL=17625
CL=17641
2008-10-22 13:13:01 -07:00
Ken Thompson
14c639161a
elided dots
...
R=r
OCL=17601
CL=17601
2008-10-21 20:55:40 -07:00
Russ Cox
dbabeb1d7a
reject new of function type
...
R=ken
OCL=17598
CL=17598
2008-10-21 18:03:25 -07:00
Rob Pike
f0e93e8cc5
fix a couple of inconsequential glitches in regexp code.
...
R=rsc
DELTA=2 (0 added, 1 deleted, 1 changed)
OCL=17589
CL=17595
2008-10-21 17:18:34 -07:00
Russ Cox
beee6915f8
rewrite &Point{1, 2} as allocation
...
R=ken
OCL=17592
CL=17592
2008-10-21 16:53:54 -07:00
Russ Cox
2c3ddf5ef6
include local types in typestrings
...
R=r
DELTA=16 (14 added, 1 deleted, 1 changed)
OCL=17584
CL=17584
2008-10-21 15:57:38 -07:00
Russ Cox
44b0ecc5ca
6g: use full type in sigt[0].name
...
sys: add sys.reflect
runtime: add canfail flag for later
R=ken
OCL=17583
CL=17583
2008-10-21 15:38:26 -07:00
Ken Thompson
0347e95b63
changes to imbedded
...
R=r
OCL=17572
CL=17572
2008-10-21 15:04:10 -07:00
Russ Cox
1a149ca1be
stop looking for type names beginning with _.
...
they're gone.
R=ken
OCL=17569
CL=17569
2008-10-21 14:44:31 -07:00
Russ Cox
aacfbb461b
6g:
...
* print int as int, not P.int
* write type info for non-exported types
in its own new section.
ar:
skip over rest of line after $$
R=ken
OCL=17568
CL=17568
2008-10-21 14:34:45 -07:00
Russ Cox
0532f89b1f
6l: invent gotypestrings if needed
...
R=r
DELTA=419 (409 added, 5 deleted, 5 changed)
OCL=17524
CL=17530
2008-10-21 10:40:16 -07:00
Russ Cox
a570eaabcd
6l:
...
use libbio instead of maintaining own buffer
libbio:
always use vlong offsets; die if off_t is too small
R=r
DELTA=163 (23 added, 63 deleted, 77 changed)
OCL=17508
CL=17512
2008-10-20 17:33:51 -07:00
Russ Cox
28912ce03f
fix compiler warnings
...
R=r
DELTA=44 (10 added, 9 deleted, 25 changed)
OCL=17502
CL=17502
2008-10-20 15:26:38 -07:00
Russ Cox
bfc70d0f0a
use Biobuf not fd for reading objects.
...
will make reading type info easier.
R=r
DELTA=21 (2 added, 1 deleted, 18 changed)
OCL=17491
CL=17501
2008-10-20 15:21:59 -07:00
Russ Cox
aff914c6ec
add nuke
...
R=r
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=17497
CL=17500
2008-10-20 15:21:52 -07:00
Russ Cox
46d3497a04
run.bash: do not make test in gosrc
...
R=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=17476
CL=17499
2008-10-20 15:08:53 -07:00
Russ Cox
ef40d9435b
6g:
...
make sure methods end up immediately following
the struct they are methods on.
ar:
eliminate duplicate definitions from __.PKGDEF.
check that multiple .6 do not give different defs for same
exported type/var/func/const.
increase ar header name size from 16 to 64 bytes
R=r
DELTA=379 (333 added, 18 deleted, 28 changed)
OCL=17477
CL=17481
2008-10-20 13:53:56 -07:00
Rob Pike
03a9872fe3
add primitive ftoa, dtoa to strings library.
...
R=rsc
DELTA=72 (69 added, 0 deleted, 3 changed)
OCL=17478
CL=17480
2008-10-20 13:53:20 -07:00
Russ Cox
7c7a525d18
add io.ReadWriteClose and use it in http
...
R=r
DELTA=15 (6 added, 7 deleted, 2 changed)
OCL=17447
CL=17461
2008-10-20 12:37:07 -07:00
Ken Thompson
61361af9e8
unnamed substructures - not complete
...
R=r
OCL=17437
CL=17437
2008-10-19 20:13:37 -07:00
Rob Pike
35eebcacc8
fix typo causing infinite recursion
...
R=rsc
OCL=17398
CL=17398
2008-10-17 17:59:27 -07:00
Russ Cox
5fe4cd83a8
do not set t->recur on basic types.
...
the comment talked about printing, but now
t->recur is only used for typehash.
in typehash it is important to compute different
hashes for the different basic types.
add test that makes sure an interface { X() int8 }
cannot be used as interface { X() int64 }
R=ken
OCL=17396
CL=17396
2008-10-17 17:51:29 -07:00
Russ Cox
ab9db8a5f8
cleanup - delete unneeded vargen++
...
R=ken
OCL=17394
CL=17394
2008-10-17 17:45:32 -07:00
Rob Pike
d378321b6e
add atol and ltoa. probably want unsigned at some point too.
...
R=rsc
DELTA=14 (10 added, 0 deleted, 4 changed)
OCL=17387
CL=17390
2008-10-17 17:28:09 -07:00
Russ Cox
ba46bd1e5a
export prereq for interface types
...
R=ken
OCL=17377
CL=17377
2008-10-17 16:13:17 -07:00
Ian Lance Taylor
907fea6b54
Link against -lm so that we can find the function "floor".
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=17375
CL=17375
2008-10-17 15:52:49 -07:00
Russ Cox
7cb6b6788c
new convert code found error
...
R=r
OCL=17327
CL=17327
2008-10-16 16:51:12 -07:00
Russ Cox
1163b1db6f
diagnose various conversion problems
...
R=ken
OCL=17320
CL=17320
2008-10-16 15:59:31 -07:00
Russ Cox
493a9d2f42
put toplevel & check back and add test
...
R=ken
OCL=17307
CL=17307
2008-10-16 14:02:20 -07:00
Ken Thompson
2e4b8d94cd
diagnosed some incorrect
...
inputs for method receivers.
R=r
OCL=17304
CL=17304
2008-10-16 13:29:03 -07:00
Russ Cox
59167e5bdb
diagnose export of incomplete type
...
R=ken
OCL=17253
CL=17253
2008-10-15 17:51:23 -07:00
Rob Pike
801f542b0f
remove hack now that vector of int works.
...
R=rsc
DELTA=9 (0 added, 3 deleted, 6 changed)
OCL=17248
CL=17250
2008-10-15 17:20:37 -07:00
Russ Cox
7cd173a4f8
error about & at top level until it is safe
...
R=ken
OCL=17241
CL=17241
2008-10-15 17:09:42 -07:00
Ken Thompson
1bf38484d1
interface on arbitrary types
...
global signatures for basic types
R=r
OCL=17238
CL=17240
2008-10-15 17:08:10 -07:00
Rob Pike
84523402fc
Make regexp build and install officially
...
R=rsc
DELTA=335 (172 added, 156 deleted, 7 changed)
OCL=17167
CL=17180
2008-10-14 22:16:45 -07:00
Rob Pike
69baaa9751
move regexp to lib
...
next cl will update names and add to build
R=rsc
DELTA=1876 (938 added, 938 deleted, 0 changed)
OCL=17149
CL=17166
2008-10-14 19:22:17 -07:00
Russ Cox
4248607ffe
simplify comma code per ken's suggestion
...
R=ken
OCL=17164
CL=17164
2008-10-14 18:47:24 -07:00
Russ Cox
82e41cc533
allow trailing comma in braced initialized list
...
R=ken
OCL=17141
CL=17143
2008-10-14 17:10:39 -07:00
Rob Pike
5933dbda3a
delete hack for interface equality now that it supported by the 6g compiler
...
R=rsc
DELTA=21 (0 added, 21 deleted, 0 changed)
OCL=17123
CL=17136
2008-10-14 16:33:11 -07:00
Ken Thompson
e2e8aa0ee1
interface equality (strings specifically)
...
R=r
OCL=17134
CL=17134
2008-10-14 16:10:44 -07:00
Ken Thompson
edb1412c50
interface equality
...
R=r
OCL=17116
CL=17118
2008-10-14 15:08:23 -07:00
Ken Thompson
1836541566
bug with struct-type { 1 }
...
R=r
OCL=17096
CL=17096
2008-10-14 12:48:14 -07:00
Ken Thompson
1ea5bc7533
stack allocation for the init function
...
R=r
OCL=17063
CL=17063
2008-10-13 20:14:09 -07:00
Russ Cox
900e076d21
handle zeroed interface in ifaceI2I
...
R=r
OCL=16938
CL=16938
2008-10-10 16:21:50 -07:00
Russ Cox
0adc1db757
until 6g implements it, warn about using int in interface.
...
R=ken
OCL=16935
CL=16935
2008-10-10 16:14:13 -07:00
Russ Cox
827dcb86b7
add sys.BUG_intereq to compare interfaces for equality
...
R=r
OCL=16929
CL=16929
2008-10-10 15:30:32 -07:00
Cary Hull
f960840a0e
Adding Mkdir.
...
R=rsc
APPROVED=rsc
DELTA=21 (21 added, 0 deleted, 0 changed)
OCL=16794
CL=16803
2008-10-09 00:15:37 -07:00
Russ Cox
5f1202428b
add empty var ( ), type ( ), const ( ) factorings
...
suggested by rob (could make programs generating
go easier to write).
R=ken
DELTA=13 (13 added, 0 deleted, 0 changed)
OCL=16766
CL=16766
2008-10-08 15:33:09 -07:00
Russ Cox
bbb00c62e1
split all.bash into make.bash and run.bash
...
R=r
OCL=16720
CL=16728
2008-10-08 09:46:54 -07:00
Russ Cox
103fec0455
add http to lib build
...
R=r
OCL=16721
CL=16727
2008-10-08 09:46:31 -07:00
Russ Cox
047c6ec6da
check $GOROOT before diving into build
...
R=r
DELTA=6 (6 added, 0 deleted, 0 changed)
OCL=16726
CL=16726
2008-10-08 09:46:20 -07:00
Cary Hull
f4a8db667b
Fixes breakage caused by semicolon restriction.
...
R=rsc
APPROVED=rsc
DELTA=50 (4 added, 0 deleted, 46 changed)
OCL=16707
CL=16725
2008-10-08 09:34:50 -07:00
Russ Cox
b4f8e01acb
more interface checks:
...
- pointer to interface cannot have methods
- record type names for better runtime error
R=r,ken
DELTA=85 (80 added, 0 deleted, 5 changed)
OCL=16658
CL=16722
2008-10-08 09:21:57 -07:00
Cary Hull
38c2472609
Unterminated declaration breaks build.
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=16688
CL=16690
2008-10-07 17:25:32 -07:00
Russ Cox
02d184b303
remove support for *T as an implicit declaration of T
...
R=ken
OCL=16651
CL=16653
2008-10-07 13:00:10 -07:00
Russ Cox
e6cd1e445b
remove uses of *T as an implicit forward declaration of T
...
R=gri,r
OCL=16648
CL=16652
2008-10-07 12:59:54 -07:00
Russ Cox
96da920f1a
fix bug:
...
type T struct
export type T struct { a int }
was not exporting T
R=ken
OCL=16650
CL=16650
2008-10-07 12:42:57 -07:00
Russ Cox
d364d28142
implement new semicolon rules:
...
* 1. all statements and declarations are terminated by semicolons
* 2. semicolons can be omitted at top level.
* 3. semicolons can be omitted before and after the closing ) or }
* on a list of statements or declarations.
now that semicolons are in, uncomment forward declaration
of interfaces
R=ken
DELTA=285 (124 added, 114 deleted, 47 changed)
OCL=16638
CL=16646
2008-10-07 12:36:30 -07:00
Russ Cox
983f06bdb6
update code to follow new semicolon rules:
...
* 1. all statements and declarations are terminated by semicolons
* 2. semicolons can be omitted at top level.
* 3. semicolons can be omitted before and after the closing ) or }
* on a list of statements or declarations.
/home/rsc/bin/addsemi and then diff+tweak.
R=r,gri
OCL=16620
CL=16643
2008-10-07 12:31:31 -07:00
Rob Pike
7ee60b174d
sys.stringtorune doesn't need a length parameter.
...
R=rsc
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=16600
CL=16630
2008-10-07 10:03:34 -07:00
Russ Cox
74e2e087e2
change type names to go live at the name, so that
...
type T struct {
next *T
}
and
type T *struct {
next T
}
are valid without needing forward declarations.
add "type T struct" syntax for forward struct declarations.
add "type T interface" syntax, but commented out
(need to fix semicolons first)
R=ken
DELTA=452 (259 added, 115 deleted, 78 changed)
OCL=16580
CL=16584
2008-10-06 16:44:17 -07:00
Russ Cox
1b257b2bb3
silence gcc warning - initialize two variables
...
R=ken
OCL=16550
CL=16550
2008-10-06 13:52:23 -07:00
Ken Thompson
6499fbe734
bug060
...
R=r
OCL=16497
CL=16497
2008-10-04 17:11:01 -07:00
Ken Thompson
f25843e65e
bug 026
...
R=r
OCL=16494
CL=16494
2008-10-04 15:17:49 -07:00
Russ Cox
c8b9970e16
change *a1++; to plain a1++
...
R=ken
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=16489
CL=16489
2008-10-04 02:54:19 -07:00
Russ Cox
2e1bb4a4cf
add method test & fix method name bugs
...
R=ken,r
DELTA=86 (72 added, 9 deleted, 5 changed)
OCL=16488
CL=16488
2008-10-04 02:51:03 -07:00
Russ Cox
45f4e38506
silence gcc warnings
...
R=ken
OCL=16449
CL=16466
2008-10-03 16:23:02 -07:00
Russ Cox
b8babed7c2
new import/export format
...
package flag
export type flag.Flag struct { name flag.string; usage flag.string; \
value flag.Value; next *flag.Flag }
type flag.string string
type flag.Value interface { AsBool () (? *flag.BoolValue); \
AsInt () (? *flag.IntValue); AsString () (? *flag.StringValue); \
IsBool () (? flag.bool); IsInt () (? flag.bool); IsString () (? flag.bool); \
Str () (? flag.string); ValidValue (str flag.string) (? flag.bool) }
type flag.BoolValue struct { val flag.bool; p *flag.bool }
type flag.IntValue struct { val flag.int64; p *flag.int64 }
type flag.StringValue struct { val flag.string; p *flag.string }
type flag.bool bool
func (e *flag.StringValue) AsBool () (? *flag.BoolValue)
func (e *flag.StringValue) AsInt () (? *flag.IntValue)
...
the \ continuations are for this message, not real.
changed delimiter for import from (( )) to $$ $$.
replaced mksys.bash with mksys.c
changed sys.go to use leading export,
fake package name is now SYS not foop
don't always require ; on forward func decls
R=ken,r
DELTA=1827 (446 added, 1083 deleted, 298 changed)
OCL=16433
CL=16463
2008-10-03 16:15:55 -07:00
Ken Thompson
8877d27b40
interfaces of all types
...
R=r
OCL=16462
CL=16462
2008-10-03 16:12:21 -07:00
Rob Pike
bbb908fef0
allow prof to launch the process
...
R=rsc
DELTA=32 (30 added, 0 deleted, 2 changed)
OCL=16440
CL=16445
2008-10-03 14:49:10 -07:00
Ken Thompson
ed139c1e37
more on arbitrary receiver types
...
this CL passes the tests, but should
be considered unstable
R=r
OCL=16390
CL=16390
2008-10-02 20:51:10 -07:00
Ken Thompson
53a22770a7
names now println/panicln
...
bug fix in named-return
R=r
OCL=16377
CL=16377
2008-10-02 15:37:15 -07:00
Ken Thompson
f21e731c71
added printn and panicn
...
prints that insert spaces and new line
R=r
OCL=16370
CL=16370
2008-10-02 14:38:07 -07:00
Russ Cox
0216273c7a
add values to some "return" statements.
...
delete unused variables
R=ken
OCL=16360
CL=16360
2008-10-02 11:34:04 -07:00
Ken Thompson
d015f896bb
clear output parameters
...
R=r
OCL=16345
CL=16345
2008-10-01 20:00:58 -07:00
Ken Thompson
970d6a14c4
initialization of
...
var a,b int;
R=r
OCL=16318
CL=16318
2008-10-01 14:16:57 -07:00
Russ Cox
abb95518ab
add a script to build *everything*
...
R=r
DELTA=41 (41 added, 0 deleted, 0 changed)
OCL=16290
CL=16293
2008-10-01 11:06:13 -07:00
Russ Cox
8dc08788ef
remove ( ) around mismatch type prints,
...
so that they don't look like functions.
R=ken
OCL=16244
CL=16244
2008-09-30 15:38:41 -07:00
Russ Cox
387c1bc31e
pretty types; use 6g -t to disable
...
R=ken
OCL=16240
CL=16242
2008-09-30 15:35:40 -07:00
Russ Cox
a4f15640aa
i can import "net" in package net
...
and still have a variable named "net"
R=r
DELTA=18 (0 added, 0 deleted, 18 changed)
OCL=16220
CL=16222
2008-09-30 14:03:13 -07:00
Russ Cox
1f1ae404f8
for loops in hashmap.
...
a few missing FLUSH.
R=ken
OCL=16221
CL=16221
2008-09-30 14:02:53 -07:00
Russ Cox
a05c59fe91
cleanup export
...
R=ken
OCL=16219
CL=16219
2008-09-30 13:52:44 -07:00
Russ Cox
b033c581db
fix export bug for /usr/r/rpc
...
R=ken
OCL=16218
CL=16218
2008-09-30 13:49:31 -07:00
Russ Cox
4d571c9093
fix up arg list parsing to handle any names:
...
type t1 int;
type t2 int;
type t3 int;
func f1(t1, t2, t3);
func f2(t1, t2, t3 bool);
func f3(t1, t2, x t3);
func f4(*t2, x t3); // error: cannot mix
func f5(t1, *t3);
func (x *t1) f6(y *[]t2) (t1, *t3);
func f7() (int, *string);
func f8(t1, *t2, x t3); // error: cannot mix
func f9() (x int, *string);
func f10(*t2, t3);
R=ken
OCL=16202
CL=16210
2008-09-30 12:53:11 -07:00
Ken Thompson
b6f59358b5
minor bugs
...
R=r
OCL=16163
CL=16163
2008-09-29 20:33:51 -07:00
Ian Lance Taylor
489b5001e2
Use unsigned int in itoa to avoid relying on the behaviour of
...
signed integer overflow when negating the most negative
integer.
R=rsc
DELTA=11 (0 added, 7 deleted, 4 changed)
OCL=16105
CL=16120
2008-09-29 13:40:23 -07:00
Russ Cox
e4a61c6524
* implement Linux epoll for polling i/o
...
* isolate OS-specific polling goop in Pollster type
* move generic poll loop out of fd_darwin.go into fd.go
R=r
DELTA=782 (448 added, 281 deleted, 53 changed)
OCL=16108
CL=16119
2008-09-29 13:37:00 -07:00
Russ Cox
878fe69bc1
delete unused files
...
R=r
DELTA=494 (0 added, 494 deleted, 0 changed)
OCL=16109
CL=16115
2008-09-29 13:16:28 -07:00
Ken Thompson
89ac5618ac
toward methods on any type
...
R=r
OCL=16068
CL=16068
2008-09-28 20:22:31 -07:00
Ken Thompson
3a884d76ac
bug in simul assignment
...
R=r
OCL=16053
CL=16053
2008-09-27 17:46:40 -07:00
Ken Thompson
ce0f1dee6f
change print(float) from 5 to 7 sig digits
...
R=r
OCL=16045
CL=16045
2008-09-27 13:33:50 -07:00
Ken Thompson
7be2b9fdf6
bug in argument passing
...
R=r
OCL=16044
CL=16044
2008-09-27 13:32:38 -07:00
Ian Lance Taylor
2fb4edd3e1
Correct zoneinfo version number: it's not 2, it's '2'.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=16032
CL=16040
2008-09-27 09:39:37 -07:00
Ken Thompson
9f3d600be6
export
...
syntax for inheritance
R=r
OCL=16028
CL=16028
2008-09-26 21:27:26 -07:00
Ken Thompson
fb86c39362
bug with array bounds
...
R=r
OCL=16021
CL=16023
2008-09-26 17:41:43 -07:00
Ken Thompson
8545700af8
export
...
R=r
OCL=16018
CL=16022
2008-09-26 17:41:23 -07:00
Russ Cox
43c5e63c00
Darwin kqueue/kevent-based network FDs
...
R=r
OCL=15998
CL=16004
2008-09-26 14:46:28 -07:00
Russ Cox
5267db394c
add os.Pipe
...
R=r
OCL=15989
CL=16001
2008-09-26 14:31:17 -07:00
Russ Cox
185a309737
fix build: new net Makefile
...
TBR=r
OCL=15996
CL=15996
2008-09-26 14:18:34 -07:00
Russ Cox
6201a963f1
move src/syscall to src/lib/syscall.
...
enforce rule: all kernel data structures and constants
go in syscall module.
move things that should be in syscall out of net.
make net a single package.
R=r
OCL=15985
CL=15994
2008-09-26 14:11:26 -07:00
Russ Cox
2662aad7b7
libmach_amd64: refresh darwin thread list each time we get asked.
...
R=r
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=15982
CL=15993
2008-09-26 14:10:33 -07:00
Russ Cox
72154b042f
go/acid/go
...
R=r
DELTA=99 (95 added, 1 deleted, 3 changed)
OCL=15983
CL=15992
2008-09-26 14:10:26 -07:00
Russ Cox
d448d18cb4
test and fix non-blocking chan ops on buffered chans
...
R=ken
DELTA=68 (19 added, 0 deleted, 49 changed)
OCL=15966
CL=15969
2008-09-26 11:47:04 -07:00
Russ Cox
c3d841f5d4
handle negative numeric constants in import.
...
(fixes bugs/bug106)
package bug0
export const A = -1
package bug1
import "bug0"
R=ken
DELTA=21 (19 added, 0 deleted, 2 changed)
OCL=15901
CL=15968
2008-09-26 11:44:20 -07:00
Russ Cox
2c52881a85
fix ELF bugs found by iant
...
- .text begins at INITTEXT, not 0
and does not include HEADR
- .shstrtab, .gosymtab, .gopclntab have alignment 1
- .gosymtab, .gopclntab have type SHT_PROGBITS
R=r
DELTA=9 (0 added, 0 deleted, 9 changed)
OCL=15953
CL=15956
2008-09-26 10:25:13 -07:00
Russ Cox
a0e7937243
6ar: exit with error status if files cannot be opened.
...
R=r
DELTA=15 (8 added, 0 deleted, 7 changed)
OCL=15952
CL=15954
2008-09-26 10:13:57 -07:00
Ian Lance Taylor
f023b7a997
Change the name of the result variable so that it does not
...
hide the package "ip".
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=15914
CL=15914
2008-09-25 17:36:37 -07:00
Russ Cox
d4edee3dd0
prototype nit
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=15906
CL=15909
2008-09-25 17:07:24 -07:00
Russ Cox
34bb7a0bb2
gobuild -m: replace value of $GOARCH and $GOOS
...
in Makefile with $(GOARCH) and $(GOOS)
R=r
DELTA=40 (38 added, 0 deleted, 2 changed)
OCL=15905
CL=15908
2008-09-25 17:07:06 -07:00
Ian Lance Taylor
99ec031391
To get an empty string, return an empty string, not 0.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=15858
CL=15860
2008-09-25 10:51:23 -07:00
Ken Thompson
bcd07252e1
export
...
R=r
OCL=15805
CL=15805
2008-09-24 16:20:01 -07:00
Russ Cox
afd04fdb98
cleanup; sys.sleep can go.
...
R=r
OCL=15786
CL=15792
2008-09-24 15:28:03 -07:00
Russ Cox
42b7789a92
early HTTP library and trivial server
...
R=r
OCL=15777
CL=15791
2008-09-24 15:26:55 -07:00
Russ Cox
a61bb95497
get rid of per-G Note, avoids per-G kernel semaphore on Mac.
...
2.14u 19.82s 22.17r 6.out 100000 # old
1.87u 0.43s 2.31r 6.out 100000 # new
R=r
OCL=15762
CL=15772
2008-09-24 14:13:07 -07:00
Ken Thompson
5f0a5e7a13
more export
...
R=r
OCL=15771
CL=15771
2008-09-24 14:12:21 -07:00
Russ Cox
3f106f976a
make prof work on linux
...
R=r
DELTA=18 (11 added, 1 deleted, 6 changed)
OCL=15752
CL=15755
2008-09-24 11:07:21 -07:00
Rob Pike
c79dffd5ef
bug: updated wrong counter when combining values
...
R=rsc
OCL=15751
CL=15751
2008-09-24 10:35:59 -07:00
Russ Cox
5ff12f871f
only use mach kernel semaphores for actual contention.
...
running rob's powser p.go:
3.21u 2.58s 5.80r 6.out # old
1.48u 0.05s 1.54r 6.out # new
R=r
OCL=15748
CL=15750
2008-09-24 10:25:28 -07:00
Rob Pike
eea21f8b85
rudimentary real-time profiler.
...
tested on mac only.
output like this:
tubenose=% sudo go/src/cmd/prof/6prof -p 71839 -c -d 10
63.93% mach_semaphore_signal
4.64% sys·chansend1
3.93% chanrecv
2.86% semrelease
1.43% cas
1.43% sendchan
1.07% xadd
0.71% main·f
0.71% scheduler
0.71% sys·gosched
0.71% dequeue
...
R=rsc
DELTA=361 (361 added, 0 deleted, 0 changed)
OCL=15731
CL=15736
2008-09-23 18:45:44 -07:00
Rob Pike
7c48a39423
better debuggers:
...
- follow through segmented stacks
- a couple of fixes to db
R=rsc
DELTA=72 (62 added, 0 deleted, 10 changed)
OCL=15713
CL=15717
2008-09-23 15:08:39 -07:00
Ken Thompson
1101d406ec
more on export
...
R=r
OCL=15704
CL=15704
2008-09-23 14:16:41 -07:00
Ken Thompson
dc04d096f0
fixed export sort for methods
...
R=r
OCL=15699
CL=15699
2008-09-23 12:48:52 -07:00
Russ Cox
5383e28ea0
change string([]byte) to pass array, rather than &a[0],
...
to string convert. if the byte array has length 0,
the computation of &a[0] throws an index bounds error.
for fixed size arrays, this ends up invoking arrays2d
unnecessarily, but it works.
R=ken
DELTA=304 (44 added, 28 deleted, 232 changed)
OCL=15674
CL=15678
2008-09-22 20:12:15 -07:00
Rob Pike
4d12c0e170
add os.Getenv()
...
R=rsc
DELTA=51 (50 added, 0 deleted, 1 changed)
OCL=15665
CL=15667
2008-09-22 17:31:41 -07:00
Ken Thompson
4332e0a546
remove extraneous print
...
R=r
OCL=15666
CL=15666
2008-09-22 17:29:12 -07:00
Ken Thompson
adaec0c4f4
vectors bug
...
R=r
OCL=15664
CL=15664
2008-09-22 16:58:30 -07:00
Russ Cox
c14924bcc8
implement zoneinfo reader
...
R=r
DELTA=348 (338 added, 0 deleted, 10 changed)
OCL=15648
CL=15660
2008-09-22 16:41:14 -07:00
Russ Cox
3c17ee69d9
add "once" package
...
R=r
DELTA=79 (79 added, 0 deleted, 0 changed)
OCL=15656
CL=15656
2008-09-22 16:26:57 -07:00
Russ Cox
ebd1eef41e
implement spec: when main.main returns, the program exits
...
R=r
DELTA=9 (7 added, 2 deleted, 0 changed)
OCL=15628
CL=15643
2008-09-22 13:47:59 -07:00
Russ Cox
fb40f88c40
test cleanup
...
- do not print tracebacks if $GOTRACEBACK=0
- set GOTRACEBACK=0 during tests
- filter out pc numbers in errors
R=r
DELTA=70 (22 added, 30 deleted, 18 changed)
OCL=15618
CL=15642
2008-09-22 13:47:53 -07:00
Russ Cox
a27e61e2fe
time bug: darwin, linux return microseconds not nanoseconds
...
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=15626
CL=15641
2008-09-22 13:46:57 -07:00
Russ Cox
fb2c66710c
compiler changes:
...
export.c:
- only expose explicitly exported types to importer
- fix behind your back
go.h:
- add deep() prototype (fixes 64-bit linux crash on time.go)
go.y:
- add a new syntax error case
walk.c:
- allow a,b = f() where f is func ptr (fixes bug088)
R=ken
OCL=15617
CL=15630
2008-09-22 12:45:01 -07:00
Ken Thompson
8231e94520
now method/interface code
...
R=r
OCL=15627
CL=15627
2008-09-22 12:16:19 -07:00
Russ Cox
b676b0e125
better yacc rule in Makefile
...
if y.tab.c is older than y.tab.h, make
interprets doing nothing as a failure,
because y.tab.c hasn't been updated.
so update it.
R=r
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=15615
CL=15622
2008-09-22 10:56:54 -07:00
Ken Thompson
8a9752dcfb
another async select bug
...
R=r
OCL=15599
CL=15599
2008-09-20 19:56:40 -07:00
Ken Thompson
39a4b1421f
bug103 - but the fix caused other
...
things to break. hopefully all fixed
now.
R=r
OCL=15597
CL=15597
2008-09-20 14:59:15 -07:00
Ken Thompson
1da727a31f
fix bugs in asynch select
...
R=r
OCL=15586
CL=15586
2008-09-19 20:43:30 -07:00
Russ Cox
0e81bba1fe
export an os.Error constructor
...
R=r
DELTA=20 (6 added, 7 deleted, 7 changed)
OCL=15569
CL=15571
2008-09-19 15:23:16 -07:00
Rob Pike
995f938ae3
more nuanced handling of usage message to allow user control.
...
also print argv(0) in default message
R=gri
DELTA=37 (21 added, 9 deleted, 7 changed)
OCL=15540
CL=15554
2008-09-19 12:52:00 -07:00
Russ Cox
72e3b204e4
add gobuild.
...
use gobuild-generated Makefile for math and os.
other makefile tweaks.
move math/main.go to test/math.go
R=r
OCL=15529
CL=15537
2008-09-19 11:55:46 -07:00
Russ Cox
5eb9e0621b
avoid dereferencing nil type on undefined name.
...
R=ken
DELTA=12 (12 added, 0 deleted, 0 changed)
OCL=15506
CL=15528
2008-09-19 09:39:09 -07:00
Russ Cox
a67258f380
proper handling of signals.
...
do not run init on g0.
R=r
DELTA=161 (124 added, 23 deleted, 14 changed)
OCL=15490
CL=15497
2008-09-18 15:56:46 -07:00
Russ Cox
326bb67fbf
whitespace
...
R=r
DELTA=0 (0 added, 0 deleted, 0 changed)
OCL=15492
CL=15494
2008-09-18 15:54:21 -07:00
Russ Cox
aca4f19e20
clean blyacc
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=15489
CL=15493
2008-09-18 15:50:28 -07:00
Russ Cox
f74ec00278
add -K flag to check stack underflow
...
R=ken
DELTA=38 (36 added, 0 deleted, 2 changed)
OCL=15482
CL=15491
2008-09-18 15:41:20 -07:00
Russ Cox
d1d7dc6c42
make blyacc too
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=15488
CL=15488
2008-09-18 15:09:48 -07:00
Russ Cox
76036192b9
make Makefiles safe for parallel make
...
use -j4 (4-way parallel) in make.bash.
halves time for make.bash on r45
also add libregexp, acid to default build
R=r
DELTA=90 (39 added, 37 deleted, 14 changed)
OCL=15485
CL=15487
2008-09-18 15:06:43 -07:00
Russ Cox
899c5281da
make acid build on linux.
...
recognize symbol table info again on 64-only linux.
R=r
DELTA=11 (9 added, 0 deleted, 2 changed)
OCL=15486
CL=15486
2008-09-18 15:06:14 -07:00
Russ Cox
13f3149a01
more helpful messages for name-related syntax errors.
...
R=ken
OCL=15477
CL=15479
2008-09-18 13:32:14 -07:00
Russ Cox
9f35e8b227
time & date.
...
rename AddrToInt, StatToInt, etc -> BytePtr, StatPtr, ...
R=r
OCL=15450
CL=15456
2008-09-17 16:20:00 -07:00
Russ Cox
f0635bbfaa
Linux bison rejects // comments outside { code snippets }
...
R=ken
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=15444
CL=15446
2008-09-17 14:09:44 -07:00
Russ Cox
68209ed5e3
fix printing of -(1<<63)
...
R=r
OCL=15441
CL=15445
2008-09-17 14:08:52 -07:00
Russ Cox
9350ef4eea
add network listening & tests
...
R=r,presotto
OCL=15410
CL=15440
2008-09-17 13:49:23 -07:00
Ken Thompson
304440356d
assignment in select
...
with new select operator
R=r
OCL=15418
CL=15418
2008-09-16 20:51:50 -07:00
Rob Pike
47919799b4
new grammar:
...
binary <- is send
unary <- is recv
-< is gone
case a := <-ch: works in select
case a = <-ch: works in select
support for new cases is not yet in the compiler but all non-select
code works
second CL will update affected go source
R=ken
OCL=15414
CL=15414
2008-09-16 19:14:33 -07:00
Russ Cox
4dfc7f0f14
fix / work around bugs in bufio test
...
R=r
DELTA=11 (8 added, 0 deleted, 3 changed)
OCL=15405
CL=15405
2008-09-16 14:15:54 -07:00
Russ Cox
e8a02230f2
preliminary network - just Dial for now
...
R=r,presotto
OCL=15393
CL=15399
2008-09-16 13:42:47 -07:00
Russ Cox
1841f3114e
acid fixes etc. still not perfect.
...
R=r
DELTA=764 (694 added, 38 deleted, 32 changed)
OCL=15285
CL=15395
2008-09-16 12:33:00 -07:00
Ken Thompson
721cb9c6a1
redeclaring methods
...
R=r
OCL=15375
CL=15375
2008-09-15 19:07:23 -07:00
Ken Thompson
5d5e9f74cb
bug - divide and mod of a byte
...
R=r
OCL=15370
CL=15370
2008-09-15 15:03:10 -07:00
Ken Thompson
d01a1ec260
robs wednesday bug
...
R=r
OCL=15327
CL=15327
2008-09-14 17:29:50 -07:00
Ken Thompson
2119294af9
methods on any type
...
-- but only *struct tested
R=r
OCL=15326
CL=15326
2008-09-14 16:57:55 -07:00
Ken Thompson
b9cee1b6c1
package name on signatures thru rename
...
R=r
OCL=15314
CL=15314
2008-09-13 14:51:39 -07:00
Ken Thompson
1ae08bee90
Automated g4 rollback of changelist 15312.
...
*** Reason for rollback ***
<enter reason for rollback>
*** Original change description ***
correct signal name thru package rename
R=r
OCL=15313
CL=15313
2008-09-13 14:49:36 -07:00
Ken Thompson
28b9702741
correct signal name thru package rename
...
R=r
OCL=15312
CL=15312
2008-09-13 14:46:19 -07:00
Ken Thompson
bb3269fba0
snprints for safety
...
R=r
OCL=15311
CL=15311
2008-09-13 14:37:56 -07:00
Rob Pike
c1ad0509ee
remove special trap-handling code for array out of bounds -
...
compiler doesn't generate them any more
R=ken
OCL=15309
CL=15309
2008-09-13 13:13:36 -07:00
Ken Thompson
904d4045d3
1 got rid if static 'fn wo return' test
...
2 added dynamic calls to throw for array bounds
and 'fn wo return'
3 small optimization on index[constant]
R=r
OCL=15281
CL=15281
2008-09-12 16:48:35 -07:00
Russ Cox
7c9e2c2b6c
buffered input & output
...
R=r
DELTA=812 (803 added, 0 deleted, 9 changed)
OCL=15225
CL=15280
2008-09-12 16:42:53 -07:00
Russ Cox
0a097b5cf3
change rand names to match type names
...
R=r
DELTA=66 (19 added, 9 deleted, 38 changed)
OCL=15232
CL=15265
2008-09-12 16:17:36 -07:00
Russ Cox
729bc5c0c7
rudimentary string utilities.
...
R=r
DELTA=314 (306 added, 8 deleted, 0 changed)
OCL=15074
CL=15263
2008-09-12 16:12:20 -07:00
Rob Pike
ab9f27b227
fix up linux trap handling - INTB 5 gives SEGV
...
R=rsc
OCL=15244
CL=15244
2008-09-12 12:35:06 -07:00
Rob Pike
e9047d1fc2
fix silly portability bug
...
R=gri
OCL=15238
CL=15238
2008-09-12 12:17:13 -07:00
Rob Pike
6e8dbc2051
- catch trace traps
...
- disassemble the instructions in a trace trap to see if it's a run-time trap
- if so, print relevant info
- avoid double-printing traceback on panic
R=ken,rsc
DELTA=66 (50 added, 7 deleted, 9 changed)
OCL=15199
CL=15224
2008-09-12 09:44:41 -07:00
Ken Thompson
47580f79b4
bug075
...
R=r
OCL=15192
CL=15192
2008-09-11 19:09:25 -07:00
Rob Pike
d6f15be61d
fixes for funcs without returns
...
R=ken
OCL=15170
CL=15170
2008-09-11 15:48:42 -07:00
Ken Thompson
ff65872fbf
function wo return is an error - not warning
...
R=r
OCL=15169
CL=15169
2008-09-11 15:44:45 -07:00
Robert Griesemer
0ba1db7475
- fixed missing return issues
...
R=r
OCL=15168
CL=15168
2008-09-11 15:38:22 -07:00
Ken Thompson
d30c9a4be5
implement discussed function wo return statement
...
R=r
OCL=15166
CL=15166
2008-09-11 15:23:01 -07:00
Rob Pike
5ea7649b43
pull O_RDONLY etc. up to os library
...
R=rsc
DELTA=16 (14 added, 0 deleted, 2 changed)
OCL=15156
CL=15163
2008-09-11 15:09:10 -07:00
Rob Pike
ccede3e872
make syscall use strings for file names
...
tweak os to adjust
move StringToBytes into syscall, at least for now
this program still works:
package main
import os "os"
func main() {
os.Stdout.WriteString("hello, world\n");
a, b := os.NewFD(77).WriteString("no way");
os.Stdout.WriteString(b.String() + "\n");
}
R=rsc
DELTA=263 (59 added, 176 deleted, 28 changed)
OCL=15153
CL=15153
2008-09-11 13:40:17 -07:00
Rob Pike
c80b06a54e
add lib/os to standard build
...
break lib/os into multiple source files
R=rsc
DELTA=189 (178 added, 4 deleted, 7 changed)
OCL=15149
CL=15152
2008-09-11 13:03:46 -07:00
Ken Thompson
0a7e4a7415
bug generating duplicate interface signatures
...
R=r
OCL=15119
CL=15119
2008-09-10 19:49:35 -07:00
Ken Thompson
a0e57201c7
bug in type of first argument to slice
...
R=r
OCL=15113
CL=15113
2008-09-10 16:45:41 -07:00
Rob Pike
c2723c23d6
make FD a struct with Read, Write, etc.
...
as methods
R=gri,rsc
DELTA=99 (56 added, 31 deleted, 12 changed)
OCL=15103
CL=15103
2008-09-10 15:23:28 -07:00
Rob Pike
92ae2cc8a3
add an Error type to be used as a singleton pointer
...
put all the code in one file for now to work around compiler bug
R=gri,rsc
DELTA=168 (120 added, 41 deleted, 7 changed)
OCL=15100
CL=15100
2008-09-10 14:19:03 -07:00
Rob Pike
795004c6b5
rudimentary beginnings of soon-to-be-real os library
...
R=gri
DELTA=76 (76 added, 0 deleted, 0 changed)
OCL=15086
CL=15088
2008-09-10 12:14:39 -07:00
Robert Griesemer
0416f994b7
- added convenience wrappers for sort
...
(work now with Ken's latest compiler fix)
- exoanded test cases accordingly
- fixed a type in the spec (thx r)
R=r
DELTA=65 (62 added, 2 deleted, 1 changed)
OCL=15050
CL=15050
2008-09-09 18:13:08 -07:00
Ken Thompson
d40f032d18
fixed bug in certain
...
evaluation of complex literals
R=r
OCL=15036
CL=15036
2008-09-09 15:47:31 -07:00
Russ Cox
376898ca8b
go threads for OS X
...
R=r
OCL=14944
CL=15013
2008-09-09 11:50:14 -07:00
Rob Pike
24838a2df6
fix bug in stack limit calculation - was setting limit reg in wrong place.
...
R=ken
OCL=14981
CL=14981
2008-09-08 19:30:14 -07:00
Robert Griesemer
18852cf6d3
- added sort package and test case
...
R=r
OCL=14975
CL=14975
2008-09-08 18:43:42 -07:00
Russ Cox
c3ca056143
go linux x86-64 kernel fixes:
...
* change .gosymtab and .gopclntab to section 7 (note)
* start INITTEXT at 4MB, not 4KB
R=r
OCL=14953
CL=14959
2008-09-08 15:22:55 -07:00
Ken Thompson
077fe40867
bug with struct literal with metods
...
R=r
OCL=14937
CL=14937
2008-09-08 13:10:11 -07:00
Ken Thompson
0194aaf918
T{} syntax for constructors
...
T(expression) for conversion
FUNC keyword no longer a type
R=r
OCL=14887
CL=14887
2008-09-05 19:50:34 -07:00
Rob Pike
e2e48e9a8e
use a makefile to build math
...
fix a typo in syscall/Makefile
R=ken
OCL=14863
CL=14863
2008-09-05 09:55:33 -07:00
Ken Thompson
193eac7917
bugs 29, 61, 62, 74
...
fixedbugs 49 now (correctly) fails
bugs 32, 41, 68, 77 shouldnt be bugs
R=r
OCL=14842
CL=14842
2008-09-04 17:15:15 -07:00
Rob Pike
eab46c6ef4
include math in standard build
...
R=ken
OCL=14811
CL=14811
2008-09-04 13:09:49 -07:00
Ken Thompson
9dbaab54d1
rewriting bugs
...
R=r
OCL=14810
CL=14810
2008-09-04 12:21:10 -07:00
Rob Pike
4c9d84f06a
Update fmt, refl, and rpc to exploit bug fixes in compiler
...
R=gri
OCL=14806
CL=14806
2008-09-04 10:39:04 -07:00
Rob Pike
6c72bfa55b
fix bug in stack overflow check.
...
if stack is in low memory and frame size is huge, test could wrap around!
fix by omitting test altogether if we know frame is big.
R=gri
OCL=14782
CL=14782
2008-09-03 19:58:46 -07:00
Ken Thompson
182f91ffe0
map literals
...
R=r
OCL=14759
CL=14759
2008-09-03 14:40:22 -07:00
Ken Thompson
4539ced714
array literals
...
R=r
OCL=14756
CL=14756
2008-09-03 14:09:29 -07:00
Ken Thompson
1423bf3dc4
structure literals
...
R=r
OCL=14735
CL=14735
2008-09-02 19:11:25 -07:00
Ken Thompson
0ffacfd995
order of evaluation in function args
...
R=r
OCL=14733
CL=14733
2008-09-02 17:12:32 -07:00
Ken Thompson
9c5669bd0b
bug in conv(string, bytearray)
...
R=r
OCL=14732
CL=14732
2008-09-02 16:21:30 -07:00
Rob Pike
b5eddae554
fix bug: was writing off end of array
...
R=gri
OCL=14728
CL=14728
2008-09-02 14:31:31 -07:00
Rob Pike
a0b2ccf9f4
vector cleanup:
...
- change Delete to Remove
- return deleted element in Remove
- remove range checking (runtime does this for you)
R=gri
OCL=14714
CL=14714
2008-09-02 13:16:43 -07:00
Ken Thompson
a7f1af81bd
minor bugs
...
R=r
OCL=14702
CL=14702
2008-09-01 14:37:32 -07:00
Ken Thompson
33ee52727f
fixed labels/break/continue/goto
...
R=r
OCL=14675
CL=14675
2008-08-29 20:30:19 -07:00
Ken Thompson
944ad62ecd
fix type of (1<<x)
...
R=r
OCL=14656
CL=14656
2008-08-29 13:24:53 -07:00
Robert Griesemer
08c4380e48
- updated and cleaned up vector.go to use new array instructions
...
- added initial test cases (needs to be expanded)
R=r
DELTA=135 (84 added, 30 deleted, 21 changed)
OCL=14654
CL=14654
2008-08-29 11:10:23 -07:00
Ken Thompson
53010efe01
shift operations to new spec
...
R=r
OCL=14641
CL=14641
2008-08-28 19:59:42 -07:00
Ken Thompson
c6130e9f1f
get rid of static/dynamic array distinction
...
R=r
OCL=14634
CL=14634
2008-08-28 15:17:37 -07:00
Ken Thompson
66a603c986
arrays
...
R=r
OCL=14603
CL=14603
2008-08-27 17:28:30 -07:00
Ken Thompson
30fd44cf9d
fix fat copy of overlapping data
...
R=r
OCL=14417
CL=14417
2008-08-21 20:49:04 -07:00
Rob Pike
b59b551be7
allow predefined identifiers (len, etc.) to be exported.
...
(they were not accepted as names by the import parser)
R=ken
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=14159
CL=14159
2008-08-13 15:24:55 -07:00
Ken Thompson
52861558f4
put i2s, s2i and i2i in convert
...
R=r
OCL=14143
CL=14143
2008-08-12 19:13:09 -07:00
Rob Pike
0f1d439e82
update bugs
...
exploit the compiler now supporting i2s and i2i and clean up some code
fix up some panics and prints
R=gri
OCL=14141
CL=14141
2008-08-12 17:07:33 -07:00
Ken Thompson
ead7a6d47a
i2s and i2i
...
R=r
OCL=14140
CL=14140
2008-08-12 16:36:18 -07:00
Ken Thompson
c1ab5a554f
resolve go.y edits
...
R=r
OCL=14132
CL=14132
2008-08-12 14:28:58 -07:00
Ken Thompson
4797523572
fixed bugs in const/case
...
R=r
DELTA=138 (75 added, 12 deleted, 51 changed)
OCL=14129
CL=14131
2008-08-12 14:04:03 -07:00
Rob Pike
7293dab5a9
fix two print statements
...
R=gri
OCL=14105
CL=14105
2008-08-11 21:37:46 -07:00
Rob Pike
72d50900e3
fix a typo in the comments
...
R=ken
OCL=14104
CL=14104
2008-08-11 21:29:11 -07:00
Robert Griesemer
683ded80c9
- changed go-in-go parser to require ()'s for panic and print
...
- adjusted much of the existing go code
- missing: tests
R=r
DELTA=229 (1 added, 17 deleted, 211 changed)
OCL=14103
CL=14103
2008-08-11 21:20:42 -07:00
Ken Thompson
a8a9dbc9c6
print() and field names
...
R=r
DELTA=86 (61 added, 3 deleted, 22 changed)
OCL=14099
CL=14099
2008-08-11 19:17:28 -07:00
Rob Pike
968701beb1
- fix signedness bug in sys.Inf()
...
- add NaN, Inf printing to fmt
- fix a couple of bugs in fmt
- add a test for fmt
R=ken
OCL=14092
CL=14092
2008-08-11 15:04:54 -07:00
Ken Thompson
2679eefb31
floating <= and >= compare
...
R=r
DELTA=8 (0 added, 0 deleted, 8 changed)
OCL=14091
CL=14091
2008-08-11 13:53:50 -07:00
Ken Thompson
2b75556436
export large constants
...
R=r
DELTA=37 (31 added, 4 deleted, 2 changed)
OCL=14089
CL=14089
2008-08-11 13:22:04 -07:00
Ken Thompson
5649c23c8c
fixed op=, ++ and -- on maps (bug060)
...
R=r
DELTA=22 (21 added, 0 deleted, 1 changed)
OCL=14049
CL=14049
2008-08-10 16:49:01 -07:00
Ken Thompson
258c817a1b
allow name-type or pointer-to-named-type as method name (bug046)
...
R=r
DELTA=17 (11 added, 3 deleted, 3 changed)
OCL=14048
CL=14048
2008-08-10 15:09:09 -07:00
Ken Thompson
b89c538473
fixed unary ^ opcode (bug082)
...
R=r
DELTA=11 (10 added, 1 deleted, 0 changed)
OCL=14047
CL=14047
2008-08-10 14:35:02 -07:00
Ken Thompson
091047f36c
adding and deleting files
...
R=r
DELTA=1685 (920 added, 765 deleted, 0 changed)
OCL=14030
CL=14030
2008-08-09 17:33:35 -07:00
Ken Thompson
272ae659db
mp fixed arith
...
R=r
DELTA=149 (80 added, 62 deleted, 7 changed)
OCL=14029
CL=14029
2008-08-09 17:29:26 -07:00
Rob Pike
baf0747dd3
fix minor bug uncovered by new constant evaluator
...
R=gri
OCL=14025
CL=14025
2008-08-09 14:50:29 -07:00
Ken Thompson
67c4cc473c
forgot a file
...
R=r
DELTA=427 (427 added, 0 deleted, 0 changed)
OCL=14017
CL=14017
2008-08-08 17:15:46 -07:00
Ken Thompson
9c2ade358d
mp constants
...
R=r
DELTA=381 (142 added, 26 deleted, 213 changed)
OCL=14011
CL=14016
2008-08-08 17:13:31 -07:00
Russ Cox
907f38acfc
Change generated acid to indent nested structures properly.
...
Before the change:
acid: M(m0)
g0 00008dd0
morearg 00000000
cret 00000000
curg 2aaaaaaab000
lastg 00000000
Gobuf sched {
SP ffffe5e0
PC 7fff00001ba1
}
...
acid:
After the change:
acid: M(m0)
g0 (G)00008dd0
morearg 00000000
cret 00000000
curg (G)2aaaaaaab000
lastg (G)00000000
Gobuf sched {
SP ffffe5e0
PC 00001ba1
}
...
acid:
R=ken
DELTA=27 (14 added, 2 deleted, 11 changed)
OCL=13802
CL=13998
2008-08-08 04:25:20 -07:00
Rob Pike
fa7d54ff2e
include syscall in default build
...
fix an issue with autolib names by compiling to target location
print a bit more when compiling
R=gri
OCL=13988
CL=13988
2008-08-07 17:36:50 -07:00
Russ Cox
f7f6329e26
kill trailing white space.
...
(apparently my first attempt didn't work.)
R=r
OCL=13888
CL=13888
2008-08-05 14:21:42 -07:00
Russ Cox
96824000ed
* comment, clean up scheduler
...
* rewrite lock implementation to be correct
(tip: never assume that an algorithm you found
in a linux man page is correct.)
* delete unneeded void* arg from clone fn
* replace Rendez with Note
* comment mal better
* use 6c -w, fix warnings
* mark all assembly functions 7
R=r
DELTA=828 (338 added, 221 deleted, 269 changed)
OCL=13884
CL=13886
2008-08-05 14:18:47 -07:00
Rob Pike
5adbacb8e7
allow pointers as keys in maps, treating them the same as ints - ptr eq not value equality
...
R=ken,gri
OCL=13879
CL=13879
2008-08-05 11:14:35 -07:00
Russ Cox
c8dee2770d
acid. works only on Linux for now
...
R=r
DELTA=7031 (6906 added, 113 deleted, 12 changed)
OCL=13847
CL=13852
2008-08-04 17:24:25 -07:00
Robert Griesemer
2f4352a26d
- switched most of existing Go code to new export syntax
...
- adjusted lang doc
R=r
DELTA=192 (26 added, 65 deleted, 101 changed)
OCL=13844
CL=13848
2008-08-04 17:17:59 -07:00
Russ Cox
d28acc42ec
first cut at multithreading. works on Linux.
...
* kick off new os procs (machs) as needed
* add sys·sleep for testing
* add Lock, Rendez
* properly lock mal, sys·newproc, scheduler
* linux syscall arg #4 is in R10, not CX
* chans are not multithread-safe yet
* multithreading disabled by default;
set $gomaxprocs=2 (or 1000) to turn it on
This should build on OS X but may not.
Rob and I will fix soon after submitting.
TBR=r
OCL=13784
CL=13842
2008-08-04 16:43:49 -07:00
Rob Pike
4f6ba4c8a5
use new export syntax to avoid repetition
...
R=gri
OCL=13819
CL=13819
2008-08-04 14:23:51 -07:00
Ken Thompson
695f83a9e0
export external functions
...
R=r
DELTA=16 (10 added, 4 deleted, 2 changed)
OCL=13815
CL=13815
2008-08-04 13:18:59 -07:00
Robert Griesemer
0cc772cbc0
- adjust Make.conf to use cc instead of cc64 for now
...
TBR=rsc
OCL=13804
CL=13804
2008-08-04 09:47:52 -07:00
Russ Cox
7b3771401c
add nm
...
R=r
DELTA=339 (339 added, 0 deleted, 0 changed)
OCL=13786
CL=13794
2008-08-03 23:06:00 -07:00
Russ Cox
34514bdb72
Use a single Make.conf for setting CC, etc.
...
This makes it easy to build with other flags
(like -ggdb) or other compilers (like cc64).
R=r
DELTA=45 (6 added, 22 deleted, 17 changed)
OCL=13790
CL=13793
2008-08-03 23:03:31 -07:00
Ken Thompson
989676d2ba
add 'export' adjectives to external
...
var, const and type declarations.
R=r
DELTA=49 (12 added, 28 deleted, 9 changed)
OCL=13791
CL=13791
2008-08-03 18:47:02 -07:00
Russ Cox
9aad9fef76
make 6a, 6c, 6g, 6l, libmach_amd64 build on 64-bit gcc.
...
these guys really really want long to be 32-bits,
so ,s/long/int32/ (and then manual fixup).
still passes all tests.
(i started out looking for just those longs that
needed to be int32 instead, and it was just too hard
to track them down one by one.)
the longs were rare enough that i don't think
it will cause integration problems.
R=ken
OCL=13787
CL=13789
2008-08-03 17:25:15 -07:00
Ken Thompson
851100683e
6c delete .6 file on error
...
R=r
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=13785
CL=13785
2008-08-03 13:31:06 -07:00
Russ Cox
873ba78b79
Remove doubled #else
...
R=r
DELTA=4 (2 added, 2 deleted, 0 changed)
OCL=13775
CL=13779
2008-08-03 00:34:05 -07:00
Russ Cox
4feda71b7d
slightly gratuitous reorg of scheduler code
...
* rename select (very loaded word) nextgoroutine
* separate out "enter scheduler" (sys·gosched)
from the scheduler itself (scheduler)
R=r
APPROVED=r
DELTA=36 (17 added, 15 deleted, 4 changed)
OCL=13772
CL=13774
2008-08-02 22:34:04 -07:00
Ken Thompson
7889e03477
go method
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=13765
CL=13765
2008-08-02 15:31:21 -07:00
Rob Pike
c557836c8e
- mark syscall support routines as non-stack-generating
...
- add unlink, creat
- add constants for open
- fix some comments
R=gri
OCL=13654
CL=13656
2008-07-30 14:23:53 -07:00
Rob Pike
ebec99179f
fix a comment
...
fix a register name
R=gri
OCL=13548
CL=13548
2008-07-29 15:17:27 -07:00
Rob Pike
e06d1540c8
fixes for linux system call linkage
...
R=gri
OCL=13547
CL=13547
2008-07-29 15:06:21 -07:00
Rob Pike
ebcd76d540
rewrite system call interface to use less assembler.
...
R=gri
OCL=13546
CL=13546
2008-07-29 14:44:48 -07:00
Rob Pike
f095e263c5
fix type error caused by recent change
...
R=gri
OCL=13545
CL=13545
2008-07-29 13:16:42 -07:00
Ken Thompson
b2d9020242
len now takes an expression
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=13523
CL=13523
2008-07-28 13:54:58 -07:00
Rob Pike
d302244c6c
add lstat
...
clean up some code
fix comments
add paramter names to interface
R=ken
OCL=13521
CL=13521
2008-07-28 13:07:58 -07:00
Rob Pike
3835e01d97
print tracebacks for all goroutines, not just the crashing one
...
R=ken
OCL=13518
CL=13518
2008-07-28 11:29:41 -07:00
Ken Thompson
b1abcc195d
random bug fixes
...
R=r
DELTA=18 (6 added, 1 deleted, 11 changed)
OCL=13504
CL=13504
2008-07-27 13:09:15 -07:00
Ken Thompson
bd397d2f9b
select
...
R=r
DELTA=29 (27 added, 1 deleted, 1 changed)
OCL=13503
CL=13503
2008-07-27 11:42:52 -07:00
Rob Pike
eccea1980d
add fstat, stat
...
R=ken
OCL=13497
CL=13497
2008-07-26 16:22:14 -07:00
Rob Pike
20a02661d9
beginnings of a low-level syscall library
...
R=ken
OCL=13483
CL=13496
2008-07-26 14:49:21 -07:00
Ken Thompson
120827284e
select/chan
...
R=r
DELTA=517 (137 added, 98 deleted, 282 changed)
OCL=13495
CL=13495
2008-07-26 14:21:21 -07:00
Ken Thompson
949ab5c7ff
select
...
R=r
APPROVED=r
DELTA=41 (24 added, 13 deleted, 4 changed)
OCL=13480
CL=13480
2008-07-25 17:03:27 -07:00
Ken Thompson
e963cba8a1
select
...
R=r
APPROVED=r
DELTA=147 (94 added, 14 deleted, 39 changed)
OCL=13477
CL=13477
2008-07-25 15:55:12 -07:00
Ken Thompson
ece3e57c85
read select
...
R=r
APPROVED=r
DELTA=120 (108 added, 0 deleted, 12 changed)
OCL=13468
CL=13468
2008-07-25 11:58:26 -07:00
Rob Pike
b4902c5f40
fix ordering problem: flag depends on fmt
...
R=gri
OCL=13442
CL=13442
2008-07-24 17:01:09 -07:00
Ken Thompson
cb9b1038db
select
...
R=r
APPROVED=r
DELTA=638 (433 added, 21 deleted, 184 changed)
OCL=13426
CL=13438
2008-07-24 15:57:30 -07:00
Rob Pike
7693409677
add usage message
...
R=gri
OCL=13423
CL=13423
2008-07-24 10:38:22 -07:00
Rob Pike
ac0dd5ae52
Add a flags package.
...
R=gri
OCL=13399
CL=13399
2008-07-23 20:02:54 -07:00
Rob Pike
35b7a174e6
maintain __.PKGDEF files in archives if the 'g' flag is given
...
use this facility to simplify the math lib-building script
R=ken
DELTA=183 (158 added, 16 deleted, 9 changed)
OCL=13364
CL=13366
2008-07-22 15:57:46 -07:00
Rob Pike
05caa7f820
help management of empty pkg and lib directories in perforce
...
R=gri
DELTA=4 (4 added, 0 deleted, 0 changed)
OCL=13328
CL=13328
2008-07-21 17:10:49 -07:00
Ken Thompson
b78676a49d
start of select
...
random bugs fixed
SVN=128149
2008-07-20 20:13:07 -07:00
Ken Thompson
963753d3f9
tweaks to init
...
rand using init
SVN=128142
2008-07-20 13:33:45 -07:00
Ken Thompson
f24f8ffae0
init
...
SVN=128128
2008-07-19 18:39:12 -07:00
Rob Pike
acf3d59847
update fmt to use some initialization
...
tweak ar so the pkgdef file doesn't cause it not to generate a symbol table
SVN=128119
2008-07-19 14:52:01 -07:00
Ken Thompson
c92aff2de7
init
...
SVN=128118
2008-07-19 14:37:02 -07:00
Ken Thompson
90da636c15
init filename vs pkgname
...
SVN=128117
2008-07-19 14:20:46 -07:00
Ken Thompson
fb3af53f4e
initialization
...
SVN=128115
2008-07-19 13:38:29 -07:00
Ken Thompson
4c5a165873
len(fixed array)
...
SVN=128050
2008-07-18 11:59:35 -07:00
Ken Thompson
0ca551fc36
loop in subtype
...
SVN=127933
2008-07-17 18:15:05 -07:00
Ken Thompson
41861ca7bb
one more time for divide
...
SVN=127911
2008-07-17 16:22:40 -07:00
Ken Thompson
9e2d185040
div bug
...
[]ptr bug
proc reuses old g* structures
differnt assignment of offsets to parameters
SVN=127888
2008-07-17 15:03:39 -07:00
Ken Thompson
814320c8b4
parameter in fn literals
...
SVN=127695
2008-07-16 18:31:01 -07:00
Ken Thompson
8003849498
parameter declartions in func literals
...
SVN=127678
2008-07-16 17:22:54 -07:00
Ken Thompson
e7d549fbd7
new (more fifo) schedulint algorithm
...
newproc will reuse dead procs
SVN=127565
2008-07-16 13:50:23 -07:00
Ken Thompson
44b8934d35
back out last chan fix
...
allow print of pointers
SVN=127548
2008-07-16 12:44:21 -07:00
Ken Thompson
90da10d7ac
chan bool offset bug
...
SVN=127537
2008-07-16 11:46:33 -07:00
Ken Thompson
ac048ce7f4
new chan syntax
...
SVN=127437
2008-07-15 21:07:59 -07:00
Rob Pike
cbdaa10f8c
add linkage for writefile on darwin
...
SVN=127208
2008-07-15 08:27:50 -07:00
Rob Pike
c870ac239e
add sys.writefile; support for darwin only in this CL
...
SVN=127153
2008-07-14 20:54:55 -07:00
Rob Pike
e9a194382e
disambiguate error message
...
SVN=127152
2008-07-14 20:54:16 -07:00
Ken Thompson
c6e8e1cebf
go call fn address
...
SVN=127151
2008-07-14 20:40:48 -07:00
Ken Thompson
2d9ff40774
chan asynch
...
SVN=127121
2008-07-14 17:41:38 -07:00
Rob Pike
bad8c3d5dd
stop traceback when pc leaves text segment
...
SVN=127088
2008-07-14 16:00:44 -07:00
Ken Thompson
af58f17af9
synch chan
...
SVN=127057
2008-07-14 14:34:27 -07:00
Ken Thompson
526200345c
synch chan
...
SVN=127055
2008-07-14 14:33:39 -07:00
Ken Thompson
f7e2bb55ae
chan
...
SVN=126960
2008-07-13 16:22:50 -07:00
Ken Thompson
97cab903af
chan
...
SVN=126959
2008-07-13 16:20:27 -07:00
Ken Thompson
594175d0b5
chan
...
SVN=126958
2008-07-13 14:29:46 -07:00
Ken Thompson
3f982aeaf6
morestack magic number
...
automatically generated in 6g and 6c,
manually set in 6a. format is
TEXT a(SB),, $a-b
where a is auto size and b is parameter size
SVN=126946
2008-07-12 17:16:22 -07:00
Rob Pike
439b0c40bc
tools to update math lib.
...
you need a hack to 6ar to do this, but it's not checked in yet
SVN=126943
2008-07-12 15:56:06 -07:00
Ken Thompson
3856e45e03
more on channels
...
arg space magic number for morestack
SVN=126936
2008-07-12 13:08:53 -07:00
Rob Pike
2da9783e2b
preserve AX across stack jump so C routines return correct value when triggering morestack.
...
SVN=126935
2008-07-12 11:30:53 -07:00
Rob Pike
b07e084a99
delete dead code
...
SVN=126932
2008-07-11 19:40:03 -07:00
Rob Pike
c8bce425b0
fix comment
...
SVN=126931
2008-07-11 19:37:47 -07:00
Rob Pike
44f65c8f08
fix traceback to know about new segmenting
...
SVN=126930
2008-07-11 19:35:14 -07:00
Ken Thompson
751ce3a77a
segmented stacks AND goroutines
...
SVN=126929
2008-07-11 19:16:39 -07:00
Ken Thompson
2d7eecbbf4
bug in offsets in imported struct fields
...
SVN=126591
2008-07-09 17:15:10 -07:00
Rob Pike
d5f4d94b80
redefinition fix for autolib: if first ATEXT is already defined, skip this file
...
SVN=126580
2008-07-09 16:40:11 -07:00
Rob Pike
92bb676290
build packages automatically
...
SVN=126577
2008-07-09 16:09:48 -07:00
Rob Pike
12c81a0ce8
enable autolib
...
handle archives with __.PKGDEF elements (although we can't create them yet)
introduce a pkg directory
search the pkg directory for packages during compilation
SVN=126574
2008-07-09 16:05:03 -07:00
Ken Thompson
7b454bb1d9
defined external registers g and m
...
SVN=126521
2008-07-09 11:35:26 -07:00
Ken Thompson
77e20e8cec
converted double to float64
...
SVN=126446
2008-07-08 20:48:41 -07:00
Rob Pike
41b9617be4
fix ldexp, frexp, and make math package compile and test correctly
...
SVN=126423
2008-07-08 17:26:10 -07:00
Ken Thompson
4528854308
unique import/export names
...
more on go statement
SVN=126421
2008-07-08 17:19:17 -07:00
Rob Pike
655c281303
disambiguate typedefs in export blocks of .6 files
...
SVN=126366
2008-07-08 14:20:04 -07:00
Rob Pike
6db99de606
add bytestorune and stringtorune to sys.
...
SVN=126321
2008-07-08 10:36:43 -07:00
Ken Thompson
1d31a25d83
more coroutine
...
fixed a,b,c := x,x,x
SVN=126250
2008-07-07 17:59:32 -07:00
Ken Thompson
999b12c768
remove incorrect (!) consts
...
-r
SVN=126198
2008-07-07 15:00:12 -07:00
Rob Pike
5b904a3bde
update to Unicode 5
...
SVN=126184
2008-07-07 14:07:46 -07:00
Ken Thompson
0d079a5362
start of coroutine
...
SVN=126152
2008-07-07 12:29:26 -07:00
Ken Thompson
caa7193c95
took out vlong/uvlong/rune conversions
...
SVN=126053
2008-07-06 11:20:44 -07:00
Ken Thompson
4d6d4e7f4e
random little bugs
...
SVN=126049
2008-07-05 17:43:25 -07:00
Ken Thompson
417a971f9a
output args declared
...
arguments in first block for diagnostics
thomo return
better syntax error recovery
SVN=126045
2008-07-05 12:49:25 -07:00
Ken Thompson
ac5a887d5d
floating point print
...
SVN=126038
2008-07-04 18:01:35 -07:00
Ken Thompson
1efa6a0544
better recovery after syntax error
...
SVN=126003
2008-07-03 18:05:20 -07:00
Ken Thompson
81b325db1b
a,b := fun()
...
SVN=125998
2008-07-03 17:41:05 -07:00
Ken Thompson
d915b96100
new iota
...
SVN=125984
2008-07-03 16:41:32 -07:00
Rob Pike
ef12ae4631
drop some superfluous file prefixes in runtime
...
SVN=125956
2008-07-03 13:42:04 -07:00
Robert Griesemer
27b4b2e4d3
- fixed .x file permissions
...
- implemented -strict mode if statement
- added readfile() to sys pkg
- removed outdated sys.go
SVN=125572
2008-07-01 16:48:31 -07:00
Rob Pike
6973e3813f
update golden
...
fix a comment
SVN=125405
2008-06-30 16:30:53 -07:00
Rob Pike
03febb6773
clean up rearrangement of runtime functions in the source
...
add isNaN, isInf, NaN, Inf
SVN=125389
2008-06-30 15:30:47 -07:00
Rob Pike
d3204ef19f
makes stack traces work for segmented stacks
...
SVN=125371
2008-06-30 14:39:47 -07:00
Rob Pike
8e82a673db
Break runtime.c into separate pieces for maps, strings, print, etc.
...
Share common assembler for amd64 runtime
SVN=125317
2008-06-30 11:50:36 -07:00
Ken Thompson
b987f7a757
segmented stacks
...
SVN=125267
2008-06-29 20:40:08 -07:00
Ken Thompson
d3237f9a2a
more line numbers
...
SVN=125265
2008-06-28 17:27:39 -07:00
Ken Thompson
dc1602ca23
more line numbers
...
SVN=125261
2008-06-28 13:58:00 -07:00
Rob Pike
ff4b01b440
fix two (!) bugs printing floating point zero
...
SVN=125260
2008-06-28 12:54:24 -07:00
Ken Thompson
ca029d34b6
another both sides functions
...
SVN=125230
2008-06-27 17:53:23 -07:00
Ken Thompson
57d80398e6
line numbers
...
SVN=125228
2008-06-27 17:35:42 -07:00
Rob Pike
4331293f41
update to new world. still can't use it but it's a lot of editing....
...
SVN=125218
2008-06-27 17:06:23 -07:00
Ken Thompson
390d5fe5b2
fixed fncall both sides
...
SVN=125217
2008-06-27 16:59:14 -07:00
Ken Thompson
102fcc6689
sametype message
...
SVN=125216
2008-06-27 16:43:02 -07:00
Ken Thompson
73f85f8a53
map index of index bug
...
SVN=125213
2008-06-27 16:30:20 -07:00
Rob Pike
34cb7c299e
export sys.exit
...
update tests to use exit rather than return
ignore return value from main (actually done in prior CL)
SVN=125173
2008-06-27 14:15:06 -07:00
Rob Pike
3719aa4d9a
update darwin for segmented stacks
...
SVN=125154
2008-06-27 13:10:56 -07:00
Ken Thompson
1f6828bcdf
segmented stack
...
SVN=125151
2008-06-27 13:03:19 -07:00
Rob Pike
f977e251fa
add a test
...
fix make.bash for runtime - sysfile.6 depends on OS so simplest thing is to build just our own version
SVN=125130
2008-06-27 11:36:40 -07:00
Rob Pike
1f672596c5
fix a few spelling mistakes in messages
...
SVN=125108
2008-06-27 10:29:02 -07:00
Ken Thompson
75937c2a16
better line numbers
...
SVN=125018
2008-06-26 17:54:44 -07:00
Robert Griesemer
553771314c
- moved integer code into src/pkg
...
SVN=125003
2008-06-26 16:52:15 -07:00
Rob Pike
bcfd31f0e9
repair struct definition
...
SVN=124985
2008-06-26 15:35:43 -07:00
Rob Pike
f28ec1af7f
slight change to file names
...
SVN=124982
2008-06-26 15:27:21 -07:00
Rob Pike
66b240c7a4
make readfile work on darwin
...
parameterize the system interface a bit
SVN=124981
2008-06-26 15:26:27 -07:00
Ken Thompson
e42d6a5fe2
add pointer to val type of maps
...
SVN=124971
2008-06-26 14:58:23 -07:00
Rob Pike
3e4e83ab1e
add sys.readfile()
...
add args to linux runtime
SVN=124961
2008-06-26 14:09:26 -07:00
Rob Pike
9ff0e6288e
runtime needs runtime.c
...
6l needs to know that there is no rt_amd64.6
SVN=124766
2008-06-25 21:31:17 -07:00
Rob Pike
41abdad5ec
maybe now $O is right
...
SVN=124764
2008-06-25 21:24:14 -07:00
Rob Pike
5132d10305
O=6 not O=o
...
SVN=124763
2008-06-25 21:23:14 -07:00
Rob Pike
c87597de2c
put a makefile into runtime
...
make the runtime library an archive (rt0 is still separate)
update 6l to use the archive
add fakeobj.c, missing from prior change
SVN=124762
2008-06-25 21:19:05 -07:00
Rob Pike
250a091922
add plan 9 ar, which understands our symbol tables
...
SVN=124761
2008-06-25 20:58:35 -07:00
Ken Thompson
e90ae879d6
autolib (#pragma lib)
...
added to 6g to autoload
the included import files.
SVN=124759
2008-06-25 20:22:10 -07:00
Robert Griesemer
3311e1b673
- dump registers in case of signal (linux)
...
SVN=124702
2008-06-25 17:07:22 -07:00
Ken Thompson
1a3f944530
simul assignment
...
SVN=124591
2008-06-25 11:35:06 -07:00
Rob Pike
deaac9800f
previous change was a nit too aggressive - regular comparison should apply when comparing
...
internal symbol names
SVN=124461
2008-06-24 21:44:48 -07:00
Rob Pike
4061a7e9c7
allow an underscore to match centered dot (rune 00B7), so people don't have to
...
type a centered dot when debugging.
SVN=124460
2008-06-24 21:42:54 -07:00
Ken Thompson
10296166a5
bug in returning a fat function result
...
SVN=124436
2008-06-24 18:14:32 -07:00
Rob Pike
1bef250f33
center dots into argument code
...
SVN=124433
2008-06-24 18:00:24 -07:00
Rob Pike
1e774d9e6a
put center dot into main_main
...
restore smashed arg code, lost in incorrect resolve
SVN=124432
2008-06-24 17:58:18 -07:00
Ken Thompson
7d11924c13
middle dot as alpha package separator
...
SVN=124419
2008-06-24 17:16:06 -07:00
Robert Griesemer
206daeabda
- added access to thread state info from the signal handler
...
SVN=124404
2008-06-24 16:48:54 -07:00
Rob Pike
2987c8434b
arguments available
...
argc, argv, envc, envv all in sys now
sys.argc() etc.
SVN=124398
2008-06-24 15:31:03 -07:00
Ken Thompson
87dae02a63
string nil same as string ""
...
SVN=124381
2008-06-24 14:11:20 -07:00
Rob Pike
362ea7c77d
remove explicit import of "sys"
...
add a boolean printer
SVN=124362
2008-06-24 12:54:26 -07:00
Ken Thompson
90846cd447
map[int] bug
...
SVN=124332
2008-06-24 11:10:47 -07:00
Ken Thompson
78c8dec944
bug miscalculating ullman
...
in CALLMETH/DOTMETH
SVN=124321
2008-06-24 10:30:33 -07:00
Rob Pike
d4c2da409b
safety checks, waiting for gri's real tracking of PC and SP
...
extant code is too fragile
SVN=124223
2008-06-23 20:12:39 -07:00
Rob Pike
7b210c5b2f
add signal handling to mac runtime
...
SVN=124184
2008-06-23 16:34:17 -07:00
Ken Thompson
dee07c884e
maps
...
SVN=124030
2008-06-22 21:02:06 -07:00
Rob Pike
12c2864e4f
more nearly correct interface code for signals on linux
...
SVN=124021
2008-06-21 17:28:37 -07:00
Rob Pike
aeb43984ec
add signal handling and traceback support therein.
...
factor the runtime into architecture-dependent and -independent pieces.
ditto for the OS dependence.
SVN=124020
2008-06-21 15:36:23 -07:00
Ken Thompson
54abac678a
redeclarations of variables in the same block.
...
half-step toward multivalued map indexing
SVN=124019
2008-06-21 15:11:29 -07:00
Rob Pike
85785fe577
delete incorrect offset print
...
SVN=123857
2008-06-20 10:55:53 -07:00
Rob Pike
1a2421e406
improved formatting of traceback
...
SVN=123527
2008-06-18 23:25:37 -07:00
Rob Pike
d6f25597bb
print rudimentary stack traceback after panic
...
SVN=123524
2008-06-18 23:17:39 -07:00
Ken Thompson
ddba96aed8
stack offset
...
SVN=123521
2008-06-18 22:07:09 -07:00
Ken Thompson
f997bc6eb6
stack offseet table marker
...
tacked above each TEXT entry
SVN=123496
2008-06-18 17:51:56 -07:00
Ken Thompson
1926fef175
bogus diagnostic with
...
default as first case
in a switch
SVN=123398
2008-06-18 11:43:50 -07:00
Ken Thompson
c242b53d22
more maps
...
more semi-colons
type assignment of constants
SVN=123278
2008-06-17 22:33:32 -07:00
Ken Thompson
c5bb50c9dc
assign nil to interface
...
SVN=123256
2008-06-17 18:07:40 -07:00
Ken Thompson
7131bf476c
SVN=123250
2008-06-17 18:02:06 -07:00
Ken Thompson
504aa698f7
SVN=123249
2008-06-17 18:01:05 -07:00
Ken Thompson
53ec6500bc
yata
...
SVN=123246
2008-06-17 17:59:06 -07:00
Ken Thompson
0006c83231
optional semi-colons
...
SVN=123245
2008-06-17 17:57:31 -07:00
Ken Thompson
4e8142c929
maps
...
SVN=123089
2008-06-16 22:34:50 -07:00
Ken Thompson
3f2d542817
added and, or, xor opcodes
...
SVN=123031
2008-06-16 17:04:39 -07:00
Rob Pike
88a3371a91
print pc on faults
...
SVN=123030
2008-06-16 17:04:30 -07:00
Ken Thompson
e1a06ccc80
now checks for lvalue/rvalue context of
...
expressions.
start of generics for calling builtin
functions
start of map type
'any' demoted from reserved word to type
SVN=122808
2008-06-15 20:24:30 -07:00
Rob Pike
073486c3ed
add support for debugging in MACH binaries
...
fix up libmach_amd64 to handle MACH binaries and symbols
db now works on mac and linux
SVN=122807
2008-06-15 17:22:57 -07:00
Ken Thompson
efec14bc5a
plan9 line numbers and line table
...
SVN=122793
2008-06-13 18:16:23 -07:00
Rob Pike
1ad1044b2d
hack to find first instruction for decoding the pc/line table properly.
...
SVN=122792
2008-06-13 18:15:30 -07:00
Rob Pike
34691ccd10
support symbol tables and line numbers in 6.out executables
...
SVN=122700
2008-06-13 12:55:37 -07:00
Rob Pike
e9c9c9ace5
add symbol tables and line/pc information to 6.outs
...
SVN=122699
2008-06-13 12:54:21 -07:00
Ken Thompson
343f5aa7b4
better import/export
...
SVN=122584
2008-06-12 21:48:56 -07:00
Rob Pike
67e141b637
Bug fix. Without rounding, .shstrtab is written on top of data segment
...
SVN=122567
2008-06-12 18:51:06 -07:00
Rob Pike
b6c9221bb1
fix name of mach_amd64 library source dir
...
SVN=122506
2008-06-12 14:52:41 -07:00
Rob Pike
ed5e39a66d
Add 6db
...
SVN=122505
2008-06-12 14:50:25 -07:00
Ken Thompson
ef61a4cb1e
better version of op=
...
fixed bugs in /= and %/
SVN=122493
2008-06-12 14:21:09 -07:00
Rob Pike
54bca54655
make paths explicit for easier installation
...
SVN=122488
2008-06-12 13:43:47 -07:00
Rob Pike
e2e6b7e4cc
remove reference to 9ar
...
SVN=122487
2008-06-12 13:38:54 -07:00
Rob Pike
24dbd2413b
remove reference to 9ar
...
SVN=122486
2008-06-12 13:37:54 -07:00
Rob Pike
69b74c3953
import the plan 9 libraries libc (lib9) and libbio into the tree.
...
remove the dependency on /home/r.
SVN=122482
2008-06-12 13:26:16 -07:00
Ken Thompson
2254a8ee99
import/export
...
SVN=122309
2008-06-11 21:06:26 -07:00
Rob Pike
2694a85a52
tweaks in clean rules and dependencies
...
SVN=122274
2008-06-11 18:01:45 -07:00
Rob Pike
461d1b7987
convert from mk to make
...
phew.
SVN=122266
2008-06-11 17:50:07 -07:00
Rob Pike
32aa0d9198
generated file; needs updating
...
SVN=122179
2008-06-11 14:03:52 -07:00
Rob Pike
820368a19a
fix up mkfiles to use $GOROOT instead of $PLAN9
...
mention in setup doc that binaries go into $HOME/bin
SVN=122177
2008-06-11 13:59:55 -07:00
Rob Pike
df28e14e5b
add a setup document, and tweak the scripts that it mentions
...
SVN=122175
2008-06-11 13:34:08 -07:00
Ken Thompson
2bba3a610d
reorder1 - function first instead of last
...
SVN=122160
2008-06-11 12:25:44 -07:00
Ken Thompson
0b3093f0a5
debugging to get fmt to run
...
SVN=122046
2008-06-10 21:29:57 -07:00
Ken Thompson
36f21e00f5
mode elf tossing
...
SVN=121962
2008-06-10 12:42:37 -07:00
Ken Thompson
6a659ebf13
new elf header
...
SVN=121737
2008-06-09 13:16:50 -07:00
Ken Thompson
f9c58c25e0
more nihan
...
SVN=121622
2008-06-08 19:02:27 -07:00
Ken Thompson
9abf9e8a37
nihon
...
SVN=121620
2008-06-08 18:26:23 -07:00
Ken Thompson
b6eca3534c
bug in len
...
SVN=121618
2008-06-08 17:46:28 -07:00
Ken Thompson
610644a1ca
asdf
...
SVN=121615
2008-06-08 17:21:46 -07:00
Rob Pike
27d95f1372
use /bin/ed to avoid compatibility issues with plan 9 ed
...
SVN=121611
2008-06-08 17:02:01 -07:00
Ken Thompson
36bfd2a906
floating point
...
SVN=121607
2008-06-08 16:11:14 -07:00
Ken Thompson
8200a0b088
optional semicolons
...
SVN=121604
2008-06-08 12:48:37 -07:00
Ken Thompson
f7753f1687
more code generation - mostly shift and multiply
...
SVN=121585
2008-06-07 15:21:02 -07:00
Ken Thompson
181ad4743c
more div/mod
...
SVN=121577
2008-06-06 21:21:54 -07:00
Ken Thompson
d83b994da6
div and mod operators
...
SVN=121576
2008-06-06 20:43:29 -07:00
Ken Thompson
feb1c77f9c
cafebabe
...
SVN=121574
2008-06-06 19:16:18 -07:00
Ken Thompson
b6218e6907
'\Ucafebabe'
...
SVN=121562
2008-06-06 17:42:03 -07:00
Ken Thompson
609cf0c3a7
fixed \\ secape in strings
...
SVN=121553
2008-06-06 17:08:21 -07:00
Ken Thompson
a93099cd8c
SVN=121547
2008-06-06 17:01:33 -07:00
Ken Thompson
6b8bd3556a
nonaddressable = functioncall
...
code gen error
SVN=121541
2008-06-06 16:49:35 -07:00
Ken Thompson
d1493d1edc
checked into both gc and runtime by mistake
...
SVN=121498
2008-06-06 15:01:50 -07:00
Ken Thompson
498ed50061
code gen bug calling i2s
...
SVN=121497
2008-06-06 15:01:02 -07:00
Ken Thompson
e372be9e76
code gen bug in ++ and --
...
SVN=121476
2008-06-06 13:54:59 -07:00
Ken Thompson
fa259ff89c
fix different ANON flag between
...
darwin and linux
SVN=121371
2008-06-05 21:02:55 -07:00
Ken Thompson
959f9fb3d4
goos garch
...
SVN=121368
2008-06-05 19:53:15 -07:00
Ken Thompson
bbb2073223
goos garch
...
SVN=121367
2008-06-05 19:38:39 -07:00
Ken Thompson
8527f49e24
goos and goarch
...
SVN=121349
2008-06-05 16:57:26 -07:00
Ken Thompson
e2c3ec3173
goos goarch
...
SVN=121348
2008-06-05 16:56:23 -07:00
Ken Thompson
28429aaaa6
goos and goarch
...
SVN=121346
2008-06-05 16:55:06 -07:00
Ken Thompson
2b77d87fca
goos and goarch
...
SVN=121345
2008-06-05 16:54:34 -07:00
Rob Pike
5624e34494
rearrange tree to reflect design based on $GOROOT $GOOS $GOARCH
...
SVN=121291
2008-06-05 14:20:24 -07:00
Ken Thompson
f4ccabdea6
stuff
...
SVN=121190
2008-06-04 16:44:48 -07:00
Rob Pike
df8ac28975
initial runtime code checkin
...
SVN=121183
2008-06-04 15:52:48 -07:00
Ken Thompson
f1880579ef
loaded problem getting main from a library
...
SVN=121175
2008-06-04 15:33:59 -07:00
Ken Thompson
6633be6a86
fix loader problem loading main from a library
...
SVN=121174
2008-06-04 15:32:47 -07:00
Ken Thompson
3adcf6fa0e
touch to make later modified date
...
SVN=121172
2008-06-04 15:08:59 -07:00
Rob Pike
6b4d69e5f0
move old code into 'old' directory
...
add src/test dir
SVN=121166
2008-06-04 14:46:07 -07:00
Rob Pike
0cafb9ea3d
Add compiler source to new directory structure
...
SVN=121164
2008-06-04 14:37:38 -07:00
Rob Pike
7fbe486b1a
use new conversion syntax to simplify test
...
SVN=118019
2008-05-07 17:34:51 -07:00
Rob Pike
37b8eb4648
fix double declaration of g
...
SVN=118016
2008-05-07 17:32:58 -07:00
Rob Pike
38c083c1ca
Require names for return values for functions with complex return types.
...
SVN=117346
2008-05-01 00:01:45 -07:00
Rob Pike
b806ba4d88
Add description of how compiling and linking handle dependencies.
...
SVN=115807
2008-04-15 16:43:06 -07:00
Rob Pike
8cdb71017a
remove noisy print
...
SVN=114939
2008-04-03 16:59:46 -07:00
Rob Pike
b749038246
Add a rudimentary vector container to ameliorate the inability to allocate dynamic arrays.
...
SVN=114931
2008-04-03 16:38:21 -07:00
Rob Pike
01764a30fe
make digits a string instead of an array of bytes.
...
use string* to pass it around.
SVN=114795
2008-04-02 21:32:39 -07:00
Ken Thompson
5d6eba80f8
generate an error if the foreward
...
declaration of a func does not exactly
match the actual (or another foreward)
declaration. the reason is that when
there are 2 declarations of a function,
the names of the parameters are taken
from the first. thus
func x(a int);
followed by
func x(b int) { ... }
will have the parameter named "a" and
"b" will be undefined.
SVN=114788
2008-04-02 20:23:01 -07:00
Ken Thompson
87278c26e2
bug36
...
fixed error in symbol table in
the second forward declaration of
a function.
SVN=114572
2008-04-01 12:48:20 -07:00
Ken Thompson
e73674b291
code to assign nil to an interface
...
without conversions
SVN=114453
2008-03-31 19:19:37 -07:00
Ken Thompson
5918f80f1a
bug31
...
failed to correctly convert from pointer
to interface in a return statement.
moved ANY from a special type in
chan/map to a basic type.
SVN=114350
2008-03-31 11:50:47 -07:00
Ken Thompson
c69d54e7cd
bug28
...
fix code generation bug in
second index of string slice.
SVN=114255
2008-03-29 16:27:12 -07:00
Ken Thompson
0b62cb61ca
fix bug30
...
automatic declaration leaking
from one function to another
SVN=114252
2008-03-29 15:37:38 -07:00
Ken Thompson
c5c8268a78
SVN=114213
2008-03-28 15:08:58 -07:00
Ken Thompson
2181098189
SVN=114204
2008-03-28 13:56:47 -07:00
Ken Thompson
cb87526ce3
SVN=114202
2008-03-28 13:41:41 -07:00
Rob Pike
42d7850608
Basic formatted I/O library plus one support lib.
...
SVN=113977
2008-03-27 00:06:21 -07:00
Brian Kernighan
d82b11e4a4
last-minute fix: convert to ANSI C
...
R=dmr
DELTA=3 (2 added, 0 deleted, 1 changed)
1988-04-01 02:03:04 -05:00
Brian Kernighan
0744ac9691
convert to Draft-Proposed ANSI C
...
R=dmr
DELTA=5 (2 added, 0 deleted, 3 changed)
1988-04-01 02:02:04 -05:00
Brian Kernighan
0bb0b61d6a
convert to C
...
R=dmr
DELTA=6 (0 added, 3 deleted, 3 changed)
1974-01-20 01:02:03 -04:00
Brian Kernighan
7d7c6a97f8
hello, world
...
R=ken
DELTA=7 (7 added, 0 deleted, 0 changed)
1972-07-18 19:05:45 -05:00