Closed Bug 1605207 Opened 4 years ago Closed 4 years ago

Cleanup XDRInterpretedFunction

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

Details

Attachments

(5 files)

The current implementation is pretty inconsistent with other parts of engine and is the JSFunction::kind() temporarily has the wrong value. This is blocking Bug 1600705.

Pass appropriate arguments to NewFunctionWithProto instead of filling them
after the fact. The script should be transcoded after the function is set up.
Also stop preserving the NEW_SCRIPT_CLEARED flag in XDR.

We had a few extra RootedFunction when we only cared if about if the pointer
was null or not, so lets remove them. Also rename to isFunctionScript since
this is called for stand-alone functions as well. Semantics should be
unchanged.

Depends on D57862

Depends on D57917

Depends on D57918

Move the transcoding from XDRLazyScript and XDRRelazificationInfo into
LazyScript::XDRScriptData to avoid duplication. Add similar code for non-lazy
scripts for consistency.

Depends on D57919

I expanded the scope of cleanup because this code was getting in the way of eliminating LazyScripts.

Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6204c67cacf5
Cleanup XDRInterpretedFunction. r=jandem
https://hg.mozilla.org/integration/autoland/rev/0f37ad6a815e
Remove unnecessary roots in XDRScript. r=caroline
https://hg.mozilla.org/integration/autoland/rev/94c7c031cfa1
Cleanups in js::XDRScript. r=jandem
https://hg.mozilla.org/integration/autoland/rev/4eaa8b8ff4f6
Cleanups in XDRScriptGCThing. r=jandem
https://hg.mozilla.org/integration/autoland/rev/5b103899895f
Fixup XDR of FieldInitializers. r=jandem

== Change summary for alert #24578 (as of Mon, 23 Dec 2019 07:43:05 GMT) ==

Improvements:

1% Base Content JS windows7-32-shippable opt 2,969,269.33 -> 2,935,912.00

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=24578

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: