diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-07-24 13:51:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-24 13:51:46 -0700 |
commit | cef60e93e6db859b47c818f745be809feb04ae48 (patch) | |
tree | 60ac5fe6f0c41aa72b152656d6ce426b1c708d70 /vm_exec.h | |
parent | c4e893ceb5811f3436f1e16cab769a16469b56b0 (diff) |
YJIT: Fallback send instructions to vm_sendish (#8106)
Notes
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
Diffstat (limited to 'vm_exec.h')
-rw-r--r-- | vm_exec.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) |