mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: remove Node.Alloc
$ sizeof -p cmd/compile/internal/gc Node Node 240 $ Change-Id: Id12710c480ed4e0a5bf4f5006f6bd56ef91a2af1 Reviewed-on: https://go-review.googlesource.com/10525 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
71080fbb9e
commit
60e5f5bdff
7 changed files with 34 additions and 30 deletions
|
|
@ -778,17 +778,17 @@ func slicelit(ctxt int, n *Node, var_ *Node, init **NodeList) {
|
|||
|
||||
// set auto to point at new temp or heap (3 assign)
|
||||
var a *Node
|
||||
if n.Alloc != nil {
|
||||
if x := prealloc[n]; x != nil {
|
||||
// temp allocated during order.c for dddarg
|
||||
n.Alloc.Type = t
|
||||
x.Type = t
|
||||
|
||||
if vstat == nil {
|
||||
a = Nod(OAS, n.Alloc, nil)
|
||||
a = Nod(OAS, x, nil)
|
||||
typecheck(&a, Etop)
|
||||
*init = list(*init, a) // zero new temp
|
||||
}
|
||||
|
||||
a = Nod(OADDR, n.Alloc, nil)
|
||||
a = Nod(OADDR, x, nil)
|
||||
} else if n.Esc == EscNone {
|
||||
a = temp(t)
|
||||
if vstat == nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue