tools/go/ssa/interp
Alan Donovan 6db8a00c75 go.tools/go/ssa: write zero value when storing a composite literal in-place if necessary
Previously, statements such as:

type T struct { a, b int }
[...]
x = T{}
x = T{b: 1}

would only affect the aggregate members mentioned in the composite
literal and leave the other members unchanged. This change causes us
to write a zero value to the target in cases where the target is not
already known to hold a zero value and the number of initializers in
the composite literal differs from the number of elements in its type.

Author: Peter Collingbourne.  (hg clpatch got confused)

LGTM=pcc
R=pcc
CC=golang-codereviews
https://golang.org/cl/107980045
2014-06-16 12:29:30 -04:00
..
testdata go.tools/go/ssa: write zero value when storing a composite literal in-place if necessary 2014-06-16 12:29:30 -04:00
external.go go.tools/go/ssa/interp: minor cleanup 2014-04-15 15:37:32 -04:00
external_darwin.go go/ssa/interp: add syscall.Sysctl to Darwin. 2014-03-04 13:34:45 -05:00
external_freebsd.go go.tools/go/ssa/interp: add wrappers for Sysctl{,Uint32} intrinsics on FreeBSD 2014-04-18 15:58:12 -04:00
external_plan9.go go.tools/ssa/interp: add intrinsics for (*sync.Pool).{Get,Put}. 2014-01-27 13:11:16 -05:00
external_unix.go go.tools/ssa/interp: add intrinsics for (*sync.Pool).{Get,Put}. 2014-01-27 13:11:16 -05:00
external_windows.go go.tools/ssa/interp: add intrinsics for (*sync.Pool).{Get,Put}. 2014-01-27 13:11:16 -05:00
interp.go go.tools/go/ssa: emit a recover block if the function's results are unnamed 2014-06-13 13:08:35 -04:00
interp_test.go go.tools/go/ssa/interp: fix tests broken by recent runtime changes. 2014-02-18 15:37:24 -05:00
map.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
ops.go go/ssa: make Builtin capable of representing non-spec-defined intrinsics. 2014-06-13 17:34:07 -04:00
reflect.go go/ssa: cleanup: make NewFunction a member of *Program. 2014-06-11 14:03:40 -04:00
value.go go.tools/go/types/typeutil: new package for type utilities. 2014-02-19 13:32:36 -05:00