go/src
Josh Bleecher Snyder 57279ba752 cmd/internal/gc: separate func-only Node fields
Nodes dominate gc's memory usage, but many fields are only used
for a subset of kinds of nodes. This change pulls out fields
used only for func-like Nodes. This reduces the size of the
Node struct on a 64-bit machine from 504 bytes to 416 bytes (-17%).

Compiling the runtime, 1.5% of nodes have a non-nil Func.
In html/template, 2.7% of nodes have a non-nil Func.

This change introduces an extra alloc and associated GC overhead
when Func is non-nil. However, when Func is nil, as it almost
always is, it spares the garbage collector scanning some Node fields.
Empirically, this change appears to be roughly neutral with regard to GC.

To keep the diff readable, this CL uses an embedded Func field.
A subsequent CL will unembed the field.

Passes toolstash -cmp.

Change-Id: Ide86aa954b097fb8e6154f0811d3691497477004
Reviewed-on: https://go-review.googlesource.com/7360
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-04-01 18:00:20 +00:00
..
archive all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
bufio bufio: fix incorrect comment on Scanner.Scan 2015-03-18 00:59:49 +00:00
builtin
bytes runtime: add runtime.cmpstring and bytes.Compare 2015-03-25 22:46:39 +00:00
cmd cmd/internal/gc: separate func-only Node fields 2015-04-01 18:00:20 +00:00
compress compress/flate: fix typo in comment 2015-04-01 16:48:04 +00:00
container
crypto crypto/x509: use syscall.GetVersion instead of internal/syscall/windows.GetVersion 2015-03-31 08:11:24 +00:00
database/sql database/sql: provide stats on number of open connections to the database. 2015-04-01 15:24:53 +00:00
debug debug/dwarf, encoding/asn1, go/ast: fix old comments 2015-03-24 00:09:30 +00:00
encoding debug/dwarf, encoding/asn1, go/ast: fix old comments 2015-03-24 00:09:30 +00:00
errors
expvar expvar: fix build 2015-02-05 13:53:29 +00:00
flag all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
fmt fmt: improve test coverage of %x and %X format variations for strings 2015-04-01 00:55:30 +00:00
go go/scanner: Stabilize (*ErrorList).Sort 2015-04-01 17:39:57 +00:00
hash os/signal, hash/crc32: add arm64 build tags 2015-03-16 18:46:43 +00:00
html html/template: fix crash when escaping incomplete template 2015-03-20 19:57:45 +00:00
image image/draw: fix golden test for YCbCr.RGBA change. 2015-03-27 00:30:14 +00:00
index/suffixarray
internal cmd/gofmt, go/format: refactor common pieces into internal/format 2015-04-01 17:35:26 +00:00
io io: clarify the behavior of PipeWriter.CloseWithError(nil). 2015-03-30 09:43:11 +00:00
log log/syslog: avoid unix sockets on darwin/arm 2015-03-04 22:13:06 +00:00
math math/big: remove NaN support - just not worth it 2015-03-31 23:05:31 +00:00
mime mime/quotedprintable: add binary mode to the writer 2015-03-30 12:49:19 +00:00
net net: add socket system call hooks for testing 2015-03-31 23:07:42 +00:00
os os: give race detector chance to override Exit(0) 2015-03-28 12:42:37 +00:00
path all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
reflect all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
regexp regexp: fix link to RE2 syntax 2015-03-23 19:17:52 +00:00
runtime runtime, cmd/internal/ld: change runtime to use a single linker symbol 2015-03-31 22:45:07 +00:00
sort sort: fixed small typo in comments 2015-02-08 23:38:50 +00:00
strconv all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
strings strings: Add benchmark test for trim function 2015-03-31 00:40:55 +00:00
sync sync/atomic: add support for GOARCH=arm64 2015-03-16 18:46:18 +00:00
syscall syscall: apply the errno allocation fix to other operating systems 2015-03-27 16:58:02 +00:00
testing testing/quick: fix comment 2015-03-27 13:00:53 +00:00
text text/scanner: Fix EOF reporting on strange Readers 2015-04-01 03:39:22 +00:00
time time: add a thorough example for time.Format 2015-03-26 18:44:42 +00:00
unicode all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
unsafe unsafe: minor doc string improvements 2015-01-28 19:42:15 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash androidtest.bash: remove use of cp --preserve. 2015-02-13 21:16:25 +00:00
bootstrap.bash build: add bootstrap.bash for bootstrapping new systems 2015-03-02 17:51:56 +00:00
clean.bash
clean.bat
clean.rc
iostest.bash iostest.bash: build script for iOS 2015-03-30 16:54:01 +00:00
make.bash [dev.cc] cmd/go: fix expansion of 'std', add 'cmd' 2015-02-23 15:13:17 +00:00
make.bat build: update Windows make.bat to use CC_FOR_TARGET. 2015-03-02 02:20:46 +00:00
make.rc all: delete C libraries and cmd/dist code that builds them 2015-03-01 00:40:23 +00:00
nacltest.bash nacltest.bash: reduce test time by using bootstrapping Go to build fstest_nacl.go 2015-03-24 23:58:14 +00:00
race.bash [dev.cc] cmd/go: fix expansion of 'std', add 'cmd' 2015-02-23 15:13:17 +00:00
race.bat [dev.cc] cmd/go: fix expansion of 'std', add 'cmd' 2015-02-23 15:13:17 +00:00
run.bash build: convert run.bash, run.bat, and run.rc into a Go program 2015-03-03 23:22:11 +00:00
run.bat build: convert run.bash, run.bat, and run.rc into a Go program 2015-03-03 23:22:11 +00:00
run.rc build: convert run.bash, run.bat, and run.rc into a Go program 2015-03-03 23:22:11 +00:00