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

187 Commits

Author SHA1 Message Date
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
Hector Chu
6bfe5f55f4 Ported runtime to Windows.
R=rsc
CC=golang-dev
https://golang.org/cl/176066
2010-01-06 17:58:55 -08:00
Adam Langley
50d6c81d4a runtime: fix race condition
(Thanks to ken and rsc for pointing this out)

rsc:
	ken pointed out that there's a race in the new
	one-lock-per-channel code.  the issue is that
	if one goroutine has gone to sleep doing

	select {
	case <-c1:
	case <-c2:
	}

	and then two more goroutines try to send
	on c1 and c2 simultaneously, the way that
	the code makes sure only one wins is the
	selgen field manipulation in dequeue:

	       // if sgp is stale, ignore it
	       if(sgp->selgen != sgp->g->selgen) {
		       //prints("INVALID PSEUDOG POINTER\n");
		       freesg(c, sgp);
		       goto loop;
	       }

	       // invalidate any others
	       sgp->g->selgen++;

	but because the global lock is gone both
	goroutines will be fiddling with sgp->g->selgen
	at the same time.

This results in a 7% slowdown in the single threaded case for a
ping-pong microbenchmark.

Since the cas predominantly succeeds, adding a simple check first
didn't make any difference.

R=rsc
CC=golang-dev
https://golang.org/cl/180068
2009-12-18 12:25:53 -08:00
Kai Backman
d85bb81878 first stub for softfloats, intercepts float instructions and skips
them in the stream.

R=rsc
https://golang.org/cl/174052
2009-12-17 16:08:42 -08:00
Russ Cox
08579c26dd runtime: if os/signal is not in use, crash on
most signals, so that ordinary programs
	can be killed, for example.

Fixes #434.

R=dsymonds1
CC=golang-dev, hoisie
https://golang.org/cl/180064
2009-12-16 20:20:50 -08:00
David Symonds
b5866494ea os/signal: new package
Fixes #71.

R=rsc, r
https://golang.org/cl/162056
2009-12-15 18:21:29 -08:00
Russ Cox
d16bc7a9f2 runtime: return zero value in x, ok = <-c when ok == false
Fixes #401.

R=ken2
https://golang.org/cl/180053
2009-12-15 16:59:23 -08:00
Robert Griesemer
d65a5cce89 1) Change default gofmt default settings for
parsing and printing to new syntax.

   Use -oldparser to parse the old syntax,
   use -oldprinter to print the old syntax.

2) Change default gofmt formatting settings
   to use tabs for indentation only and to use
   spaces for alignment. This will make the code
   alignment insensitive to an editor's tabwidth.

   Use -spaces=false to use tabs for alignment.

3) Manually changed src/exp/parser/parser_test.go
   so that it doesn't try to parse the parser's
   source files using the old syntax (they have
   new syntax now).

4) gofmt -w src misc test/bench

4th set of files.

R=rsc
CC=golang-dev
https://golang.org/cl/180049
2009-12-15 15:40:16 -08:00
Russ Cox
19c18358ca runtime: in exitsyscall, avoid confusing garbage collector
R=r
CC=golang-dev
https://golang.org/cl/178046
2009-12-14 19:06:20 -08:00
Devon H. O'Dell
857d4cf1a9 Remove GOBIN in PATH dependency; don't assume cwd is $GOROOT/src
This change removes the necessity to have GOBIN in $PATH,
and also doesn't assume that the build is being run from
$GOROOT/src. This is a minimal set of necessary changes
to get Go to build happily from the FreeBSD ports
collection.

R=rsc
CC=golang-dev
https://golang.org/cl/171044
2009-12-11 15:14:09 -08:00
Kai Backman
d08d33f389 fix calling convention and make memmove restore the g and m
registers.

R=rsc
https://golang.org/cl/166049
2009-12-10 11:42:01 -08:00
Russ Cox
0400a7f8b1 runtime: start new darwin/amd64 threads on correct stack,
then enable stack check.

R=r
https://golang.org/cl/165100
2009-12-08 23:34:45 -08:00
Devon H. O'Dell
5a4a08fab8 Fix stack on FreeBSD / add stack check across the board
FreeBSD was passing stk as the new thread's stack base, while
stk is the top of the stack in go. The added check should cause
a trap if this ever comes up in any new ports, or regresses
in current ones.

R=rsc
CC=golang-dev
https://golang.org/cl/167055
2009-12-08 18:19:30 -08:00
Devon H. O'Dell
cdce7325c8 When SA_SIGINFO is set, we should use __sa_sigaction on FreeBSD
R=rsc
CC=golang-dev
https://golang.org/cl/165097
2009-12-08 18:18:04 -08:00
Russ Cox
0d3301a557 runtime: don't touch pages of memory unnecessarily.
cuts working size for hello world from 6 MB to 1.2 MB.
still some work to be done, but diminishing returns.

R=r
https://golang.org/cl/165080
2009-12-07 15:52:14 -08:00
Russ Cox
33649bd278 runtime: introduce unsafe.New and unsafe.NewArray
to provide functionality previously hacked in to
    reflect and gob.

R=r
https://golang.org/cl/165076
2009-12-07 15:51:58 -08:00
Rob Pike
20c1ec263a pick off special one-byte case in copy. worth 2x in benchmarks (38ns->16ns).
the one-item case could be generalized easily with no cost. worth considering.

R=rsc
CC=golang-dev, cw
https://golang.org/cl/167044
2009-12-07 11:28:02 -08:00