summaryrefslogtreecommitdiff
path: root/src/runtime
AgeCommit message (Collapse)AuthorFilesLines
2008-12-09chans and maps of interfacesRuss Cox4-23/+35
R=r DELTA=746 (729 added, 1 deleted, 16 changed) OCL=20858 CL=20858
2008-12-08use Note sched.stopped correctlyRuss Cox1-1/+6
R=r DELTA=6 (5 added, 0 deleted, 1 changed) OCL=20777 CL=20779
2008-12-05range statementKen Thompson2-13/+97
R=r OCL=20667 CL=20667
2008-12-05add support for ref counts to memory allocator.Russ Cox6-100/+145
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-04add mutex.MutexRuss Cox2-0/+179
R=r DELTA=349 (348 added, 0 deleted, 1 changed) OCL=20380 CL=20472
2008-12-04add stub routines stackalloc() and stackfree().Russ Cox5-10/+55
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-03preparation for exec.Russ Cox8-104/+207
* 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-03clean stack trace code.Russ Cox1-39/+29
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-11-25new stacktrace formatRuss Cox2-27/+32
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-25change meaning of $GOMAXPROCS to number of cpus to use,Russ Cox5-121/+285
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-25use pc/ln table to print source lines in tracebackRuss Cox3-47/+220
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-23delete stack mark stringsRuss Cox8-108/+268
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-20don't print (incorrect anyway) line numbers in panic.Rob Pike1-3/+1
R=rsc DELTA=4 (0 added, 2 deleted, 2 changed) OCL=19757 CL=19763
2008-11-20symbol table changesRuss Cox1-0/+31
* 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-20tweak pcs in traceback so they point to calling line instead of line after call.Rob Pike2-2/+2
R=rsc DELTA=2 (0 added, 0 deleted, 2 changed) OCL=19745 CL=19745
2008-11-19change array slice error to include boundsRuss Cox1-2/+15
$ 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-17First pieces of malloc.Russ Cox2-2/+8
R=r DELTA=756 (754 added, 0 deleted, 2 changed) OCL=19266 CL=19378
2008-11-14switchKen Thompson1-1/+1
R=r OCL=19288 CL=19288
2008-11-14add cov, prof to default build; clean up compiler warningsRuss Cox1-0/+1
R=r DELTA=8 (1 added, 0 deleted, 7 changed) OCL=19245 CL=19245
2008-11-13temp fix for map not multiple of 8Ken Thompson1-0/+1
R=r OCL=19166 CL=19166
2008-11-13mike's map codeKen Thompson6-263/+1059
R=r OCL=19146 CL=19146
2008-11-12converting uint bits back into floatsRob Pike1-0/+28
R=rsc DELTA=32 (32 added, 0 deleted, 0 changed) OCL=19084 CL=19091
2008-11-10* accept all NaNs, not just the one sys.NaN() returns.Russ Cox1-36/+60
* 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-10handle Inf, NaN in float printRuss Cox3-25/+34
R=r DELTA=48 (23 added, 14 deleted, 11 changed) OCL=18707 CL=18922
2008-11-06bug in select defaultKen Thompson1-31/+36
R=r OCL=18741 CL=18741
2008-11-06add sys.float32bits, sys.float64bitsRob Pike1-0/+17
R=rsc DELTA=21 (21 added, 0 deleted, 0 changed) OCL=18709 CL=18718
2008-11-05select defaultKen Thompson3-10/+12
R=r OCL=18646 CL=18646
2008-11-05more runtime support for chan select defaultRuss Cox1-1/+39
R=ken OCL=18630 CL=18630
2008-11-05runtime support for default in select.Russ Cox1-2/+13
assumes cas->send == 2 for default case. R=ken OCL=18628 CL=18628
2008-11-05allow any type at all in sys.unreflect;Russ Cox1-8/+0
accomodate empty type table in 6l. R=r DELTA=10 (2 added, 8 deleted, 0 changed) OCL=18601 CL=18605
2008-11-05new interface error messagesRuss Cox1-6/+28
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-056g interface changes:Russ Cox1-26/+2
* 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-03runtime support for interface ok,Russ Cox1-8/+71
whatever the final syntax ends up being. R=ken OCL=18414 CL=18414
2008-11-036l: generate gotypesigs on demand.Russ Cox1-0/+72
add sys.unreflect, which uses gotypesigs. R=r DELTA=170 (152 added, 12 deleted, 6 changed) OCL=18396 CL=18404
2008-11-03rename various magic names.Russ Cox1-18/+18
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-03in traceback, handle the case where we've called through a nil function pointerRob Pike1-0/+7
R=rsc DELTA=7 (7 added, 0 deleted, 0 changed) OCL=18372 CL=18372
2008-10-29bug 113Ken Thompson1-0/+5
R=r OCL=18081 CL=18081
2008-10-216g: use full type in sigt[0].nameRuss Cox1-26/+52
sys: add sys.reflect runtime: add canfail flag for later R=ken OCL=17583 CL=17583
2008-10-15interface on arbitrary typesKen Thompson1-4/+37
global signatures for basic types R=r OCL=17238 CL=17240
2008-10-14delete hack for interface equality now that it supported by the 6g compilerRob Pike1-19/+0
R=rsc DELTA=21 (0 added, 21 deleted, 0 changed) OCL=17123 CL=17136
2008-10-14interface equality (strings specifically)Ken Thompson1-10/+11
R=r OCL=17134 CL=17134
2008-10-14interface equalityKen Thompson1-0/+47
R=r OCL=17116 CL=17118
2008-10-10handle zeroed interface in ifaceI2IRuss Cox1-8/+9
R=r OCL=16938 CL=16938
2008-10-10add sys.BUG_intereq to compare interfaces for equalityRuss Cox1-0/+18
R=r OCL=16929 CL=16929
2008-10-08more interface checks:Russ Cox1-4/+9
- pointer to interface cannot have methods - record type names for better runtime error R=r,ken DELTA=85 (80 added, 0 deleted, 5 changed) OCL=16658 CL=16722
2008-10-07sys.stringtorune doesn't need a length parameter.Rob Pike2-3/+3
R=rsc DELTA=7 (0 added, 0 deleted, 7 changed) OCL=16600 CL=16630
2008-10-03interfaces of all typesKen Thompson1-13/+17
R=r OCL=16462 CL=16462
2008-10-02added printn and panicnKen Thompson1-0/+12
prints that insert spaces and new line R=r OCL=16370 CL=16370
2008-09-30for loops in hashmap.Russ Cox1-36/+28
a few missing FLUSH. R=ken OCL=16221 CL=16221
2008-09-28toward methods on any typeKen Thompson1-7/+16
R=r OCL=16068 CL=16068