diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-03-14 13:39:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 13:39:06 -0700 |
commit | 9a43c63d436568350333964a859fd14987a029f0 (patch) | |
tree | fda0025df06cf95fb9292c1822f548f26cd28cb2 /vm_insnhelper.c | |
parent | 76f2031884a7857649490f2ef8bcda534bd69c0c (diff) | |
download | ruby-9a43c63d436568350333964a859fd14987a029f0.tar.gz |
YJIT: Implement throw instruction (#7491)
* Break up jit_exec from vm_sendish
* YJIT: Implement throw instruction
* YJIT: Explain what rb_vm_throw does [ci skip]
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index f513a9be09..674308c90c 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1823,6 +1823,12 @@ vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, } } +VALUE +rb_vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t throw_state, VALUE throwobj) +{ + return vm_throw(ec, reg_cfp, throw_state, throwobj); +} + static inline void vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag) { @@ -5211,15 +5217,7 @@ vm_sendish( val = vm_invokeblock_i(ec, GET_CFP(), &calling); break; } - - if (!UNDEF_P(val)) { - return val; /* CFUNC normal return */ - } - else { - RESTORE_REGS(); /* CFP pushed in cc->call() */ - } - - return jit_exec(ec); + return val; } /* object.c */ |