47 bytes, text/x-phabricator-request
|Details | Review|
As we complete the migration of ICs to CacheIR, the remaining ICs are primarily fallbacks. We should investigate moving this JitCode to the JSRuntime to be shared. This would simplify parts of baseline compilation and we may be able to eliminate the fallback IC stub space.
Let's do this after bug 1499644 lands to avoid bitrotting that (and this patch will look nicer on top of that).
Depends on: 1499644
I've been thinking a bit about the right design for this. * We probably need a FallbackStubKind enum class so we can store an EnumeratedArray<FallbackStubKind, uint32_t> in JitRuntime - storing the offset in a shared JitCode* instance, similar to (other) runtime trampolines. * The stub compiler class for each stub is currently responsible for (1) Compiling stub code and (2) allocating the stub. For (1) I think it might be nice to use a shared FallbackStubCompiler class that compiles all the fallback stub codes. It could call a static method on each fallback stub class to compile the code for it, for example we would have: static void emitCode(FallbackStubCompiler& compiler); on ICTypeOf_Fallback, ICGetProp_Fallback, etc. For (2) I think we can probably allocate the stub directly in ICScript::Create, once bug 1499644 is done. Maybe with some helper lambda and perfect forwarding.
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/d6fb444fa553 Move Baseline IC fallback code from JitRealm to JitRuntime. r=tcampbell
You need to log in before you can comment on or make changes to this bug.