tools/go/ssa
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
..
interp go/ssa/interp: fix bug causing subelements of aggregates to change address. 2015-03-13 18:22:38 +00:00
ssautil go/ssa: simplify TypesWithMethodSets 2015-01-22 14:03:32 +00:00
testdata go/ssa: simplify make([]T, len, k) to new([k]T)[:len] for constant k 2014-12-29 21:06:17 +00:00
blockopt.go go.tools/go/ssa: don't attempt fusion on single-pred blocks with φ-nodes 2014-04-24 09:08:21 -04:00
builder.go go/ssa: treat declared init functions less specially 2015-03-05 20:09:21 +00:00
builder_test.go go/loader: rename SourceImports flag to ImportFromBinary and invert sense 2015-02-23 23:01:10 +00:00
const.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
create.go go/ssa: treat declared init functions less specially 2015-03-05 20:09:21 +00:00
doc.go tools: add import comments. 2014-12-09 22:42:16 +00:00
dom.go go.tools/go/ssa: use bytes.Buffer instead of io.Writer. 2014-01-28 17:48:10 -05:00
emit.go go/ssa: simplify TypesWithMethodSets 2015-01-22 14:03:32 +00:00
example_test.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
func.go Extend duplicate check to exported wrappers 2015-01-23 18:36:53 +00:00
lift.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
lvalue.go go/ssa: add position info to all Load/Store instructions 2014-12-29 23:03:32 +00:00
methods.go go/ssa: simplify TypesWithMethodSets 2015-01-22 14:03:32 +00:00
mode.go go/ssa: standardize parsing of BuilderMode flags. 2015-02-18 18:34:24 +00:00
print.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
sanity.go go/ssa: treat declared init functions less specially 2015-03-05 20:09:21 +00:00
source.go go/ssa: treat declared init functions less specially 2015-03-05 20:09:21 +00:00
source_test.go astutil: move to go/ast/astutil 2015-01-13 15:47:47 +00:00
ssa.go go/ssa: treat declared init functions less specially 2015-03-05 20:09:21 +00:00
stdlib_test.go go/loader: rename SourceImports flag to ImportFromBinary and invert sense 2015-02-23 23:01:10 +00:00
testmain.go go/ssa: add list-of-tests constant to generated testmain package 2015-01-22 22:45:41 +00:00
testmain_test.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
util.go go/types: expose IsInterface predicate, eliminating 6 copies 2015-01-21 18:49:27 +00:00
wrappers.go go/ssa: canonicalize receiver types to avoid creating duplicate thunk functions 2014-12-29 17:50:45 +00:00