Skip to content

Commit 7df6f49

Browse files
committed
lmao oops look up the class of the receiver
1 parent dd10097 commit 7df6f49

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

zjit/src/codegen.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,14 @@ fn gen_lookup_method(
445445
method_id: ID,
446446
state: &FrameState,
447447
) -> Option<lir::Opnd> {
448+
asm_comment!(asm, "get the class of the receiver with rb_obj_class");
449+
let class = asm.ccall(rb_obj_class as *const u8, vec![recv]);
448450
// TODO(max): Figure out if we need to do anything here to save state to CFP
449451
let method_opnd = Opnd::UImm(method_id.0.into());
452+
asm_comment!(asm, "call rb_callable_method_entry");
450453
let result = asm.ccall(
451454
rb_callable_method_entry as *const u8,
452-
vec![recv, method_opnd],
455+
vec![class, method_opnd],
453456
);
454457
asm.test(result, result);
455458
asm.jz(Target::SideExit(state.clone()));

0 commit comments

Comments
 (0)