g is not in r15 anymore.
now it's in a per-thread memory segment,
which is valid even inside a signal handler,
so we can just refer to g directly.
Fixes#1082.
R=r
CC=golang-dev
https://golang.org/cl/2149045
Need to correct for deferproc's extra 2 words of stack or in some
cases (such as memory profiling) traceback can cause a crash.
Also bulletproof the closure test.
R=rsc
CC=golang-dev
https://golang.org/cl/2138047
Old code was using recursion to traverse object graph.
New code uses an explicit stack, cutting the per-pointer
footprint to two words during the recursion and avoiding
the standard allocator and stack splitting code.
in test/garbage:
Reduces parser runtime by 2-3%
Reduces Peano runtime by 40%
Increases tree runtime by 4-5%
R=r
CC=golang-dev
https://golang.org/cl/2150042
Based on the observation that a great number of the types that
are copied or compared in interfaces, maps, and channels are
word-sized, this uses specialized copy and equality functions
for them that use a word instead of 4 or 8 bytes. Seems to yield
0-6% improvements in performance in the benchmarks I've run.
For example, with the regexp benchmarks:
Before:
regexp.BenchmarkLiteral 500000 3.26 µs/op
regexp.BenchmarkNotLiteral 100000 13.67 µs/op
regexp.BenchmarkMatchClass 100000 18.72 µs/op
regexp.BenchmarkMatchClass_InRange 100000 20.04 µs/op
regexp.BenchmarkReplaceAll 100000 27.85 µs/op
After:
regexp.BenchmarkLiteral 500000 3.11 µs/op
regexp.BenchmarkNotLiteral 200000 13.29 µs/op
regexp.BenchmarkMatchClass 100000 17.65 µs/op
regexp.BenchmarkMatchClass_InRange 100000 18.49 µs/op
regexp.BenchmarkReplaceAll 100000 26.34 µs/op
R=rsc
CC=golang-dev
https://golang.org/cl/1967047
The runtime only passes 32 bits of file offset,
but the kernel wants 64 bits, so have to add
zeros explicitly in a copy of the arguments.
R=adg, Martin Neubauer
CC=golang-dev
https://golang.org/cl/1933044
Function to create a GoString with a known length so it can contain NUL
bytes anywhere in the string. Some C libraries have strings like this.
R=rsc
CC=golang-dev
https://golang.org/cl/2007042
Returns R14 and R15 to the available register pool.
Plays more nicely with ELF ABI C code.
In particular, our signal handlers will no longer crash
when a signal arrives during execution of a cgo C call.
Fixes#720.
R=ken2, r
CC=golang-dev
https://golang.org/cl/1847051
but with less precision than hardware counterparts.
fixed a number of tests to output BUG when they failed.
changed the runner to distinghuish between output
and output containing ^BUG
R=rsc
CC=dho, golang-dev
https://golang.org/cl/1778041
updated thread.c to provide destroylock, which seems to be
required to link.
updated README with different virtualization programs.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/1746047
Cannot assume that g == m->curg at time of signal.
Must save actual g and restore.
Fixes flaky crashes with messages like
throw: malloc mlookup
throw: malloc/free - deadlock
throw: unwindstack on self
throw: free mlookup
(and probably others) when running cgo.
R=iant
CC=golang-dev
https://golang.org/cl/1648043
* Code for assignment, conversions now mirrors spec.
* Changed some snprint -> smprint.
* Renamed runtime functions to separate
interface conversions from type assertions:
convT2I, assertI2T, etc.
* Correct checking of \U sequences.
Fixes#840.
Fixes#830.
Fixes#778.
R=ken2
CC=golang-dev
https://golang.org/cl/1303042