mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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]
This commit is contained in:
parent
76f2031884
commit
9a43c63d43
Notes:
git
2023-03-14 20:39:28 +00:00
Merged-By: k0kubun <takashikkbn@gmail.com>
4 changed files with 87 additions and 33 deletions
24
insns.def
24
insns.def
|
@ -814,6 +814,12 @@ send
|
|||
VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), cd->ci, blockiseq, false);
|
||||
val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_method);
|
||||
|
||||
jit_func_t func;
|
||||
if (val == Qundef && (func = jit_compile(ec))) {
|
||||
val = func(ec, ec->cfp);
|
||||
if (ec->tag->state) THROW_EXCEPTION(val);
|
||||
}
|
||||
|
||||
if (val == Qundef) {
|
||||
RESTORE_REGS();
|
||||
NEXT_INSN();
|
||||
|
@ -833,6 +839,12 @@ opt_send_without_block
|
|||
VALUE bh = VM_BLOCK_HANDLER_NONE;
|
||||
val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_method);
|
||||
|
||||
jit_func_t func;
|
||||
if (val == Qundef && (func = jit_compile(ec))) {
|
||||
val = func(ec, ec->cfp);
|
||||
if (ec->tag->state) THROW_EXCEPTION(val);
|
||||
}
|
||||
|
||||
if (val == Qundef) {
|
||||
RESTORE_REGS();
|
||||
NEXT_INSN();
|
||||
|
@ -935,6 +947,12 @@ invokesuper
|
|||
VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), cd->ci, blockiseq, true);
|
||||
val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_super);
|
||||
|
||||
jit_func_t func;
|
||||
if (val == Qundef && (func = jit_compile(ec))) {
|
||||
val = func(ec, ec->cfp);
|
||||
if (ec->tag->state) THROW_EXCEPTION(val);
|
||||
}
|
||||
|
||||
if (val == Qundef) {
|
||||
RESTORE_REGS();
|
||||
NEXT_INSN();
|
||||
|
@ -954,6 +972,12 @@ invokeblock
|
|||
VALUE bh = VM_BLOCK_HANDLER_NONE;
|
||||
val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_invokeblock);
|
||||
|
||||
jit_func_t func;
|
||||
if (val == Qundef && (func = jit_compile(ec))) {
|
||||
val = func(ec, ec->cfp);
|
||||
if (ec->tag->state) THROW_EXCEPTION(val);
|
||||
}
|
||||
|
||||
if (val == Qundef) {
|
||||
RESTORE_REGS();
|
||||
NEXT_INSN();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue