YJIT: add asm comment when we clear local types (#9713)
Small PR to add a comment when we clear local variable types, so we can be aware that it's happening when looking at the disasm.
This commit is contained in:
parent
fde3d065e6
commit
adf29c9a98
@ -1173,6 +1173,13 @@ impl Assembler
|
||||
}
|
||||
}
|
||||
|
||||
/// Erase local variable type information
|
||||
/// eg: because of a call we can't track
|
||||
pub fn clear_local_types(&mut self) {
|
||||
asm_comment!(self, "clear local variable types");
|
||||
self.ctx.clear_local_types();
|
||||
}
|
||||
|
||||
/// Spill all live stack temps from registers to the stack
|
||||
pub fn spill_temps(&mut self) {
|
||||
// Forget registers above the stack top
|
||||
|
@ -356,7 +356,7 @@ fn jit_prepare_routine_call(
|
||||
|
||||
// In case the routine calls Ruby methods, it can set local variables
|
||||
// through Kernel#binding and other means.
|
||||
asm.ctx.clear_local_types();
|
||||
asm.clear_local_types();
|
||||
}
|
||||
|
||||
/// Record the current codeblock write position for rewriting into a jump into
|
||||
@ -5892,7 +5892,7 @@ fn gen_send_cfunc(
|
||||
asm.store(ec_cfp_opnd, CFP);
|
||||
|
||||
// cfunc calls may corrupt types
|
||||
asm.ctx.clear_local_types();
|
||||
asm.clear_local_types();
|
||||
|
||||
// Note: the return block of gen_send_iseq() has ctx->sp_offset == 1
|
||||
// which allows for sharing the same successor.
|
||||
@ -6951,7 +6951,7 @@ fn gen_send_iseq(
|
||||
callee_ctx.upgrade_opnd_type(SelfOpnd, recv_type);
|
||||
|
||||
// The callee might change locals through Kernel#binding and other means.
|
||||
asm.ctx.clear_local_types();
|
||||
asm.clear_local_types();
|
||||
|
||||
// Pop arguments and receiver in return context and
|
||||
// mark it as a continuation of gen_leave()
|
||||
@ -8012,7 +8012,7 @@ fn gen_invokeblock_specialized(
|
||||
asm.mov(stack_ret, ret);
|
||||
|
||||
// cfunc calls may corrupt types
|
||||
asm.ctx.clear_local_types();
|
||||
asm.clear_local_types();
|
||||
|
||||
// Share the successor with other chains
|
||||
jump_to_next_insn(jit, asm, ocb);
|
||||
@ -8170,7 +8170,7 @@ fn gen_invokesuper_specialized(
|
||||
jit.assume_method_lookup_stable(asm, ocb, cme);
|
||||
|
||||
// Method calls may corrupt types
|
||||
asm.ctx.clear_local_types();
|
||||
asm.clear_local_types();
|
||||
|
||||
match cme_def_type {
|
||||
VM_METHOD_TYPE_ISEQ => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user