mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: args no longer live until end-of-function
We're dropping this behavior in favor of runtime.KeepAlive. Implement runtime.KeepAlive as an intrinsic. Update #15843 Change-Id: Ib60225bd30d6770ece1c3c7d1339a06aa25b1cbc Reviewed-on: https://go-review.googlesource.com/28310 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
faf611a07a
commit
ca4089ad62
8 changed files with 25 additions and 69 deletions
|
|
@ -77,7 +77,6 @@ type Node struct {
|
|||
|
||||
const (
|
||||
hasBreak = 1 << iota
|
||||
notLiveAtEnd
|
||||
isClosureVar
|
||||
isOutputParamHeapAddr
|
||||
noInline // used internally by inliner to indicate that a function call should not be inlined; set for OCALLFUNC and OCALLMETH only
|
||||
|
|
@ -93,16 +92,6 @@ func (n *Node) SetHasBreak(b bool) {
|
|||
n.flags &^= hasBreak
|
||||
}
|
||||
}
|
||||
func (n *Node) NotLiveAtEnd() bool {
|
||||
return n.flags¬LiveAtEnd != 0
|
||||
}
|
||||
func (n *Node) SetNotLiveAtEnd(b bool) {
|
||||
if b {
|
||||
n.flags |= notLiveAtEnd
|
||||
} else {
|
||||
n.flags &^= notLiveAtEnd
|
||||
}
|
||||
}
|
||||
func (n *Node) isClosureVar() bool {
|
||||
return n.flags&isClosureVar != 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue