summaryrefslogtreecommitdiff
path: root/src/pkg/runtime
AgeCommit message (Collapse)AuthorFilesLines
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
2009-07-09reflection for methodsRuss Cox1-0/+11
R=r DELTA=156 (135 added, 8 deleted, 13 changed) OCL=31407 CL=31428
2009-07-08reflection for functionsRuss Cox5-4/+125
add channel send type check (thanks austin). fix type mismatch message. R=r DELTA=241 (225 added, 5 deleted, 11 changed) OCL=31370 CL=31375
2009-07-08reflection for channelsRuss Cox4-12/+54
R=r DELTA=188 (171 added, 6 deleted, 11 changed) OCL=31352 CL=31361
2009-07-08reflection for mapsRuss Cox5-47/+145
R=r DELTA=304 (248 added, 34 deleted, 22 changed) OCL=31345 CL=31347
2009-07-07runtime: use new reflect data structures (CL 31107)Russ Cox4-520/+236
in place of sigi, sigt. R=ken OCL=31118 CL=31277
2009-07-06new reflect library data structures and code declarationsRuss Cox2-0/+257
* use structs instead of interfaces * compiler lays out data structures ahead of time, so no more parsing of strings. * unified reflect data structures with interface runtime data structures. * richer data structures should enable reflection on chans and maps, but not implemented here. R=r,iant DELTA=1179 (1179 added, 0 deleted, 0 changed) OCL=31107 CL=31213
2009-07-02move Structrnd to runtime.hRuss Cox3-8/+5
R=ken OCL=31125 CL=31125
2009-06-30change alignment rules: roll receiver intoRuss Cox2-47/+66
input parameters, move output parameters into their own struct. R=ken OCL=30954 CL=30966
2009-06-30remove declarations for functions that cannot be called from cRuss Cox2-12/+1
(because they return values in the input parameters). R=iant DELTA=12 (0 added, 11 deleted, 1 changed) OCL=30952 CL=30965
2009-06-30convert string runtime to use cgo.Russ Cox8-140/+86
now that cgo2c can handle it, merge x.c and x_go.cgo into a single x.cgo, for x=float,malloc,sema. R=r DELTA=1950 (954 added, 996 deleted, 0 changed) OCL=30951 CL=30964
2009-06-30in preparation for changing 6g's behavior toRuss Cox1-26/+144
align the output args separately from the input args, change cgo2c to insert the necessary padding when the two arg lists are concatenated in the c translation. for example, there is a runtime func indexstring(s string, i int32) (b byte) right now in 6g those arguments are aligned in one struct with s at offset 0, i at 16, and b at 20. soon the b byte will be in its own struct and structs are 8 aligned, so it will be b at 24. right now cgo2c generates: void indexstring(string s, int32 i, byte b) this CL makes it generate, in --6g mode: void indexstring(string s, int32 i, uint32, byte b) this is valid 6c input, although not valid gcc input. (the code is being generated for 6c only anyway.) also, allow C code to be mixed in among the Go funcs. every instance of the token `func' is expected to start a new go func. R=iant DELTA=145 (118 added, 0 deleted, 27 changed) OCL=30949 CL=30963
2009-06-29io.StringBytes -> strings.BytesRuss Cox1-0/+3
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
2009-06-25Change os.Error convention:Russ Cox1-3/+7
echo back context of call in error if likely to be useful. For example, if os.Open("/etc/passwd", os.O_RDONLY) fails with syscall.EPERM, it returns as the os.Error &PathError{ Op: "open", Path: "/etc/passwd" Error: os.EPERM } which formats as open /etc/passwd: permission denied Not converted: datafmt go/... google/... regexp tabwriter template R=r DELTA=1153 (561 added, 156 deleted, 436 changed) OCL=30738 CL=30781
2009-06-25Add Gobuf.r0 that stores arg0 or return value ofKai Backman2-2/+3
goroutine. arm only. R=rsc APPROVED=rsc DELTA=5 (3 added, 2 deleted, 0 changed) OCL=30644 CL=30746
2009-06-23Runtime is now starting up with a dummy c program as target:Kai Backman4-91/+232
- morestack and gosave/gogo/gocall support - memclr and memset from inferno - bugfixes in _rt0_arm R=rsc APPROVED=rsc DELTA=304 (174 added, 36 deleted, 94 changed) OCL=30636 CL=30642
2009-06-22add arm support to mkasmhKai Backman1-0/+5
R=rsc APPROVED=rsc DELTA=5 (5 added, 0 deleted, 0 changed) OCL=30587 CL=30595
2009-06-18make pkg/runtime/Makefile behave like the others:Russ Cox1-0/+2
make builds; make install installs. R=r DELTA=2 (2 added, 0 deleted, 0 changed) OCL=30489 CL=30491
2009-06-17fix 386 build.Russ Cox1-1/+1
some day... TBR=r OCL=30453 CL=30453
2009-06-17Forgot to check in 386/asm.h.Russ Cox5-49/+64
Rather than do that, fix build by generating asm.h automatically. R=r DELTA=97 (48 added, 36 deleted, 13 changed) OCL=30449 CL=30452
2009-06-17update 386 to new runtime (CL 30381)Russ Cox7-155/+205
R=r DELTA=298 (119 added, 81 deleted, 98 changed) OCL=30427 CL=30443
2009-06-17runtime: stack growth adjustments, cleanupRuss Cox10-306/+259
* keep coherent SP/PC in gobuf (i.e., SP that would be in use at that PC) * gogocall replaces setspgoto, should work better in presence of link registers * delete unused system calls only amd64; 386 is now broken R=r DELTA=548 (183 added, 183 deleted, 182 changed) OCL=30381 CL=30442
2009-06-16grab bag of changes aimed at getting stack splitting to work:Kai Backman1-110/+119
- morestack support for 5l and arm runtime - argsize support in 5c, 5l, ar and nm. assembly code from 5a will break in interesting ways unless NOSPLIT is specified - explicit cond execution constants - fix 5l output to use %d instead of %ld so that negative values show. - added a lot of code to arm/asm.s. runtime entry code almost working currently aborts at gogo not implemented R=rsc APPROVED=rsc DELTA=305 (125 added, 29 deleted, 151 changed) OCL=30246 CL=30347
2009-06-15fix another gc bug, one that i have only imagined,Russ Cox3-2/+5
not observed: do not use malloc to allocate stacks during garbage collection, because it would make the malloc data structures change underfoot. R=r DELTA=6 (3 added, 0 deleted, 3 changed) OCL=30323 CL=30326
2009-06-15fix garbage collection race: save stack traceRuss Cox1-4/+5
when changing process state to Gsyscall, not after. R=r DELTA=8 (4 added, 3 deleted, 1 changed) OCL=30320 CL=30325
2009-06-10Adding a batch of missing system calls.Kai Backman8-63/+1380
R=rsc APPROVED=rsc DELTA=1329 (1264 added, 1 deleted, 64 changed) OCL=30040 CL=30158
2009-06-09mv src/lib to src/pkgRob Pike75-0/+14763
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102