Open Bug 1938859 Opened 2 months ago Updated 3 days ago

Remove JS::TransitiveCompileOptions::deoptimizeModuleGlobalVars

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

REOPENED

People

(Reporter: arai, Assigned: arai)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file)

The JS::TransitiveCompileOptions::deoptimizeModuleGlobalVars was added to keep the backward compatibility of the Cu.import behavior with the "JSM to ESM" shim, which required all the global variables being on the environment object.

https://searchfox.org/mozilla-central/rev/ab26669b610c2245ac9fcf9cecc3612d73297d93/js/public/CompileOptions.h#335-343

// De-optimize ES module's top-level `var`s, in order to define all of them
// on the ModuleEnvironmentObject, instead of local slot.
//
// This is used for providing all global variables in Cu.import return value
// (see bug 1766761 for more details), and this is temporary solution until
// ESM-ification finishes.
//
// WARNING: This option will eventually be removed.
bool deoptimizeModuleGlobalVars = false;

Once the JSM API is removed, this option can be removed.
The last and the only consumer will be removed in bug 1881888

Blocks: 1776174
Severity: -- → N/A
Priority: -- → P3
Depends on: 1941472
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/e9c90fbcc514 Remove TransitiveCompileOptions.deoptimizeModuleGlobalVars. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch

Backed out as requested by arai for causing Bug 1946592.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 137 Branch → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: