go/src
Matthew Dempsky a1bb3030c8 cmd/yacc: generate arrays instead of slices where possible
Yacc generates a bunch of global variables of the form

    var yyFoo = []int{...}

where yyFoo is never subsequently modified to point to a different
slice.  Since these variables are implicitly compiled as

    var yyFoo = ([...]int{...})[:]

anyway, by simply converting them all to

    var yyFoo = [...]int{...}

we save sizeof(sliceStruct) bytes of data memory for each variable and
also make len(yyFoo) into compile-time constant expressions, which
shaves some bytes off text size:

    $ size 6g.before 6g.after
       text	   data	    bss	    dec	    hex	filename
    4598019	 605968	 342700	5546687	 54a2bf	6g.before
    4597810	 605552	 342700	5546062	 54a04e	6g.after

Change-Id: I53c7aa6efdb2d52738013e9d337a59afbfcb2494
Reviewed-on: https://go-review.googlesource.com/7520
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-04-02 21:05:43 +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/yacc: generate arrays instead of slices where possible 2015-04-02 21:05:43 +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/ast: fix ast.Inspect doc string 2015-04-02 03:51:22 +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: implement missing special cases for binary operations 2015-04-02 17:05:09 +00:00
mime mime/quotedprintable: add binary mode to the writer 2015-03-30 12:49:19 +00:00
net net: move test flags into main_test.go 2015-04-02 09:07:24 +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: remove checkgc code from hashmap 2015-04-02 15:28:56 +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