]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix naming of decomposed structs
authorKeith Randall <khr@golang.org>
Fri, 1 Apr 2016 04:24:10 +0000 (21:24 -0700)
committerKeith Randall <khr@golang.org>
Mon, 11 Apr 2016 17:11:23 +0000 (17:11 +0000)
commitb04e145248d5d3721a41d4bb26704fdb43caaf38
tree2179b4c4ebef5291e8bdf4e1bdedb760543d9bd3
parent6c6089b3fdba9eb0cff863a03074dbac47c92f63
cmd/compile: fix naming of decomposed structs

When a struct is SSAable, we will name its component parts
by their field names.  For example,
type T struct {
     a, b, c int
}
If we ever need to spill a variable x of type T, we will
spill its individual components to variables named x.a, x.b,
and x.c.

Change-Id: I857286ff1f2597f2c4bbd7b4c0b936386fb37131
Reviewed-on: https://go-review.googlesource.com/21389
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/type.go
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/decompose.go
src/cmd/compile/internal/ssa/export_test.go
src/cmd/compile/internal/ssa/type.go
src/cmd/compile/internal/ssa/type_test.go