Replace self-hosted module implementation with C++
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox104 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
(Blocks 2 open bugs)
Details
Attachments
(7 files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
A large portion of the modules implementation in SpiderMonkey is written in self-hosted JS (js/src/builtin/Module.js). There were good reasons to do this at the time, but this hasn't really been a win overall.
Moving this code to C++ would improve:
- security: prototype pollution attacks would not be possible
- efficiency: currently execution bounces repeatedly between JS and native code which is not optimal, and all data must uses JS types even when native types would be preferable=
- debugging: currently there's no debugger support for backtraces through JS stack frames making it harder to investigate issues in the module implementation
Assignee | ||
Comment 1•2 years ago
|
||
Reimplement ModuleGetExportedNames in C++ and remove from self-hosted code.
This adds an intrinsic for it so that the remaining self-hosted code can call
it. This will be removed eventually.
Assignee | ||
Comment 2•2 years ago
|
||
Depends on D149880
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D149881
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D149882
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D149883
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D149884
Assignee | ||
Comment 7•2 years ago
|
||
This also renames it GatherAvailableModuleAncestors which is what it's called
in the spec now.
Depends on D149885
Comment 8•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/95b47c5e977c
https://hg.mozilla.org/mozilla-central/rev/90b8eff04bf8
https://hg.mozilla.org/mozilla-central/rev/8e18e606b42c
https://hg.mozilla.org/mozilla-central/rev/78781f9739fa
https://hg.mozilla.org/mozilla-central/rev/b609fcb74109
https://hg.mozilla.org/mozilla-central/rev/353db52eac26
https://hg.mozilla.org/mozilla-central/rev/0cacfd0aec5d
Assignee | ||
Updated•2 years ago
|
Description
•