summaryrefslogtreecommitdiff
path: root/src/runtime/runtime.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-15Imported Upstream version 1.4upstream/1.4Tianon Gravi1-0/+399
2009-06-06move src/runtime -> src/lib/runtime;Russ Cox1-462/+0
only automatic g4 mv here. R=r OCL=30002 CL=30007
2009-06-04386-related fixes and guardsRuss Cox1-8/+14
R=r DELTA=44 (19 added, 1 deleted, 24 changed) OCL=29912 CL=29915
2009-05-28detect recursive initializationKen Thompson1-0/+6
R=r OCL=29544 CL=29544
2009-05-20change representation of interface values.Russ Cox1-1/+23
this is not a user-visible change. before, all interface values were struct Itype { Sigt *type; Sigi *inter; void *method[n]; } struct Iface { void *addr; Itype *itype; } the itype is basically a vtable, but it's unnecessary if the static type is interface{ }. for interface values with static type empty, the new representation is struct Eface { void *addr; Sigt *type; } this complicates the code somewhat, but it reduces the number of Itypes that have to be computed and cached, it opens up opportunities to avoid function calls in a few common cases, and it will make it possible to lay out interface{} values at compile time, which i think i'll need for the new reflection. R=ken OCL=28701 CL=29121
2009-05-08move things out of sys into os and runtimeRuss Cox1-14/+14
R=r OCL=28569 CL=28573
2009-04-09change representation of stringsKen Thompson1-12/+10
R=r OCL=27293 CL=27293
2009-03-31test for and fix bug involving reflect v.Interface() and ==.Russ Cox1-6/+4
R=r DELTA=156 (149 added, 2 deleted, 5 changed) OCL=26973 CL=26973
2009-03-31more 386 runtime:Russ Cox1-4/+7
remove use of _subv in vlrt.c darwin/386/signal.c darwin/386/* linux/386/* (forgotten before) can run empty program on darwin/386 now. R=r DELTA=1140 (1021 added, 114 deleted, 5 changed) OCL=26942 CL=26968
2009-03-30more 386 runtime - can run tiny c programs.Russ Cox1-3/+13
R=r DELTA=1926 (1727 added, 168 deleted, 31 changed) OCL=26876 CL=26878
2009-01-26gc #0. mark and sweep collector.Russ Cox1-10/+14
R=r,gri DELTA=472 (423 added, 2 deleted, 47 changed) OCL=23522 CL=23541
2009-01-26interface speedups and fixes.Russ Cox1-0/+36
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-26implement new restrictions on whatRuss Cox1-31/+26
can be compared/hashed. R=r DELTA=351 (201 added, 80 deleted, 70 changed) OCL=23423 CL=23481
2009-01-22move math routines from package sys to package math,Russ Cox1-255/+0
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-16casify, cleanup sysRuss Cox1-60/+41
R=r OCL=22978 CL=22984
2008-12-19chan and map of [] and structRuss Cox1-17/+18
R=r DELTA=192 (145 added, 8 deleted, 39 changed) OCL=21609 CL=21614
2008-12-10string hash function faults w empty stringKen Thompson1-0/+2
fixes maps[""] R=r OCL=20909 CL=20911
2008-12-09chans and maps of interfacesRuss Cox1-1/+2
R=r DELTA=746 (729 added, 1 deleted, 16 changed) OCL=20858 CL=20858
2008-12-05add support for ref counts to memory allocator.Russ Cox1-77/+0
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-11-23delete stack mark stringsRuss Cox1-59/+16
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-17First pieces of malloc.Russ Cox1-1/+1
R=r DELTA=756 (754 added, 0 deleted, 2 changed) OCL=19266 CL=19378
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-13mike's map codeKen Thompson1-9/+35
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 Cox1-2/+2
R=r DELTA=48 (23 added, 14 deleted, 11 changed) OCL=18707 CL=18922
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 Thompson1-1/+4
R=r OCL=18646 CL=18646
2008-09-22test cleanupRuss Cox1-2/+15
- do not print tracebacks if $GOTRACEBACK=0 - set GOTRACEBACK=0 during tests - filter out pc numbers in errors R=r DELTA=70 (22 added, 30 deleted, 18 changed) OCL=15618 CL=15642
2008-09-22now method/interface codeKen Thompson1-170/+0
R=r OCL=15627 CL=15627
2008-09-14methods on any typeKen Thompson1-0/+1
-- but only *struct tested R=r OCL=15326 CL=15326
2008-09-121 got rid if static 'fn wo return' testKen Thompson1-0/+12
2 added dynamic calls to throw for array bounds and 'fn wo return' 3 small optimization on index[constant] R=r OCL=15281 CL=15281
2008-09-12- catch trace trapsRob Pike1-1/+3
- disassemble the instructions in a trace trap to see if it's a run-time trap - if so, print relevant info - avoid double-printing traceback on panic R=ken,rsc DELTA=66 (50 added, 7 deleted, 9 changed) OCL=15199 CL=15224
2008-08-11- fix signedness bug in sys.Inf()Rob Pike1-1/+1
- add NaN, Inf printing to fmt - fix a couple of bugs in fmt - add a test for fmt R=ken OCL=14092 CL=14092
2008-08-05kill trailing white space.Russ Cox1-3/+3
(apparently my first attempt didn't work.) R=r OCL=13888 CL=13888
2008-08-05* comment, clean up schedulerRuss Cox1-33/+37
* rewrite lock implementation to be correct (tip: never assume that an algorithm you found in a linux man page is correct.) * delete unneeded void* arg from clone fn * replace Rendez with Note * comment mal better * use 6c -w, fix warnings * mark all assembly functions 7 R=r DELTA=828 (338 added, 221 deleted, 269 changed) OCL=13884 CL=13886
2008-08-05allow pointers as keys in maps, treating them the same as ints - ptr eq not ↵Rob Pike1-3/+4
value equality R=ken,gri OCL=13879 CL=13879
2008-08-04first cut at multithreading. works on Linux.Russ Cox1-25/+93
* kick off new os procs (machs) as needed * add sys·sleep for testing * add Lock, Rendez * properly lock mal, sys·newproc, scheduler * linux syscall arg #4 is in R10, not CX * chans are not multithread-safe yet * multithreading disabled by default; set $gomaxprocs=2 (or 1000) to turn it on This should build on OS X but may not. Rob and I will fix soon after submitting. TBR=r OCL=13784 CL=13842
2008-07-28print tracebacks for all goroutines, not just the crashing oneRob Pike1-0/+1
R=ken OCL=13518 CL=13518
2008-07-14synch chanKen Thompson1-228/+0
SVN=127055
2008-07-13chanKen Thompson1-2/+145
SVN=126958
2008-07-12preserve AX across stack jump so C routines return correct value when ↵Rob Pike1-10/+10
triggering morestack. SVN=126935
2008-07-11segmented stacks AND goroutinesKen Thompson1-14/+223
SVN=126929
2008-07-09defined external registers g and mKen Thompson1-0/+5
SVN=126521
2008-07-08fix ldexp, frexp, and make math package compile and test correctlyRob Pike1-6/+6
SVN=126423
2008-07-08unique import/export namesKen Thompson1-0/+13
more on go statement SVN=126421
2008-06-30update goldenRob Pike1-1/+1
fix a comment SVN=125405
2008-06-30clean up rearrangement of runtime functions in the sourceRob Pike1-0/+461
add isNaN, isInf, NaN, Inf SVN=125389