mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
YJIT: Fallback send instructions to vm_sendish (#8106)
This commit is contained in:
parent
c4e893ceb5
commit
cef60e93e6
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
10
vm_exec.h
10
vm_exec.h
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue