aboutsummaryrefslogtreecommitdiffstats
path: root/insns.def
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-14 13:39:06 -0700
committerGitHub <noreply@github.com>2023-03-14 13:39:06 -0700
commit9a43c63d436568350333964a859fd14987a029f0 (patch)
treefda0025df06cf95fb9292c1822f548f26cd28cb2 /insns.def
parent76f2031884a7857649490f2ef8bcda534bd69c0c (diff)
downloadruby-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 'insns.def')
-rw-r--r--insns.def24
1 files changed, 24 insertions, 0 deletions
diff --git a/insns.def b/insns.def
index 16efac81d3..9af64aa4b3 100644
--- a/insns.def
+++ b/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();