diff options
| -rw-r--r-- | ext/json/parser/parser.c | 2 | ||||
| -rw-r--r-- | vm_method.c | 3 | ||||
| -rw-r--r-- | zjit/src/backend/lir.rs | 7 | ||||
| -rw-r--r-- | zjit/src/codegen.rs | 26 | ||||
| -rw-r--r-- | zjit/src/hir.rs | 58 | ||||
| -rw-r--r-- | zjit/src/hir/opt_tests.rs | 583 | ||||
| -rw-r--r-- | zjit/src/hir/tests.rs | 4 | ||||
| -rw-r--r-- | zjit/src/payload.rs | 9 | ||||
| -rw-r--r-- | zjit/src/profile.rs | 10 |
9 files changed, 430 insertions, 272 deletions
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c index 308b47c373..fbfbfac9da 100644 --- a/ext/json/parser/parser.c +++ b/ext/json/parser/parser.c @@ -1454,7 +1454,7 @@ static inline void json_value_completed(json_frame *frame) frame->phase = (enum json_frame_phase) frame->type; } -static inline bool json_match_keyword(JSON_ParserState *state, const char *keyword, size_t offset) +ALWAYS_INLINE(static) bool json_match_keyword(JSON_ParserState *state, const char *keyword, size_t offset) { // It is assumed that since `keyword` is always a literal, the compiler is able to constantize this // `strlen` and several other computations in that routine, such as eliminating the `if (resumable)` branch. diff --git a/vm_method.c b/vm_method.c index fb34426bf2..59906f9b16 100644 --- a/vm_method.c +++ b/vm_method.c @@ -522,7 +522,7 @@ clear_method_cache_by_id_in_class(VALUE klass, ID mid) // not see these origins via RCLASS_ORIGIN(owner), so we find them by // iterating all of owner's classexts and checking their origin_ fields. { - VALUE origins = rb_ary_new(); + VALUE origins = rb_ary_hidden_new(1); struct collect_per_box_origins_arg origins_arg = { .owner = owner, .klass_housing_cme = klass_housing_cme, @@ -532,6 +532,7 @@ clear_method_cache_by_id_in_class(VALUE klass, ID mid) for (long i = 0; i < RARRAY_LEN(origins); i++) { invalidate_callable_method_entry_in_every_m_table(RARRAY_AREF(origins, i), mid, cme); } + RB_GC_GUARD(origins); } } diff --git a/zjit/src/backend/lir.rs b/zjit/src/backend/lir.rs index a417df300a..91a1a3ffcf 100644 --- a/zjit/src/backend/lir.rs +++ b/zjit/src/backend/lir.rs @@ -4,12 +4,12 @@ use std::mem::take; use std::rc::Rc; use crate::bitset::BitSet; use crate::codegen::{local_size_and_idx_to_ep_offset, perf_symbol_range_start, perf_symbol_range_end}; -use crate::cruby::{IseqPtr, RUBY_OFFSET_CFP_ISEQ, RUBY_OFFSET_CFP_JIT_RETURN, RUBY_OFFSET_CFP_PC, RUBY_OFFSET_CFP_SP, SIZEOF_VALUE_I32, vm_stack_canary}; +use crate::cruby::{IseqPtr, RUBY_OFFSET_CFP_ISEQ, RUBY_OFFSET_CFP_JIT_RETURN, RUBY_OFFSET_CFP_PC, RUBY_OFFSET_CFP_SP, SIZEOF_VALUE_I32, vm_stack_canary, YarvInsnIdx }; use crate::hir::{Invariant, SideExitReason}; use crate::hir; use crate::options::{TraceExits, PerfMap, get_option}; use crate::cruby::VALUE; -use crate::payload::IseqVersionRef; +use crate::payload::{IseqVersionRef, get_or_create_iseq_payload}; use crate::stats::{exit_counter_ptr, exit_counter_ptr_for_opcode, side_exit_counter, CompileError}; use crate::virtualmem::CodePtr; use crate::asm::{CodeBlock, Label}; @@ -2402,7 +2402,8 @@ impl Assembler fn compile_exit_recompile(asm: &mut Assembler, exit: &SideExit) { if let Some(recompile) = &exit.recompile { - + let payload = get_or_create_iseq_payload(exit.iseq); + payload.reset_profiles_remaining(recompile.insn_idx as YarvInsnIdx); use crate::codegen::exit_recompile; asm_comment!(asm, "profile and maybe recompile"); asm_ccall!(asm, exit_recompile, diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs index 108739c3e6..ee80ac0db5 100644 --- a/zjit/src/codegen.rs +++ b/zjit/src/codegen.rs @@ -699,9 +699,9 @@ fn gen_insn(cb: &mut CodeBlock, jit: &mut JITState, asm: &mut Assembler, functio let val_type = function.type_of(*val); gen_has_type(jit, asm, opnd!(val), val_type, *expected) } - Insn::GuardType { val, guard_type, state } => { - let val_type = function.type_of(*val); - gen_guard_type(jit, asm, opnd!(val), val_type, *guard_type, &function.frame_state(*state)) + &Insn::GuardType { val, guard_type, state, recompile } => { + let val_type = function.type_of(val); + gen_guard_type(jit, asm, opnd!(val), val_type, guard_type, recompile, &function.frame_state(state)) } &Insn::GuardBitEquals { val, expected, reason, state, recompile } => gen_guard_bit_equals(jit, asm, opnd!(val), expected, reason, recompile, &function.frame_state(state)), &Insn::GuardAnyBitSet { val, mask, reason, state, .. } => gen_guard_any_bit_set(jit, asm, opnd!(val), mask, reason, &function.frame_state(state)), @@ -2525,33 +2525,33 @@ fn gen_has_type(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, val_typ } /// Compile a type check with a side exit -fn gen_guard_type(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, val_type: Type, guard_type: Type, state: &FrameState) -> lir::Opnd { +fn gen_guard_type(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, val_type: Type, guard_type: Type, recompile: Option<Recompile>, state: &FrameState) -> lir::Opnd { let is_known_heap_basic_object = val_type.is_subtype(types::HeapBasicObject); gen_incr_counter(asm, Counter::guard_type_count); if guard_type.is_subtype(types::Fixnum) { asm.test(val, Opnd::UImm(RUBY_FIXNUM_FLAG as u64)); - asm.jz(jit, side_exit(jit, state, GuardType(guard_type))); + asm.jz(jit, side_exit_with_recompile(jit, state, GuardType(guard_type), recompile)); } else if guard_type.is_subtype(types::Flonum) { // Flonum: (val & RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG let masked = asm.and(val, Opnd::UImm(RUBY_FLONUM_MASK as u64)); asm.cmp(masked, Opnd::UImm(RUBY_FLONUM_FLAG as u64)); - asm.jne(jit, side_exit(jit, state, GuardType(guard_type))); + asm.jne(jit, side_exit_with_recompile(jit, state, GuardType(guard_type), recompile)); } else if guard_type.is_subtype(types::StaticSymbol) { // Static symbols have (val & 0xff) == RUBY_SYMBOL_FLAG // Use 8-bit comparison like YJIT does. // If `val` is a constant (rare but possible), put it in a register to allow masking. let val = asm.load_imm(val); asm.cmp(val.with_num_bits(8), Opnd::UImm(RUBY_SYMBOL_FLAG as u64)); - asm.jne(jit, side_exit(jit, state, GuardType(guard_type))); + asm.jne(jit, side_exit_with_recompile(jit, state, GuardType(guard_type), recompile)); } else if guard_type.is_subtype(types::NilClass) { asm.cmp(val, Qnil.into()); - asm.jne(jit, side_exit(jit, state, GuardType(guard_type))); + asm.jne(jit, side_exit_with_recompile(jit, state, GuardType(guard_type), recompile)); } else if guard_type.is_subtype(types::TrueClass) { asm.cmp(val, Qtrue.into()); - asm.jne(jit, side_exit(jit, state, GuardType(guard_type))); + asm.jne(jit, side_exit_with_recompile(jit, state, GuardType(guard_type), recompile)); } else if guard_type.is_subtype(types::FalseClass) { asm.cmp(val, Qfalse.into()); - asm.jne(jit, side_exit(jit, state, GuardType(guard_type))); + asm.jne(jit, side_exit_with_recompile(jit, state, GuardType(guard_type), recompile)); } else if guard_type.is_immediate() { // All immediate types' guard should have been handled above panic!("unexpected immediate guard type: {guard_type}"); @@ -2562,7 +2562,7 @@ fn gen_guard_type(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, val_t // TODO: Max thinks codegen should not care about the shapes of the operands except to create them. (Shopify/ruby#685) let val = asm.load_mem(val); - let side_exit = side_exit(jit, state, GuardType(guard_type)); + let side_exit = side_exit_with_recompile(jit, state, GuardType(guard_type), recompile); if !is_known_heap_basic_object { // Check if it's a special constant asm.test(val, (RUBY_IMMEDIATE_MASK as u64).into()); @@ -2579,7 +2579,7 @@ fn gen_guard_type(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, val_t asm.cmp(klass, Opnd::Value(expected_class)); asm.jne(jit, side_exit); } else if let Some(builtin_type) = guard_type.builtin_type_equivalent() { - let side = side_exit(jit, state, GuardType(guard_type)); + let side = side_exit_with_recompile(jit, state, GuardType(guard_type), recompile); if !is_known_heap_basic_object { // Check special constant @@ -2598,7 +2598,7 @@ fn gen_guard_type(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, val_t asm.cmp(tag, Opnd::UImm(builtin_type as u64)); asm.jne(jit, side); } else if guard_type.bit_equal(types::HeapBasicObject) { - let side_exit = side_exit(jit, state, GuardType(guard_type)); + let side_exit = side_exit_with_recompile(jit, state, GuardType(guard_type), recompile); asm.cmp(val, Opnd::Value(Qfalse)); asm.je(jit, side_exit.clone()); asm.test(val, (RUBY_IMMEDIATE_MASK as u64).into()); diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index 805503b82b..fa035292e4 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -1168,7 +1168,7 @@ pub enum Insn { HasType { val: InsnId, expected: Type }, /// Side-exit if val doesn't have the expected type. - GuardType { val: InsnId, guard_type: Type, state: InsnId }, + GuardType { val: InsnId, guard_type: Type, state: InsnId, recompile: Option<Recompile> }, /// Side-exit if val is not the expected Const. GuardBitEquals { val: InsnId, expected: Const, reason: SideExitReason, state: InsnId, recompile: Option<Recompile> }, /// Side-exit if (val & mask) == 0 @@ -2125,7 +2125,13 @@ impl<'a> std::fmt::Display for InsnPrinter<'a> { Insn::IntOr { left, right } => { write!(f, "IntOr {left}, {right}") }, Insn::FixnumLShift { left, right, .. } => { write!(f, "FixnumLShift {left}, {right}") }, Insn::FixnumRShift { left, right, .. } => { write!(f, "FixnumRShift {left}, {right}") }, - Insn::GuardType { val, guard_type, .. } => { write!(f, "GuardType {val}, {}", guard_type.print(self.ptr_map)) }, + Insn::GuardType { val, guard_type, recompile, .. } => { + write!(f, "GuardType {val}, {}", guard_type.print(self.ptr_map))?; + if recompile.is_some() { + write!(f, " recompile")?; + } + return Ok(()) + }, Insn::RefineType { val, new_type, .. } => { write!(f, "RefineType {val}, {}", new_type.print(self.ptr_map)) }, Insn::HasType { val, expected, .. } => { write!(f, "HasType {val}, {}", expected.print(self.ptr_map)) }, Insn::GuardBitEquals { val, expected, recompile, .. } => { @@ -3468,7 +3474,7 @@ impl Function { pub fn coerce_to(&mut self, block: BlockId, val: InsnId, guard_type: Type, state: InsnId) -> InsnId { if self.is_a(val, guard_type) { return val; } - self.push_insn(block, Insn::GuardType { val, guard_type, state }) + self.push_insn(block, Insn::GuardType { val, guard_type, state, recompile: None }) } fn count_complex_call_features(&mut self, block: BlockId, ci_flags: c_uint) { @@ -3711,7 +3717,8 @@ impl Function { // Add GuardType for profiled receiver if let Some(profiled_type) = profiled_type { - recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state }); + let argc = unsafe { vm_ci_argc(ci) } as i32; + recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state, recompile: Some(Recompile::ProfileSend { argc }) }); } let send_direct = self.push_insn(block, Insn::SendDirect { recv, cd, cme, iseq, args: processed_args, kw_bits, state: send_state, block: send_block }); @@ -3754,7 +3761,8 @@ impl Function { self.push_insn(block, Insn::PatchPoint { invariant: Invariant::MethodRedefined { klass, method: mid, cme }, state }); if let Some(profiled_type) = profiled_type { - recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state }); + let argc = unsafe { vm_ci_argc(ci) } as i32; + recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state, recompile: Some(Recompile::ProfileSend{ argc }) }); } let send_direct = self.push_insn(block, Insn::SendDirect { recv, cd, cme, iseq, args: processed_args, kw_bits, state: send_state, block: None }); @@ -3774,7 +3782,8 @@ impl Function { self.push_insn(block, Insn::PatchPoint { invariant: Invariant::MethodRedefined { klass, method: mid, cme }, state }); if let Some(profiled_type) = profiled_type { - recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state }); + let argc = unsafe { vm_ci_argc(ci) } as i32; + recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state, recompile: Some(Recompile::ProfileSend{ argc }) }); } let id = unsafe { get_cme_def_body_attr_id(cme) }; @@ -3790,7 +3799,8 @@ impl Function { self.push_insn(block, Insn::PatchPoint { invariant: Invariant::MethodRedefined { klass, method: mid, cme }, state }); if let Some(profiled_type) = profiled_type { - recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state }); + let argc = unsafe { vm_ci_argc(ci) } as i32; + recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state, recompile: Some(Recompile::ProfileSend{ argc }) }); } let id = unsafe { get_cme_def_body_attr_id(cme) }; @@ -3812,7 +3822,8 @@ impl Function { } self.push_insn(block, Insn::PatchPoint { invariant: Invariant::MethodRedefined { klass, method: mid, cme }, state }); if let Some(profiled_type) = profiled_type { - recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state }); + let argc = unsafe { vm_ci_argc(ci) } as i32; + recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state, recompile: Some(Recompile::ProfileSend{ argc }) }); } let kw_splat = flags & VM_CALL_KW_SPLAT != 0; let invoke_proc = self.push_insn(block, Insn::InvokeProc { recv, args: args.clone(), state, kw_splat }); @@ -3850,7 +3861,8 @@ impl Function { } self.push_insn(block, Insn::PatchPoint { invariant: Invariant::MethodRedefined { klass, method: mid, cme }, state }); if let Some(profiled_type) = profiled_type { - recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state }); + let argc = unsafe { vm_ci_argc(ci) } as i32; + recv = self.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state, recompile: Some(Recompile::ProfileSend{ argc }) }); } // All structs from the same Struct class should have the same // length. So if our recv is embedded all runtime @@ -3921,12 +3933,12 @@ impl Function { if recv_type.is_string() { self.push_insn(block, Insn::PatchPoint { invariant: Invariant::NoSingletonClass { klass: recv_type.class() }, state }); - let guard = self.push_insn(block, Insn::GuardType { val, guard_type: types::String, state }); + let guard = self.push_insn(block, Insn::GuardType { val, guard_type: types::String, state, recompile: None }); // Infer type so AnyToString can fold off this self.insn_types[guard.0] = self.infer_type(guard); self.make_equal_to(insn_id, guard); } else { - let recv = self.push_insn(block, Insn::GuardType { val, guard_type: Type::from_profiled_type(recv_type), state}); + let recv = self.push_insn(block, Insn::GuardType { val, guard_type: Type::from_profiled_type(recv_type), state, recompile: None }); let send_to_s = self.push_insn(block, Insn::Send { recv, cd, block: None, args: vec![], state, reason: ObjToStringNotString }); self.make_equal_to(insn_id, send_to_s); } @@ -4373,16 +4385,16 @@ impl Function { fn load_ivar_guard_type(&mut self, block: BlockId, recv: InsnId, recv_type: ProfiledType, state: InsnId) -> InsnId { if recv_type.flags().is_t_class() { // Check class first since `Class < Module` - self.push_insn(block, Insn::GuardType { val: recv, guard_type: types::Class, state }) + self.push_insn(block, Insn::GuardType { val: recv, guard_type: types::Class, state, recompile: None }) } else if recv_type.flags().is_t_module() { - self.push_insn(block, Insn::GuardType { val: recv, guard_type: types::Module, state }) + self.push_insn(block, Insn::GuardType { val: recv, guard_type: types::Module, state, recompile: None }) } else if recv_type.flags().is_t_data() { - self.push_insn(block, Insn::GuardType { val: recv, guard_type: types::TData, state }) + self.push_insn(block, Insn::GuardType { val: recv, guard_type: types::TData, state, recompile: None }) } else { // HeapBasicObject is wider than T_OBJECT, but shapes for T_OBJECTs are in a pool of // its own and are guaranteed to be different from shapes of any other T_* types. So // the shape check that follows already covers checking for T_OBJECT. - self.push_insn(block, Insn::GuardType { val: recv, guard_type: types::HeapBasicObject, state }) + self.push_insn(block, Insn::GuardType { val: recv, guard_type: types::HeapBasicObject, state, recompile: None }) } } @@ -4769,7 +4781,8 @@ impl Function { if let Some(profiled_type) = profiled_type { // Guard receiver class - recv = fun.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state }); + let argc = unsafe { vm_ci_argc(call_info) } as i32; + recv = fun.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state, recompile: Some(Recompile::ProfileSend { argc }) }); fun.insn_types[recv.0] = fun.infer_type(recv); } @@ -4835,7 +4848,8 @@ impl Function { if let Some(profiled_type) = profiled_type { // Guard receiver class - recv = fun.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state }); + let argc = unsafe { vm_ci_argc(call_info) } as i32; + recv = fun.push_insn(block, Insn::GuardType { val: recv, guard_type: Type::from_profiled_type(profiled_type), state, recompile: Some(Recompile::ProfileSend { argc }) }); fun.insn_types[recv.0] = fun.infer_type(recv); } @@ -7093,9 +7107,9 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> { } let ty = Type::from_profiled_type(summary.bucket(0)); let obj = if ty.is_subtype(types::NilClass) { - fun.push_insn(block, Insn::GuardType { val: hash, guard_type: types::NilClass, state: exit_id }) + fun.push_insn(block, Insn::GuardType { val: hash, guard_type: types::NilClass, state: exit_id, recompile: None }) } else if ty.is_subtype(types::HashExact) { - fun.push_insn(block, Insn::GuardType { val: hash, guard_type: types::HashExact, state: exit_id }) + fun.push_insn(block, Insn::GuardType { val: hash, guard_type: types::HashExact, state: exit_id, recompile: None }) } else { fun.push_insn(block, Insn::SideExit { state: exit_id, reason: SideExitReason::SplatKwNotNilOrHash, recompile: None }); break; // End the block @@ -7161,7 +7175,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> { let id = ID(get_arg(pc, 0).as_u64()); let pushval = get_arg(pc, 2); if let Some(summary) = fun.polymorphic_summary(&profiles, self_param, exit_state.insn_idx) { - self_param = fun.push_insn(block, Insn::GuardType { val: self_param, guard_type: types::HeapBasicObject, state: exit_id }); + self_param = fun.push_insn(block, Insn::GuardType { val: self_param, guard_type: types::HeapBasicObject, state: exit_id, recompile: None }); let rbasic_flags = fun.load_rbasic_flags(block, self_param); let join_block = insn_idx_to_block.get(&insn_idx).copied().unwrap_or_else(|| fun.new_block(insn_idx)); let join_param = fun.push_insn(join_block, Insn::Param); @@ -8332,7 +8346,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> { break; // End the block } if let Some(summary) = fun.polymorphic_summary(&profiles, self_param, exit_state.insn_idx) { - self_param = fun.push_insn(block, Insn::GuardType { val: self_param, guard_type: types::HeapBasicObject, state: exit_id }); + self_param = fun.push_insn(block, Insn::GuardType { val: self_param, guard_type: types::HeapBasicObject, state: exit_id, recompile: None }); let rbasic_flags = fun.load_rbasic_flags(block, self_param); let join_block = insn_idx_to_block.get(&insn_idx).copied().unwrap_or_else(|| fun.new_block(insn_idx)); let join_param = fun.push_insn(join_block, Insn::Param); @@ -8540,7 +8554,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> { break; // End the block } let val = state.stack_pop()?; - let array = fun.push_insn(block, Insn::GuardType { val, guard_type: types::ArrayExact, state: exit_id, }); + let array = fun.push_insn(block, Insn::GuardType { val, guard_type: types::ArrayExact, state: exit_id, recompile: None }); let length = fun.push_insn(block, Insn::ArrayLength { array }); let expected = fun.push_insn(block, Insn::Const { val: Const::CInt64(num as i64) }); fun.push_insn(block, Insn::GuardGreaterEq { left: length, right: expected, reason: SideExitReason::ExpandArray, state: exit_id }); diff --git a/zjit/src/hir/opt_tests.rs b/zjit/src/hir/opt_tests.rs index 74b951d2e5..9a2ff9f03b 100644 --- a/zjit/src/hir/opt_tests.rs +++ b/zjit/src/hir/opt_tests.rs @@ -225,7 +225,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[0] = Const Value(0) PatchPoint MethodRedefined(Integer@0x1008, -@0x1010, cme:0x1018) - v26:Fixnum = GuardType v10, Fixnum + v26:Fixnum = GuardType v10, Fixnum recompile CheckInterrupts Return v26 "); @@ -455,7 +455,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1008, /@0x1010, cme:0x1018) - v26:Fixnum = GuardType v10, Fixnum + v26:Fixnum = GuardType v10, Fixnum recompile CheckInterrupts Return v26 "); @@ -1132,7 +1132,7 @@ mod hir_opt_tests { v15:Fixnum[0] = Const Value(0) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []@0x1010, cme:0x1018) - v27:ArrayExact = GuardType v10, ArrayExact + v27:ArrayExact = GuardType v10, ArrayExact recompile v35:CInt64[0] = Const CInt64(0) v29:CInt64 = ArrayLength v27 v30:CInt64[0] = GuardLess v35, v29 @@ -1165,7 +1165,7 @@ mod hir_opt_tests { v15:Fixnum[0] = Const Value(0) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []@0x1010, cme:0x1018) - v27:ArrayExact = GuardType v10, ArrayExact + v27:ArrayExact = GuardType v10, ArrayExact recompile v35:CInt64[0] = Const CInt64(0) v29:CInt64 = ArrayLength v27 v30:CInt64[0] = GuardLess v35, v29 @@ -1248,7 +1248,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(CustomEq@0x1008) PatchPoint MethodRedefined(CustomEq@0x1008, !=@0x1010, cme:0x1018) - v30:ObjectSubclass[class_exact:CustomEq] = GuardType v10, ObjectSubclass[class_exact:CustomEq] + v30:ObjectSubclass[class_exact:CustomEq] = GuardType v10, ObjectSubclass[class_exact:CustomEq] recompile v31:BoolExact = CCallWithFrame v30, :BasicObject#!=@0x1040, v30 v21:NilClass = Const Value(nil) CheckInterrupts @@ -1280,7 +1280,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1008, +@0x1010, cme:0x1018) - v26:Fixnum = GuardType v10, Fixnum + v26:Fixnum = GuardType v10, Fixnum recompile v27:Fixnum = FixnumAdd v26, v15 CheckInterrupts Return v27 @@ -1406,7 +1406,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v19:BasicObject = SendDirect v18, 0x1038, :foo (0x1048) CheckInterrupts Return v19 @@ -1434,7 +1434,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, baz@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:Fixnum[1] = Const Value(1) CheckInterrupts Return v20 @@ -1461,7 +1461,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, baz@0x1008, cme:0x1010) - v19:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v19:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile CheckInterrupts Return v19 "); @@ -1498,7 +1498,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v21:BasicObject = SendDirect v20, 0x1038, :foo (0x1048), v11 CheckInterrupts Return v21 @@ -1530,7 +1530,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, fun_new_map@0x1010, cme:0x1018) - v27:ArraySubclass[class_exact:C] = GuardType v10, ArraySubclass[class_exact:C] + v27:ArraySubclass[class_exact:C] = GuardType v10, ArraySubclass[class_exact:C] recompile v28:BasicObject = SendDirect v27, 0x1040, :fun_new_map (0x1050) PatchPoint NoEPEscape(test) v18:CPtr = LoadSP @@ -1567,7 +1567,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, bar@0x1010, cme:0x1018) - v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v29:BasicObject = CCallWithFrame v28, :Enumerable#bar@0x1040, block=0x1048 PatchPoint NoEPEscape(test) v18:CPtr = LoadSP @@ -1604,7 +1604,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, length@0x1010, cme:0x1018) - v24:ArrayExact = GuardType v10, ArrayExact + v24:ArrayExact = GuardType v10, ArrayExact recompile v25:CInt64 = ArrayLength v24 v26:Fixnum = BoxFixnum v25 CheckInterrupts @@ -1662,7 +1662,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v19:BasicObject = SendDirect v18, 0x1038, :foo (0x1048) CheckInterrupts Return v19 @@ -1690,7 +1690,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): v11:Fixnum[3] = Const Value(3) PatchPoint MethodRedefined(Object@0x1000, Integer@0x1008, cme:0x1010) - v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v21:BasicObject = SendDirect v20, 0x1038, :Integer (0x1048), v11 CheckInterrupts Return v21 @@ -1720,7 +1720,7 @@ mod hir_opt_tests { v11:Fixnum[1] = Const Value(1) v13:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts Return v23 @@ -1750,7 +1750,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v23:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v23:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v24:BasicObject = SendDirect v23, 0x1038, :foo (0x1048) PatchPoint MethodRedefined(Object@0x1000, bar@0x1050, cme:0x1058) v27:BasicObject = SendDirect v23, 0x1038, :bar (0x1048) @@ -1778,7 +1778,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v19:BasicObject = SendDirect v18, 0x1038, :foo (0x1048) CheckInterrupts Return v19 @@ -1805,7 +1805,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): v11:Fixnum[3] = Const Value(3) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v21:BasicObject = SendDirect v20, 0x1038, :foo (0x1048), v11 CheckInterrupts Return v21 @@ -1833,7 +1833,7 @@ mod hir_opt_tests { v11:Fixnum[3] = Const Value(3) v13:Fixnum[4] = Const Value(4) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts Return v23 @@ -1860,7 +1860,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, target@0x1008, cme:0x1010) - v44:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v44:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v45:BasicObject = SendDirect v44, 0x1038, :target (0x1048) v14:Fixnum[10] = Const Value(10) v16:Fixnum[20] = Const Value(20) @@ -1901,7 +1901,7 @@ mod hir_opt_tests { v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v12:StringExact = StringCopy v11 PatchPoint MethodRedefined(Object@0x1008, puts@0x1010, cme:0x1018) - v22:ObjectSubclass[class_exact*:Object@VALUE(0x1008)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1008)] + v22:ObjectSubclass[class_exact*:Object@VALUE(0x1008)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1008)] recompile v23:BasicObject = CCallVariadic v22, :Kernel#puts@0x1040, v12 CheckInterrupts Return v23 @@ -1936,7 +1936,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, +@0x1010, cme:0x1018) - v27:Fixnum = GuardType v12, Fixnum + v27:Fixnum = GuardType v12, Fixnum recompile v29:Fixnum[100] = Const Value(100) CheckInterrupts Return v29 @@ -1966,7 +1966,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, +@0x1010, cme:0x1018) - v28:Fixnum = GuardType v12, Fixnum + v28:Fixnum = GuardType v12, Fixnum recompile v29:Fixnum = GuardType v13, Fixnum v30:Fixnum = FixnumAdd v28, v29 CheckInterrupts @@ -1996,7 +1996,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1008, +@0x1010, cme:0x1018) - v26:Fixnum = GuardType v10, Fixnum + v26:Fixnum = GuardType v10, Fixnum recompile v27:Fixnum = FixnumAdd v26, v15 CheckInterrupts Return v27 @@ -2055,7 +2055,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, []@0x1010, cme:0x1018) - v28:Fixnum = GuardType v12, Fixnum + v28:Fixnum = GuardType v12, Fixnum recompile v29:Fixnum = GuardType v13, Fixnum v30:Fixnum = FixnumAref v28, v29 CheckInterrupts @@ -2166,7 +2166,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, <@0x1010, cme:0x1018) - v28:Fixnum = GuardType v12, Fixnum + v28:Fixnum = GuardType v12, Fixnum recompile v29:Fixnum = GuardType v13, Fixnum v30:BoolExact = FixnumLt v28, v29 CheckInterrupts @@ -2196,7 +2196,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1008, <@0x1010, cme:0x1018) - v26:Fixnum = GuardType v10, Fixnum + v26:Fixnum = GuardType v10, Fixnum recompile v27:BoolExact = FixnumLt v26, v15 CheckInterrupts Return v27 @@ -2484,7 +2484,7 @@ mod hir_opt_tests { v15:Fixnum[0] = Const Value(0) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []@0x1010, cme:0x1018) - v27:ArrayExact = GuardType v10, ArrayExact + v27:ArrayExact = GuardType v10, ArrayExact recompile v35:CInt64[0] = Const CInt64(0) v29:CInt64 = ArrayLength v27 v30:CInt64[0] = GuardLess v35, v29 @@ -2519,7 +2519,7 @@ mod hir_opt_tests { v15:Fixnum[0] = Const Value(0) PatchPoint NoSingletonClass(Hash@0x1008) PatchPoint MethodRedefined(Hash@0x1008, []@0x1010, cme:0x1018) - v27:HashExact = GuardType v10, HashExact + v27:HashExact = GuardType v10, HashExact recompile v28:BasicObject = HashAref v27, v15 CheckInterrupts Return v28 @@ -2830,7 +2830,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, +@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile v33:Fixnum = GuardType v13, Fixnum v24:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2864,7 +2864,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, -@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile v33:Fixnum = GuardType v13, Fixnum v24:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2898,7 +2898,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, *@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile v33:Fixnum = GuardType v13, Fixnum v24:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2932,7 +2932,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, /@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile v33:Fixnum = GuardType v13, Fixnum v34:Integer = FixnumDiv v32, v33 v24:Fixnum[5] = Const Value(5) @@ -2967,7 +2967,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, %@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile v33:Fixnum = GuardType v13, Fixnum v34:Fixnum = FixnumMod v32, v33 v24:Fixnum[5] = Const Value(5) @@ -3002,7 +3002,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, <@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile v33:Fixnum = GuardType v13, Fixnum v24:Fixnum[5] = Const Value(5) CheckInterrupts @@ -3036,7 +3036,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, <=@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile v33:Fixnum = GuardType v13, Fixnum v24:Fixnum[5] = Const Value(5) CheckInterrupts @@ -3070,7 +3070,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, >@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile v33:Fixnum = GuardType v13, Fixnum v24:Fixnum[5] = Const Value(5) CheckInterrupts @@ -3104,7 +3104,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, >=@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile v33:Fixnum = GuardType v13, Fixnum v24:Fixnum[5] = Const Value(5) CheckInterrupts @@ -3138,7 +3138,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, ==@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile v33:Fixnum = GuardType v13, Fixnum v24:Fixnum[5] = Const Value(5) CheckInterrupts @@ -3172,7 +3172,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, !=@0x1010, cme:0x1018) - v32:Fixnum = GuardType v12, Fixnum + v32:Fixnum = GuardType v12, Fixnum recompile PatchPoint BOPRedefined(INTEGER_REDEFINED_OP_FLAG, BOP_EQ) v34:Fixnum = GuardType v13, Fixnum v24:Fixnum[5] = Const Value(5) @@ -3259,7 +3259,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, itself@0x1010, cme:0x1018) - v23:Fixnum = GuardType v10, Fixnum + v23:Fixnum = GuardType v10, Fixnum recompile CheckInterrupts Return v23 "); @@ -3570,7 +3570,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, block_given?@0x1008, cme:0x1010) - v19:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v19:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:CPtr = GetEP 0 v21:BoolExact = IsBlockGiven v20 CheckInterrupts @@ -3596,7 +3596,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, block_given?@0x1008, cme:0x1010) - v19:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v19:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:FalseClass = Const Value(false) CheckInterrupts Return v20 @@ -3624,7 +3624,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, block_given?@0x1008, cme:0x1010) - v23:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v23:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v15:Fixnum[5] = Const Value(5) CheckInterrupts Return v15 @@ -3751,7 +3751,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1010, cme:0x1018) - v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v24:BasicObject = SendDirect v23, 0x1040, :foo (0x1050) CheckInterrupts Return v24 @@ -3781,7 +3781,7 @@ mod hir_opt_tests { v11:Fixnum[1] = Const Value(1) v13:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts Return v23 @@ -3815,7 +3815,7 @@ mod hir_opt_tests { bb3(v8:BasicObject, v9:NilClass): v13:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v34:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v8, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v34:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v8, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v36:Fixnum[1] = Const Value(1) PatchPoint NoEPEscape(test) v21:CPtr = LoadSP @@ -3854,7 +3854,7 @@ mod hir_opt_tests { v13:Fixnum[1] = Const Value(1) SetLocal :a, l0, EP@3, v13 PatchPoint MethodRedefined(Object@0x1000, lambda@0x1008, cme:0x1010) - v45:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v8, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v45:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v8, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v46:BasicObject = CCallWithFrame v45, :Kernel#lambda@0x1038, block=0x1040 v20:CPtr = GetEP 0 v21:BasicObject = LoadField v20, :a@0x1048 @@ -3920,7 +3920,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): v11:Fixnum[10] = Const Value(10) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v21:BasicObject = SendDirect v20, 0x1038, :foo (0x1048), v11 CheckInterrupts Return v21 @@ -3950,7 +3950,7 @@ mod hir_opt_tests { v11:Fixnum[10] = Const Value(10) v13:Fixnum[20] = Const Value(20) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts Return v23 @@ -3979,7 +3979,7 @@ mod hir_opt_tests { v11:Fixnum[1] = Const Value(1) v13:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts Return v23 @@ -4009,7 +4009,7 @@ mod hir_opt_tests { v13:Fixnum[1] = Const Value(1) v15:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v25:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v25:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v26:BasicObject = SendDirect v25, 0x1038, :foo (0x1048), v13, v15, v11 CheckInterrupts Return v26 @@ -4039,7 +4039,7 @@ mod hir_opt_tests { v13:Fixnum[2] = Const Value(2) v15:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v25:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v25:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v26:BasicObject = SendDirect v25, 0x1038, :foo (0x1048), v11, v15, v13 CheckInterrupts Return v26 @@ -4068,7 +4068,7 @@ mod hir_opt_tests { v11:Fixnum[0] = Const Value(0) v13:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts Return v23 @@ -4098,7 +4098,7 @@ mod hir_opt_tests { v13:Fixnum[3] = Const Value(3) v15:Fixnum[4] = Const Value(4) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v37:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v37:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v38:BasicObject = SendDirect v37, 0x1038, :foo (0x1048), v11, v13, v15 v20:Fixnum[1] = Const Value(1) v22:Fixnum[2] = Const Value(2) @@ -4135,7 +4135,7 @@ mod hir_opt_tests { v13:Fixnum[3] = Const Value(3) v34:Fixnum[4] = Const Value(4) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v37:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v37:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v38:BasicObject = SendDirect v37, 0x1038, :foo (0x1048), v11, v13, v34 v18:Fixnum[1] = Const Value(1) v20:Fixnum[2] = Const Value(2) @@ -4170,7 +4170,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): v11:Fixnum[6] = Const Value(6) PatchPoint MethodRedefined(Object@0x1000, target@0x1008, cme:0x1010) - v48:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v48:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v49:BasicObject = SendDirect v48, 0x1038, :target (0x1048), v11 v16:Fixnum[10] = Const Value(10) v18:Fixnum[20] = Const Value(20) @@ -4212,7 +4212,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): v11:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v21:BasicObject = SendDirect v20, 0x1038, :foo (0x1048), v11 CheckInterrupts Return v21 @@ -4327,7 +4327,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): v17:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v21:BasicObject = SendDirect v20, 0x1038, :foo (0x1048), v17 CheckInterrupts Return v21 @@ -4786,7 +4786,7 @@ mod hir_opt_tests { v17:HeapBasicObject = ObjectAlloc v43 PatchPoint NoSingletonClass(Set@0x1008) PatchPoint MethodRedefined(Set@0x1008, initialize@0x1038, cme:0x1040) - v49:SetExact = GuardType v17, SetExact + v49:SetExact = GuardType v17, SetExact recompile v50:BasicObject = CCallVariadic v49, :Set#initialize@0x1068 CheckInterrupts Return v49 @@ -5467,7 +5467,7 @@ mod hir_opt_tests { v15:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Proc@0x1008) PatchPoint MethodRedefined(Proc@0x1008, call@0x1010, cme:0x1018) - v25:ObjectSubclass[class_exact:Proc] = GuardType v10, ObjectSubclass[class_exact:Proc] + v25:ObjectSubclass[class_exact:Proc] = GuardType v10, ObjectSubclass[class_exact:Proc] recompile v26:BasicObject = InvokeProc v25, v15 CheckInterrupts Return v26 @@ -5500,7 +5500,7 @@ mod hir_opt_tests { v15:Fixnum[2] = Const Value(2) PatchPoint NoSingletonClass(Proc@0x1008) PatchPoint MethodRedefined(Proc@0x1008, []@0x1010, cme:0x1018) - v26:ObjectSubclass[class_exact:Proc] = GuardType v10, ObjectSubclass[class_exact:Proc] + v26:ObjectSubclass[class_exact:Proc] = GuardType v10, ObjectSubclass[class_exact:Proc] recompile v27:BasicObject = InvokeProc v26, v15 CheckInterrupts Return v27 @@ -5533,7 +5533,7 @@ mod hir_opt_tests { v15:Fixnum[3] = Const Value(3) PatchPoint NoSingletonClass(Proc@0x1008) PatchPoint MethodRedefined(Proc@0x1008, yield@0x1010, cme:0x1018) - v25:ObjectSubclass[class_exact:Proc] = GuardType v10, ObjectSubclass[class_exact:Proc] + v25:ObjectSubclass[class_exact:Proc] = GuardType v10, ObjectSubclass[class_exact:Proc] recompile v26:BasicObject = InvokeProc v25, v15 CheckInterrupts Return v26 @@ -5566,7 +5566,7 @@ mod hir_opt_tests { v15:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Proc@0x1008) PatchPoint MethodRedefined(Proc@0x1008, ===@0x1010, cme:0x1018) - v25:ObjectSubclass[class_exact:Proc] = GuardType v10, ObjectSubclass[class_exact:Proc] + v25:ObjectSubclass[class_exact:Proc] = GuardType v10, ObjectSubclass[class_exact:Proc] recompile v26:BasicObject = InvokeProc v25, v15 CheckInterrupts Return v26 @@ -7115,7 +7115,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint MethodRedefined(Object@0x1000, zero@0x1008, cme:0x1010) - v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v22:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v28:StaticSymbol[:b] = Const Value(VALUE(0x1038)) PatchPoint MethodRedefined(Object@0x1000, one@0x1040, cme:0x1048) CheckInterrupts @@ -7328,7 +7328,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(NilClass@0x1008, nil?@0x1010, cme:0x1018) - v24:NilClass = GuardType v10, NilClass + v24:NilClass = GuardType v10, NilClass recompile v25:TrueClass = Const Value(true) CheckInterrupts Return v25 @@ -7357,7 +7357,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(FalseClass@0x1008, nil?@0x1010, cme:0x1018) - v24:FalseClass = GuardType v10, FalseClass + v24:FalseClass = GuardType v10, FalseClass recompile v25:FalseClass = Const Value(false) CheckInterrupts Return v25 @@ -7386,7 +7386,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(TrueClass@0x1008, nil?@0x1010, cme:0x1018) - v24:TrueClass = GuardType v10, TrueClass + v24:TrueClass = GuardType v10, TrueClass recompile v25:FalseClass = Const Value(false) CheckInterrupts Return v25 @@ -7415,7 +7415,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Symbol@0x1008, nil?@0x1010, cme:0x1018) - v24:StaticSymbol = GuardType v10, StaticSymbol + v24:StaticSymbol = GuardType v10, StaticSymbol recompile v25:FalseClass = Const Value(false) CheckInterrupts Return v25 @@ -7444,7 +7444,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, nil?@0x1010, cme:0x1018) - v24:Fixnum = GuardType v10, Fixnum + v24:Fixnum = GuardType v10, Fixnum recompile v25:FalseClass = Const Value(false) CheckInterrupts Return v25 @@ -7473,7 +7473,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Float@0x1008, nil?@0x1010, cme:0x1018) - v24:Flonum = GuardType v10, Flonum + v24:Flonum = GuardType v10, Flonum recompile v25:FalseClass = Const Value(false) CheckInterrupts Return v25 @@ -7503,7 +7503,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, nil?@0x1010, cme:0x1018) - v25:StringExact = GuardType v10, StringExact + v25:StringExact = GuardType v10, StringExact recompile v26:FalseClass = Const Value(false) CheckInterrupts Return v26 @@ -7533,7 +7533,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, !@0x1010, cme:0x1018) - v25:ArrayExact = GuardType v10, ArrayExact + v25:ArrayExact = GuardType v10, ArrayExact recompile v26:FalseClass = Const Value(false) CheckInterrupts Return v26 @@ -7562,7 +7562,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(FalseClass@0x1008, !@0x1010, cme:0x1018) - v24:FalseClass = GuardType v10, FalseClass + v24:FalseClass = GuardType v10, FalseClass recompile v25:TrueClass = Const Value(true) CheckInterrupts Return v25 @@ -7591,7 +7591,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(NilClass@0x1008, !@0x1010, cme:0x1018) - v24:NilClass = GuardType v10, NilClass + v24:NilClass = GuardType v10, NilClass recompile v25:TrueClass = Const Value(true) CheckInterrupts Return v25 @@ -7635,11 +7635,25 @@ mod hir_opt_tests { v29:NilClass = Const Value(nil) Jump bb5(v25, v26, v29) bb5(v31:BasicObject, v32:BasicObject, v33:Falsy): - PatchPoint MethodRedefined(NilClass@0x1008, !@0x1010, cme:0x1018) - v45:NilClass = GuardType v33, NilClass - v46:TrueClass = Const Value(true) + v37:CBool = HasType v33, FalseClass + CondBranch v37, bb8(v31, v32, v33), bb9() + bb8(v38:BasicObject, v39:BasicObject, v40:Falsy): + PatchPoint MethodRedefined(FalseClass@0x1008, !@0x1010, cme:0x1018) + v68:TrueClass = Const Value(true) + Jump bb7(v38, v39, v68) + bb9(): + v46:CBool = HasType v33, NilClass + CondBranch v46, bb10(v31, v32, v33), bb11() + bb10(v47:BasicObject, v48:BasicObject, v49:Falsy): + PatchPoint MethodRedefined(NilClass@0x1040, !@0x1010, cme:0x1018) + v71:TrueClass = Const Value(true) + Jump bb7(v47, v48, v71) + bb11(): + v55:BasicObject = Send v33, :! # SendFallbackReason: SendWithoutBlock: polymorphic fallback + Jump bb7(v31, v32, v55) + bb7(v57:BasicObject, v58:BasicObject, v59:BasicObject): CheckInterrupts - Return v46 + Return v59 "); } @@ -7666,7 +7680,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, empty?@0x1010, cme:0x1018) - v25:ArrayExact = GuardType v10, ArrayExact + v25:ArrayExact = GuardType v10, ArrayExact recompile v26:CInt64 = ArrayLength v25 v27:CInt64[0] = Const CInt64(0) v28:CBool = IsBitEqual v26, v27 @@ -7699,7 +7713,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(Hash@0x1008) PatchPoint MethodRedefined(Hash@0x1008, empty?@0x1010, cme:0x1018) - v25:HashExact = GuardType v10, HashExact + v25:HashExact = GuardType v10, HashExact recompile v26:BoolExact = CCall v25, :Hash#empty?@0x1040 CheckInterrupts Return v26 @@ -7732,7 +7746,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, ==@0x1010, cme:0x1018) - v29:ObjectSubclass[class_exact:C] = GuardType v12, ObjectSubclass[class_exact:C] + v29:ObjectSubclass[class_exact:C] = GuardType v12, ObjectSubclass[class_exact:C] recompile v30:CBool = IsBitEqual v29, v13 v31:BoolExact = BoxBool v30 CheckInterrupts @@ -7764,7 +7778,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, &@0x1010, cme:0x1018) - v28:Fixnum = GuardType v12, Fixnum + v28:Fixnum = GuardType v12, Fixnum recompile v29:Fixnum = GuardType v13, Fixnum v30:Fixnum = FixnumAnd v28, v29 CheckInterrupts @@ -7796,7 +7810,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, |@0x1010, cme:0x1018) - v28:Fixnum = GuardType v12, Fixnum + v28:Fixnum = GuardType v12, Fixnum recompile v29:Fixnum = GuardType v13, Fixnum v30:Fixnum = FixnumOr v28, v29 CheckInterrupts @@ -7825,7 +7839,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:NilClass = Const Value(nil) CheckInterrupts Return v20 @@ -7863,7 +7877,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1010, cme:0x1018) - v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v26:CShape = LoadField v23, :shape_id@0x1040 v27:CShape[0x1041] = GuardBitEquals v26, CShape(0x1041) recompile v28:BasicObject = LoadField v23, :@foo@0x1042 @@ -7906,7 +7920,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1010, cme:0x1018) - v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v24:BasicObject = GetIvar v23, :@foo CheckInterrupts Return v24 @@ -8379,7 +8393,7 @@ mod hir_opt_tests { bb3(v9:HeapBasicObject, v10:BasicObject): v17:Fixnum[5] = Const Value(5) PatchPoint MethodRedefined(C@0x1008, foo=@0x1010, cme:0x1018) - v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v31:CShape = LoadField v28, :shape_id@0x1040 v32:CShape[0x1041] = GuardBitEquals v31, CShape(0x1041) StoreField v28, :@foo@0x1042, v17 @@ -8746,7 +8760,7 @@ mod hir_opt_tests { bb4(v13:BasicObject): v34:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1008, +@0x1010, cme:0x1018) - v45:Fixnum = GuardType v13, Fixnum + v45:Fixnum = GuardType v13, Fixnum recompile v46:Fixnum = FixnumAdd v45, v34 CheckInterrupts Return v46 @@ -8828,7 +8842,7 @@ mod hir_opt_tests { bb4(v13:BasicObject): v34:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1008, +@0x1010, cme:0x1018) - v50:Fixnum = GuardType v13, Fixnum + v50:Fixnum = GuardType v13, Fixnum recompile v51:Fixnum = FixnumAdd v50, v34 CheckInterrupts Return v51 @@ -8898,7 +8912,7 @@ mod hir_opt_tests { bb4(v13:BasicObject): v33:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1008, +@0x1010, cme:0x1018) - v44:Fixnum = GuardType v13, Fixnum + v44:Fixnum = GuardType v13, Fixnum recompile v45:Fixnum = FixnumAdd v44, v33 CheckInterrupts Return v45 @@ -9061,7 +9075,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1010, cme:0x1018) - v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v24:BasicObject = GetIvar v23, :@foo CheckInterrupts Return v24 @@ -9283,7 +9297,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v19:BasicObject = SendDirect v18, 0x1038, :foo (0x1048) CheckInterrupts Return v19 @@ -9313,7 +9327,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v19:BasicObject = SendDirect v18, 0x1038, :foo (0x1048) CheckInterrupts Return v19 @@ -9344,7 +9358,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v19:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v19:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:BasicObject = SendDirect v19, 0x1038, :foo (0x1048) CheckInterrupts Return v20 @@ -9450,7 +9464,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1010, cme:0x1018) - v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v26:CShape = LoadField v23, :shape_id@0x1040 v27:CShape[0x1041] = GuardBitEquals v26, CShape(0x1041) recompile v28:NilClass = Const Value(nil) @@ -9486,7 +9500,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1010, cme:0x1018) - v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v26:CShape = LoadField v23, :shape_id@0x1040 v27:CShape[0x1041] = GuardBitEquals v26, CShape(0x1041) recompile v28:NilClass = Const Value(nil) @@ -9522,7 +9536,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v17:Fixnum[5] = Const Value(5) PatchPoint MethodRedefined(C@0x1008, foo=@0x1010, cme:0x1018) - v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v31:CShape = LoadField v28, :shape_id@0x1040 v32:CShape[0x1041] = GuardBitEquals v31, CShape(0x1041) StoreField v28, :@foo@0x1042, v17 @@ -9561,7 +9575,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v17:Fixnum[5] = Const Value(5) PatchPoint MethodRedefined(C@0x1008, foo=@0x1010, cme:0x1018) - v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v31:CShape = LoadField v28, :shape_id@0x1040 v32:CShape[0x1041] = GuardBitEquals v31, CShape(0x1041) StoreField v28, :@foo@0x1042, v17 @@ -9597,7 +9611,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1010, cme:0x1018) - v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v24:BasicObject = LoadField v23, :foo@0x1040 CheckInterrupts Return v24 @@ -9628,7 +9642,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1010, cme:0x1018) - v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v24:CPtr = LoadField v23, :as_heap@0x1040 v25:BasicObject = LoadField v24, :foo@0x1041 CheckInterrupts @@ -9663,7 +9677,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1010, cme:0x1018) - v27:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v27:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v19:Fixnum[5] = Const Value(5) CheckInterrupts Return v19 @@ -9697,7 +9711,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo=@0x1010, cme:0x1018) - v31:ObjectSubclass[class_exact:C] = GuardType v12, ObjectSubclass[class_exact:C] + v31:ObjectSubclass[class_exact:C] = GuardType v12, ObjectSubclass[class_exact:C] recompile v32:CUInt64 = LoadField v31, :RBASIC_FLAGS@0x1040 v33:CUInt64 = GuardNoBitsSet v32, RUBY_FL_FREEZE=CUInt64(2048) StoreField v31, :foo=@0x1041, v13 @@ -9734,7 +9748,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo=@0x1010, cme:0x1018) - v31:ObjectSubclass[class_exact:C] = GuardType v12, ObjectSubclass[class_exact:C] + v31:ObjectSubclass[class_exact:C] = GuardType v12, ObjectSubclass[class_exact:C] recompile v32:CUInt64 = LoadField v31, :RBASIC_FLAGS@0x1040 v33:CUInt64 = GuardNoBitsSet v32, RUBY_FL_FREEZE=CUInt64(2048) v34:CPtr = LoadField v31, :as_heap@0x1041 @@ -9897,7 +9911,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, to_s@0x1010, cme:0x1018) - v24:StringExact = GuardType v10, StringExact + v24:StringExact = GuardType v10, StringExact recompile CheckInterrupts Return v24 "); @@ -9924,7 +9938,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, to_s@0x1010, cme:0x1018) - v23:Fixnum = GuardType v10, Fixnum + v23:Fixnum = GuardType v10, Fixnum recompile v24:StringExact = CCallVariadic v23, :Integer#to_s@0x1040 CheckInterrupts Return v24 @@ -9952,7 +9966,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, to_s@0x1010, cme:0x1018) - v23:Bignum = GuardType v10, Bignum + v23:Bignum = GuardType v10, Bignum recompile v24:StringExact = CCallVariadic v23, :Integer#to_s@0x1040 CheckInterrupts Return v24 @@ -10050,7 +10064,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []@0x1010, cme:0x1018) - v29:ArrayExact = GuardType v12, ArrayExact + v29:ArrayExact = GuardType v12, ArrayExact recompile v30:Fixnum = GuardType v13, Fixnum v31:CInt64 = UnboxFixnum v30 v32:CInt64 = ArrayLength v29 @@ -10091,7 +10105,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, []@0x1010, cme:0x1018) - v29:ArraySubclass[class_exact:C] = GuardType v12, ArraySubclass[class_exact:C] + v29:ArraySubclass[class_exact:C] = GuardType v12, ArraySubclass[class_exact:C] recompile v30:Fixnum = GuardType v13, Fixnum v31:CInt64 = UnboxFixnum v30 v32:CInt64 = ArrayLength v29 @@ -10163,7 +10177,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(Hash@0x1008) PatchPoint MethodRedefined(Hash@0x1008, []@0x1010, cme:0x1018) - v29:HashExact = GuardType v12, HashExact + v29:HashExact = GuardType v12, HashExact recompile v30:BasicObject = HashAref v29, v13 CheckInterrupts Return v30 @@ -10197,7 +10211,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, []@0x1010, cme:0x1018) - v29:HashSubclass[class_exact:C] = GuardType v12, HashSubclass[class_exact:C] + v29:HashSubclass[class_exact:C] = GuardType v12, HashSubclass[class_exact:C] recompile v30:BasicObject = CCallWithFrame v29, :Hash#[]@0x1040, v13 CheckInterrupts Return v30 @@ -10295,7 +10309,7 @@ mod hir_opt_tests { bb3(v13:BasicObject, v14:BasicObject, v15:BasicObject, v16:BasicObject): PatchPoint NoSingletonClass(Hash@0x1008) PatchPoint MethodRedefined(Hash@0x1008, []=@0x1010, cme:0x1018) - v37:HashExact = GuardType v14, HashExact + v37:HashExact = GuardType v14, HashExact recompile HashAset v37, v15, v16 CheckInterrupts Return v16 @@ -10331,7 +10345,7 @@ mod hir_opt_tests { bb3(v13:BasicObject, v14:BasicObject, v15:BasicObject, v16:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, []=@0x1010, cme:0x1018) - v37:HashSubclass[class_exact:C] = GuardType v14, HashSubclass[class_exact:C] + v37:HashSubclass[class_exact:C] = GuardType v14, HashSubclass[class_exact:C] recompile v38:BasicObject = CCallWithFrame v37, :Hash#[]=@0x1040, v15, v16 CheckInterrupts Return v16 @@ -10393,7 +10407,7 @@ mod hir_opt_tests { v19:Fixnum[10] = Const Value(10) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []=@0x1010, cme:0x1018) - v33:ArrayExact = GuardType v10, ArrayExact + v33:ArrayExact = GuardType v10, ArrayExact recompile v34:CUInt64 = LoadField v33, :RBASIC_FLAGS@0x1040 v35:CUInt64 = GuardNoBitsSet v34, RUBY_FL_FREEZE=CUInt64(2048) v37:CUInt64 = GuardNoBitsSet v35, RUBY_ELTS_SHARED=CUInt64(4096) @@ -10435,7 +10449,7 @@ mod hir_opt_tests { bb3(v13:BasicObject, v14:BasicObject, v15:BasicObject, v16:BasicObject): PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []=@0x1010, cme:0x1018) - v37:ArrayExact = GuardType v14, ArrayExact + v37:ArrayExact = GuardType v14, ArrayExact recompile v38:Fixnum = GuardType v15, Fixnum v39:CUInt64 = LoadField v37, :RBASIC_FLAGS@0x1040 v40:CUInt64 = GuardNoBitsSet v39, RUBY_FL_FREEZE=CUInt64(2048) @@ -10483,7 +10497,7 @@ mod hir_opt_tests { bb3(v13:BasicObject, v14:BasicObject, v15:BasicObject, v16:BasicObject): PatchPoint NoSingletonClass(MyArray@0x1008) PatchPoint MethodRedefined(MyArray@0x1008, []=@0x1010, cme:0x1018) - v37:ArraySubclass[class_exact:MyArray] = GuardType v14, ArraySubclass[class_exact:MyArray] + v37:ArraySubclass[class_exact:MyArray] = GuardType v14, ArraySubclass[class_exact:MyArray] recompile v38:BasicObject = CCallVariadic v37, :Array#[]=@0x1040, v15, v16 CheckInterrupts Return v16 @@ -10515,7 +10529,7 @@ mod hir_opt_tests { v15:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, <<@0x1010, cme:0x1018) - v27:ArrayExact = GuardType v10, ArrayExact + v27:ArrayExact = GuardType v10, ArrayExact recompile v28:CUInt64 = LoadField v27, :RBASIC_FLAGS@0x1040 v29:CUInt64 = GuardNoBitsSet v28, RUBY_FL_FREEZE=CUInt64(2048) ArrayPush v27, v15 @@ -10549,7 +10563,7 @@ mod hir_opt_tests { v15:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, push@0x1010, cme:0x1018) - v26:ArrayExact = GuardType v10, ArrayExact + v26:ArrayExact = GuardType v10, ArrayExact recompile v27:CUInt64 = LoadField v26, :RBASIC_FLAGS@0x1040 v28:CUInt64 = GuardNoBitsSet v27, RUBY_FL_FREEZE=CUInt64(2048) ArrayPush v26, v15 @@ -10585,7 +10599,7 @@ mod hir_opt_tests { v19:Fixnum[3] = Const Value(3) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, push@0x1010, cme:0x1018) - v30:ArrayExact = GuardType v10, ArrayExact + v30:ArrayExact = GuardType v10, ArrayExact recompile v31:BasicObject = CCallVariadic v30, :Array#push@0x1040, v15, v17, v19 CheckInterrupts Return v31 @@ -10767,7 +10781,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, length@0x1010, cme:0x1018) - v25:ArrayExact = GuardType v10, ArrayExact + v25:ArrayExact = GuardType v10, ArrayExact recompile v26:CInt64 = ArrayLength v25 v27:Fixnum = BoxFixnum v26 CheckInterrupts @@ -10798,7 +10812,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, size@0x1010, cme:0x1018) - v25:ArrayExact = GuardType v10, ArrayExact + v25:ArrayExact = GuardType v10, ArrayExact recompile v26:CInt64 = ArrayLength v25 v27:Fixnum = BoxFixnum v26 CheckInterrupts @@ -10830,7 +10844,7 @@ mod hir_opt_tests { v15:RegexpExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(String@0x1010) PatchPoint MethodRedefined(String@0x1010, =~@0x1018, cme:0x1020) - v27:StringExact = GuardType v10, StringExact + v27:StringExact = GuardType v10, StringExact recompile v28:BasicObject = CCallWithFrame v27, :String#=~@0x1048, v15 CheckInterrupts Return v28 @@ -10861,7 +10875,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, getbyte@0x1010, cme:0x1018) - v28:StringExact = GuardType v12, StringExact + v28:StringExact = GuardType v12, StringExact recompile v29:Fixnum = GuardType v13, Fixnum v30:CInt64 = UnboxFixnum v29 v31:CInt64 = LoadField v28, :len@0x1040 @@ -10902,7 +10916,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, getbyte@0x1010, cme:0x1018) - v32:StringExact = GuardType v12, StringExact + v32:StringExact = GuardType v12, StringExact recompile v33:Fixnum = GuardType v13, Fixnum v34:CInt64 = UnboxFixnum v33 v35:CInt64 = LoadField v32, :len@0x1040 @@ -10944,7 +10958,7 @@ mod hir_opt_tests { bb3(v13:BasicObject, v14:BasicObject, v15:BasicObject, v16:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, setbyte@0x1010, cme:0x1018) - v32:StringExact = GuardType v14, StringExact + v32:StringExact = GuardType v14, StringExact recompile v33:Fixnum = GuardType v15, Fixnum v34:Fixnum = GuardType v16, Fixnum v35:CInt64 = UnboxFixnum v33 @@ -10991,7 +11005,7 @@ mod hir_opt_tests { bb3(v13:BasicObject, v14:BasicObject, v15:BasicObject, v16:BasicObject): PatchPoint NoSingletonClass(MyString@0x1008) PatchPoint MethodRedefined(MyString@0x1008, setbyte@0x1010, cme:0x1018) - v32:StringSubclass[class_exact:MyString] = GuardType v14, StringSubclass[class_exact:MyString] + v32:StringSubclass[class_exact:MyString] = GuardType v14, StringSubclass[class_exact:MyString] recompile v33:Fixnum = GuardType v15, Fixnum v34:Fixnum = GuardType v16, Fixnum v35:CInt64 = UnboxFixnum v33 @@ -11036,7 +11050,7 @@ mod hir_opt_tests { bb3(v13:BasicObject, v14:BasicObject, v15:BasicObject, v16:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, setbyte@0x1010, cme:0x1018) - v32:StringExact = GuardType v14, StringExact + v32:StringExact = GuardType v14, StringExact recompile v33:BasicObject = CCallWithFrame v32, :String#setbyte@0x1040, v15, v16 CheckInterrupts Return v33 @@ -11067,7 +11081,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, empty?@0x1010, cme:0x1018) - v25:StringExact = GuardType v10, StringExact + v25:StringExact = GuardType v10, StringExact recompile v26:CInt64 = LoadField v25, :len@0x1040 v27:CInt64[0] = Const CInt64(0) v28:CBool = IsBitEqual v26, v27 @@ -11102,7 +11116,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, empty?@0x1010, cme:0x1018) - v29:StringExact = GuardType v10, StringExact + v29:StringExact = GuardType v10, StringExact recompile v20:Fixnum[4] = Const Value(4) CheckInterrupts Return v20 @@ -11131,7 +11145,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, succ@0x1010, cme:0x1018) - v24:Fixnum = GuardType v10, Fixnum + v24:Fixnum = GuardType v10, Fixnum recompile v25:Fixnum[1] = Const Value(1) v26:Fixnum = FixnumAdd v24, v25 CheckInterrupts @@ -11161,7 +11175,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, succ@0x1010, cme:0x1018) - v24:Bignum = GuardType v10, Bignum + v24:Bignum = GuardType v10, Bignum recompile v25:BasicObject = CCallWithFrame v24, :Integer#succ@0x1040 CheckInterrupts Return v25 @@ -11191,7 +11205,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[5] = Const Value(5) PatchPoint MethodRedefined(Integer@0x1008, <<@0x1010, cme:0x1018) - v26:Fixnum = GuardType v10, Fixnum + v26:Fixnum = GuardType v10, Fixnum recompile v27:Fixnum = FixnumLShift v26, v15 CheckInterrupts Return v27 @@ -11221,7 +11235,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[-5] = Const Value(-5) PatchPoint MethodRedefined(Integer@0x1008, <<@0x1010, cme:0x1018) - v26:Fixnum = GuardType v10, Fixnum + v26:Fixnum = GuardType v10, Fixnum recompile v27:BasicObject = CCallWithFrame v26, :Integer#<<@0x1040, v15 CheckInterrupts Return v27 @@ -11251,7 +11265,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[64] = Const Value(64) PatchPoint MethodRedefined(Integer@0x1008, <<@0x1010, cme:0x1018) - v26:Fixnum = GuardType v10, Fixnum + v26:Fixnum = GuardType v10, Fixnum recompile v27:BasicObject = CCallWithFrame v26, :Integer#<<@0x1040, v15 CheckInterrupts Return v27 @@ -11282,7 +11296,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, <<@0x1010, cme:0x1018) - v28:Fixnum = GuardType v12, Fixnum + v28:Fixnum = GuardType v12, Fixnum recompile v29:BasicObject = CCallWithFrame v28, :Integer#<<@0x1040, v13 CheckInterrupts Return v29 @@ -11311,7 +11325,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[5] = Const Value(5) PatchPoint MethodRedefined(Integer@0x1008, >>@0x1010, cme:0x1018) - v25:Fixnum = GuardType v10, Fixnum + v25:Fixnum = GuardType v10, Fixnum recompile v26:Fixnum = FixnumRShift v25, v15 CheckInterrupts Return v26 @@ -11340,7 +11354,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[-5] = Const Value(-5) PatchPoint MethodRedefined(Integer@0x1008, >>@0x1010, cme:0x1018) - v25:Fixnum = GuardType v10, Fixnum + v25:Fixnum = GuardType v10, Fixnum recompile v26:BasicObject = CCallWithFrame v25, :Integer#>>@0x1040, v15 CheckInterrupts Return v26 @@ -11369,7 +11383,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[64] = Const Value(64) PatchPoint MethodRedefined(Integer@0x1008, >>@0x1010, cme:0x1018) - v25:Fixnum = GuardType v10, Fixnum + v25:Fixnum = GuardType v10, Fixnum recompile v26:BasicObject = CCallWithFrame v25, :Integer#>>@0x1040, v15 CheckInterrupts Return v26 @@ -11399,7 +11413,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, >>@0x1010, cme:0x1018) - v27:Fixnum = GuardType v12, Fixnum + v27:Fixnum = GuardType v12, Fixnum recompile v28:BasicObject = CCallWithFrame v27, :Integer#>>@0x1040, v13 CheckInterrupts Return v28 @@ -11430,7 +11444,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, <<@0x1010, cme:0x1018) - v29:StringExact = GuardType v12, StringExact + v29:StringExact = GuardType v12, StringExact recompile v30:String = GuardType v13, String v31:StringExact = StringAppend v29, v30 CheckInterrupts @@ -11462,7 +11476,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, <<@0x1010, cme:0x1018) - v29:StringExact = GuardType v12, StringExact + v29:StringExact = GuardType v12, StringExact recompile v30:Fixnum = GuardType v13, Fixnum v31:StringExact = StringAppendCodepoint v29, v30 CheckInterrupts @@ -11496,7 +11510,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, <<@0x1010, cme:0x1018) - v29:StringExact = GuardType v12, StringExact + v29:StringExact = GuardType v12, StringExact recompile v30:String = GuardType v13, String v31:StringExact = StringAppend v29, v30 CheckInterrupts @@ -11530,7 +11544,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(MyString@0x1008) PatchPoint MethodRedefined(MyString@0x1008, <<@0x1010, cme:0x1018) - v29:StringSubclass[class_exact:MyString] = GuardType v12, StringSubclass[class_exact:MyString] + v29:StringSubclass[class_exact:MyString] = GuardType v12, StringSubclass[class_exact:MyString] recompile v30:BasicObject = CCallWithFrame v29, :String#<<@0x1040, v13 CheckInterrupts Return v30 @@ -11613,7 +11627,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, ascii_only?@0x1010, cme:0x1018) - v24:StringExact = GuardType v10, StringExact + v24:StringExact = GuardType v10, StringExact recompile v25:BoolExact = CCall v24, :String#ascii_only?@0x1040 CheckInterrupts Return v25 @@ -11691,7 +11705,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, ^@0x1010, cme:0x1018) - v27:Fixnum = GuardType v12, Fixnum + v27:Fixnum = GuardType v12, Fixnum recompile v28:Fixnum = GuardType v13, Fixnum v29:Fixnum = FixnumXor v27, v28 CheckInterrupts @@ -11725,7 +11739,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, ^@0x1010, cme:0x1018) - v31:Fixnum = GuardType v12, Fixnum + v31:Fixnum = GuardType v12, Fixnum recompile v32:Fixnum = GuardType v13, Fixnum v23:Fixnum[42] = Const Value(42) CheckInterrupts @@ -11756,7 +11770,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, ^@0x1010, cme:0x1018) - v27:Bignum = GuardType v12, Bignum + v27:Bignum = GuardType v12, Bignum recompile v28:BasicObject = CCallWithFrame v27, :Integer#^@0x1040, v13 CheckInterrupts Return v28 @@ -11786,7 +11800,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, ^@0x1010, cme:0x1018) - v27:Fixnum = GuardType v12, Fixnum + v27:Fixnum = GuardType v12, Fixnum recompile v28:BasicObject = CCallWithFrame v27, :Integer#^@0x1040, v13 CheckInterrupts Return v28 @@ -11816,7 +11830,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(TrueClass@0x1008, ^@0x1010, cme:0x1018) - v27:TrueClass = GuardType v12, TrueClass + v27:TrueClass = GuardType v12, TrueClass recompile v28:BasicObject = CCallWithFrame v27, :TrueClass#^@0x1040, v13 CheckInterrupts Return v28 @@ -11870,7 +11884,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(Hash@0x1008) PatchPoint MethodRedefined(Hash@0x1008, size@0x1010, cme:0x1018) - v25:HashExact = GuardType v10, HashExact + v25:HashExact = GuardType v10, HashExact recompile v26:Fixnum = CCall v25, :Hash#size@0x1040 CheckInterrupts Return v26 @@ -11902,7 +11916,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(Hash@0x1008) PatchPoint MethodRedefined(Hash@0x1008, size@0x1010, cme:0x1018) - v29:HashExact = GuardType v10, HashExact + v29:HashExact = GuardType v10, HashExact recompile v20:Fixnum[5] = Const Value(5) CheckInterrupts Return v20 @@ -11935,7 +11949,7 @@ mod hir_opt_tests { v15:StaticSymbol[:foo] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, respond_to?@0x1018, cme:0x1020) - v26:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v26:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile PatchPoint MethodRedefined(C@0x1010, foo@0x1048, cme:0x1050) v30:TrueClass = Const Value(true) CheckInterrupts @@ -11968,7 +11982,7 @@ mod hir_opt_tests { v15:StaticSymbol[:foo] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, respond_to?@0x1018, cme:0x1020) - v26:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v26:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile PatchPoint MethodRedefined(C@0x1010, respond_to_missing?@0x1048, cme:0x1050) PatchPoint MethodRedefined(C@0x1010, foo@0x1078, cme:0x1080) v32:FalseClass = Const Value(false) @@ -12004,7 +12018,7 @@ mod hir_opt_tests { v15:StaticSymbol[:foo] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, respond_to?@0x1018, cme:0x1020) - v26:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v26:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile PatchPoint MethodRedefined(C@0x1010, foo@0x1048, cme:0x1050) v30:FalseClass = Const Value(false) CheckInterrupts @@ -12040,7 +12054,7 @@ mod hir_opt_tests { v17:FalseClass = Const Value(false) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, respond_to?@0x1018, cme:0x1020) - v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile PatchPoint MethodRedefined(C@0x1010, foo@0x1048, cme:0x1050) v32:FalseClass = Const Value(false) CheckInterrupts @@ -12076,7 +12090,7 @@ mod hir_opt_tests { v17:NilClass = Const Value(nil) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, respond_to?@0x1018, cme:0x1020) - v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile PatchPoint MethodRedefined(C@0x1010, foo@0x1048, cme:0x1050) v32:FalseClass = Const Value(false) CheckInterrupts @@ -12112,7 +12126,7 @@ mod hir_opt_tests { v17:TrueClass = Const Value(true) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, respond_to?@0x1018, cme:0x1020) - v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile PatchPoint MethodRedefined(C@0x1010, foo@0x1048, cme:0x1050) v32:TrueClass = Const Value(true) CheckInterrupts @@ -12147,7 +12161,7 @@ mod hir_opt_tests { v17:Fixnum[4] = Const Value(4) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, respond_to?@0x1018, cme:0x1020) - v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile PatchPoint MethodRedefined(C@0x1010, foo@0x1048, cme:0x1050) v32:TrueClass = Const Value(true) CheckInterrupts @@ -12182,7 +12196,7 @@ mod hir_opt_tests { v17:NilClass = Const Value(nil) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, respond_to?@0x1018, cme:0x1020) - v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v28:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile PatchPoint MethodRedefined(C@0x1010, foo@0x1048, cme:0x1050) v32:TrueClass = Const Value(true) CheckInterrupts @@ -12215,7 +12229,7 @@ mod hir_opt_tests { v15:StaticSymbol[:foo] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, respond_to?@0x1018, cme:0x1020) - v26:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v26:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile PatchPoint MethodRedefined(C@0x1010, respond_to_missing?@0x1048, cme:0x1050) PatchPoint MethodRedefined(C@0x1010, foo@0x1078, cme:0x1080) v32:FalseClass = Const Value(false) @@ -12252,7 +12266,7 @@ mod hir_opt_tests { v15:StaticSymbol[:foo] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, respond_to?@0x1018, cme:0x1020) - v26:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v26:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v27:BasicObject = CCallVariadic v26, :Kernel#respond_to?@0x1048, v15 CheckInterrupts Return v27 @@ -12278,7 +12292,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile CheckInterrupts Return v18 "); @@ -12304,7 +12318,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:StringExact[VALUE(0x1038)] = Const Value(VALUE(0x1038)) CheckInterrupts Return v20 @@ -12330,7 +12344,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:NilClass = Const Value(nil) CheckInterrupts Return v20 @@ -12356,7 +12370,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:TrueClass = Const Value(true) CheckInterrupts Return v20 @@ -12382,7 +12396,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:FalseClass = Const Value(false) CheckInterrupts Return v20 @@ -12408,7 +12422,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:Fixnum[0] = Const Value(0) CheckInterrupts Return v20 @@ -12434,7 +12448,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v20:Fixnum[1] = Const Value(1) CheckInterrupts Return v20 @@ -12461,7 +12475,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): v11:Fixnum[3] = Const Value(3) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v20:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile CheckInterrupts Return v11 "); @@ -12489,7 +12503,7 @@ mod hir_opt_tests { v13:Fixnum[2] = Const Value(2) v15:Fixnum[3] = Const Value(3) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v24:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v24:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile CheckInterrupts Return v15 "); @@ -12559,7 +12573,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Symbol@0x1008, to_sym@0x1010, cme:0x1018) - v22:StaticSymbol = GuardType v10, StaticSymbol + v22:StaticSymbol = GuardType v10, StaticSymbol recompile CheckInterrupts Return v22 "); @@ -12586,7 +12600,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, to_i@0x1010, cme:0x1018) - v22:Fixnum = GuardType v10, Fixnum + v22:Fixnum = GuardType v10, Fixnum recompile CheckInterrupts Return v22 "); @@ -12776,7 +12790,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, ==@0x1010, cme:0x1018) - v29:StringExact = GuardType v12, StringExact + v29:StringExact = GuardType v12, StringExact recompile v30:String = GuardType v13, String v31:BoolExact = StringEqual v29, v30 CheckInterrupts @@ -12810,7 +12824,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, ==@0x1010, cme:0x1018) - v29:StringSubclass[class_exact:C] = GuardType v12, StringSubclass[class_exact:C] + v29:StringSubclass[class_exact:C] = GuardType v12, StringSubclass[class_exact:C] recompile v30:String = GuardType v13, String v31:BoolExact = StringEqual v29, v30 CheckInterrupts @@ -12844,7 +12858,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, ==@0x1010, cme:0x1018) - v29:StringExact = GuardType v12, StringExact + v29:StringExact = GuardType v12, StringExact recompile v30:String = GuardType v13, String v31:BoolExact = StringEqual v29, v30 CheckInterrupts @@ -12876,7 +12890,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, ===@0x1010, cme:0x1018) - v28:StringExact = GuardType v12, StringExact + v28:StringExact = GuardType v12, StringExact recompile v29:String = GuardType v13, String v30:BoolExact = StringEqual v28, v29 CheckInterrupts @@ -12910,7 +12924,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, ===@0x1010, cme:0x1018) - v28:StringSubclass[class_exact:C] = GuardType v12, StringSubclass[class_exact:C] + v28:StringSubclass[class_exact:C] = GuardType v12, StringSubclass[class_exact:C] recompile v29:String = GuardType v13, String v30:BoolExact = StringEqual v28, v29 CheckInterrupts @@ -12944,7 +12958,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, ===@0x1010, cme:0x1018) - v28:StringExact = GuardType v12, StringExact + v28:StringExact = GuardType v12, StringExact recompile v29:String = GuardType v13, String v30:BoolExact = StringEqual v28, v29 CheckInterrupts @@ -12974,7 +12988,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, ==@0x1010, cme:0x1018) - v26:StringExact = GuardType v10, StringExact + v26:StringExact = GuardType v10, StringExact recompile v29:TrueClass = Const Value(true) CheckInterrupts Return v29 @@ -13003,7 +13017,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, ===@0x1010, cme:0x1018) - v25:StringExact = GuardType v10, StringExact + v25:StringExact = GuardType v10, StringExact recompile v28:TrueClass = Const Value(true) CheckInterrupts Return v28 @@ -13277,7 +13291,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, ==@0x1010, cme:0x1018) - v29:StringExact = GuardType v12, StringExact + v29:StringExact = GuardType v12, StringExact recompile v30:String = GuardType v13, String v31:BoolExact = StringEqual v29, v30 CheckInterrupts @@ -13344,7 +13358,7 @@ mod hir_opt_tests { v15:NilClass = Const Value(nil) PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, !=@0x1010, cme:0x1018) - v27:StringExact = GuardType v10, StringExact + v27:StringExact = GuardType v10, StringExact recompile v28:BoolExact = CCallWithFrame v27, :BasicObject#!=@0x1040, v15 CheckInterrupts Return v28 @@ -13377,7 +13391,7 @@ mod hir_opt_tests { bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, !=@0x1010, cme:0x1018) - v29:StringExact = GuardType v12, StringExact + v29:StringExact = GuardType v12, StringExact recompile PatchPoint MethodRedefined(String@0x1008, ==@0x1040, cme:0x1048) v33:String = GuardType v13, String v34:BoolExact = StringEqual v29, v33 @@ -13413,7 +13427,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, !=@0x1010, cme:0x1018) - v26:StringExact = GuardType v10, StringExact + v26:StringExact = GuardType v10, StringExact recompile PatchPoint MethodRedefined(String@0x1008, ==@0x1040, cme:0x1048) v35:TrueClass = Const Value(true) v32:TrueClass = Const Value(true) @@ -13448,7 +13462,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, size@0x1010, cme:0x1018) - v25:StringExact = GuardType v10, StringExact + v25:StringExact = GuardType v10, StringExact recompile v26:Fixnum = CCall v25, :String#size@0x1040 CheckInterrupts Return v26 @@ -13480,7 +13494,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, size@0x1010, cme:0x1018) - v29:StringExact = GuardType v10, StringExact + v29:StringExact = GuardType v10, StringExact recompile v20:Fixnum[5] = Const Value(5) CheckInterrupts Return v20 @@ -13511,7 +13525,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, bytesize@0x1010, cme:0x1018) - v24:StringExact = GuardType v10, StringExact + v24:StringExact = GuardType v10, StringExact recompile v25:CInt64 = LoadField v24, :len@0x1040 v26:Fixnum = BoxFixnum v25 CheckInterrupts @@ -13544,7 +13558,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, bytesize@0x1010, cme:0x1018) - v28:StringExact = GuardType v10, StringExact + v28:StringExact = GuardType v10, StringExact recompile v19:Fixnum[5] = Const Value(5) CheckInterrupts Return v19 @@ -13575,7 +13589,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, length@0x1010, cme:0x1018) - v25:StringExact = GuardType v10, StringExact + v25:StringExact = GuardType v10, StringExact recompile v26:Fixnum = CCall v25, :String#length@0x1040 CheckInterrupts Return v26 @@ -13669,7 +13683,7 @@ mod hir_opt_tests { v25:ClassSubclass[String@0x1010] = Const Value(VALUE(0x1010)) PatchPoint NoSingletonClass(String@0x1010) PatchPoint MethodRedefined(String@0x1010, is_a?@0x1011, cme:0x1018) - v29:StringExact = GuardType v10, StringExact + v29:StringExact = GuardType v10, StringExact recompile v30:BoolExact = IsA v29, v25 CheckInterrupts Return v30 @@ -13701,7 +13715,7 @@ mod hir_opt_tests { v25:ModuleSubclass[Kernel@0x1010] = Const Value(VALUE(0x1010)) PatchPoint NoSingletonClass(String@0x1018) PatchPoint MethodRedefined(String@0x1018, is_a?@0x1020, cme:0x1028) - v29:StringExact = GuardType v10, StringExact + v29:StringExact = GuardType v10, StringExact recompile v30:BasicObject = CCallWithFrame v29, :Kernel#is_a?@0x1050, v25 CheckInterrupts Return v30 @@ -13736,7 +13750,7 @@ mod hir_opt_tests { v29:ClassSubclass[Integer@0x1010] = Const Value(VALUE(0x1010)) PatchPoint NoSingletonClass(String@0x1018) PatchPoint MethodRedefined(String@0x1018, is_a?@0x1020, cme:0x1028) - v33:StringExact = GuardType v10, StringExact + v33:StringExact = GuardType v10, StringExact recompile v21:Fixnum[5] = Const Value(5) CheckInterrupts Return v21 @@ -13802,7 +13816,7 @@ mod hir_opt_tests { v25:ClassSubclass[String@0x1010] = Const Value(VALUE(0x1010)) PatchPoint NoSingletonClass(String@0x1010) PatchPoint MethodRedefined(String@0x1010, kind_of?@0x1011, cme:0x1018) - v29:StringExact = GuardType v10, StringExact + v29:StringExact = GuardType v10, StringExact recompile v30:BoolExact = IsA v29, v25 CheckInterrupts Return v30 @@ -13834,7 +13848,7 @@ mod hir_opt_tests { v25:ModuleSubclass[Kernel@0x1010] = Const Value(VALUE(0x1010)) PatchPoint NoSingletonClass(String@0x1018) PatchPoint MethodRedefined(String@0x1018, kind_of?@0x1020, cme:0x1028) - v29:StringExact = GuardType v10, StringExact + v29:StringExact = GuardType v10, StringExact recompile v30:BasicObject = CCallWithFrame v29, :Kernel#kind_of?@0x1050, v25 CheckInterrupts Return v30 @@ -13869,7 +13883,7 @@ mod hir_opt_tests { v29:ClassSubclass[Integer@0x1010] = Const Value(VALUE(0x1010)) PatchPoint NoSingletonClass(String@0x1018) PatchPoint MethodRedefined(String@0x1018, kind_of?@0x1020, cme:0x1028) - v33:StringExact = GuardType v10, StringExact + v33:StringExact = GuardType v10, StringExact recompile v21:Fixnum[5] = Const Value(5) CheckInterrupts Return v21 @@ -14100,7 +14114,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, length@0x1010, cme:0x1018) - v29:StringExact = GuardType v10, StringExact + v29:StringExact = GuardType v10, StringExact recompile v20:Fixnum[4] = Const Value(4) CheckInterrupts Return v20 @@ -14140,7 +14154,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, class@0x1008, cme:0x1010) - v43:ObjectSubclass[class_exact:C] = GuardType v6, ObjectSubclass[class_exact:C] + v43:ObjectSubclass[class_exact:C] = GuardType v6, ObjectSubclass[class_exact:C] recompile v46:ClassSubclass[C@0x1000] = Const Value(VALUE(0x1000)) v13:StaticSymbol[:_lex_actions] = Const Value(VALUE(0x1038)) v15:TrueClass = Const Value(true) @@ -14176,7 +14190,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, class@0x1010, cme:0x1018) - v25:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v25:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v28:ClassSubclass[C@0x1008] = Const Value(VALUE(0x1008)) PatchPoint MethodRedefined(Class@0x1040, name@0x1048, cme:0x1050) v32:StringExact|NilClass = CCall v28, :Module#name@0x1078 @@ -14208,7 +14222,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, class@0x1010, cme:0x1018) - v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] + v23:ObjectSubclass[class_exact:C] = GuardType v10, ObjectSubclass[class_exact:C] recompile v26:ClassSubclass[C@0x1008] = Const Value(VALUE(0x1008)) CheckInterrupts Return v26 @@ -14258,7 +14272,7 @@ mod hir_opt_tests { Jump bb3(v4) bb3(v6:BasicObject): PatchPoint MethodRedefined(Object@0x1000, class@0x1008, cme:0x1010) - v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] + v18:ObjectSubclass[class_exact*:Object@VALUE(0x1000)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1000)] recompile v21:ClassSubclass[Object@0x1038] = Const Value(VALUE(0x1038)) CheckInterrupts Return v21 @@ -14699,7 +14713,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): PatchPoint NoSingletonClass(TestDynamic@0x1008) PatchPoint MethodRedefined(TestDynamic@0x1008, val@0x1010, cme:0x1018) - v23:ObjectSubclass[class_exact:TestDynamic] = GuardType v10, ObjectSubclass[class_exact:TestDynamic] + v23:ObjectSubclass[class_exact:TestDynamic] = GuardType v10, ObjectSubclass[class_exact:TestDynamic] recompile v26:CShape = LoadField v23, :shape_id@0x1040 v27:CShape[0x1041] = GuardBitEquals v26, CShape(0x1041) recompile v28:BasicObject = LoadField v23, :@val@0x1042 @@ -14806,7 +14820,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, secret@0x1008, cme:0x1010) - v19:ObjectSubclass[class_exact:C] = GuardType v6, ObjectSubclass[class_exact:C] + v19:ObjectSubclass[class_exact:C] = GuardType v6, ObjectSubclass[class_exact:C] recompile v21:Fixnum[42] = Const Value(42) CheckInterrupts Return v21 @@ -14864,7 +14878,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): PatchPoint NoSingletonClass(BasicObject@0x1000) PatchPoint MethodRedefined(BasicObject@0x1000, initialize@0x1008, cme:0x1010) - v21:BasicObjectExact = GuardType v6, BasicObjectExact + v21:BasicObjectExact = GuardType v6, BasicObjectExact recompile v22:NilClass = Const Value(nil) CheckInterrupts Return v22 @@ -14948,7 +14962,7 @@ mod hir_opt_tests { bb3(v6:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, secret@0x1008, cme:0x1010) - v19:ObjectSubclass[class_exact:C] = GuardType v6, ObjectSubclass[class_exact:C] + v19:ObjectSubclass[class_exact:C] = GuardType v6, ObjectSubclass[class_exact:C] recompile v21:Fixnum[42] = Const Value(42) CheckInterrupts Return v21 @@ -15031,7 +15045,7 @@ mod hir_opt_tests { v19:BasicObject = Send v12, :length # SendFallbackReason: Singleton class previously created for receiver class PatchPoint NoSingletonClass(Proc@0x1008) PatchPoint MethodRedefined(Proc@0x1008, call@0x1010, cme:0x1018) - v40:ObjectSubclass[class_exact:Proc] = GuardType v13, ObjectSubclass[class_exact:Proc] + v40:ObjectSubclass[class_exact:Proc] = GuardType v13, ObjectSubclass[class_exact:Proc] recompile v41:BasicObject = InvokeProc v40 PatchPoint NoEPEscape(test) v32:BasicObject = Send v12, :length # SendFallbackReason: Singleton class previously created for receiver class @@ -15187,7 +15201,7 @@ mod hir_opt_tests { v33:BasicObject = SendDirect v9, 0x1058, :foo (0x1068), v10 v18:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1070, +@0x1078, cme:0x1080) - v36:Fixnum = GuardType v33, Fixnum + v36:Fixnum = GuardType v33, Fixnum recompile v37:Fixnum = FixnumAdd v36, v18 CheckInterrupts Return v37 @@ -15448,7 +15462,7 @@ mod hir_opt_tests { bb3(v11:HeapBasicObject, v12:BasicObject, v13:NilClass): PatchPoint NoSingletonClass(B@0x1008) PatchPoint MethodRedefined(B@0x1008, proc@0x1010, cme:0x1018) - v39:ObjectSubclass[class_exact:B] = GuardType v11, ObjectSubclass[class_exact:B] + v39:ObjectSubclass[class_exact:B] = GuardType v11, ObjectSubclass[class_exact:B] recompile v40:BasicObject = CCallWithFrame v39, :Kernel#proc@0x1040, block=0x1048 v19:CPtr = GetEP 0 v20:BasicObject = LoadField v19, :blk@0x1050 @@ -15661,7 +15675,7 @@ mod hir_opt_tests { bb4(v35:BasicObject, v36:BasicObject, v37:BasicObject): v40:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1070, +@0x1078, cme:0x1080) - v59:Fixnum = GuardType v37, Fixnum + v59:Fixnum = GuardType v37, Fixnum recompile v60:Fixnum = FixnumAdd v59, v40 CheckInterrupts Return v60 @@ -16078,7 +16092,7 @@ mod hir_opt_tests { bb11(): v71:Falsy = RefineType v60, Falsy PatchPoint MethodRedefined(Object@0x1010, lambda@0x1018, cme:0x1020) - v118:ObjectSubclass[class_exact*:Object@VALUE(0x1010)] = GuardType v58, ObjectSubclass[class_exact*:Object@VALUE(0x1010)] + v118:ObjectSubclass[class_exact*:Object@VALUE(0x1010)] = GuardType v58, ObjectSubclass[class_exact*:Object@VALUE(0x1010)] recompile v119:BasicObject = CCallWithFrame v118, :Kernel#lambda@0x1048, block=0x1050 v75:CPtr = GetEP 0 v76:BasicObject = LoadField v75, :list@0x1001 @@ -16387,7 +16401,7 @@ mod hir_opt_tests { v19:Truthy = RefineType v10, Truthy v23:Fixnum[42] = Const Value(42) PatchPoint MethodRedefined(Object@0x1008, greet_recompile@0x1010, cme:0x1018) - v43:ObjectSubclass[class_exact*:Object@VALUE(0x1008)] = GuardType v9, ObjectSubclass[class_exact*:Object@VALUE(0x1008)] + v43:ObjectSubclass[class_exact*:Object@VALUE(0x1008)] = GuardType v9, ObjectSubclass[class_exact*:Object@VALUE(0x1008)] recompile v44:BasicObject = SendDirect v43, 0x1040, :greet_recompile (0x1050), v23 CheckInterrupts Return v44 @@ -16541,7 +16555,7 @@ mod hir_opt_tests { bb3(v9:BasicObject, v10:BasicObject): v15:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1008, -@0x1010, cme:0x1018) - v35:Fixnum = GuardType v10, Fixnum + v35:Fixnum = GuardType v10, Fixnum recompile v36:Fixnum = FixnumSub v35, v15 v21:Fixnum[2] = Const Value(2) v40:Fixnum = FixnumSub v35, v21 @@ -16731,7 +16745,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Float@0x1008, nan?@0x1010, cme:0x1018) - v23:Flonum = GuardType v10, Flonum + v23:Flonum = GuardType v10, Flonum recompile v24:BoolExact = CCall v23, :Float#nan?@0x1040 CheckInterrupts Return v24 @@ -16759,7 +16773,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Float@0x1008, finite?@0x1010, cme:0x1018) - v23:Flonum = GuardType v10, Flonum + v23:Flonum = GuardType v10, Flonum recompile v24:BoolExact = CCall v23, :Float#finite?@0x1040 CheckInterrupts Return v24 @@ -16787,7 +16801,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Float@0x1008, infinite?@0x1010, cme:0x1018) - v23:Flonum = GuardType v10, Flonum + v23:Flonum = GuardType v10, Flonum recompile v24:NilClass|Fixnum = CCall v23, :Float#infinite?@0x1040 CheckInterrupts Return v24 @@ -16815,7 +16829,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, even?@0x1010, cme:0x1018) - v22:Fixnum = GuardType v10, Fixnum + v22:Fixnum = GuardType v10, Fixnum recompile v24:BoolExact = InvokeBuiltin leaf <inline_expr>, v22 CheckInterrupts Return v24 @@ -16843,7 +16857,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Integer@0x1008, odd?@0x1010, cme:0x1018) - v22:Fixnum = GuardType v10, Fixnum + v22:Fixnum = GuardType v10, Fixnum recompile v24:BoolExact = InvokeBuiltin leaf <inline_expr>, v22 CheckInterrupts Return v24 @@ -16871,7 +16885,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Float@0x1008, zero?@0x1010, cme:0x1018) - v22:Flonum = GuardType v10, Flonum + v22:Flonum = GuardType v10, Flonum recompile v24:BoolExact = InvokeBuiltin leaf <inline_expr>, v22 CheckInterrupts Return v24 @@ -16899,7 +16913,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Float@0x1008, positive?@0x1010, cme:0x1018) - v22:Flonum = GuardType v10, Flonum + v22:Flonum = GuardType v10, Flonum recompile v24:BoolExact = InvokeBuiltin leaf <inline_expr>, v22 CheckInterrupts Return v24 @@ -16927,7 +16941,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Float@0x1008, negative?@0x1010, cme:0x1018) - v22:Flonum = GuardType v10, Flonum + v22:Flonum = GuardType v10, Flonum recompile v24:BoolExact = InvokeBuiltin leaf <inline_expr>, v22 CheckInterrupts Return v24 @@ -16956,7 +16970,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Float@0x1008, +@0x1010, cme:0x1018) - v28:Flonum = GuardType v12, Flonum + v28:Flonum = GuardType v12, Flonum recompile v29:Flonum = GuardType v13, Flonum v30:Float = FloatAdd v28, v29 CheckInterrupts @@ -16987,7 +17001,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Float@0x1008, *@0x1010, cme:0x1018) - v28:Flonum = GuardType v12, Flonum + v28:Flonum = GuardType v12, Flonum recompile v29:Flonum = GuardType v13, Flonum v30:Float = FloatMul v28, v29 CheckInterrupts @@ -17018,7 +17032,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Float@0x1008, -@0x1010, cme:0x1018) - v28:Flonum = GuardType v12, Flonum + v28:Flonum = GuardType v12, Flonum recompile v29:Flonum = GuardType v13, Flonum v30:Float = FloatSub v28, v29 CheckInterrupts @@ -17049,7 +17063,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Float@0x1008, /@0x1010, cme:0x1018) - v28:Flonum = GuardType v12, Flonum + v28:Flonum = GuardType v12, Flonum recompile v29:Flonum = GuardType v13, Flonum v30:Float = FloatDiv v28, v29 CheckInterrupts @@ -17078,7 +17092,7 @@ mod hir_opt_tests { Jump bb3(v6, v7) bb3(v9:BasicObject, v10:BasicObject): PatchPoint MethodRedefined(Float@0x1008, to_i@0x1010, cme:0x1018) - v23:Flonum = GuardType v10, Flonum + v23:Flonum = GuardType v10, Flonum recompile v24:Integer = FloatToInt v23 CheckInterrupts Return v24 @@ -17108,7 +17122,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Float@0x1008, *@0x1010, cme:0x1018) - v28:Flonum = GuardType v12, Flonum + v28:Flonum = GuardType v12, Flonum recompile v29:Fixnum = GuardType v13, Fixnum v30:Float = FloatMul v28, v29 CheckInterrupts @@ -17155,7 +17169,7 @@ mod hir_opt_tests { v17:Fixnum[0] = Const Value(0) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, var@0x1010, cme:0x1018) - v138:ObjectSubclass[class_exact:C] = GuardType v12, ObjectSubclass[class_exact:C] + v138:ObjectSubclass[class_exact:C] = GuardType v12, ObjectSubclass[class_exact:C] recompile v139:BasicObject = LoadField v138, :var@0x1040 PatchPoint MethodRedefined(Integer@0x1048, +@0x1050, cme:0x1058) v179:Fixnum = GuardType v139, Fixnum @@ -17263,7 +17277,7 @@ mod hir_opt_tests { Jump bb3(v7, v8, v9) bb3(v11:BasicObject, v12:BasicObject, v13:BasicObject): PatchPoint MethodRedefined(Symbol@0x1008, ==@0x1010, cme:0x1018) - v48:StaticSymbol = GuardType v12, StaticSymbol + v48:StaticSymbol = GuardType v12, StaticSymbol recompile v49:CBool = IsBitEqual v48, v13 v50:BoolExact = BoxBool v49 CheckInterrupts @@ -17278,4 +17292,117 @@ mod hir_opt_tests { Return v40 "); } + + #[test] + fn test_trigger_guard_type_recompilation() { + eval(" + class C + def f(x) + @a = 1 + y = x + 1 + @a = y + end + end + + # As of 06/04/2026, zjit/src/options.rs uses 5 as the default number of profiles + # Let's pick a number that is reasonably larger to ensure compilation, even if + # the default value changes a bit + num_to_compile = 30 + + c = C.new + + # Repeatedly call an integer until this fast path gets JITed + num_to_compile.times { c.f(1) } + + "); + + let intermediate_hir = hir_string_proc("C.new.method(:f)"); + + eval(" + # Supposed to be the same as the earlier Ruby method in this test + num_to_compile = 30 + c = C.new + # Call this with a float in order to trigger a guard failure + # Do this enough times to cause a recompilation + num_to_compile.times { c.f(1.5) } + "); + + let final_hir = hir_string_proc("C.new.method(:f)"); + + assert_snapshot!(format!("{intermediate_hir}\n{final_hir}"), @" + fn f@<compiled>:4: + bb1(): + EntryPoint interpreter + v1:HeapBasicObject = LoadSelf + v2:CPtr = LoadSP + v3:BasicObject = LoadField v2, :x@0x1000 + v4:NilClass = Const Value(nil) + Jump bb3(v1, v3, v4) + bb2(): + EntryPoint JIT(0) + v7:HeapBasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :x@1 + v9:NilClass = Const Value(nil) + Jump bb3(v7, v8, v9) + bb3(v11:HeapBasicObject, v12:BasicObject, v13:NilClass): + v17:Fixnum[1] = Const Value(1) + PatchPoint SingleRactorMode + SetIvar v11, :@a, v17 + PatchPoint NoEPEscape(f) + v27:Fixnum[1] = Const Value(1) + PatchPoint MethodRedefined(Integer@0x1008, +@0x1010, cme:0x1018) + v46:Fixnum = GuardType v12, Fixnum recompile + v47:Fixnum = FixnumAdd v46, v27 + PatchPoint SingleRactorMode + SetIvar v11, :@a, v47 + CheckInterrupts + Return v47 + + fn f@<compiled>:4: + bb1(): + EntryPoint interpreter + v1:HeapBasicObject = LoadSelf + v2:CPtr = LoadSP + v3:BasicObject = LoadField v2, :x@0x1000 + v4:NilClass = Const Value(nil) + Jump bb3(v1, v3, v4) + bb2(): + EntryPoint JIT(0) + v7:HeapBasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :x@1 + v9:NilClass = Const Value(nil) + Jump bb3(v7, v8, v9) + bb3(v11:HeapBasicObject, v12:BasicObject, v13:NilClass): + v17:Fixnum[1] = Const Value(1) + PatchPoint SingleRactorMode + SetIvar v11, :@a, v17 + PatchPoint NoEPEscape(f) + v27:Fixnum[1] = Const Value(1) + v30:CBool = HasType v12, Flonum + CondBranch v30, bb5(v11, v12, v13, v12, v27), bb6() + bb5(v31:HeapBasicObject, v32:BasicObject, v33:NilClass, v34:BasicObject, v35:Fixnum[1]): + v37:Flonum = RefineType v34, Flonum + PatchPoint MethodRedefined(Float@0x1008, +@0x1010, cme:0x1018) + v74:Float = FloatAdd v37, v35 + Jump bb4(v31, v32, v33, v74) + bb6(): + v41:CBool = HasType v12, Fixnum + CondBranch v41, bb7(v11, v12, v13, v12, v27), bb8() + bb7(v42:HeapBasicObject, v43:BasicObject, v44:NilClass, v45:BasicObject, v46:Fixnum[1]): + v48:Fixnum = RefineType v45, Fixnum + PatchPoint MethodRedefined(Integer@0x1040, +@0x1010, cme:0x1048) + v77:Fixnum = FixnumAdd v48, v46 + Jump bb4(v42, v43, v44, v77) + bb8(): + PatchPoint MethodRedefined(Float@0x1008, +@0x1010, cme:0x1018) + v80:Flonum = GuardType v12, Flonum recompile + v81:Float = FloatAdd v80, v27 + Jump bb4(v11, v80, v13, v81) + bb4(v54:HeapBasicObject, v55:BasicObject, v56:NilClass, v57:Float|Fixnum): + PatchPoint SingleRactorMode + SetIvar v54, :@a, v57 + CheckInterrupts + Return v57 + "); + } } diff --git a/zjit/src/hir/tests.rs b/zjit/src/hir/tests.rs index a17a5262f4..09ca3687e2 100644 --- a/zjit/src/hir/tests.rs +++ b/zjit/src/hir/tests.rs @@ -120,7 +120,7 @@ mod snapshot_tests { v16:Any = Snapshot FrameState { pc: 0x1008, stack: [v6, v11, v13, v15], locals: [] } v23:Any = Snapshot FrameState { pc: 0x1008, stack: [v6, v13, v15, v11], locals: [] } PatchPoint MethodRedefined(Object@0x1010, foo@0x1018, cme:0x1020) - v25:ObjectSubclass[class_exact*:Object@VALUE(0x1010)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1010)] + v25:ObjectSubclass[class_exact*:Object@VALUE(0x1010)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1010)] recompile v26:BasicObject = SendDirect v25, 0x1048, :foo (0x1058), v13, v15, v11 v18:Any = Snapshot FrameState { pc: 0x1060, stack: [v26], locals: [] } PatchPoint NoTracePoint @@ -156,7 +156,7 @@ mod snapshot_tests { v13:Fixnum[2] = Const Value(2) v14:Any = Snapshot FrameState { pc: 0x1008, stack: [v6, v11, v13], locals: [] } PatchPoint MethodRedefined(Object@0x1010, foo@0x1018, cme:0x1020) - v22:ObjectSubclass[class_exact*:Object@VALUE(0x1010)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1010)] + v22:ObjectSubclass[class_exact*:Object@VALUE(0x1010)] = GuardType v6, ObjectSubclass[class_exact*:Object@VALUE(0x1010)] recompile v23:BasicObject = SendDirect v22, 0x1048, :foo (0x1058), v11, v13 v16:Any = Snapshot FrameState { pc: 0x1060, stack: [v23], locals: [] } PatchPoint NoTracePoint diff --git a/zjit/src/payload.rs b/zjit/src/payload.rs index 807c33b8b7..51b6f4721b 100644 --- a/zjit/src/payload.rs +++ b/zjit/src/payload.rs @@ -3,6 +3,7 @@ use std::ptr::NonNull; use crate::codegen::IseqCallRef; use crate::stats::CompileError; use crate::{cruby::*, profile::IseqProfile, virtualmem::CodePtr}; +use crate::options::get_option; pub use crate::jit_frame::JITFrame; @@ -35,6 +36,14 @@ impl IseqPayload { self_is_heap_object: false, } } + + /// Profile counts are used for compilation policy. + /// When we deoptimize a method that can be recompiled, we need to update the count to collect more profiles. + /// Otherwise, we will generate the same code that was just deoptimized. + pub fn reset_profiles_remaining(&mut self, insn_idx: YarvInsnIdx) { + let num_profiles = get_option!(num_profiles); + self.profile.entry_mut(insn_idx).set_profiles_remaining(num_profiles); + } } /// JIT code version. When the same ISEQ is compiled with a different assumption, a new version is created. diff --git a/zjit/src/profile.rs b/zjit/src/profile.rs index 000c424da4..56a0f9bc3d 100644 --- a/zjit/src/profile.rs +++ b/zjit/src/profile.rs @@ -417,7 +417,7 @@ impl ProfiledType { /// Per-instruction profile entry, stored sparsely in a sorted Vec. #[derive(Debug)] -struct ProfileEntry { +pub struct ProfileEntry { /// YARV instruction index insn_idx: u32, /// Type information of YARV instruction operands @@ -426,6 +426,12 @@ struct ProfileEntry { profiles_remaining: NumProfiles, } +impl ProfileEntry { + pub fn set_profiles_remaining(&mut self, num_profiles: NumProfiles) { + self.profiles_remaining = num_profiles; + } +} + #[derive(Debug)] pub struct IseqProfile { /// Sparse storage of per-instruction profile data, sorted by instruction index. @@ -445,7 +451,7 @@ impl IseqProfile { } /// Get or create a mutable profile entry for the given instruction index. - fn entry_mut(&mut self, insn_idx: YarvInsnIdx) -> &mut ProfileEntry { + pub fn entry_mut(&mut self, insn_idx: YarvInsnIdx) -> &mut ProfileEntry { let idx = insn_idx as u32; match self.entries.binary_search_by_key(&idx, |e| e.insn_idx) { Ok(i) => &mut self.entries[i], |
