var vars []*dwarf.Var
ssaVars := make(map[*Node]bool)
- for varID := range debugInfo.Vars {
- n := debugInfo.Vars[varID].(*Node)
+ for varID, dvar := range debugInfo.Vars {
+ n := dvar.(*Node)
ssaVars[n] = true
for _, slot := range debugInfo.VarSlots[varID] {
ssaVars[debugInfo.Slots[slot].N.(*Node)] = true
return nil, 0
}
- var n *Node
switch a := v.Aux.(type) {
case nil, *obj.LSym:
// ok, but no node
+ return nil, e
case *Node:
- n = a
+ return a, e
default:
Fatalf("weird aux: %s", v.LongString())
+ return nil, e
}
-
- return n, e
}
// Constructs a new liveness structure used to hold the global state of the
in = append(in, d)
}
- var d *Node
for _, t := range f.Params().Fields().Slice() {
- d = nod(ODCLFIELD, nil, nil)
+ d := nod(ODCLFIELD, nil, nil)
d.Type = t.Type
d.SetIsddd(t.Isddd())
in = append(in, d)
var out []*Node
for _, t := range f.Results().Fields().Slice() {
- d = nod(ODCLFIELD, nil, nil)
+ d := nod(ODCLFIELD, nil, nil)
d.Type = t.Type
out = append(out, d)
}
return dwarfScopes
}
-type pcsByPC []scopedPCs
-
-func (s pcsByPC) Len() int { return len(s) }
-func (s pcsByPC) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s pcsByPC) Less(i, j int) bool {
- return s[i].start < s[j].start
-}
-
type varsByScopeAndOffset struct {
vars []*dwarf.Var
scopes []ScopeID