Closed Bug 1700443 Opened 4 years ago Closed 4 years ago

Remove old arguments analysis code

Categories

(Core :: JavaScript Engine: JIT, task, P2)

task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: iain, Assigned: iain)

References

Details

Attachments

(12 files)

(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details

Bug 1688033 rewrote the arguments analysis using escape analysis. That code will ride the trains in 89; once 90 opens, we should remove the old code.

This patch removes the needsArgsAnalysis flag. Other flags will be cleaned up in a later patch.

Depends on D114032

The HAS_ARGS_OBJ flag in BaselineFrame needs to stick around for the baseline interpreter, but it's immutable for the baseline compiler. (The next patch will move needsArgsObj from MutableFlags to ImmutableFlags.)

Depends on D114033

After the previous patches, JSScript still has three flags related to arguments analysis. Two of them are immutable (argumentsHasVarBinding and alwaysNeedsArgsObj), and one is mutable (needsArgsObj). We can simplify this down to just needsArgsObj, which is now immutable.

After the simplification, there's no longer any difference between argsObjAliasesFormals and argumentsAliasesFormals.

Depends on D114034

Depends on D114035

The next patch removes CallFlags::FunApplyMagicArgs.

Depends on D114036

Depends on D114169

Depends on D114170

There's a separate usecase here that overloaded JS_OPTIMIZED_ARGUMENTS. getMissingArgumentsMaybeSentinelValue returns JS_OPTIMIZED_ARGUMENTS if it can't recreate the arguments object. The comment on createMissingArguments explains that this occurs if the environment is dead; see tests/debug/Frame-eval-12.js, where we return an inner function that subsequently tries to access its parent's arguments. There's a bunch of code on the devtools side of the wall to handle this case, and we have test coverage, so instead of ripping this out I'm just rewriting it to use a different magic value.

Depends on D114171

The only remaining caller of SetFrameArgumentsObject is FinishBailoutToBaseline.

Depends on D114172

Depends on D114173

Depends on D114174

Attachment #9219971 - Attachment description: Bug 1700443: Remove JS_OPTIMIZED_ARGUMENTS r=jandem → Bug 1700443: Remove JS_OPTIMIZED_ARGUMENTS r=jandem!
Attachment #9219967 - Attachment description: Bug 1700443: Remove MIRType::MagicOptimizedArguments r=jandem → Bug 1700443: Remove MIRType::MagicOptimizedArguments r=jandem!
Regressions: 1712424
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: