summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-05-19 08:52:52 -0700
committerGitHub <noreply@github.com>2022-05-19 11:52:52 -0400
commitb8a268e293f89338c9ad5af8cf8e9e350c112c72 (patch)
treeb2eb1d46db88674d010f6e71eb1ee86ebbd79b56 /yjit
parent3d6fd162a469f9bfa4afc696ef8b8d8536a38507 (diff)
YJIT: Add opt_succ (#5919)
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit')
-rw-r--r--yjit/src/codegen.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index 473d464d52..1d62d74de0 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -2991,6 +2991,16 @@ fn gen_opt_empty_p(
gen_opt_send_without_block(jit, ctx, cb, ocb)
}
+fn gen_opt_succ(
+ jit: &mut JITState,
+ ctx: &mut Context,
+ cb: &mut CodeBlock,
+ ocb: &mut OutlinedCb,
+) -> CodegenStatus {
+ // Delegate to send, call the method on the recv
+ gen_opt_send_without_block(jit, ctx, cb, ocb)
+}
+
fn gen_opt_str_freeze(
jit: &mut JITState,
ctx: &mut Context,
@@ -5820,6 +5830,7 @@ fn get_gen_fn(opcode: VALUE) -> Option<InsnGenFn> {
OP_OPT_LTLT => Some(gen_opt_ltlt),
OP_OPT_NIL_P => Some(gen_opt_nil_p),
OP_OPT_EMPTY_P => Some(gen_opt_empty_p),
+ OP_OPT_SUCC => Some(gen_opt_succ),
OP_OPT_NOT => Some(gen_opt_not),
OP_OPT_SIZE => Some(gen_opt_size),
OP_OPT_LENGTH => Some(gen_opt_length),