Merge TypeScript and ICScript into JitScript
Categories
(Core :: JavaScript Engine: JIT, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(11 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
The plan is to do the following:
- Rename TypeScript to JitScript.
- Move it from vm/TypeInference.* to jit/JitScript.{h,cpp}
- Merge ICScript into JitScript. TypeScript and ICScript have the same lifetime already so this should be straight-forward. It will eliminate a malloc/free + extra dereferences + we can do a single bytecode walk instead of two when allocating JitScript.
- Move JIT-related fields currently in JSScript (baseline/ion/etc) to JitScript. This is nice because sizeof(JSScript) matters and it will move some JIT-related code out of vm/
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Also JSScript::makeTypes => JSScript::createJitScript for consistency with code
elsewhere.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Some of the TypeInference-related static methods were kept in TypeInference-inl.h and
TypeInference.cpp because of various dependencies. Also, methods like JitScript::MonitorAssign
probably don't belong on JitScript anyway, but for now this seems reasonable.
Depends on D31755
Assignee | ||
Comment 3•5 years ago
|
||
ICScript and JitScript had the same lifetime already, but this eliminates
a malloc/free and some extra dereferences (especially for accessing ICEntries
from Baseline Interpreter code).
This is just the minimal set of changes to make it easier to review. Follow-up
changes should:
-
Move (now) JitScript methods to JitScript.cpp
-
Merge FillBytecodeTypeMap with JitScript::initICEntries so we do just a single
bytecode walk. -
Move JitScript from the js namespace to js::jit.
Depends on D31982
Assignee | ||
Comment 4•5 years ago
|
||
These have been unnecessary since the ICScript introduction: when performing the
arguments analysis we have a JitScript but not a BaselineScript.
Depends on D32103
Assignee | ||
Comment 5•5 years ago
|
||
The destroy() call in JSScript::finalize was moved into DestroyJitScripts for
consistency with BaselineScript and IonScript.
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D32290
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D32292
Assignee | ||
Comment 8•5 years ago
|
||
"Discard" instead of "Release" for consistency with ShouldDiscardBaselineCode.
Depends on D32293
Assignee | ||
Comment 9•5 years ago
|
||
We now do a single pass over the bytecode instead of two.
Register pressure of the combined code might be a bit worse but it also
eliminates some duplication so I think it's worth it.
Assignee | ||
Comment 10•5 years ago
|
||
Depends on D32298
Comment 11•5 years ago
|
||
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ac16f08196a part 1 - Rename TypeScript to JitScript. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/330f42984cf4 part 2 - Move JitScript from vm/TypeInference.* to jit/JitScript.*. r=tcampbell
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 13•5 years ago
|
||
JitScript::initICEntriesAndBytecodeTypeMap is still in BaselineIC.cpp because
it depends on things defined there (like FallbackStubAllocator) and I think it's
not unreasonable to keep it there.
Depends on D32299
Comment 14•5 years ago
|
||
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e81b72b58694 part 3 - Merge ICScript into JitScript. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/71c4f7fd04f0 part 4 - Remove unnecessary hasJitScript() checks in BaselineInspector. r=tcampbell
Updated•5 years ago
|
Comment 15•5 years ago
|
||
bugherder |
Comment 16•5 years ago
|
||
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c0f95fe29f8a part 5 - Make JitScript::destroy static. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/547d1940a27f part 6 - Use DefaultInitializeElements to initialize JitScript's StackTypeSet array. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/56f1c5f12b84 part 7 - Improve the JitScript comment a bit. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/5ee66c20f298 part 8 - Rename ShouldReleaseTypes to ShouldDiscardJitScripts. r=tcampbell
Comment 17•5 years ago
|
||
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/05c094ef90ca part 9 - Merge FillBytecodeTypeMap into JitScript::initICEntries. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/87aaa29b2fff part 10 - Move JitScript to js::jit namespace. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/ec5f175f4f2c part 11 - Move more JitScript code into JitScript.cpp. r=tcampbell
Assignee | ||
Updated•5 years ago
|
Comment 18•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c0f95fe29f8a
https://hg.mozilla.org/mozilla-central/rev/547d1940a27f
https://hg.mozilla.org/mozilla-central/rev/56f1c5f12b84
https://hg.mozilla.org/mozilla-central/rev/5ee66c20f298
https://hg.mozilla.org/mozilla-central/rev/05c094ef90ca
https://hg.mozilla.org/mozilla-central/rev/87aaa29b2fff
https://hg.mozilla.org/mozilla-central/rev/ec5f175f4f2c
Description
•