mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: remove uses of dummy
Per https://developers.google.com/style/inclusive-documentation, since we are editing some of this code anyway and it is easier to put the cleanup in a separate CL. Change-Id: Ib6b851f43f9cc0a57676564477d4ff22abb1cee5 Reviewed-on: https://go-review.googlesource.com/c/go/+/273106 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
4a6b4fd139
commit
9e0e43d84d
15 changed files with 100 additions and 101 deletions
|
|
@ -692,10 +692,10 @@ func (s *state) Warnl(pos src.XPos, msg string, args ...interface{}) { s.f.Warnl
|
|||
func (s *state) Debug_checknil() bool { return s.f.Frontend().Debug_checknil() }
|
||||
|
||||
var (
|
||||
// dummy node for the memory variable
|
||||
// marker node for the memory variable
|
||||
memVar = Node{Op: ONAME, Sym: &types.Sym{Name: "mem"}}
|
||||
|
||||
// dummy nodes for temporary variables
|
||||
// marker nodes for temporary variables
|
||||
ptrVar = Node{Op: ONAME, Sym: &types.Sym{Name: "ptr"}}
|
||||
lenVar = Node{Op: ONAME, Sym: &types.Sym{Name: "len"}}
|
||||
newlenVar = Node{Op: ONAME, Sym: &types.Sym{Name: "newlen"}}
|
||||
|
|
@ -4793,7 +4793,7 @@ func (s *state) getMethodClosure(fn *Node) *ssa.Value {
|
|||
n2.SetClass(PFUNC)
|
||||
// n2.Sym already existed, so it's already marked as a function.
|
||||
n2.Pos = fn.Pos
|
||||
n2.Type = types.Types[TUINT8] // dummy type for a static closure. Could use runtime.funcval if we had it.
|
||||
n2.Type = types.Types[TUINT8] // fake type for a static closure. Could use runtime.funcval if we had it.
|
||||
return s.expr(n2)
|
||||
}
|
||||
|
||||
|
|
@ -6054,7 +6054,7 @@ func (s *state) mem() *ssa.Value {
|
|||
|
||||
func (s *state) addNamedValue(n *Node, v *ssa.Value) {
|
||||
if n.Class() == Pxxx {
|
||||
// Don't track our dummy nodes (&memVar etc.).
|
||||
// Don't track our marker nodes (&memVar etc.).
|
||||
return
|
||||
}
|
||||
if n.IsAutoTmp() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue