Repository navigation
[JSC] VarargsLength and LoadVarargs on Spread should not clobber the world - #79993
Merged
Conversation
Collaborator
|
EWS run on current version of this PR (hash 971d46b) Details |
sosukesuzuki
marked this pull request as ready for review
November 7, 2026 01:05
This was referenced Nov 12, 2026
Constellation
approved these changes
Nov 13, 2026
…r the world https://bugs.webkit.org/show_bug.cgi?id=330526 Reviewed by Yusuke Suzuki. When the argument is the result of Spread (KnownCellUse), VarargsLength and LoadVarargs do not call operations since 325863@main. They only load the length and copy the elements. But the abstract interpreter and clobberize() still say that they clobber the world, so structures proven before an inlined f(...array) are forgotten. This patch makes them precise for KnownCellUse. VarargsLength reads Butterfly_publicLength, and LoadVarargs reads IndexedContiguousProperties and writes only its stack slots. Since the effects now depend on it, DFG::validate() checks that KnownCellUse is only used for Spread without an offset. Spread itself does not clobber the world in the abstract interpreter only when the array iterator protocol is proven from the structure of the array, so this is when it helps. clobberize() for Spread is unchanged. Test: JSTests/stress/spread-call-inlined-callee-does-not-clobber-world.js * JSTests/stress/spread-call-inlined-callee-does-not-clobber-world.js: Added. (shouldBe): (add): (count): (checkAroundCall): (checkAroundCallWithArray): (change): (changeStructureInCallee): (opaque): (callOpaque): (changeStructureInNestedCall): (mutateBetweenCalls): (truncate): (mutateInCallee): (checkAroundIterable): (loop): (forwardRest): (callForwardRest): (forwardRestTwice): (callForwardRestTwice): (sloppyArguments): (functionArguments): (readCallerArguments): (Base): (Derived): (construct): (catchThrow): (callThrow): (exits): (locals): (readConstant): (callReadConstant): (changeConstant): (generate): (arrayIteratorPrototype.next): * Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * Source/JavaScriptCore/dfg/DFGClobberize.h: (JSC::DFG::clobberize): * Source/JavaScriptCore/dfg/DFGValidate.cpp: Canonical link: https://commits.webkit.org/326606@main
webkit-commit-queue
force-pushed
the
eng/JSC-VarargsLength-and-LoadVarargs-on-Spread-should-not-clobber-the-world
branch
from
November 13, 2026 02:45
971d46b to
40c45df
Compare
Collaborator
|
Committed 326606@main (40c45df): https://commits.webkit.org/326606@main Reviewed commits have been landed. Closing PR #79993 and removing active labels. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
40c45df
971d46b