]> Cypherpunks repositories - gostls13.git/commit
gc: tweak and enable escape analysis
authorRuss Cox <rsc@golang.org>
Sun, 28 Aug 2011 16:05:00 +0000 (12:05 -0400)
committerRuss Cox <rsc@golang.org>
Sun, 28 Aug 2011 16:05:00 +0000 (12:05 -0400)
commitdb5f9da4256084db2f78db0e26b7b794af3ec7d6
tree4d1e65d1744d24d96ad4d42c9c0ed1a8f5274cfd
parent2a808826012ecc2165733de186f5e0a569e41619
gc: tweak and enable escape analysis

-s now means *disable* escape analysis.

Fix escape leaks for struct/slice/map literals.
Add ... tracking.
Rewrite new(T) and slice literal into stack allocation when safe.

Add annotations to reflect.
Reflect is too chummy with the compiler,
so changes like these affect it more than they should.

R=lvd, dave, gustavo
CC=golang-dev
https://golang.org/cl/4954043
src/cmd/gc/doc.go
src/cmd/gc/esc.c
src/cmd/gc/gen.c
src/cmd/gc/go.h
src/cmd/gc/lex.c
src/cmd/gc/sinit.c
src/cmd/gc/subr.c
src/cmd/gc/typecheck.c
src/cmd/gc/walk.c
src/pkg/reflect/value.go
test/escape2.go