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:
Keith Randall 2016-08-31 15:17:02 -07:00
parent faf611a07a
commit ca4089ad62
8 changed files with 25 additions and 69 deletions

View file

@ -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&notLiveAtEnd != 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
}