Closed
Bug 1405661
Opened 7 years ago
Closed 7 years ago
Baldr: have DecodeModuleEnvironment start the code section
Categories
(Core :: JavaScript Engine: JIT, enhancement)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: luke, Assigned: luke)
References
Details
Attachments
(2 files)
(deleted),
patch
|
lth
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
lth
:
review+
|
Details | Diff | Splinter Review |
For real streaming compilation (bug 1347644), I think we want to buffer up enough bytes to decode the module environment before starting a compilation helper task to do a streaming decode of the code section. To do a streaming decode, we want to know the code section size so that the memory can be allocated and not need to be resized during parallel compilation. This implies having DecodeModuleEnvironment() startSection(SectionId::Code). The patches end up simplifying the code too.
Assignee | ||
Comment 1•7 years ago
|
||
The next patch ended up suggesting a refactoring I should've made to begin with: putting (sectionStart, sectionSize) into a Maybe<Pair> that is returned as an outparam in startSection() and given to finishSection().
Attachment #8915115 -
Flags: review?(lhansen)
Assignee | ||
Comment 2•7 years ago
|
||
This patch does what comment 0 said, sticking a MaybeSectionRange in the ModuleEnvironment which ends up obviating the need for peekSectionSize().
Attachment #8915116 -
Flags: review?(lhansen)
Comment 3•7 years ago
|
||
Comment on attachment 8915115 [details] [diff] [review]
tidy-start-section
Review of attachment 8915115 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/wasm/WasmValidate.h
@@ +25,5 @@
> namespace js {
> namespace wasm {
>
> +// This struct captures the bytecode offset of a section's payload (so not
> +// including the header) and the section size of the payload.
This should probably be just "the size of that payload".
Attachment #8915115 -
Flags: review?(lhansen) → review+
Comment 4•7 years ago
|
||
Comment on attachment 8915116 [details] [diff] [review]
start-code-section-in-decode-module-env
Review of attachment 8915116 [details] [diff] [review]:
-----------------------------------------------------------------
Nice.
Attachment #8915116 -
Flags: review?(lhansen) → review+
Pushed by lwagner@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/62fc2f51d566
Baldr: stidy Decoder::startSection (r=lth)
https://hg.mozilla.org/integration/mozilla-inbound/rev/13b556ec5a8e
Baldr: decode Code section header in DecodeModuleEnvironment (r=lth)
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/62fc2f51d566
https://hg.mozilla.org/mozilla-central/rev/13b556ec5a8e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•