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