Store numICEntries in SharedScriptData
Categories
(Core :: JavaScript Engine: JIT, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
This will let us remove the Vector in ICScript::Create. We can allocate the ICScript upfront and write to that directly.
Assignee | ||
Comment 1•5 years ago
|
||
We should probably move the JOF_TYPESET uint16_t from JSScript to SharedScriptData at the same time.
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
This makes the naming more consistent. Also, instead of checking against
JSScript::MaxBytecodeTypeSets at every JOF_TYPESET op, we can move this
condition to SharedScriptData creation if we use uint32_t instead of uint16_t.
This is more efficient and also nicer because MaxBytecodeTypeSets seems to be
more of a JSScript implementation detail the bytecode emitter doessn't need to
worry about.
Assignee | ||
Comment 3•5 years ago
|
||
This also tidies up overflow checks to ensure numICEntries never overflows
UINT32_MAX in the emitter.
ICScript currently stores numICEntries as uint32_t, but it's not an
issue due to BaselineMaxScriptLength.
Depends on D28449
Assignee | ||
Comment 4•5 years ago
|
||
Because SharedScriptData now contains numICEntries, we can allocate the ICScript
up front and fill it in directly. Advantages are: no Vector malloc/free overhead,
no ICEntry copying, no more LifoAlloc::steal, better cache locality, fewer moving
parts. This will also make it easier to merge ICScript and TypeScript in the future.
Depends on D28450
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
leave-open because after this lands I want to post a part 4 to replace the exception in part 2 with a static_assert.
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f35cf62b01a1 part 1 - Clean up BytecodeEmitter's TypeSet count a bit. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/39133aa95fce part 2 - Store numICEntries in SharedScriptData. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/50967daabdf4 part 3 - Use SharedScriptData::numICEntries to allocate and initialize ICScript directly. r=tcampbell
Comment 7•5 years ago
|
||
bugherder |
Assignee | ||
Comment 8•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ce407a09308 part 4 - Replace overflow check with a static_assert. r=tcampbell
Comment 10•5 years ago
|
||
bugherder |
Description
•