cmd/compile: move Node.Vargen, Node.Iota into Node.Name
$ sizeof -p cmd/compile/internal/gc Node
Node 192
$
Change-Id: I8f0c1a3cc2bf9c8eff02bbd8d061ff98affc9eb0
Reviewed-on: https://go-review.googlesource.com/10529
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
diff --git a/src/cmd/compile/internal/gc/dcl.go b/src/cmd/compile/internal/gc/dcl.go
index 2a88861..0c50cb4 100644
--- a/src/cmd/compile/internal/gc/dcl.go
+++ b/src/cmd/compile/internal/gc/dcl.go
@@ -229,7 +229,7 @@
s.Block = block
s.Lastlineno = int32(parserline())
s.Def = n
- n.Vargen = int32(gen)
+ n.Name.Vargen = int32(gen)
n.Funcdepth = Funcdepth
n.Class = uint8(ctxt)
@@ -423,9 +423,8 @@
// walkdef will check s->def again once
// all the input source has been processed.
n = newname(s)
-
n.Op = ONONAME
- n.Iota = iota_ // save current iota value in const declarations
+ n.Name.Iota = iota_ // save current iota value in const declarations
}
if Curfn != nil && n.Funcdepth > 0 && n.Funcdepth != Funcdepth && n.Op == ONAME {
@@ -624,7 +623,7 @@
declare(n.Left, PPARAM)
if dclcontext == PAUTO {
vargen++
- n.Left.Vargen = int32(vargen)
+ n.Left.Name.Vargen = int32(vargen)
}
}
}
@@ -641,7 +640,7 @@
declare(n.Left, PPARAM)
if dclcontext == PAUTO {
vargen++
- n.Left.Vargen = int32(vargen)
+ n.Left.Name.Vargen = int32(vargen)
}
}
}
@@ -688,7 +687,7 @@
declare(n.Left, PPARAMOUT)
if dclcontext == PAUTO {
i++
- n.Left.Vargen = int32(i)
+ n.Left.Name.Vargen = int32(i)
}
}
}