-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[JSC] Align sloppy mode f() = 1 behavior with other engines
#44364
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
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
rkirsling:eng/JSC-Align-sloppy-mode-f-1-behavior-with-other-engines
Apr 23, 2025
Merged
[JSC] Align sloppy mode f() = 1 behavior with other engines
#44364
webkit-commit-queue
merged 1 commit into
WebKit:main
from
rkirsling:eng/JSC-Align-sloppy-mode-f-1-behavior-with-other-engines
Apr 23, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
|
EWS run on previous version of this PR (hash 97b75ed) Details |
97b75ed to
46e2312
Compare
Collaborator
|
EWS run on previous version of this PR (hash 46e2312) Details |
Constellation
approved these changes
Apr 23, 2025
46e2312 to
637e395
Compare
Collaborator
|
EWS run on current version of this PR (hash 637e395) Details |
https://bugs.webkit.org/show_bug.cgi?id=291882 Reviewed by Yusuke Suzuki. In tc39/ecma262#3568, we'll finally be specifying the web reality that `f() = 1` is not an early error in sloppy mode. JSC's behavior on this was mostly aligned with SM/V8's back in https://commits.webkit.org/212076@main, but there is one outstanding discrepancy to resolve: SM/V8 both call the function before throwing a ReferenceError. This patch resolves said discrepancy, which applies to not only =, but also += and kin (excluding logical assignment), ++ / --, and for-in/of. * JSTests/ChakraCore/test/Function/call1.baseline-jsc: * JSTests/ChakraCore/test/LetConst/tdz1.baseline-jsc: * JSTests/stress/sloppy-mode-function-call-assignment-targets.js: Added. * LayoutTests/js/modify-non-references-expected.txt: * LayoutTests/js/parser-syntax-check-expected.txt: * LayoutTests/js/script-tests/modify-non-references.js: * LayoutTests/svg/dom/SVGTransformList-anim-read-only-expected.txt: * Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp: (JSC::PostfixNode::emitBytecode): (JSC::PrefixNode::emitBytecode): (JSC::AssignErrorNode::emitBytecode): (JSC::ForInNode::emitBytecode): (JSC::ForOfNode::emitBytecode): * Source/JavaScriptCore/parser/ASTBuilder.h: (JSC::ASTBuilder::makeAssignNode): * Source/JavaScriptCore/parser/NodeConstructors.h: (JSC::AssignErrorNode::AssignErrorNode): * Source/JavaScriptCore/parser/Nodes.h: * Source/JavaScriptCore/parser/Parser.cpp: (JSC::Parser<LexerType>::isSimpleAssignmentTarget): Canonical link: https://commits.webkit.org/293996@main
637e395 to
d8f1247
Compare
Collaborator
|
Committed 293996@main (d8f1247): https://commits.webkit.org/293996@main Reviewed commits have been landed. Closing PR #44364 and removing active labels. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
JavaScriptCore
For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
d8f1247
637e395
🧪 wpe-wk2🧪 ios-wk2🧪 mac-AS-debug-wk2🧪 gtk-wk2🧪 mac-intel-wk2