Closed Bug 1524499 Opened 9 months ago Closed 8 months ago

Move the |active| flag from BaselineScript to TypeScript


(Core :: JavaScript Engine: JIT, enhancement)

Not set



Tracking Status
firefox67 --- fixed


(Reporter: jandem, Assigned: jandem)




(4 files)

Before we discard JIT code we set the |active| flag on BaselineScripts that are on the stack to ensure we don't discard these scripts.

Similarly, the Baseline interpreter won't like the TypeScript/ICScript being pulled from under interpreter frames so we have to move the flag to TypeScript instead.

Patches for this coming up. I ended up cleaning up some TypeScript design issues that make TypeScript a lot nicer to work with and it will make it easier to merge with ICScript and/or rename to JitScript in the future.

Assignee: nobody → jdemooij

Baseline interpreter frames will have a TypeScript/ICScript we want to keep
around on GC.

The JSScript::typesDontCheckGeneration method will be removed in the next patch.

As we add more fields to TypeScript (= JitScript in the future), the
AutoSweepTypeScript argument to JSScript::types() is becoming annoying.
This patch moves the argument to TypeScript::typeArray() and
TypeScript::inlinedCompilations() because that's the data affected by type

Depends on D18548

This is pretty straight-forward now and it's much nicer to encapsulate this in
TypeScript instead of having these types-related flags in JSScript.

Depends on D18549

Pushed by
part 1 - Move active flag from BaselineScript to TypeScript. r=tcampbell
part 2 - Move the AutoSweepTypeScript& from JSScript::types() to TypeScript methods that depend on swept data. r=tcampbell
part 3 - Move HasFreezeConstraints and TypesGeneration flags from JSScript to TypeScript. r=tcampbell
part 4 - Some minor changes to address review feedback. r=tcampbell
You need to log in before you can comment on or make changes to this bug.