Allow parsing modules using stencils rather than GC objects.
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox80 | --- | fixed |
People
(Reporter: mgaudet, Assigned: tcampbell)
References
Details
Attachments
(5 files, 1 obsolete file)
We need to be able to parse modules without requiring the allocation of GC'd objects.
| Assignee | ||
Comment 1•5 years ago
|
||
The ModuleObject allocation needs to be handled, but this is similar to the standalone JSFunction case and should be straightforward.
The import/export map is currently built of JSObjects that are allocated in the middle of parsing. We need a stencil abstraction for the following types:
RequestedModuleObjectImportEntryObjectExportEntryObject
These are currently aggregated intoArrayObjects that are attached to theModuleObject.
Some sort of Import/ExportMap Stencil data structure probably needs to be defined.
| Assignee | ||
Comment 2•5 years ago
|
||
Introduce StencilModuleEntry type to replace {Import,Export}EntryObject
during parsing. Avoid allocating those GC objects until the initModule call.
| Assignee | ||
Comment 3•5 years ago
|
||
Defer the ModuleObject::functionDeclarations list initiailization until after
parsing.
Depends on D83206
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
| Assignee | ||
Comment 4•5 years ago
|
||
Similar to what is done for FunctionScope, defer the initialization of
ModuleScope::Data::module field until creating concrete scope.
Depends on D83206
| Assignee | ||
Comment 5•5 years ago
|
||
Use StencilModuleMetadata to hold module function-declarations list so that a
ModuleObject is no longer needed to perform parsing.
Depends on D83269
| Assignee | ||
Comment 6•5 years ago
|
||
Depends on D83270
| Assignee | ||
Comment 7•5 years ago
|
||
The binding name is by definition the explicitName of the JSFunction so do
not store a copy of it. This avoids needing to trace that anymore.
Depends on D83269
Comment 9•5 years ago
|
||
Backed outfor causing assertion failure at jsapi.cpp.
Backout link: https://hg.mozilla.org/integration/autoland/rev/5974b9e65af447c1d1b6918ea7887822f05c9a02
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=309675182&repo=autoland&lineNumber=1778
| Assignee | ||
Comment 10•5 years ago
|
||
JS_SetElement cannot be used on helper-threads, so I have restored the behaviour to use NativeObject::initDenseElement. I also modified the AssertHeapIsIdle check to disallow helper threads and verify no further issues. I will open a bug to permanently land these checks since they would have caught the problem sooner.
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
Backed out 5 changesets (bug 1614041) for Spidermonkey failure on gecko/js/src/vm/NativeObject.h. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=309684554&repo=autoland&lineNumber=3966
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=7eaf75ab590a297f8acc56cfec2cc43dcdf1dc3a
Backout:
https://hg.mozilla.org/integration/autoland/rev/45605357f44cedf5d3d6544750c68d482dca0844
Comment 13•5 years ago
|
||
(In reply to Ted Campbell [:tcampbell] from comment #10)
I also modified the
AssertHeapIsIdlecheck to disallow helper threads and verify no further issues.
See also the CHECK_THREAD macro where we explicitly allow helper thread contexts... Maybe it's time to change that. But all this is why I'm pushing for removing helper thread JSContexts completely in the future.
Comment 14•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
Comment 15•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a9af5a14e497
https://hg.mozilla.org/mozilla-central/rev/8823ae6243b7
https://hg.mozilla.org/mozilla-central/rev/e08aadd71f4d
https://hg.mozilla.org/mozilla-central/rev/5927f5feaebf
https://hg.mozilla.org/mozilla-central/rev/29ff06b4a609
Description
•