go/ssa: emit DebugRefs for x, y = z() assignments
This would cause oracle callee lookup failures when the RHS is an invoke-style call. Fixes golang/go#12999 Change-Id: Ifd561c4e7bf26f57ace5f62afac746b926c70993 Reviewed-on: https://go-review.googlesource.com/16210 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
f941d540e3
commit
b6b32a4fbf
|
@ -1054,6 +1054,7 @@ func (b *builder) assignStmt(fn *Function, lhss, rhss []ast.Expr, isDef bool) {
|
||||||
} else {
|
} else {
|
||||||
// e.g. x, y = pos()
|
// e.g. x, y = pos()
|
||||||
tuple := b.exprN(fn, rhss[0])
|
tuple := b.exprN(fn, rhss[0])
|
||||||
|
emitDebugRef(fn, rhss[0], tuple, false)
|
||||||
for i, lval := range lvals {
|
for i, lval := range lvals {
|
||||||
lval.store(fn, emitExtract(fn, tuple, i))
|
lval.store(fn, emitExtract(fn, tuple, i))
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,11 @@ func f(spilled, unspilled int) {
|
||||||
_ = /*@Parameter*/ (unspilled)
|
_ = /*@Parameter*/ (unspilled)
|
||||||
_ = /*@<nil>*/ (1 + 2) // (constant)
|
_ = /*@<nil>*/ (1 + 2) // (constant)
|
||||||
i := 0
|
i := 0
|
||||||
|
|
||||||
|
f := func() (int, int) { return 0, 0 }
|
||||||
|
|
||||||
/*@Call*/ (print( /*@BinOp*/ (i + 1)))
|
/*@Call*/ (print( /*@BinOp*/ (i + 1)))
|
||||||
|
_, _ = /*@Call*/ (f())
|
||||||
ch := /*@MakeChan*/ (make(chan int))
|
ch := /*@MakeChan*/ (make(chan int))
|
||||||
/*@UnOp*/ (<-ch)
|
/*@UnOp*/ (<-ch)
|
||||||
x := /*@UnOp*/ (<-ch)
|
x := /*@UnOp*/ (<-ch)
|
||||||
|
|
Loading…
Reference in New Issue