Closed Bug 1618636 Opened 4 years ago Closed 4 years ago

Unify FunctionCreationData and BCEScriptStencil into a single structure

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: mgaudet, Assigned: tcampbell)

References

Details

Attachments

(4 files)

By the end of Stencil, we need to distinguish much less the difference between a JSFunction and JSSCript, because from the perspective they're two pieces of the same thing (where the Script is an optional addition to a function)

We should unify them to make this clear, probably in a similar way to how we made FunctionCreationData own the LazyScriptCreationData.

Priority: -- → P3
Blocks: 1605101
Depends on: 1635432
No longer depends on: 1618634
Depends on: 1635635
Assignee: nobody → tcampbell

Add a plain base class to hold the ScriptStencil data members. This
non-virtual type will later be used to replace FunctionCreationData. In the
long run we will remove the virtual methods entirely.

Add a FunctionBox::emitLazy flag to identify boxes which should allocate a
lazy script. This also is used to avoid allocating JSFunctions for funboxes
that are the result of a failed syntax parse.

Depends on D74155

We only use the gcThings array, but this is a stepping stone to Stencil.

Depends on D74157

Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0531f5d899fd
Add non-virtual ScriptStencilBase. r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/eae61ee67546
Remove the Maybe in FunctionCreationData. r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/bef58cfccdd8
Move FunctionCreationData::createLazyScript. r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/3a21ee384f6d
Replace FunctionCreationData with ScriptStencilBase. r=mgaudet
See Also: → 1638670
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: