}
}
- // To satisfy toolstash -cmp, preserve the unsorted
- // declaration order so we can emit the ATYPE instructions in
- // the same order.
- // TODO(mdempsky): Remove in followup CL.
- Curfn.Func.UnsortedDcls = append([]*Node(nil), Curfn.Func.Dcl...)
-
if f.Config.NeedsFpScratch {
scratchFpMem = temp(Types[TUINT64])
scratchFpMem.Used = scratchUsed
}
}
- for _, n := range fn.Func.UnsortedDcls {
+ for _, n := range fn.Func.Dcl {
if n.Op != ONAME { // might be OTYPE or OLITERAL
continue
}
switch n.Class {
case PAUTO:
if !n.Used {
- // Hacks to appease toolstash -cmp.
- // TODO(mdempsky): Remove in followup CL.
- pcloc++
- Pc.Pc++
- Linksym(ngotype(n))
continue
}
fallthrough
_32bit uintptr // size on 32bit platforms
_64bit uintptr // size on 64bit platforms
}{
- {Func{}, 108, 192}, // TODO(mdempsky): Change back to 96, 168 in followup CL.
+ {Func{}, 96, 168},
{Name{}, 52, 80},
{Node{}, 92, 144},
{Sym{}, 60, 112},
// Func holds Node fields used only with function-like nodes.
type Func struct {
- Shortname *Node
- Enter Nodes // for example, allocate and initialize memory for escaping parameters
- Exit Nodes
- Cvars Nodes // closure params
- Dcl []*Node // autodcl for this func/closure
- UnsortedDcls []*Node // autodcl for this func/closure
- Inldcl Nodes // copy of dcl for use in inlining
- Closgen int
- Outerfunc *Node // outer function (for closure)
- FieldTrack map[*Sym]struct{}
- Ntype *Node // signature
- Top int // top context (Ecall, Eproc, etc)
- Closure *Node // OCLOSURE <-> ODCLFUNC
- FCurfn *Node
- Nname *Node
+ Shortname *Node
+ Enter Nodes // for example, allocate and initialize memory for escaping parameters
+ Exit Nodes
+ Cvars Nodes // closure params
+ Dcl []*Node // autodcl for this func/closure
+ Inldcl Nodes // copy of dcl for use in inlining
+ Closgen int
+ Outerfunc *Node // outer function (for closure)
+ FieldTrack map[*Sym]struct{}
+ Ntype *Node // signature
+ Top int // top context (Ecall, Eproc, etc)
+ Closure *Node // OCLOSURE <-> ODCLFUNC
+ FCurfn *Node
+ Nname *Node
Inl Nodes // copy of the body for use in inlining
InlCost int32