You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[move-function] Implement the false conditional test for move-function
I forgot to include this in the previous test commit I updated. This is a
particularly important one since it shows given the following code:
```
let k = Klass()
if alwaysFalse() {
let _ = _move(k)
}
// <== (A)
```
that at point A, the debugger views k as being uninitialized. This is the
correct behavior since:
1. The lifetime of k needs to be defined by static PC regions in the binary. We
can not model the notion that k's availability is control dependent on the
conditional alwaysFalse unless we cloned code. So fundamentally, we have to be
conservative and say that since (A) is reachable from the _move that the value
isn't available.
2. move semantics means that k can not be used at any point reachable from the
_move. Thus we know that k can not have any uses after the conditional. Thus it
is reasonable that k would not necessarily be available in the debugger at that
point since it is guaranteed to not have any later uses in the function.
Thus we are forced by 1 into this solution with the solice of 2 that it does fit
the model.
0 commit comments