]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: remove Orig, SetOrig from Node interface
authorRuss Cox <rsc@golang.org>
Sat, 28 Nov 2020 05:36:44 +0000 (00:36 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 30 Nov 2020 18:33:51 +0000 (18:33 +0000)
commit171787efcd7a59c90f05a191c74bf5844f1c542a
tree5121711829f10c9a896e000688612da87ca97d49
parent79a3d5ce158de1696256d58aa563ca7cd30f6c3f
[dev.regabi] cmd/compile: remove Orig, SetOrig from Node interface

These are only needed for a few opcodes, and we can avoid
wasting storage in every implementation by using the extension
interface pattern with a helper function for access.

Of course, in the current codebase, there is only one Node
implementation (*node) and it has these methods, so there
is no danger of a functional change in this particular CL.

Passes buildall w/ toolstash -cmp.

Change-Id: I440c6c232f1fe7b56b852a00dc530f8f49a6b12d
Reviewed-on: https://go-review.googlesource.com/c/go/+/274089
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/const.go
src/cmd/compile/internal/gc/escape.go
src/cmd/compile/internal/gc/gen.go
src/cmd/compile/internal/gc/iexport.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/ir/fmt.go
src/cmd/compile/internal/ir/node.go