Skip to content

Commit ceebc7f

Browse files
committed
MicroJIT: generate less code for CFUNCs
Added UJIT_CHECK_MODE. Set to 1 to double check method dispatch in generated code. It's surprising to me that we need to watch both cc and cme. There might be opportunities to simplify there.
1 parent 82c5d35 commit ceebc7f

File tree

7 files changed

+270
-37
lines changed

7 files changed

+270
-37
lines changed

gc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2564,7 +2564,7 @@ vm_ccs_free(struct rb_class_cc_entries *ccs, int alive, rb_objspace_t *objspace,
25642564
asan_poison_object((VALUE)cc);
25652565
}
25662566
}
2567-
vm_cc_invalidate(cc);
2567+
rb_vm_cc_invalidate(cc);
25682568
}
25692569
ruby_xfree(ccs->entries);
25702570
}

ujit_asm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ x86opnd_t imm_opnd(int64_t imm)
7373
return opnd;
7474
}
7575

76-
x86opnd_t const_ptr_opnd(void* ptr)
76+
x86opnd_t const_ptr_opnd(const void *ptr)
7777
{
7878
x86opnd_t opnd = {
7979
OPND_IMM,

ujit_asm.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ x86opnd_t mem_opnd(size_t num_bits, x86opnd_t base_reg, int32_t disp);
220220
x86opnd_t imm_opnd(int64_t val);
221221

222222
// Constant pointer operand
223-
x86opnd_t const_ptr_opnd(void* ptr);
223+
x86opnd_t const_ptr_opnd(const void *ptr);
224224

225225
// Struct member operand
226226
#define member_opnd(base_reg, struct_type, member_name) mem_opnd( \

0 commit comments

Comments
 (0)