aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/export_test.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2017-09-18 14:53:56 -0700
committerKeith Randall <khr@golang.org>2017-09-19 22:03:10 +0000
commit1787ced8943d0c97ff9583d3f094327564b45618 (patch)
treea7da862e7d8541c955ceedc7c5b0b30c02df0a9f /src/cmd/compile/internal/ssa/export_test.go
parent0a48185b4383fac8d260112efa261112f3d41ee2 (diff)
downloadgo-1787ced8943d0c97ff9583d3f094327564b45618.tar.gz
go-1787ced8943d0c97ff9583d3f094327564b45618.zip
cmd/compile: remove Symbol wrappers from Aux fields
We used to have {Arg,Auto,Extern}Symbol structs with which we wrapped a *gc.Node or *obj.LSym before storing them in the Aux field of an ssa.Value. This let the SSA part of the compiler distinguish between autos and args, for example. We no longer need the wrappers as we can query the underlying objects directly. There was also some sloppy usage, where VarDef had a *gc.Node directly in its Aux field, whereas the use of that variable had that *gc.Node wrapped in an AutoSymbol. Thus the Aux fields didn't match (using ==) when they probably should. This sloppy usage cleanup is the only thing in the CL that changes the generated code - we can get rid of some more unused auto variables if the matching happens reliably. Removing this wrapper also lets us get rid of the varsyms cache (which was used to prevent wrapping the same *gc.Node twice). Change-Id: I0dedf8f82f84bfee413d310342b777316bd1d478 Reviewed-on: https://go-review.googlesource.com/64452 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/export_test.go')
-rw-r--r--src/cmd/compile/internal/ssa/export_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/export_test.go b/src/cmd/compile/internal/ssa/export_test.go
index 54cd96beaa..ad69463bdd 100644
--- a/src/cmd/compile/internal/ssa/export_test.go
+++ b/src/cmd/compile/internal/ssa/export_test.go
@@ -75,6 +75,10 @@ func (d *DummyAuto) String() string {
return d.s
}
+func (d *DummyAuto) StorageClass() StorageClass {
+ return ClassAuto
+}
+
func (DummyFrontend) StringData(s string) interface{} {
return nil
}