Closed Bug 1530412 Opened 6 years ago Closed 6 years ago

Add LazyScriptData type instead of void* field

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

Details

Attachments

(7 files)

Currently LazyScript has a |void* table_| field to store optional variable-length data. We should migrate to a better encapsulated structure to simplify initialization/XDR/cloning/GC issues, similar to what was done with PrivateScriptData.

The numClosedOverBindings/numInnerFunctions/fieldInitializers fields should all be moved over to this data structure.

Moving the numClosedOverBindings length to LazyScriptData would be a slight memory regression, but it is also desirable to standardize the flags of LazyScript to match JSScript. Moving the fieldInitializers stuff to LazyScriptData will make it optional and revert some of the memory regression that that change causes.

Simplify placeholders and add toStringEnd argument.

Depends on D23398

Depends on D23402

Depends on D23403

Attachment #9050804 - Attachment description: Bug 1530412 - Clean up LazyScript::CreateForXDR → Bug 1530412 - Add toStringEnd argument to LazyScript::CreateForXDR
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/896a538f502b Fix LazyScript constructor argument names r=jorendorff https://hg.mozilla.org/integration/autoland/rev/0b61c4bdd578 Add toStringEnd argument to LazyScript::CreateForXDR r=jorendorff https://hg.mozilla.org/integration/autoland/rev/618b7bbaebbe Move LazyScript::numClosedOverBindings/numInnerFunctions to normal fields r=jorendorff https://hg.mozilla.org/integration/autoland/rev/539d7eec3444 Use mozilla::Span for LazyScript tables r=jorendorff https://hg.mozilla.org/integration/autoland/rev/a93ef3e7f2b9 Use JSScript::ImmutableFlags in LazyScript r=jandem https://hg.mozilla.org/integration/autoland/rev/5bd984729daf Add js::LazyScriptData type r=jorendorff https://hg.mozilla.org/integration/autoland/rev/348419a9d041 Use LazyScriptData for LazyScript r=jorendorff
Regressions: 1541353
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: