-
Notifications
You must be signed in to change notification settings - Fork 274
Killing #return_value
behaves inconsistently
#4336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I believe the problem is that we do |
Note if you just skip the DEAD instruction then you'll get the same inaccuracy except we'll believe it may have it's old value, rather than the special dead value. The inconsistency between first and second call will remain |
Further thoughts:
|
Partial solution: #4343 |
Suppose we have
f
like:On the first call to
f
, the two arms of theif
produce value sets{ f#return_value -> { dynamic_object1 }, @inflight_exception -> { null } }
and{ @inflight_exception -> { dynamic_object2 } }
respectively. These merge "cleanly" to give{ f#return_value -> { dynamic_object1 }, @inflight_exception -> { null, dynamic_object2 } }
allowing the caller to proceed as if the return value is certainly a pointer to DO1. However, the caller then runsThis leads to a value-set
f#return_value -> { f#return_value$object }
, which is different to the value-set we had when the program started before it was referenced at all.Then when we call
f
again, our two value sets are:{ f#return_value -> { dynamic_object1 }, @inflight_exception -> { null } }
and{ f#return_value -> { f#return_value$object }, @inflight_exception -> { dynamic_object2 } }
These merge to produce
{ f#return_value -> { dynamic_object1, f#return_value$object }, @inflight_exception -> { null, dynamic_object2 } }
, and the caller's certainty thatf#return_value
has a single determined referee is suddenly gone.One of these behaviours is wrong (the two calls should behave the same): either
f#return_value
should have been initialised withf#return_value$object
, or theDEAD
should delete it from the value-set completely. But which?The text was updated successfully, but these errors were encountered: