summaryrefslogtreecommitdiff
path: root/yjit/src/codegen.rs
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2022-05-02 16:30:05 -0400
committerGitHub <noreply@github.com>2022-05-02 16:30:05 -0400
commit35e111fd3e38ee6f44cd67b255815ef301ac5211 (patch)
tree8837457481087ffe6ec497944af3c3dcc3727e93 /yjit/src/codegen.rs
parent5f20f4deeea29641096f9863e8cdce13cca478da (diff)
Fix bug identified by @noahgibbs. (#5876)
Turned out to be a one-character fix :)
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit/src/codegen.rs')
-rw-r--r--yjit/src/codegen.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index 043f566418..8ca1644fe6 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -2251,16 +2251,19 @@ fn guard_two_fixnums(ctx: &mut Context, cb: &mut CodeBlock, side_exit: CodePtr)
let arg0_type = ctx.get_opnd_type(StackOpnd(1));
if arg0_type.is_heap() || arg1_type.is_heap() {
+ add_comment(cb, "arg is heap object");
jmp_ptr(cb, side_exit);
return;
}
if arg0_type != Type::Fixnum && arg0_type.is_specific() {
+ add_comment(cb, "arg0 not fixnum");
jmp_ptr(cb, side_exit);
return;
}
- if arg1_type != Type::Fixnum && arg0_type.is_specific() {
+ if arg1_type != Type::Fixnum && arg1_type.is_specific() {
+ add_comment(cb, "arg1 not fixnum");
jmp_ptr(cb, side_exit);
return;
}