tools/go/ssa/interp/testdata
Alan Donovan 868c429971 go/ssa/interp: fix bug causing subelements of aggregates to change address.
Since all SSA values are immutable, no value copying is required for
any operations except those that load from or store to a variable;
those operations must do an aggregate copy, i.e., descend into struct
and array elements.  All other calls to copyVal have been removed;
they were pieces of duct tape, as I had long suspected.

The descent must be based on the static type information, not the
"shape" of the dynamic value, since two reflect.Value structs may have
different internal shapes.  We clobber the true definition of
reflect.Value's underlying type, replacing it with struct{interface{},
interface{}}, which is close enough to make the load/store functions
work.

+ Test

Change-Id: I5e239d91ed0cb2a669a9f75766024fe1f9a5c347
Reviewed-on: https://go-review.googlesource.com/7532
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-03-13 18:22:38 +00:00
..
a_test.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
b_test.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
boundmeth.go go.tools/go/ssa: perform nil check when taking value of interface method. 2014-04-09 18:00:57 -04:00
callstack.go go.tools/go/ssa: name anon funcs by their enclosing func. 2014-02-28 10:18:55 -05:00
complit.go go.tools/go/ssa/interp: some fixes to tests 2014-08-07 10:57:00 -04:00
coverage.go go/ssa/interp: fix bug causing subelements of aggregates to change address. 2015-03-13 18:22:38 +00:00
defer.go go.tools/go/ssa/interp: some fixes to tests 2014-08-07 10:57:00 -04:00
fieldprom.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
ifaceconv.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
ifaceprom.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
initorder.go go.tools/go/ssa/interp: some fixes to tests 2014-08-07 10:57:00 -04:00
methprom.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
mrvchain.go go.tools/go/ssa: simplify builder.exprN now that go/types emits correct types. 2014-01-17 09:38:25 -05:00
range.go go.tools/go/ssa/interp: some fixes to tests 2014-08-07 10:57:00 -04:00
recover.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
reflect.go go/ssa/interp: delete SSA bodies from standalone functions in "reflect" 2014-12-29 17:35:17 +00:00
static.go go.tools/go/ssa/interp: some fixes to tests 2014-08-07 10:57:00 -04:00