tools/ssa/interp
Alan Donovan 5612f0615f go.tools/ssa: use correct word size for GOARCH during type checking, interpretation.
Also report an error for "cross-interpretation": not supported
due to the interpreter's assumption that host and target
{int,uint,uintptr} are the same.  (Too tedious and messy to fix.)

Tested manually:

% cat d.go
package main
const m = ^uintptr(0)
const w = m>>8&1 + m>>16&1 + m>>32&1
func main() { println(m, w) }

% ./ssadump -build=P -run d.go
package main:
  const m          m = 18446744073709551615:uintptr
  const w          w = 3:uintptr
18446744073709551615 3

% GOARCH=386 ./ssadump -build=P -run d.go
package main:
  const m          m = 4294967295:uintptr
  const w          w = 2:uintptr
Error: Cross-interpretation is not yet supported (target has GOARCH 386, interpreter has amd64).

Fixes golang/go#7080

R=gri
CC=golang-codereviews
https://golang.org/cl/49070043
2014-01-08 14:46:17 -05:00
..
testdata go.tools/ssa: a blocking select's implicit "default" case should runtime-panic, not fall through. 2014-01-02 15:12:23 -05:00
external.go go.tools/ssa/interp: fix Plan 9 build for Brad 2013-12-20 15:20:51 -08:00
external_plan9.go go.tools/ssa/interp: fix Plan 9 build for Brad 2013-12-20 15:20:51 -08:00
external_unix.go go.tools/ssa/interp: fix Plan 9 build for Brad 2013-12-20 15:20:51 -08:00
external_windows.go go.tools/ssa/interp: fix Plan 9 build for Brad 2013-12-20 15:20:51 -08:00
interp.go go.tools/ssa: use correct word size for GOARCH during type checking, interpretation. 2014-01-08 14:46:17 -05:00
interp_test.go go.tools/ssa: use correct word size for GOARCH during type checking, interpretation. 2014-01-08 14:46:17 -05:00
map.go go.tools/ssa/interp: fixes to equivalence relations. 2013-09-16 15:22:19 -04:00
ops.go go.tools/ssa: use correct word size for GOARCH during type checking, interpretation. 2014-01-08 14:46:17 -05:00
reflect.go go.tools/ssa: use correct word size for GOARCH during type checking, interpretation. 2014-01-08 14:46:17 -05:00
value.go go.tools/ssa/interp: improve print() on interfaces, and log message for panic. 2013-11-05 13:03:14 -05:00