}
n := nod(ONONAME, nil, nil)
n.Sym = s
- n.SetAddable(true)
n.Xoffset = 0
return n
}
c.SetIsClosureVar(true)
c.SetIsDDD(n.IsDDD())
c.Name.Defn = n
- c.SetAddable(false)
// Link into list of active closure variables.
// Popped from list in func closurebody.
// and substitute that copy into the function declaration list
// so that analyses of the local (on-stack) variables use it.
stackcopy := newname(n.Sym)
- stackcopy.SetAddable(false)
stackcopy.Type = n.Type
stackcopy.Xoffset = n.Xoffset
stackcopy.SetClass(n.Class())
func (n *Node) jconv(s fmt.State, flag FmtFlag) {
c := flag & FmtShort
- if c == 0 && n.Addable() {
- fmt.Fprintf(s, " a(%v)", n.Addable())
- }
-
if c == 0 && n.Name != nil && n.Name.Vargen != 0 {
fmt.Fprintf(s, " g(%d)", n.Name.Vargen)
}
n := nod(OADDR, asNode(s.Def), nil)
n.Type = types.NewPtr(asNode(s.Def).Type)
- n.SetAddable(true)
n.SetTypecheck(1)
return n
}
n := nod(OADDR, asNode(s.Def), nil)
n.Type = types.NewPtr(asNode(s.Def).Type)
- n.SetAddable(true)
n.SetTypecheck(1)
return n
}
}
z := nod(OADDR, asNode(s.Def), nil)
z.Type = types.NewPtr(types.Types[TUINT8])
- z.SetAddable(true)
z.SetTypecheck(1)
return z
}
}
func (n *Node) isSimpleName() bool {
- return n.Op == ONAME && n.Addable() && n.Class() != PAUTOHEAP && n.Class() != PEXTERN
+ return n.Op == ONAME && n.Class() != PAUTOHEAP && n.Class() != PEXTERN
}
func litas(l *Node, r *Node, init *Nodes) {
switch n.Op {
case ONAME:
*nam = *n
- return n.Addable()
+ return true
case ODOT:
if !stataddr(nam, n.Left) {
n.Sym = s
n.Type = t
n.SetClass(PAUTO)
- n.SetAddable(true)
n.Esc = EscNever
n.Name.Curfn = e.curfn
e.curfn.Func.Dcl = append(e.curfn.Func.Dcl, n)
n.Orig = n
n.Sym = s
- n.SetAddable(true)
return n
}
_, nodeNonNil // guaranteed to be non-nil
_, nodeTransient // storage can be reused immediately after this statement
_, nodeBounded // bounds check unnecessary
- _, nodeAddable // addressable
_, nodeHasCall // expression contains a function call
_, nodeLikely // if statement condition likely
_, nodeHasVal // node.E contains a Val
func (n *Node) NonNil() bool { return n.flags&nodeNonNil != 0 }
func (n *Node) Transient() bool { return n.flags&nodeTransient != 0 }
func (n *Node) Bounded() bool { return n.flags&nodeBounded != 0 }
-func (n *Node) Addable() bool { return n.flags&nodeAddable != 0 }
func (n *Node) HasCall() bool { return n.flags&nodeHasCall != 0 }
func (n *Node) Likely() bool { return n.flags&nodeLikely != 0 }
func (n *Node) HasVal() bool { return n.flags&nodeHasVal != 0 }
func (n *Node) SetNonNil(b bool) { n.flags.set(nodeNonNil, b) }
func (n *Node) SetTransient(b bool) { n.flags.set(nodeTransient, b) }
func (n *Node) SetBounded(b bool) { n.flags.set(nodeBounded, b) }
-func (n *Node) SetAddable(b bool) { n.flags.set(nodeAddable, b) }
func (n *Node) SetHasCall(b bool) { n.flags.set(nodeHasCall, b) }
func (n *Node) SetLikely(b bool) { n.flags.set(nodeLikely, b) }
func (n *Node) SetHasVal(b bool) { n.flags.set(nodeHasVal, b) }
n = mkcall("gorecover", n.Type, init, nod(OADDR, nodfp, nil))
case OCLOSUREVAR, OCFUNC:
- n.SetAddable(true)
case OCALLINTER, OCALLFUNC, OCALLMETH:
if n.Op == OCALLINTER {