1
0
mirror of https://github.com/golang/go synced 2024-10-04 09:21:21 -06:00
Commit Graph

751 Commits

Author SHA1 Message Date
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