CyclicModuleFields structure wastes space
Categories
(Core :: JavaScript Engine, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
Details
Attachments
(2 files)
As arai commented during code review for bug 1795524, the use of several Maybe<> fields in this structure is inefficient. Packing all the flags together in one place would make better use of memory.
Assignee | ||
Comment 1•1 year ago
|
||
This reduces the size from 184 to 160 bytes on 64 bit. and from 128 to 104
bytes on 32 bit builds.
Assignee | ||
Comment 2•1 year ago
|
||
As suggsted in code review for the previous patch, it's clearer and less
error-prone to provide getters and setters for module fields which are
represented using more than one field in the structure.
This patch changes the operation of ModuleObject::maybeAsyncEvaluatingPostOrder
to return Nothing() after the post order is cleared, rather than the magic
value ASYNC_EVALUATING_POST_ORDER_CLEARED. This doesn't make any difference to
the modules system itself but required some changes to test code expectations.
Depends on D162869
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e81e696cc5a0 Pack the CyclicModuleFields structure r=arai https://hg.mozilla.org/integration/autoland/rev/e54e77856ace Refactor CyclicModuleFields to provide getters and setters for some fields r=arai
Comment 4•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e81e696cc5a0
https://hg.mozilla.org/mozilla-central/rev/e54e77856ace
Description
•