cmd/compile: rework how fieldtrack is implemented

Shrinks gc.Type and gc.Func slightly.

Passes "GOEXPERIMENT=fieldtrack ./all.bash" and "go test -a
-toolexec='toolstash -cmp' -ldflags=-k=rsc.io/tmp/fieldtrack.tracked
rsc.io/tmp/fieldtrack".

Change-Id: I785fe8a18eb830d9867d34247e4cd41a6a7921d4
Reviewed-on: https://go-review.googlesource.com/20557
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Matthew Dempsky 2016-03-10 16:15:44 -08:00
parent f6ceed2cab
commit a2a48069fe
6 changed files with 27 additions and 22 deletions

View file

@ -156,7 +156,7 @@ type Func struct {
Inldcl Nodes // copy of dcl for use in inlining
Closgen int
Outerfunc *Node
Fieldtrack []*Type
FieldTrack map[*Sym]struct{}
Outer *Node // outer func for closure
Ntype *Node // signature
Top int // top context (Ecall, Eproc, etc)