Correctly distinguish between lhs and rhs identifiers
and resolve/declare them accordingly.
Collect field and method names in respective scopes
(will be available after some minor AST API changes).
Also collect imports since it's useful to have that
list directly w/o having to re-traverse the AST
(will also be available after some minor AST API changes).
No external API changes in this CL.
R=rsc, rog
CC=golang-dev
https://golang.org/cl/4271061
The top level bytes.Buffer is always there and can be re-used.
Rpc goes from 83 to 79 mallocs per round trip.
R=rsc
CC=golang-dev
https://golang.org/cl/4271062
- StartProcess will work with relative (to attr.Dir, not
current directory) executable filenames
- StartProcess will only work if executable filename points
to the real file, it will not search for executable in the
$PATH list and others (see CreateProcess manual for details)
- StartProcess argv strings can contain any characters
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4306041
This patch adds a connection cache and keep-alive
support to Transport, which is used by the
HTTP client.
It's also structured such that it's easy to add
HTTP pipelining in the future.
R=rsc, petar-m, bradfitzwork, r
CC=golang-dev
https://golang.org/cl/4272045
Revert changes to printer.Config. Pass in the
nodeSizes map trough an internal helper function.
R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4309042
Use memoization to avoid repeated recomputation of nested
node sizes. Speeds up testdata/slow.input by several orders
of magnitude.
- added respective test case
- added timeout to test code
- deleted some unrelated unused code
Fixes#1628.
R=rsc, r
CC=golang-dev
https://golang.org/cl/4274075
This change had already been made in revision 7371, but
was then undone with changes in revision 7606.
R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4239064
These timeouts are breaking tests in very slow
systems every once in a while. I've noticed
problems when compiling the Ubuntu packages for
arm, specifically.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4291058
Also in the common case avoid unnecessary buffering in
the channel.
Removes 13 allocations per round trip. Now at 86, down from
144 a week ago.
R=rsc, bradfitzgo, r2, rsc1
CC=golang-dev
https://golang.org/cl/4277060
The scanner returns slices into the original source
for token values. If those slices are making it into
the AST and from there into other long-living data
structures (e.g. godoc search), references to the
original source are kept around involuntarily.
For the current godoc and source tree, this change reduces
memory consumption after indexing and before GC by ~92MB
or almost 30%, and by ~10MB after GC (or about 6%).
R=rsc
CC=golang-dev
https://golang.org/cl/4273072