Fixes#1572.
Initially I tried changing things so all object
files get put in _obj, but it's too much - everything
needs changing. Perhaps some other time.
R=rsc
CC=golang-dev
https://golang.org/cl/4237050
Add a new Read method to ScanState so that it
satisfies the io.Reader interface; rename
Getrune and Ungetrune to ReadRune and UnreadRune.
Make sure ReadRune does not read past width restrictions;
remove now-unnecessary Width method from ScanState.
Also make the documentation a little clearer as to
how ReadRune and UnreadRune are used.
R=r, r2
CC=golang-dev
https://golang.org/cl/4240056
This is again an intentionally minimal change.
The plan is to keep Client's zero value be a usable
client, with optional fields being added over time
(e.g. cookie manager, redirect policy, auth)
R=rsc
CC=golang-dev
https://golang.org/cl/4239044
Computer people have an agglutinating streak that I like to resist.
As a time of execution: run time.
As an adjective: run-time.
As a noun: run-time support/code/library.
Signed,
Mr. Pedant.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4252048
conflict and explain that you could put the grammars
in separate packages instead.
I could be talked into rolling back the previous change
and just making a doc change instead, but I'm content
to let it stand.
R=rsc
CC=golang-dev
https://golang.org/cl/4240053
This should allow multiple goyacc grammars to be
compiled into the same binary. There's a chance it
Fixes#1562.
R=rsc, r2
CC=golang-dev
https://golang.org/cl/4256044
Otherwise if there is an installed /usr/bin/6g the build
will use that one instead of the one it builds.
R=r
CC=golang-dev
https://golang.org/cl/4249045
This functionality might be used in environments
where programs are limited to a single thread,
to simulate a select-driven network server. It is
not exposed via the standard runtime API.
R=r, r2
CC=golang-dev
https://golang.org/cl/4254041
to move some variables from the stack to the heap.
Sorted benchmark runs on my 2007-era Mac Mini (GOARCH=amd64, GOOS=linux):
Before:
lzw.BenchmarkDecoder 2000 878176 ns/op
lzw.BenchmarkDecoder 2000 878415 ns/op
lzw.BenchmarkDecoder 2000 880352 ns/op
lzw.BenchmarkDecoder 2000 898445 ns/op
lzw.BenchmarkDecoder 2000 901728 ns/op
After:
lzw.BenchmarkDecoder 2000 859065 ns/op
lzw.BenchmarkDecoder 2000 859402 ns/op
lzw.BenchmarkDecoder 2000 860035 ns/op
lzw.BenchmarkDecoder 2000 860555 ns/op
lzw.BenchmarkDecoder 2000 861109 ns/op
The ratio of before/after median times is 1.024.
The runtime.MemStats.Mallocs delta per loop drops from 109 to 104.
R=r, r2, dfc
CC=golang-dev
https://golang.org/cl/4253043
go/doc wants to see text after BUG(uid): on the same line
in order to treat it as an official bug comment.
R=gri
CC=golang-dev
https://golang.org/cl/4250043
Using the kernel-supplied compare-and-swap code
on linux/arm means that runtime doesn't have to care
whether this is GOARM=5 or GOARM=6 anymore.
Fixes#1494.
R=r, r2
CC=golang-dev
https://golang.org/cl/4245043
Before this fix, types such as
type T map[string]T
caused infinite recursion in the gob implementation.
Now they just work.
Fixes#1518.
R=rsc
CC=golang-dev
https://golang.org/cl/4230045
Also: renamed fixedbugs/bug322.go to fixedbugs/bug323.go
because we already have a bugs/bug322.go and bug322.dir.
R=rsc
CC=golang-dev
https://golang.org/cl/4219044
When providing addition file systems to godoc via -path, the
path names may be symbolic links. Follow them.
Also: better logging of error and special conditions.
R=r, dsymonds, r2
CC=golang-dev
https://golang.org/cl/4217045
The pointer will eventually let us find *T given T.
This CL just makes room for it, always storing a zero.
R=r, r2
CC=golang-dev
https://golang.org/cl/4221046
In CL 4188061 I changed malg to allocate the requested
number of bytes n, not n+StackGuard, so that the
allocations would use rounder numbers.
The allocation of the signal stack asks for 32k and
then used g->stackguard as the base, but g->stackguard
is StackGuard bytes above the base. Previously, asking
for 32k meant getting 32k+StackGuard bytes, so using
g->stackguard as the base was safe. Now, the actual base
must be computed, so that the signal handler does not
run StackGuard bytes past the top of the stack.
Was causing flakiness mainly in programs that use the
network, because they sometimes write to closed network
connections, causing SIGPIPEs. Was also causing problems
in the doc/progs test.
Also fix Makefile so that changes to stack.h trigger rebuild.
R=bradfitzgo, r, r2
CC=golang-dev
https://golang.org/cl/4230044
A reference to the address of weak.foo resolves at link time
to the address of the symbol foo if foo would end up in the
binary anyway, or to zero if foo would not be in the binary.
For example:
int xxx = 1;
int yyy = 2;
int weak·xxx;
int weak·yyy;
void main·main(void) {
runtime·printf("%p %p %p\n", &xxx, &weak·xxx, &weak·yyy);
}
prints the same non-nil address twice, then 0 (because yyy is not
referenced so it was dropped from the binary).
This will be used by the reflection tables.
R=iant
CC=golang-dev
https://golang.org/cl/4223044
If the filename was absolute, writeFileAtomically
used the wrong filename for ioutil.TempFile leading
to non-existent directories and the TempFile would
fail.
R=r, r2
CC=golang-dev
https://golang.org/cl/4224043