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
[JSC] ResolveNode can't always skip the extra move #10853
[JSC] ResolveNode can't always skip the extra move #10853
Conversation
EWS run on previous version of this PR (hash 79b3eb5) |
79b3eb5
to
e334508
Compare
EWS run on previous version of this PR (hash e334508) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
let b=((a=b),{t(){b}}) | ||
}catch{ | ||
} | ||
a._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To verify I understand the bug correctly, without this change (and with the other change), a is JSValue()
here and not the original value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's right. We evaluate a = b
(= JSValue()
) then check_tdz
throws, but we already assigned
e334508
to
9b1d9e8
Compare
EWS run on current version of this PR (hash 9b1d9e8) |
9b1d9e8
to
1c91dd0
Compare
https://bugs.webkit.org/show_bug.cgi?id=253142 rdar://106076478 Reviewed by Keith Miller. In http://commits.webkit.org/260555@main I landed an optimization avoid the extra move in ResolveNode. However, that's not valid when we actually need the TDZ check. If the check fails, we throw an exception, but we already wrote to the destination. As a compromise, we still avoid the move unless we actually need the TDZ check. * JSTests/stress/tdz-check-catch-read.js: Added. (f): * Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp: (JSC::ResolveNode::emitBytecode): Canonical link: https://commits.webkit.org/261006@main
1c91dd0
to
e7b74be
Compare
Committed 261006@main (e7b74be): https://commits.webkit.org/261006@main Reviewed commits have been landed. Closing PR #10853 and removing active labels. |
e7b74be
9b1d9e8
π§ͺ ios-wk2π§ͺ api-iosπ§ͺ mac-AS-debug-wk2