Currently, we insert shim code into every piece of jitted code to handle the change in calling conventions from the interpreter and the jitted code.
We should, instead use a trampoline function. A trampoline function would perform the same job as the shim code,
but has many advantages:
- we would only need one for the entire process, instead of one per executor.
- we wouldn't need extra refcounting code to keep the shim alive as the trampoline function would always be live.
- we can simplify the tier1 -> tier2 code in
ENTER_EXECUTOR by having the trampoline manage much of the details
- we can use the same interface for the tier 2 interpreter, further simplifying the code
- we only need one entry into the JIT code. No need for
jit_side_entry
Linked PRs
Currently, we insert shim code into every piece of jitted code to handle the change in calling conventions from the interpreter and the jitted code.
We should, instead use a trampoline function. A trampoline function would perform the same job as the shim code,
but has many advantages:
ENTER_EXECUTORby having the trampoline manage much of the detailsjit_side_entryLinked PRs
TIER1_TO_TIER2macro name in JIT InternalDocs #141496