Closed Bug 1707792 Opened 3 years ago Closed 3 years ago

Handle _SetCanonicalName during BytecodeEmitter

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

Details

Attachments

(2 files)

As we move towards removing the self-hosting realm, we need to replace _SetCanonicalName behaviour. It should instead be processed by the BCE and the name saved on the stencil. This also has the upside that we are not relying on mutating functions in the self-hosting realm at startup.

Now, when _SetCanonicalName is used, store the canonical name on the extended
slot instead of clobbering the display name. This ensures the function names
in the self-hosted realm match their binding names and the original source
code for better clarity. Instead we apply the canonical name during function
cloning where special cases already needed to exist to find the "original"
name. The net result should be easier to understand.

Instead of manipulating the uncloned self-hosted function at runtime, process
the _SetCanonicalName call during BCE and save it in ScriptStencil. This
will later lead to directly instatiating self-hosted clones from a stencil
rather than cloning from the self-hosting realm.

Depends on D113455

Attachment #9218541 - Attachment description: WIP: Bug 1707792 - Store self-hosted canonical name in extended slot → Bug 1707792 - Store self-hosted canonical name in extended slot. r?jandem!
Attachment #9218542 - Attachment description: WIP: Bug 1707792 - Process _SetCanonicalName in BytecodeEmitter → Bug 1707792 - Process _SetCanonicalName in BytecodeEmitter. r?arai!
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8a523f660b21
Store self-hosted canonical name in extended slot. r=jandem
https://hg.mozilla.org/integration/autoland/rev/55b4f673e48d
Process _SetCanonicalName in BytecodeEmitter. r=arai
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: