Use a common base class for JSScript / LazyScript
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(4 files)
If Bug 1566607 lands, then both LazyScript and JSScript start with jitCodeRaw_ and have about 10 common fields. We should use a common base class and try to standardize accessors, particularly for immutable/mutable flags.
Assignee | ||
Comment 1•5 years ago
|
||
This is the common base class of JSScript and LazyScript. This begins
with the common jitCodeRaw_ field which both types require to have as
first memory word of structure. Follow-up patches will move more fields
and accessors that are common to the two classes.
Assignee | ||
Comment 2•5 years ago
|
||
This is defined in gc/Marking.cpp since the eager LazyScript marking
code must match the definition.
Depends on D38503
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D38504
Assignee | ||
Comment 4•5 years ago
|
||
Move various fields for source positions to BaseScript. The
lineno/column have minimal treatment because it is a larger project to
make the two more uniformly set in the frontend.
In the debugger, there is still clumsy code to access both lazy and
non-lazy scripts, but this will become simplified when the two types
fully merge.
Depends on D38505
Assignee | ||
Comment 5•5 years ago
|
||
These patches introduce the new base class and move the first 8 fields. Another patch will be needed to move the flags and their accessors but that patch bit rots quickly (largely my fault) so I want to get feedback and land the basics first.
Comment 7•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b7a383b8d837
https://hg.mozilla.org/mozilla-central/rev/0f5d459e99a9
https://hg.mozilla.org/mozilla-central/rev/63fe9b494e4f
https://hg.mozilla.org/mozilla-central/rev/2c31acc60956
Description
•