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
{{ message }}
Repository navigation
More precise livenes analysis for locals under Asyncify #9038
Actually it sounds like this would not be enough to fix the issue because the externref is always live the suspension point in my case (emscripten_promise_ref_await_unchecked(promise)).
x = y + 10; // x is live
*z = x; // x stops being live
foo(x); // x is passed to foo, but not live after it, so when re-winding we can just pass null/zero and no need to save x
I think we can avoid saving x in this case too, but the rewind logic might get a lot more complex :(
Activity
sbc100 commentedon Aug 24, 2026
Actually it sounds like this would not be enough to fix the issue because the externref is always live the suspension point in my case (
emscripten_promise_ref_await_unchecked(promise)).sbc100 commentedon Aug 24, 2026
CC @tlively @kripken
kripken commentedon Aug 25, 2026
Fixing that TODO would help the case where a local stops being live in the middle of a basic block. E.g.
If the
x = y + 20were deleted,xwould be live duringfoo().This would make Asyncify more powerful, but probably not by a lot, I'd guess. You'd have to get really lucky to benefit.
sbc100 commentedon Aug 25, 2026
How about this case:
I think we can avoid saving x in this case too, but the rewind logic might get a lot more complex :(
kripken commentedon Aug 25, 2026
Ah, yes, I suppose we'd need to consider
xas alive if it is sent to the function call.