]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: split Addrconst out of Naddr
authorMatthew Dempsky <mdempsky@google.com>
Thu, 29 Sep 2016 23:22:43 +0000 (16:22 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 30 Sep 2016 04:24:22 +0000 (04:24 +0000)
commitbb2bbfa08630c65b8751159515f3a22ec5f933ee
tree19c39859a86cc2bc8998c55a025bda726b8254b5
parent214bf6809791170b88b41249850f2f01534725c4
cmd/compile: split Addrconst out of Naddr

There are only three Prog types that we were creating with an OLITERAL
Node: ATEXT, ATYPE, and AFUNCDATA. ATEXT's value we later overwrite in
defframe, and ATYPE's we don't even need. AFUNCDATA only needs integer
constants, so get rid of all the non-int constant logic and skip
creating a Node representation for the constant.

While here, there are a few other Naddr code paths that are no longer
needed, so turn those into Fatalfs.

Passes toolstash/buildall.

Change-Id: I4cc9b92c3011890afd4f31ebeba8b1b42b753cab
Reviewed-on: https://go-review.googlesource.com/30074
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/gsubr.go
src/cmd/compile/internal/gc/pgen.go