1
0
mirror of https://github.com/golang/go synced 2024-10-03 08:21:21 -06:00
Commit Graph

303 Commits

Author SHA1 Message Date
Russ Cox
21518ea2af runtime: free old hashmap pieces during resizing
R=r
CC=golang-dev
https://golang.org/cl/1254044
2010-05-24 14:31:10 -07:00
Russ Cox
f58ba18a08 runtime: correct tracebacks for nascent goroutines, even closures
Fixes #780.

R=r
CC=golang-dev
https://golang.org/cl/1221042
2010-05-21 14:40:21 -07:00
Russ Cox
4843b130bb runtime: avoid allocation for fixed strings
R=r
CC=golang-dev
https://golang.org/cl/1083041
2010-05-19 21:33:31 -07:00
Russ Cox
b198c8612e runtime: allow large map values
Fixes #772.

R=ken2
CC=golang-dev
https://golang.org/cl/1206043
2010-05-19 12:57:47 -07:00
Ian Lance Taylor
e1b47159ab Save the scheduling state even predawn.
This permits cgo callbacks to work when run in init code.
Otherwise cgocallback switches to the wrong stack address.

R=rsc
CC=golang-dev
https://golang.org/cl/1123043
2010-05-06 22:07:03 -07:00
Rob Pike
eb48bfbbda runtime.GOMAXPROCS: hack it to have it return the old value.
R=rsc
CC=golang-dev
https://golang.org/cl/1140041
2010-05-06 11:50:47 -07:00
Russ Cox
7d7ebd2fe1 runtime, strconv: tiny cleanups
R=r
CC=golang-dev
https://golang.org/cl/1081042
2010-05-03 17:47:40 -07:00
Russ Cox
23c0aa3916 runtime/arm: fix build
Import _mulv from Inferno again, change R9 to R2.
Not sure what the other differences were for, but
they weren't working.

TBR=kaib
CC=golang-dev
https://golang.org/cl/1079041
2010-05-03 13:24:39 -07:00
Giles Lean
3c32300c4d runtime: update godefs usage comment for GOARCH=386 GOOS={darwin,freebsd}
When trying to regenerate src/pkg/runtime/darwin/386/defs.h
on a 64 bit capable Snow Leopard (OS X 10.6.3) system I
needed to add -f -m32 to godefs, as this OS and hardware
combination defaults to 64 bit compilation.

For safety, make the same change to the 32 bit FreeBSD
instructions in .../freebsd/defs.c.  (Tested OK and no
problems introduced.)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1052042
2010-05-03 01:26:39 -07:00
Russ Cox
6361f52fc4 gc: be pickier about slice, chan, array, and map sizes
Fixes #589.

R=ken2
CC=golang-dev
https://golang.org/cl/1032044
2010-05-01 13:15:42 -07:00
Alex Brainman
f81d471940 rename GOOS=mingw to GOOS=windows
R=rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/1015043
2010-04-29 23:45:14 -07:00
Russ Cox
718da3339a darwin: bsdthread_create can fail; print good error
Fixes #549.

R=adg
CC=golang-dev
https://golang.org/cl/1019042
2010-04-28 19:36:42 -07:00
Russ Cox
000ab98df6 5l, 6l, 8l, runtime: make -s binaries work
5l, 6l, 8l: change ELF header so that strip doesn't destroy binary

Fixes #261.

R=iant, r
CC=golang-dev
https://golang.org/cl/994044
2010-04-27 22:40:26 -07:00
Russ Cox
c6138efbcb runtime: closures, defer bug fix for Native Client
Enable package tests for Native Client build.

R=r
CC=golang-dev
https://golang.org/cl/957042
2010-04-22 17:52:22 -07:00
Russ Cox
214a55b06a runtime: switch state back to Grunning after recovery
Fixes #733.

R=r
CC=golang-dev
https://golang.org/cl/958041
2010-04-21 16:27:41 -07:00
Russ Cox
20c50cf0f8 runtime: rename cgo2c, *.cgo to goc2c, *.goc
to avoid confusion with real cgo

R=r
CC=golang-dev
https://golang.org/cl/904046
2010-04-20 17:03:25 -07:00
Kai Backman
26e846429d support for printing floats:
fmt.Printf("float32 %f\n", float32(1234.56789))
fmt.Printf("float64 %f\n", float64(1234.56789))
->
float32 1234.567871
float64 1234.567890

this is a snapshot. extended instruction support, corner cases
and fixes coming in subseuent cls.

R=rsc
CC=dpx, golang-dev
https://golang.org/cl/876045
2010-04-15 12:43:49 +03:00
Russ Cox
c3e54f0988 runtime: better trace for fault due to nil pointer call
R=r
CC=golang-dev
https://golang.org/cl/854048
2010-04-13 22:31:47 -07:00
Russ Cox
6363542695 runtime: delete malx, skip_depth argument to malloc
remove internal functions from traces in gopprof instead.

R=r
CC=golang-dev
https://golang.org/cl/855046
2010-04-09 15:30:40 -07:00
Ian Lance Taylor
a4f8d36ba5 Run initcgo for all amd64 targets, not just GNU/Linux.
This is required to make cgo export work on Darwin.  Note that
this corrects the stack alignment when calling initcgo to that
required by gcc on amd64.

R=rsc
CC=golang-dev
https://golang.org/cl/907041
2010-04-09 14:15:15 -07:00
Ian Lance Taylor
2e20386fc7 Library support for cgo export.
These functions are used to call from a C function back to a
Go function.  This only includes 386 support.

R=rsc
CC=golang-dev
https://golang.org/cl/834045
2010-04-09 13:30:35 -07:00
Ian Lance Taylor
2d0ff3f1a6 Support cgo export on amd64.
R=rsc
CC=golang-dev
https://golang.org/cl/857045
2010-04-09 13:30:11 -07:00
Russ Cox
c60d048594 runtime: fix build (panic) for FreeBSD
R=adg
CC=golang-dev
https://golang.org/cl/867046
2010-04-08 21:13:42 -07:00
Russ Cox
5963dbac08 runtime: turn divide by zero, nil dereference into panics
tested on linux/amd64, linux/386, linux/arm, darwin/amd64, darwin/386.
freebsd untested; will finish in a separate CL.

for now all the panics are errorStrings.
richer structures can be added as necessary
once the mechanism is shaked out.

R=r
CC=golang-dev
https://golang.org/cl/906041
2010-04-08 18:15:30 -07:00
Russ Cox
72157c300b runtime: fix bad status throw
when garbage collector sees recovering goroutine

Fixes #711.

R=r
CC=golang-dev
https://golang.org/cl/869045
2010-04-08 13:24:53 -07:00
Russ Cox
2f0cae46d8 runtime: work around kernel bug in Snow Leopard signal handling
Could not take a signal on threads other than the main thread.
If you look at the spinning binary with dtrace, you can see a
fault happening over and over:

    $ dtrace -n '
    fbt::user_trap:entry /execname=="boot32" && self->count < 10/
    {
        self->count++;
        printf("%s %x %x %x %x", probefunc, arg1, arg2, arg3, arg4);
        stack();
        tracemem(arg4, 256);
    }'

    dtrace: description 'fbt::user_trap:entry ' matched 1 probe
    CPU     ID                    FUNCTION:NAME
      1  17015                  user_trap:entry user_trap 0 10 79af0a0 79af0a0
                  mach_kernel`lo_alltraps+0x12a

             0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
         0: 0e 00 00 00 37 00 00 00 00 00 00 00 1f 00 00 00  ....7...........
        10: 1f 00 00 00 a8 33 00 00 00 00 00 01 00 00 00 00  .....3..........
        20: 98 ba dc fe 07 09 00 00 00 00 00 00 98 ba dc fe  ................
        30: 06 00 00 00 0d 00 00 00 34 00 00 00 9e 1c 00 00  ........4.......
        40: 17 00 00 00 00 02 00 00 ac 30 00 00 1f 00 00 00  .........0......
        50: 00 00 00 00 00 00 00 00 0d 00 00 00 e0 e6 29 00  ..............).
        60: 34 00 00 00 00 00 00 00 9e 1c 00 00 00 00 00 00  4...............
        70: 17 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00  ................
        80: ac 30 00 00 00 00 00 00 1f 00 00 00 00 00 00 00  .0..............
        90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        a0: 48 00 00 00 10 00 00 00 85 00 00 00 a0 f2 29 00  H.............).
        b0: 69 01 00 02 00 00 00 00 e6 93 04 82 ff 7f 00 00  i...............
        c0: 2f 00 00 00 00 00 00 00 06 02 00 00 00 00 00 00  /...............
        d0: 78 ee 42 01 01 00 00 00 1f 00 00 00 00 00 00 00  x.B.............
        e0: 00 ed 9a 07 00 00 00 00 00 00 00 00 00 00 00 00  ................
        f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................

    ...

The memory dump shows a 32-bit exception frame:

    x86_saved_state32

    gs = 0x37
    fs = 0
    es = 0x1f
    ds = 0x1f
    edi = 0x33a8
    esi = 0x01000000
    ebp = 0
    cr2 = 0xfedcba98
    ebx = 0x0907
    edx = 0
    ecx = 0xfedcba98
    eax = 0x06
    trapno = 0x0d
    err = 0x34
    eip = 0x1c9e
    cs = 0x17
    efl = 0x0200
    uesp = 0x30ac
    ss = 0x1f

The cr2 of 0xfedcba98 is the address that the new thread read
to cause the fault, but note that the trap is now a GP fault with
error code 0x34, meaning it's moved past the cr2 problem and on
to an invaild segment selector.  The 0x34 is suspiciously similar
to the 0x37 in gs, and sure enough, OS X forces gs to have
that value in the signal handler, and if your thread hasn't set
up that segment (known as USER_CTHREAD), you'll fault on the IRET
into the signal handler and never be able to handle a signal.

The kernel bug is that it forces segment 0x37 without making sure
it is a valid segment.  Leopard also forced 0x37 but had the courtesy
to set it up first.

Since OS X requires us to set up that segment (using the
thread_fast_set_cthread_self system call), we might as well
use it instead of the more complicated i386_set_ldt call to
set up our per-OS thread storage.

Also add some more zeros to bsdthread_register for new arguments
in Snow Leopard (apparently unnecessary, but being careful).

Fixes #510.

R=r
CC=golang-dev
https://golang.org/cl/824046
2010-04-08 13:24:37 -07:00
Russ Cox
24c58174b2 runtime: use explicit flag when finalizer goroutine is waiting
Avoids spurious wakeups during other sleeping by that goroutine.
Fixes #711.

R=r
CC=golang-dev
https://golang.org/cl/902041
2010-04-07 20:38:02 -07:00
Ken Thompson
b57afc2f83 another try at clearing
channel recv data.

R=rsc
CC=golang-dev
https://golang.org/cl/896041
2010-04-06 17:33:43 -07:00
Ken Thompson
dec248c665 change channel read to clear
data just read from the channel.
this will make it easier to
recognize when to garbage
collect and finalize.

R=rsc
CC=golang-dev
https://golang.org/cl/882043
2010-04-06 16:58:52 -07:00
Russ Cox
88ce9ce40c runtime: two proc bug fixes
1. Fix bug in GOMAXPROCS when trying to cut number of procs
Race could happen on any system but was
manifesting only on Xen hosted Linux.

2. Fix recover on ARM, where FP != caller SP.

R=r
CC=golang-dev
https://golang.org/cl/880043
2010-04-06 13:48:31 -07:00
Russ Cox
6d69fd1fe3 runtime: fix Caller
log: add test of Caller

New regexp in log test is picky and will require some
maintenance, but it catches off-by-one mistakes too.

Fixes #710.

R=gri
CC=esko.luontola, golang-dev
https://golang.org/cl/887043
2010-04-05 23:36:37 -07:00
Russ Cox
d89b357f76 runtime: handle malloc > 2GB correctly
R=ken2
CC=golang-dev
https://golang.org/cl/821048
2010-04-05 17:26:59 -07:00
Russ Cox
6c196015e0 runtime: various arm fixes
* correct symbol table size
  * do not reorder functions in output
  * traceback
  * signal handling
  * use same code for go + defer
  * handle leaf functions in symbol table

R=kaib, dpx
CC=golang-dev
https://golang.org/cl/884041
2010-04-05 12:51:09 -07:00
Russ Cox
f75d0d224f runtime: turn run time errors checks into panics
R=ken2, r
CC=golang-dev
https://golang.org/cl/871042
2010-04-01 22:31:27 -07:00
Russ Cox
ec53627ed5 runtime: correct memory leak in select
* adds pass 3 to dequeue from channels eagerly

various other cleanup/churn:
  * use switch on cas->send in each pass to
    factor out common code.
  * longer goto labels, commented at target
  * be more agressive about can't happen:
    throw instead of print + cope.
  * use "select" instead of "selectgo" in errors
  * use printf for debug prints when possible

R=ken2, ken3
CC=golang-dev, r
https://golang.org/cl/875041
2010-04-01 11:56:18 -07:00
Russ Cox
63e878a750 runtime: make type assertion a runtime.Error, the first of many
R=r
CC=golang-dev
https://golang.org/cl/805043
2010-03-31 15:55:10 -07:00
Russ Cox
9b1507b050 gc: implement panic and recover
R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/831042
2010-03-31 11:46:01 -07:00
Russ Cox
7ecefdc03f runtime: fix arm build, slightly.
R=r
CC=golang-dev
https://golang.org/cl/842042
2010-03-30 17:00:27 -07:00
Russ Cox
01eaf780a8 gc: add panic and recover (still unimplemented in runtime)
main semantic change is to enforce single argument to panic.

runtime: change to 1-argument panic.
use String method on argument if it has one.

R=ken2, r
CC=golang-dev
https://golang.org/cl/812043
2010-03-30 10:53:16 -07:00
Christopher Wedgwood
d166d1629a runtime: Remove unused runtime.write from linux/amd64
Also minor reformatting.

R=rsc
CC=golang-dev
https://golang.org/cl/845041
2010-03-29 22:51:39 -07:00
Russ Cox
83727ccf7c runtime: run deferred calls at Goexit
baby step toward panic+recover.

Fixes #349.

R=r
CC=golang-dev
https://golang.org/cl/825043
2010-03-29 21:48:22 -07:00
Russ Cox
d99a3da7b2 runtime: a couple more memory stats.
now runtime.MemStats.Sys really is the sum of all the other Sys fields.

R=r
CC=golang-dev
https://golang.org/cl/843041
2010-03-29 17:30:07 -07:00
Russ Cox
a709876767 runtime: more malloc statistics
expvar: default publishings for cmdline, memstats
godoc: import expvar

R=r
CC=golang-dev
https://golang.org/cl/815041
2010-03-29 13:06:26 -07:00
Russ Cox
baf538406b pprof: dump extra heap information at end of heap profile
R=r
CC=golang-dev
https://golang.org/cl/786041
2010-03-26 15:32:53 -07:00
Russ Cox
4e28cfe970 runtime: run all finalizers in a single goroutine.
eliminate second pass of mark+sweep
by scanning finalizer table specially.

R=r
CC=golang-dev
https://golang.org/cl/782041
2010-03-26 14:15:30 -07:00
Alex Brainman
a24cf69fd8 runtime: fix mingw build, implement missing destroylock()
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/747041
2010-03-24 18:03:10 -07:00
Russ Cox
6eb251f244 runtime: malloc sampling, pprof interface
R=r
CC=golang-dev
https://golang.org/cl/719041
2010-03-24 09:40:09 -07:00
Russ Cox
596c16e045 runtime: add memory profiling, disabled.
no way to get the data out yet.

add prototype for runtime.Callers,
missing from last CL.

R=r
CC=golang-dev
https://golang.org/cl/713041
2010-03-23 20:48:23 -07:00
Russ Cox
2b7d147f1a runtime: add Callers
cut copies of traceback from 6 to 1.

R=r
CC=golang-dev
https://golang.org/cl/703041
2010-03-23 17:01:17 -07:00
Ken Thompson
e781303e27 maps access to a missing key
will return the "zero" value

R=rsc
CC=golang-dev
https://golang.org/cl/700041
2010-03-23 13:00:02 -07:00
Alex Brainman
b0c6bba8e8 syscall: mksyscall_mingw.sh emitting shorter calls (to Syscall or Syscall6) when there are fewer arguments
R=rsc
CC=golang-dev
https://golang.org/cl/622041
2010-03-19 15:17:18 -07:00
Ian Lance Taylor
332ff67ee2 Fix build: don't assume that . is on PATH.
R=rsc
TBR=rsc
CC=golang-dev
https://golang.org/cl/610043
2010-03-17 10:08:27 -07:00
Russ Cox
0c3a93ceb7 runtime: add GOROOT and Version
R=r
CC=golang-dev
https://golang.org/cl/608041
2010-03-16 23:10:33 -07:00
Alex Brainman
5e6203d28b syscall: more changes to mingw version
- mkall now generates syscall stabs automatically
- we can call unicode versions of winapi now
- introduce GetErrstr function to fetch error text given errno
- general cleanup

R=rsc
CC=golang-dev
https://golang.org/cl/562041
2010-03-16 23:10:07 -07:00
Robert Griesemer
53f3d0733c gofmt: more consistent formatting of const/var decls
- gofmt -w src misc
- only manually modified file: src/pkg/go/printer/nodes.go

R=rsc
CC=golang-dev, r
https://golang.org/cl/606041
2010-03-16 16:45:54 -07:00
Russ Cox
acfd7b8d12 runtime: lock finalizer table accesses
R=r
CC=golang-dev
https://golang.org/cl/462043
2010-03-15 20:29:17 -07:00
Alex Brainman
e00795859b syscall: minimal mingw version of syscall to call windows dlls
lots of missing parts, but builds and can call dlls, see a sample code in syscall_mingw.go

R=rsc
CC=golang-dev
https://golang.org/cl/218042
2010-03-09 15:09:09 -08:00
Ken Thompson
f229c8b546 identical complex implementation
for 6g and 8g. can also be used
for 5g. 5g is still a stub.

R=rsc
CC=golang-dev
https://golang.org/cl/362041
2010-03-09 12:49:24 -08:00
Russ Cox
8ddd6c4181 runtime: clock garbage collection on bytes allocated, not pages in use
This keeps fragmentation from delaying
garbage collections (and causing more fragmentation).

Cuts fresh godoc (with indexes) from 261M to 166M (120M live).
Cuts toy wc program from 50M to 8M.

Fixes #647.

R=r, cw
CC=golang-dev
https://golang.org/cl/257041
2010-03-08 14:15:44 -08:00
Ken Thompson
426099f42e 6g complex type usable
8g and 5g have stubs to ignore complex

R=rsc
CC=golang-dev
https://golang.org/cl/257042
2010-03-05 20:16:04 -08:00
Russ Cox
36c5c5bf40 cc: disallow ... argument unless NOSPLIT is set.
check that NOSPLIT functions don't use too much stack.
correct some missing NOSPLITs in the runtime library.

Fixes bug reported in
https://groups.google.com/group/golang-nuts/t/efff68b73941eccf

R=ken2
CC=golang-dev
https://golang.org/cl/236041
2010-03-04 15:34:25 -08:00
Russ Cox
3910161307 gc: implement []int(string) and []byte(string)
R=ken2
CC=golang-dev
https://golang.org/cl/224060
2010-02-25 15:11:07 -08:00
Ian Lance Taylor
bada653f4d Use consistent types in .h file and .c file.
R=rsc
CC=golang-dev
https://golang.org/cl/224053
2010-02-25 10:13:09 -08:00
Ian Lance Taylor
7c99dcbdf9 Install runtime.h and cgocall.h.
This permits cgo generated code to use these header files even
if the Go sources are not around.

R=rsc
CC=golang-dev
https://golang.org/cl/224045
2010-02-24 17:00:25 -08:00
Russ Cox
8ba5c5593f runtime: work around Linux kernel bug in futex
Fixes #420.

R=r
CC=golang-dev
https://golang.org/cl/218065
2010-02-22 20:45:36 -08:00
Ken Thompson
f59cb49a5a fixed bug in mpconst float multiply by 0.
more complex -- constants, variables and print.

R=rsc
CC=golang-dev
https://golang.org/cl/217061
2010-02-19 20:42:50 -08:00
Kai Backman
c0aac20e20 combined pchw and embedded into tiny. added section on arm to README
R=rsc
CC=golang-dev
https://golang.org/cl/194151
2010-02-18 23:33:21 -08:00
Ken Thompson
713e3e1541 more complex - constants
import and export

R=rsc
CC=golang-dev
https://golang.org/cl/214050
2010-02-18 14:46:28 -08:00
Ken Thompson
33d6a260c1 new types complex, complex64 and complex128
only front-end compiler work.
best to do thin in 3 steps
1. frontend
2. backend
3. lib

R=rsc
CC=golang-dev
https://golang.org/cl/214042
2010-02-17 22:08:30 -08:00
Russ Cox
04d9c8853b runtime: fix bug in Caller documentation
R=r
CC=golang-dev
https://golang.org/cl/207110
2010-02-16 16:11:11 -08:00
Russ Cox
9f77e7ea3c runtime: dummy gettime for mingw/386.
Fixes #598.

R=adg
CC=golang-dev
https://golang.org/cl/206089
2010-02-12 12:49:16 -08:00
Russ Cox
22a7f2a14d runtime: delete MHeapMapCache, which is useless
because free needs to mark the block as freed to
coordinate with the garbage collector.

(in C++ free can blindly put the block on the free list,
no questions asked, so the cache saves some work.)

R=iant
CC=golang-dev
https://golang.org/cl/206069
2010-02-10 21:23:08 -08:00
Russ Cox
66cdc699b2 arm: fix build on android
R=kaib
CC=golang-dev
https://golang.org/cl/206059
2010-02-10 15:01:02 -08:00
Russ Cox
fb94be55dc runtime: tighten garbage collector
* specialize sweepspan as sweepspan0 and sweepspan1.
 * in sweepspan1, inline "free" to avoid expensive mlookup.

R=iant
CC=golang-dev
https://golang.org/cl/206060
2010-02-10 14:59:39 -08:00
Russ Cox
991a968f44 runtime: do not zero blocks on free (this time for sure!)
R=iant
CC=golang-dev
https://golang.org/cl/207054
2010-02-10 11:31:00 -08:00
Russ Cox
f25586a306 runtime: garbage collection + malloc performance
* add bit tracking finalizer status, avoiding getfinalizer lookup
  * add ability to allocate uncleared memory

R=iant
CC=golang-dev
https://golang.org/cl/207044
2010-02-10 00:00:12 -08:00
Russ Cox
2b4a9fa176 fix NaCl build for latest runtime changes
R=iant
CC=golang-dev
https://golang.org/cl/206052
2010-02-09 16:56:22 -08:00
Russ Cox
de90a7d4aa runtime: fix FreeBSD build
stab in the dark but plausible: the kernel does try to
return time zone information.
http://fxr.watson.org/fxr/source/kern/kern_time.c?v=FREEBSD8#L421

R=iant
CC=golang-dev
https://golang.org/cl/206053
2010-02-09 16:54:51 -08:00
Russ Cox
62d627f0bc runtime: allow arbitrary return type in SetFinalizer.
finalize chan, to free OS X semaphore inside Lock.
os: finalize File, to close fd.

Fixes #503.

R=ken2
CC=golang-dev
https://golang.org/cl/204065
2010-02-08 21:41:54 -08:00
Russ Cox
e4f06812c5 runtime: instrument malloc + garbage collector.
add simple garbage collection benchmark.

R=iant
CC=golang-dev
https://golang.org/cl/204053
2010-02-08 14:32:22 -08:00
Russ Cox
87915b6565 runtime: introduce MemStatsType
R=ken2
CC=golang-dev
https://golang.org/cl/204061
2010-02-07 01:20:44 -08:00
Kai Backman
ebf32c5868 fix comment
R=rsc
CC=golang-dev
https://golang.org/cl/203053
2010-02-06 21:59:46 -08:00
Andrew Gerrand
8ec9ffc742 6l: move mapped symbol table lower in memory
Allows binary to run on some Linux system.

Fix for issue 365.

R=rsc
CC=golang-dev
https://golang.org/cl/199096
2010-02-04 12:46:11 -08:00
Christopher Wedgwood
43d2e59a81 os/signal: send SIGCHLDs to Incoming
R=rsc
CC=golang-dev
https://golang.org/cl/199082
2010-02-03 23:24:28 -08:00
Russ Cox
33e396a4a7 finalizers; merge package malloc into package runtime
R=r, cw
CC=golang-dev
https://golang.org/cl/198085
2010-02-03 16:31:34 -08:00
Russ Cox
1f11ece67f nacl: fix build, finally fixed 8l convergence bug
R=r
CC=golang-dev
https://golang.org/cl/199042
2010-02-01 15:20:19 -08:00
Russ Cox
68796b0270 gc: add ... T, rework plain ...
No longer a distinct type; now a property of func types.

R=ken2
CC=golang-dev
https://golang.org/cl/197042
2010-02-01 00:25:59 -08:00
Russ Cox
a186b77b03 gc: implement defer print/println/panic/panicln
Fixes #219.

R=ken2, r
CC=golang-dev
https://golang.org/cl/194097
2010-01-27 15:37:08 -08:00
Kai Backman
9f5264f299 small embedded target for arm.
R=rsc
CC=golang-dev
https://golang.org/cl/193104
2010-01-26 20:22:59 -08:00
Russ Cox
718be3215f in C and asm, replace pkg·name with ·name
(eliminate assumption of package global name space,
make code easier to move between packages).

R=r
CC=golang-dev
https://golang.org/cl/194072
2010-01-25 18:52:55 -08:00
Russ Cox
1912632019 runtime, type switch: eliminate package global name space assumption
bonus: type switch now detects multiple uses of identical interface types.
bonus: interface types are now order-independent, following the spec.

R=ken2
CC=golang-dev
https://golang.org/cl/194053
2010-01-25 18:23:20 -08:00
Russ Cox
1cecac8134 gc: record full package paths in runtime type data
detect compilation of special package runtime with
compiler flag instead of package name.

R=ken2
CC=golang-dev
https://golang.org/cl/193080
2010-01-24 23:33:59 -08:00
Russ Cox
0365b989a4 runtime: wait to allocate mach semaphores backing Locks until needed
need better management of mach semaphores eventually
but this avoids allocating them for uncontended Locks.

R=r
CC=agl1, golang-dev
https://golang.org/cl/190079
2010-01-19 21:14:15 -08:00
Russ Cox
da9bc7ae7d runtime: add demo running Go on raw (emulated) hw
8l: add GOOS=pchw, stop spelling out all the elf numbers.

R=r
CC=golang-dev
https://golang.org/cl/186144
2010-01-13 19:51:59 -08:00
Devon H. O'Dell
1564b984a5 runtime: GS already set up by setldt in Linux/386; remove duplicate
R=rsc
CC=golang-dev
https://golang.org/cl/186146
2010-01-13 17:50:12 -08:00
Russ Cox
12518e441b runtime cleanup.
* move memory code into $GOOS-specific directory.
  * allow printing of static strings < 256 bytes.
    (dynamic strings will bump maxstring as they are allocated.)
  * use cgo2c for runtime.mal.

R=r, dho
CC=golang-dev
https://golang.org/cl/186143
2010-01-13 17:50:02 -08:00
Russ Cox
f85abf01bc runtime: reset DF flag after running external code on 386
R=r
CC=golang-dev
https://golang.org/cl/186108
2010-01-13 09:08:39 -08:00
Russ Cox
711088106e runtime: fix bug in preemption checks; was causing "lock count" panics
R=r
CC=golang-dev
https://golang.org/cl/186078
2010-01-12 10:03:02 -08:00
Russ Cox
5328df6534 runtime: check for preemption due to garbage collection
in various already expensive routines.

helps keep cpu utilization up when GOMAXPROCS > 1,
but not a full solution.

http://groups.google.com/group/golang-nuts/t/7a9535c4136d3e2

R=r
CC=golang-dev
https://golang.org/cl/184043
2010-01-09 09:47:45 -08:00
Russ Cox
74a9fc18f6 runtime: close TODO now that 8c bug is fixed
R=r
CC=golang-dev
https://golang.org/cl/183138
2010-01-06 19:24:11 -08:00