1
0
mirror of https://github.com/golang/go synced 2024-11-05 11:36:10 -07:00
go/cmd
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
..
cover go.tools/cover: split parsing code out from cmd/cover 2013-12-03 20:55:21 -08:00
godoc godoc: add ability to change or disable the display of search results. 2014-01-06 09:51:01 -05:00
goimports go.tools/cmd/goimports: Fixed url 2014-01-02 11:02:13 -08:00
gotype go.tools/go/types: move gcimporter to its own package 2013-11-14 14:11:43 -08:00
html2article go.tools/cmd/html2article: move command from go.blog repository 2013-09-27 10:40:53 +10:00
oracle go.tools/oracle: implements: now shows whole-program implements relation for selected type. 2013-12-13 18:00:55 -05:00
ssadump go.tools/ssa: use correct word size for GOARCH during type checking, interpretation. 2014-01-08 14:46:17 -05:00
vet go.tools/cmd/vet: improve error message for build tag problems 2013-12-18 16:06:56 -08:00