-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] Bracket compound assignment should resolve property key at most once #25526
[JSC] Bracket compound assignment should resolve property key at most once #25526
Conversation
EWS run on previous version of this PR (hash cff3852) |
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.
I think this has a problem that it always makes the result as string while it can be a number. And we are observing perf regressions in some of JetStream2 tests. We should not do atom string generation if the input is a number, so probably some special bytecode and Baseline / DFG / FTL handling is necessary.
cff3852
to
93f81c9
Compare
EWS run on previous version of this PR (hash 93f81c9) |
93f81c9
to
fefe1af
Compare
EWS run on previous version of this PR (hash fefe1af) |
fefe1af
to
47e17cb
Compare
EWS run on previous version of this PR (hash 47e17cb) |
47e17cb
to
3ab3620
Compare
EWS run on previous version of this PR (hash 3ab3620) |
3ab3620
to
a1b832b
Compare
EWS run on current version of this PR (hash a1b832b) |
Just a reminder that this is ready for review. |
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
β¦ once https://bugs.webkit.org/show_bug.cgi?id=270563 Reviewed by Yusuke Suzuki. Just as we did for `obj[prop]++` (275531@main), we need to make sure `obj[prop] += 1;` doesn't double-evaluate `prop`. The existing solution, however, is not of reasonable performance when `prop` is a Number value -- it is, of course, unacceptable for `arr[i]++` to be slow. To this end, this patch also introduces OpToPropertyKeyOrNumber, which will return numbers unchanged, just as it does with strings and symbols. * JSTests/test262/expectations.yaml: Mark 22 test cases as passing. * Source/JavaScriptCore/bytecode/BytecodeList.rb: * Source/JavaScriptCore/bytecode/BytecodeUseDef.cpp: * Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp: * Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h: * Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp: (JSC::PostfixNode::emitBracket): (JSC::PrefixNode::emitBracket): (JSC::ReadModifyBracketNode::emitBytecode): (JSC::ShortCircuitReadModifyBracketNode::emitBytecode): (JSC::ObjectPatternNode::bindValue const): * Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h: * Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp: * Source/JavaScriptCore/dfg/DFGClobberize.h: * Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp: * Source/JavaScriptCore/dfg/DFGDoesGC.cpp: * Source/JavaScriptCore/dfg/DFGFixupPhase.cpp: * Source/JavaScriptCore/dfg/DFGNode.h: * Source/JavaScriptCore/dfg/DFGNodeType.h: * Source/JavaScriptCore/dfg/DFGOperations.cpp: * Source/JavaScriptCore/dfg/DFGOperations.h: * Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp: * Source/JavaScriptCore/dfg/DFGSafeToExecute.h: * Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp: * Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h: * Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp: * Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp: * Source/JavaScriptCore/ftl/FTLCapabilities.cpp: * Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp: * Source/JavaScriptCore/jit/JIT.cpp: * Source/JavaScriptCore/jit/JIT.h: * Source/JavaScriptCore/jit/JITOpcodes.cpp: * Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm: * Source/JavaScriptCore/llint/LowLevelInterpreter64.asm: * Source/JavaScriptCore/runtime/CommonSlowPaths.cpp: * Source/JavaScriptCore/runtime/CommonSlowPaths.h: Canonical link: https://commits.webkit.org/275944@main
a1b832b
to
c9e7ab3
Compare
Committed 275944@main (c9e7ab3): https://commits.webkit.org/275944@main Reviewed commits have been landed. Closing PR #25526 and removing active labels. |
c9e7ab3
a1b832b