mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile,runtime: remove ambiguously live logic
The previous CL introduced stack objects. This CL removes the old ambiguously live liveness analysis. After this CL we're relying on stack objects exclusively. Update a bunch of liveness tests to reflect the new world. Fixes #22350 Change-Id: I739b26e015882231011ce6bc1a7f426049e59f31 Reviewed-on: https://go-review.googlesource.com/c/134156 Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
cbafcc55e8
commit
9a8372f8bd
16 changed files with 375 additions and 334 deletions
|
|
@ -839,6 +839,10 @@ func slicelit(ctxt initContext, n *Node, var_ *Node, init *Nodes) {
|
|||
a = nod(OAS, x, nil)
|
||||
a = typecheck(a, Etop)
|
||||
init.Append(a) // zero new temp
|
||||
} else {
|
||||
// Declare that we're about to initialize all of x.
|
||||
// (Which happens at the *vauto = vstat below.)
|
||||
init.Append(nod(OVARDEF, x, nil))
|
||||
}
|
||||
|
||||
a = nod(OADDR, x, nil)
|
||||
|
|
@ -849,6 +853,8 @@ func slicelit(ctxt initContext, n *Node, var_ *Node, init *Nodes) {
|
|||
a = typecheck(a, Etop)
|
||||
init.Append(a) // zero new temp
|
||||
a = a.Left
|
||||
} else {
|
||||
init.Append(nod(OVARDEF, a, nil))
|
||||
}
|
||||
|
||||
a = nod(OADDR, a, nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue