]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix Node.Etype overloading
authorMatthew Dempsky <mdempsky@google.com>
Thu, 8 Mar 2018 12:18:18 +0000 (04:18 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 9 Mar 2018 21:44:35 +0000 (21:44 +0000)
commite4de522c95d49d943b99740aa4a1361357dcf869
treebe03be1a2bfee6a71302a406c1c94d6cf969dd03
parent91102bf723c2e0912cbc4621f03827c0c3062128
cmd/compile: fix Node.Etype overloading

Add helper methods that validate n.Op and convert to/from the
appropriate type.

Notably, there was a lot of code in walk.go that thought setting
Etype=1 on an OADDR node affected escape analysis.

Passes toolstash-check.

TBR=marvin

Change-Id: Ieae7c67225c1459c9719f9e6a748a25b975cf758
Reviewed-on: https://go-review.googlesource.com/99535
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/alg.go
src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/bimport.go
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/inl.go
src/cmd/compile/internal/gc/noder.go
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/syntax.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/gc/universe.go
src/cmd/compile/internal/gc/walk.go