YJIT: Fallback send instructions to vm_sendish (#8106)

This commit is contained in:
Takashi Kokubun 2023-07-24 13:51:46 -07:00 committed by GitHub
parent c4e893ceb5
commit cef60e93e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2025-04-09 13:49:37 +00:00
Merged-By: k0kubun <takashikkbn@gmail.com>
7 changed files with 178 additions and 7 deletions

View file

@ -169,10 +169,20 @@ default: \
#define THROW_EXCEPTION(exc) return (VALUE)(exc)
#endif
// Run the interpreter from the JIT
#define VM_EXEC(ec, val) do { \
if (val == Qundef) { \
VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH); \
val = vm_exec(ec); \
} \
} while (0)
// Run the JIT from the interpreter
#define JIT_EXEC(ec, val) do { \
rb_jit_func_t func; \
if (val == Qundef && (func = jit_compile(ec))) { \
val = func(ec, ec->cfp); \
RESTORE_REGS(); /* fix cfp for tailcall */ \
if (ec->tag->state) THROW_EXCEPTION(val); \
} \
} while (0)