summaryrefslogtreecommitdiff
path: root/src/pkg/runtime
AgeCommit message (Collapse)AuthorFilesLines
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