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