Closed Bug 1700443 Opened 3 years ago Closed 3 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)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

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

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!
Pushed by iireland@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ce61dab689b9
Remove AnalyzeArgumentsUsage r=jandem
https://hg.mozilla.org/integration/autoland/rev/bf132d76a357
Remove argumentsOptimizationFailed r=jandem
https://hg.mozilla.org/integration/autoland/rev/c7784fbc5ac7
Clean up BaselineCodeGen r=jandem
https://hg.mozilla.org/integration/autoland/rev/2d6ddfca0a01
Simplify JSScript flags for arguments r=jandem
https://hg.mozilla.org/integration/autoland/rev/97a240f4593b
Clean up CompileInfo r=jandem
https://hg.mozilla.org/integration/autoland/rev/f0c3565b1841
Remove dead CacheIR ops r=jandem
https://hg.mozilla.org/integration/autoland/rev/de19cbf58624
Remove FunApplyMagicArgs r=jandem
https://hg.mozilla.org/integration/autoland/rev/1532bdab7a74
Remove MIRType::MagicOptimizedArguments r=jandem
https://hg.mozilla.org/integration/autoland/rev/43d61f75ce6f
Clean up EnvironmentObject and Debugger r=jandem
https://hg.mozilla.org/integration/autoland/rev/1738078ae073
Clean up SetFrameArgumentsObject r=jandem
https://hg.mozilla.org/integration/autoland/rev/e2cacd540779
Remove AnalysisMode r=jandem
https://hg.mozilla.org/integration/autoland/rev/11741e1b7f70
Remove JS_OPTIMIZED_ARGUMENTS 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: