summaryrefslogtreecommitdiff
path: root/src/pkg/runtime
AgeCommit message (Collapse)AuthorFilesLines
2009-10-10fix float <-> int64 conversionsKai Backman1-0/+13
R=rsc APPROVED=rsc DELTA=25 (25 added, 0 deleted, 0 changed) OCL=35566 CL=35574
2009-10-09acid bug fix.Russ Cox1-0/+5
lock printf output to avoid interlacing debug prints. R=r DELTA=10 (7 added, 0 deleted, 3 changed) OCL=35539 CL=35561
2009-10-09keep a list of all the M's,Russ Cox2-1/+8
so that the garbage collector doesn't free them. R=ken OCL=35538 CL=35538
2009-10-07apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync ↵Russ Cox1-4/+4
syscall testing time unicode unsafe utf8 R=gri DELTA=1409 (79 added, 24 deleted, 1306 changed) OCL=35415 CL=35437
2009-10-065l library loading, 64 bit entry pointsKai Backman1-0/+24
R=rsc APPROVED=rsc DELTA=58 (52 added, 3 deleted, 3 changed) OCL=35417 CL=35417
2009-10-05move cas out, add dummy runcgo.Kai Backman3-37/+40
R=rsc APPROVED=rsc DELTA=73 (45 added, 28 deleted, 0 changed) OCL=35363 CL=35366
2009-10-038c, 8l dynamic loading support.Russ Cox13-103/+179
better mach binaries. cgo working on darwin+linux amd64+386. eliminated context switches - pi is 30x faster. add libcgo to build. on snow leopard: - non-cgo binaries work; all tests pass. - cgo binaries work on amd64 but not 386. R=r DELTA=2031 (1316 added, 626 deleted, 89 changed) OCL=35264 CL=35304
2009-09-30cgo working on linux/386Russ Cox1-0/+7
R=r DELTA=70 (47 added, 4 deleted, 19 changed) OCL=35167 CL=35171
2009-09-24missing files; cleaned up g4 nothave output.Russ Cox1-0/+27
fixes 386 build. R=r DELTA=56 (56 added, 0 deleted, 0 changed) OCL=34979 CL=34981
2009-09-24cgo checkpoint.Russ Cox2-1/+27
can write all 3 output files and then compile them by hand. R=r DELTA=919 (841 added, 16 deleted, 62 changed) OCL=34954 CL=34973
2009-09-22changes to accommodate nacl:Russ Cox15-6/+358
* change ldt0setup to set GS itself; nacl won't let us do it. * change breakpoint to INT $3 so 8l can translate to HLT for nacl. * panic if closure is needed on nacl. * do not try to access symbol table on nacl. * mmap in 64kB chunks. nacl support: * system calls, threading, locks. R=r DELTA=365 (357 added, 5 deleted, 3 changed) OCL=34880 CL=34906
2009-09-21convert 386 to use %gs instead of %fs for extern register.Russ Cox4-35/+26
required for nacl and may be nicer for ffi, because %gs is the standard register for thread-local storage. R=ken OCL=34861 CL=34866
2009-09-18changed 5c calling convention to use stack exclusively for inKai Backman3-6/+12
params. a number of fixes to assembly routines that assumed R0 had the first arg. one stack offset fix, arm pushes the link register on stack top. go/test: passes 65% (235/364) tests R=rsc APPROVED=rsc DELTA=20 (11 added, 0 deleted, 9 changed) OCL=34809 CL=34812
2009-09-18Rudimentary command shell for Ogle. Hack to prevent linkerAustin Clements1-0/+6
from inlining newprocreadylocked. Fix type bridge's handling of basic types. Include interpreter's Thread in bridged native function calls. ; load . "6.out" Started 6.out ; BpSet("main·merge") ; ContWait() breakpoint at 0x400800 => 400800 main·merge /home/austin/src-go1/usr/austin/ptrace/test/sort.go:19 ; bt => 400800 main·merge /home/austin/src-go1/usr/austin/ptrace/test/sort.go:19 400b6a main·mergeSort+0x1be /home/austin/src-go1/usr/austin/ptrace/test/sort.go:34 448313 goexit /home/austin/src-go1/src/pkg/runtime/proc.c:133 ; main.merge.a {1} ; load . "pid:25753" Attached to 25753 ; bt => 479ddf syscall·Syscall+0x24 /home/austin/src-go1/src/pkg/syscall/asm_linux_amd64.s:24 47c011 syscall·Read+0x5d /home/austin/src-go1/src/pkg/syscall/zsyscall_linux_amd64.go:368 4119e5 os·*File·Read+0x5f /home/austin/src-go1/src/pkg/os/file.go:122 427bf3 bufio·*Reader·fill+0x116 /home/austin/src-go1/src/pkg/bufio/bufio.go:105 428361 bufio·*Reader·ReadSlice+0x195 /home/austin/src-go1/src/pkg/bufio/bufio.go:244 40204a ogle·Main+0x94 /home/austin/src-go1/usr/austin/ogle/cmd.go:226 40080f main·main+0xf /home/austin/src-go1/usr/austin/ogle/main.go:6 41c4b8 mainstart+0xf /home/austin/src-go1/src/pkg/runtime/amd64/asm.s:55 41531f goexit /home/austin/src-go1/src/pkg/runtime/proc.c:133 R=rsc APPROVED=rsc DELTA=433 (420 added, 2 deleted, 11 changed) OCL=34410 CL=34782
2009-09-15fixed register usage and removed some dead code.Kai Backman1-17/+5
R=rsc APPROVED=rsc DELTA=17 (0 added, 12 deleted, 5 changed) OCL=34659 CL=34665
2009-09-08pass Type* to makechan and makemap so thatRuss Cox4-31/+36
they can get the official alignment out of there instead of guessing. R=ken OCL=34450 CL=34450
2009-09-03fix range on invalid utf8 bugRuss Cox1-1/+2
R=r DELTA=42 (21 added, 20 deleted, 1 changed) OCL=34328 CL=34333
2009-08-31add newprocreadylocked for debuggerRuss Cox1-1/+10
R=austin DELTA=10 (9 added, 0 deleted, 1 changed) OCL=34163 CL=34166
2009-08-31use correct pc for printing fn+%#x in tracebacksRuss Cox2-10/+12
R=austin DELTA=12 (2 added, 0 deleted, 10 changed) OCL=34098 CL=34120
2009-08-28sliceslice inlineKen Thompson1-0/+6
R=rsc OCL=34041 CL=34041
2009-08-26recycle G structsRuss Cox1-0/+1
R=r DELTA=1 (1 added, 0 deleted, 0 changed) OCL=33887 CL=33904
2009-08-26finish ChanValue: Len and Cap.Russ Cox3-0/+22
R=r DELTA=45 (45 added, 0 deleted, 0 changed) OCL=33873 CL=33881
2009-08-26add Close() and Closed() to ChanValueRuss Cox3-5/+25
R=r DELTA=60 (56 added, 3 deleted, 1 changed) OCL=33868 CL=33872
2009-08-25rename runtime internals to have modern names (array->slice etc)Rob Pike12-75/+75
R=rsc DELTA=444 (179 added, 177 deleted, 88 changed) OCL=33847 CL=33849
2009-08-25checkpoint & test (pidigits) before trying to automate.Russ Cox2-0/+14
R=r DELTA=616 (598 added, 11 deleted, 7 changed) OCL=33846 CL=33848
2009-08-24start of FFI support, and a demo.Russ Cox4-2/+81
R=r DELTA=494 (492 added, 0 deleted, 2 changed) OCL=33784 CL=33810
2009-08-24linker workRuss Cox1-0/+7
* use //ffi comments in package import data to generate relocation entries and library loads. * call initffi in rt0.s if present R=r DELTA=117 (91 added, 3 deleted, 23 changed) OCL=33739 CL=33750
2009-08-20FFI step 2: can ask for libc.so.6.Russ Cox1-1/+2
introduced explicit "data" symbol instead of etext to mark beginning of data, so that using larger alignment (i.e. 4MB like GNU loader) doesn't confuse garbage collector. split dodata into dodata and dobss in preparation for putting the dynamic data + headers in the data segment instead of stuffed at the beginning of the binary. R=r DELTA=52 (37 added, 3 deleted, 12 changed) OCL=33610 CL=33618
2009-08-20len and cap on chansRuss Cox1-2/+2
R=ken OCL=33599 CL=33599
2009-08-17Removing dead tests from chan.cBill Neubauer1-4/+0
Since pres != nil was already checked and the routine sets *pres to false and returns, the subsequent tests are unneeded. R=rsc APPROVED=rsc DELTA=4 (0 added, 4 deleted, 0 changed) OCL=33439 CL=33441
2009-08-14runtime gc bug.Russ Cox1-2/+2
semacquire might move to another m. R=r DELTA=5 (2 added, 2 deleted, 1 changed) OCL=33317 CL=33326
2009-08-14Fix buildAustin Clements1-1/+1
R=rsc APPROVED=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=33294 CL=33294
2009-08-14Make the runtime correctly decode the symbol table historyAustin Clements1-14/+34
stacks produced by whole-package compilation. Fix some off-by-ones in PC/line table parsing. Hopefully. R=rsc APPROVED=rsc DELTA=42 (24 added, 6 deleted, 12 changed) OCL=33250 CL=33293
2009-08-14Account for CALL instructions before looking up the functionAustin Clements2-6/+6
at PC, to deal with functions that end with a CALL instruction. Special case known call-by-return functions. R=rsc APPROVED=rsc DELTA=12 (6 added, 6 deleted, 0 changed) OCL=33255 CL=33279
2009-08-13Don't try to account for CALL instruction in 0th frame.Austin Clements2-5/+6
R=rsc APPROVED=rsc DELTA=9 (4 added, 3 deleted, 2 changed) OCL=33238 CL=33251
2009-08-13debugging symbols for 8g.Russ Cox1-1/+0
backtraces don't work, but they didn't work when i started either. R=ken OCL=33230 CL=33230
2009-08-13makefile fixes; convert runtime to use new makefilesRuss Cox1-48/+29
R=r DELTA=67 (17 added, 29 deleted, 21 changed) OCL=33215 CL=33219
2009-08-13rename mkasmh to mkasmh.shRob Pike2-3/+3
R=rsc DELTA=204 (153 added, 49 deleted, 2 changed) OCL=33213 CL=33213
2009-08-12change gotype in symbol table fromRuss Cox1-6/+2
character string to machine address. not filled in, just carved out. R=austin DELTA=77 (11 added, 34 deleted, 32 changed) OCL=33122 CL=33124
2009-08-12delete forward type declarationsRuss Cox1-2/+0
R=r DELTA=163 (1 added, 149 deleted, 13 changed) OCL=33106 CL=33111
2009-08-11commentary about extern registerRob Pike1-3/+15
R=rsc DELTA=16 (12 added, 0 deleted, 4 changed) OCL=33030 CL=33035
2009-08-06add runtime.GOMAXPROCS, allowing a program to, in effect, set $GOMAXPROCSRob Pike2-1/+26
R=rsc DELTA=29 (28 added, 1 deleted, 0 changed) OCL=32829 CL=32837
2009-07-28make every func literal expression allocate,Russ Cox2-61/+66
so that == on func means that the functions originated in the same execution of a func literal or definition. before, there was an inconsistency: func() {x++} != func() {x++} but func() {} == func() {} this CL makes the second case != too, just like make(map[int]int) != make(map[int]int) R=r DELTA=202 (71 added, 62 deleted, 69 changed) OCL=32393 CL=32398
2009-07-27fix gc bug causing make smoketest to die in cmd/gofmt.Russ Cox2-5/+7
saving of sp was too far away from use in scanstack; the stack had changed since the sp was saved. R=r DELTA=9 (4 added, 2 deleted, 3 changed) OCL=32232 CL=32237
2009-07-27fix bug in CL 30057: missed if+continue in one place.Russ Cox1-0/+2
R=gri DELTA=2 (2 added, 0 deleted, 0 changed) OCL=32214 CL=32223
2009-07-21runtime: fix init scheduling bug.Russ Cox1-0/+8
if there is a goroutine waiting to run and the init goroutine enters a system call, entersyscall was trying to kick off a new scheduler for the other goroutine, causing a panic (new goroutines can't run until main.main). R=r DELTA=32 (32 added, 0 deleted, 0 changed) OCL=31982 CL=31982
2009-07-17another step toward eliminating forward declarations.Russ Cox1-7/+0
introduce NodeList* type in compiler to replace OLIST. this clarifies where lists can and cannot occur. list append and concatenation are now cheap. the _r rules are gone from yacc. rev and unrev are gone. no more lists of lists. the representation of assignments is a bit clunkier. split into OAS (1=1) and OAS2 (2 or more on one side). delete dead chanrecv3 code. delay construction of func types. R=ken OCL=31745 CL=31762
2009-07-13add LockOSThread and UnlockOSThread toRuss Cox3-80/+107
runtime package for use by debugger, which needs to make sure that all ptrace calls about a given pid come from the same thread. R=r DELTA=175 (90 added, 63 deleted, 22 changed) OCL=31546 CL=31558
2009-07-12Fixed minor typo in asm file.Kai Backman1-1/+1
R=rsc APPROVED=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=31487 CL=31500
2009-07-10reflection for interface setRuss Cox3-12/+41
rename map access methods to Elem, SetElem. R=r DELTA=95 (66 added, 7 deleted, 22 changed) OCL=31456 CL=31469