From 3f5e85bf04daeef79a0c158f90a9817eaeb0d263 Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Wed, 18 Feb 2026 19:43:42 -0500 Subject: [PATCH 01/22] ZJIT: Add LoadArg instruction for JIT entry blocks --- zjit/src/codegen.rs | 11 + zjit/src/hir.rs | 26 +- zjit/src/hir/opt_tests.rs | 1489 ++++++++++++++++++++++++++----------- zjit/src/hir/tests.rs | 603 +++++++++++---- 4 files changed, 1561 insertions(+), 568 deletions(-) diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs index 845f7e6eefbb2b..203372c364532d 100644 --- a/zjit/src/codegen.rs +++ b/zjit/src/codegen.rs @@ -311,6 +311,16 @@ fn gen_function(cb: &mut CodeBlock, iseq: IseqPtr, version: IseqVersionRef, func } } + // In JIT entry blocks, compile LoadArg instructions before other instructions + // so that calling convention registers are reserved early, like Param. + if function.is_entry_block(block_id) { + for &insn_id in block.insns() { + if let Insn::LoadArg { idx, .. } = function.find(insn_id) { + jit.opnds[insn_id.0] = Some(gen_param(&mut asm, idx as usize)); + } + } + } + // Compile all instructions for &insn_id in block.insns() { let insn = function.find(insn_id); @@ -481,6 +491,7 @@ fn gen_insn(cb: &mut CodeBlock, jit: &mut JITState, asm: &mut Assembler, functio Insn::StringIntern { val, state } => gen_intern(asm, opnd!(val), &function.frame_state(*state)), Insn::ToRegexp { opt, values, state } => gen_toregexp(jit, asm, *opt, opnds!(values), &function.frame_state(*state)), Insn::Param => unreachable!("block.insns should not have Insn::Param"), + Insn::LoadArg { .. } => return Ok(()), // compiled in the LoadArg pre-pass above Insn::Snapshot { .. } => return Ok(()), // we don't need to do anything for this instruction at the moment &Insn::Send { cd, blockiseq: None, state, reason, .. } => gen_send_without_block(jit, asm, cd, &function.frame_state(state), reason), &Insn::Send { cd, blockiseq: Some(blockiseq), state, reason, .. } => gen_send(jit, asm, cd, blockiseq, &function.frame_state(state), reason), diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index c43be0e1003f6b..77d6972e4778a1 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -732,6 +732,9 @@ pub enum Insn { Const { val: Const }, /// SSA block parameter. Also used for function parameters in the function's entry block. Param, + /// Load a function argument from the calling convention. + /// Used in JIT entry blocks. idx is the calling convention index, id is for display. + LoadArg { idx: u32, id: ID, val_type: Type }, StringCopy { val: InsnId, chilled: bool, state: InsnId }, StringIntern { val: InsnId, state: InsnId }, @@ -1086,6 +1089,7 @@ impl Insn { match &self { Insn::Const { .. } => effects::Empty, Insn::Param { .. } => effects::Empty, + Insn::LoadArg { .. } => effects::Empty, Insn::StringCopy { .. } => allocates, Insn::StringIntern { .. } => effects::Any, Insn::StringConcat { .. } => effects::Any, @@ -1304,6 +1308,7 @@ impl<'a> std::fmt::Display for InsnPrinter<'a> { match &self.inner { Insn::Const { val } => { write!(f, "Const {}", val.print(self.ptr_map)) } Insn::Param => { write!(f, "Param") } + Insn::LoadArg { idx, id, .. } => { write!(f, "LoadArg :{}@{idx}", id.contents_lossy()) } Insn::NewArray { elements, .. } => { write!(f, "NewArray")?; let mut prefix = " "; @@ -2182,6 +2187,7 @@ impl Function { match &self.insns[insn_id.0] { result@(Const {..} | Param + | LoadArg {..} | GetConstantPath {..} | PatchPoint {..} | PutSpecialObject {..} @@ -2420,6 +2426,7 @@ impl Function { assert!(self.insns[insn.0].has_output()); match &self.insns[insn.0] { Insn::Param => unimplemented!("params should not be present in block.insns"), + Insn::LoadArg { val_type, .. } => *val_type, Insn::SetGlobal { .. } | Insn::Jump(_) | Insn::EntryPoint { .. } | Insn::IfTrue { .. } | Insn::IfFalse { .. } | Insn::Return { .. } | Insn::Throw { .. } | Insn::PatchPoint { .. } | Insn::SetIvar { .. } | Insn::SetClassVar { .. } | Insn::ArrayExtend { .. } @@ -4597,6 +4604,7 @@ impl Function { match insn { &Insn::Const { .. } | &Insn::Param + | &Insn::LoadArg { .. } | &Insn::EntryPoint { .. } | &Insn::LoadPC | &Insn::LoadEC @@ -5376,6 +5384,7 @@ impl Function { // Instructions with no InsnId operands (except state) or nothing to assert Insn::Const { .. } | Insn::Param + | Insn::LoadArg { .. } | Insn::PutSpecialObject { .. } | Insn::LoadField { .. } | Insn::GetConstantPath { .. } @@ -7545,7 +7554,9 @@ fn compile_jit_entry_state(fun: &mut Function, jit_entry_block: BlockId, jit_ent None }; - let self_param = fun.push_insn(jit_entry_block, Insn::Param); + let mut arg_idx: u32 = 0; + let self_param = fun.push_insn(jit_entry_block, Insn::LoadArg { idx: arg_idx, id: ID!(self_), val_type: types::BasicObject }); + arg_idx += 1; let mut entry_state = FrameState::new(iseq); for local_idx in 0..num_locals(iseq) { if (lead_num + passed_opt_num..lead_num + opt_num).contains(&local_idx) { @@ -7559,7 +7570,9 @@ fn compile_jit_entry_state(fun: &mut Function, jit_entry_block: BlockId, jit_ent let ep_offset = local_idx_to_ep_offset(iseq, local_idx) as u32; entry_state.locals.push(fun.push_insn(jit_entry_block, Insn::GetLocal { level: 0, ep_offset, use_sp: false, rest_param: false })); } else if local_idx < param_size { - entry_state.locals.push(fun.push_insn(jit_entry_block, Insn::Param)); + let id = unsafe { rb_zjit_local_id(iseq, local_idx.try_into().unwrap()) }; + entry_state.locals.push(fun.push_insn(jit_entry_block, Insn::LoadArg { idx: arg_idx, id, val_type: types::BasicObject })); + arg_idx += 1; } else { entry_state.locals.push(fun.push_insn(jit_entry_block, Insn::Const { val: Const::Value(Qnil) })); } @@ -8252,8 +8265,11 @@ mod graphviz_tests { >]; bb0:v4 -> bb2:params:n; bb1 [label=< - + + + +
bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject) 
bb1() 
EntryPoint JIT(0) 
v6:BasicObject = LoadArg :self@0 
v7:BasicObject = LoadArg :x@1 
v8:BasicObject = LoadArg :y@2 
Jump bb2(v6, v7, v8) 
>]; bb1:v9 -> bb2:params:n; @@ -8302,8 +8318,10 @@ mod graphviz_tests { >]; bb0:v3 -> bb2:params:n; bb1 [label=< - + + +
bb1(v5:BasicObject, v6:BasicObject) 
bb1() 
EntryPoint JIT(0) 
v5:BasicObject = LoadArg :self@0 
v6:BasicObject = LoadArg :c@1 
Jump bb2(v5, v6) 
>]; bb1:v7 -> bb2:params:n; diff --git a/zjit/src/hir/opt_tests.rs b/zjit/src/hir/opt_tests.rs index 516bec1c510f5d..514d2e530652c6 100644 --- a/zjit/src/hir/opt_tests.rs +++ b/zjit/src/hir/opt_tests.rs @@ -45,8 +45,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -78,8 +79,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -105,8 +107,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -136,8 +139,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[5] = Const Value(5) @@ -167,8 +171,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[0] = Const Value(0) @@ -194,8 +199,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[6] = Const Value(6) @@ -223,8 +229,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :n, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :n@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:Fixnum[0] = Const Value(0) @@ -259,8 +267,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[0] = Const Value(0) @@ -286,8 +295,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[11] = Const Value(11) @@ -313,8 +323,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[0] = Const Value(0) @@ -340,8 +351,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[11] = Const Value(11) @@ -367,8 +379,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[-7] = Const Value(-7) @@ -394,8 +407,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[7] = Const Value(7) @@ -421,8 +435,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[-7] = Const Value(-7) @@ -452,8 +467,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -485,8 +501,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -524,8 +541,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[2] = Const Value(2) @@ -557,8 +575,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[2] = Const Value(2) @@ -596,8 +615,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -629,8 +649,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[2] = Const Value(2) @@ -662,8 +683,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -696,8 +718,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[2] = Const Value(2) @@ -745,8 +768,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :object, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :object@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(CustomEq@0x1000) @@ -774,8 +799,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -804,10 +831,12 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:ArrayExact = GetLocal :array, l0, SP@4, * Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:ArrayExact): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :array@1 Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:ArrayExact): + bb2(v8:BasicObject, v9:BasicObject): CheckInterrupts Return v9 @@ -818,8 +847,10 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :k, l0, SP@5 v3:BasicObject = GetLocal , l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :k@1 v8:BasicObject = GetLocal , l0, EP@3 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): @@ -832,8 +863,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :k, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :k@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): CheckInterrupts @@ -845,8 +878,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :b@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:NilClass = Const Value(nil) @@ -860,10 +895,13 @@ mod hir_opt_tests { v2:ArrayExact = GetLocal :rest, l0, SP@5, * v3:BasicObject = GetLocal :post, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:ArrayExact, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :rest@1 + v8:BasicObject = LoadArg :post@2 Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:ArrayExact, v12:BasicObject): + bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): CheckInterrupts Return v12 "); @@ -884,8 +922,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -912,8 +951,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -940,8 +980,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -977,8 +1018,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[1] = Const Value(1) @@ -1007,8 +1049,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -1039,8 +1083,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -1071,8 +1117,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) @@ -1101,8 +1149,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = Send v6, :foo # SendFallbackReason: SendWithoutBlock: unsupported method type Null @@ -1127,8 +1176,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -1154,8 +1204,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[3] = Const Value(3) @@ -1183,8 +1234,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[1] = Const Value(1) @@ -1215,8 +1267,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -1245,8 +1298,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -1271,8 +1325,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[3] = Const Value(3) @@ -1298,8 +1353,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[3] = Const Value(3) @@ -1327,8 +1383,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -1368,8 +1425,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -1402,8 +1460,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) @@ -1429,8 +1490,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) @@ -1456,8 +1520,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -1483,8 +1549,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) @@ -1511,8 +1579,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, []@0x1008, cme:0x1010) @@ -1539,8 +1610,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -1564,8 +1636,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -1589,8 +1662,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -1617,8 +1691,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, <@0x1008, cme:0x1010) @@ -1644,8 +1721,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -1671,8 +1750,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) @@ -1701,8 +1782,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -1731,8 +1813,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -1759,8 +1842,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) @@ -1786,8 +1871,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) @@ -1813,8 +1900,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[10] = Const Value(10) @@ -1840,8 +1929,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[10] = Const Value(10) @@ -1868,8 +1959,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -1894,8 +1986,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :arr@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[0] = Const Value(0) @@ -1929,8 +2023,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :arr@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[0] = Const Value(0) @@ -1961,8 +2057,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -1989,8 +2086,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -2023,8 +2121,10 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:NilClass = Const Value(nil) Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 v8:NilClass = Const Value(nil) Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): @@ -2050,8 +2150,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -2080,8 +2181,11 @@ mod hir_opt_tests { v3:BasicObject = GetLocal :bval, l0, SP@5 v4:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject, v9:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :aval@1 + v9:BasicObject = LoadArg :bval@2 v10:NilClass = Const Value(nil) Jump bb2(v7, v8, v9, v10) bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:NilClass): @@ -2111,8 +2215,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -2139,8 +2244,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -2168,8 +2274,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -2195,8 +2302,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -2225,8 +2333,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) @@ -2256,8 +2367,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, -@0x1008, cme:0x1010) @@ -2287,8 +2401,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, *@0x1008, cme:0x1010) @@ -2318,8 +2435,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, /@0x1008, cme:0x1010) @@ -2350,8 +2470,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, %@0x1008, cme:0x1010) @@ -2382,8 +2505,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, <@0x1008, cme:0x1010) @@ -2413,8 +2539,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, <=@0x1008, cme:0x1010) @@ -2444,8 +2573,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, >@0x1008, cme:0x1010) @@ -2475,8 +2607,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, >=@0x1008, cme:0x1010) @@ -2506,8 +2641,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, ==@0x1008, cme:0x1010) @@ -2537,8 +2675,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, !=@0x1008, cme:0x1010) @@ -2566,8 +2707,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = GetConstantPath 0x1000 @@ -2592,8 +2734,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :klass, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :klass@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:FalseClass = Const Value(false) @@ -2618,8 +2762,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, itself@0x1008, cme:0x1010) @@ -2641,8 +2787,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact = NewArray @@ -2669,8 +2816,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -2702,8 +2850,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -2735,8 +2884,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact = NewArray @@ -2762,8 +2912,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -2786,8 +2937,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -2820,8 +2972,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -2850,8 +3003,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -2876,8 +3030,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact = NewArray @@ -2904,8 +3059,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -2928,8 +3084,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -2955,8 +3112,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -2984,8 +3142,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -3010,8 +3169,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) @@ -3039,8 +3200,10 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:NilClass = Const Value(nil) Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 v8:NilClass = Const Value(nil) Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): @@ -3069,8 +3232,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -3106,8 +3270,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :c, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :c@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -3134,8 +3300,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[1] = Const Value(1) @@ -3168,8 +3335,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -3199,8 +3367,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[1] = Const Value(1) @@ -3224,8 +3393,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[10] = Const Value(10) @@ -3250,8 +3420,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[1] = Const Value(1) @@ -3279,8 +3450,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[3] = Const Value(3) @@ -3309,8 +3481,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[0] = Const Value(0) @@ -3339,8 +3512,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[0] = Const Value(0) @@ -3368,8 +3542,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[1] = Const Value(1) @@ -3407,8 +3582,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[1] = Const Value(1) @@ -3446,8 +3622,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[6] = Const Value(6) @@ -3490,8 +3667,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[2] = Const Value(2) @@ -3518,8 +3696,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[1] = Const Value(1) @@ -3544,8 +3723,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -3572,8 +3752,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:HashExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -3599,8 +3780,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): IncrCounter complex_arg_pass_param_kwrest @@ -3623,8 +3805,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -3656,8 +3839,10 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :s, l0, SP@5 v3:NilClass = Const Value(nil) Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :s@1 v8:NilClass = Const Value(nil) Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): @@ -3684,8 +3869,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = GetConstantPath 0x1000 @@ -3707,8 +3893,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = GetConstantPath 0x1000 @@ -3729,8 +3916,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -3759,8 +3947,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -3784,8 +3973,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -3821,8 +4011,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -3853,8 +4044,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -3885,8 +4077,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -3917,8 +4110,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -3948,8 +4142,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -3978,8 +4173,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -4010,8 +4206,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -4039,8 +4236,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -4073,8 +4271,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:ArrayExact = NewArray v11, v12 @@ -4101,8 +4302,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:ArrayExact = NewArray v11, v12 @@ -4128,8 +4332,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :block, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :block@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:CPtr = GetEP 0 @@ -4156,8 +4362,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :block, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :block@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:CBool = IsBlockParamModified l0 @@ -4188,8 +4396,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:CBool = IsBlockParamModified l1 @@ -4216,8 +4425,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -4239,8 +4449,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -4265,8 +4476,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v15:HeapBasicObject = GuardType v6, HeapBasicObject @@ -4290,8 +4502,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v15:HeapBasicObject = GuardType v6, HeapBasicObject @@ -4312,15 +4525,17 @@ mod hir_opt_tests { end test p "); - assert_snapshot!(hir_string("test"), @" + assert_snapshot!(hir_string("test"), @r" fn test@:4: bb0(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :p@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -4342,15 +4557,17 @@ mod hir_opt_tests { end test p "); - assert_snapshot!(hir_string("test"), @" + assert_snapshot!(hir_string("test"), @r" fn test@:4: bb0(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :p@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[2] = Const Value(2) @@ -4372,15 +4589,17 @@ mod hir_opt_tests { end test p "); - assert_snapshot!(hir_string("test"), @" + assert_snapshot!(hir_string("test"), @r" fn test@:4: bb0(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :p@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[3] = Const Value(3) @@ -4402,15 +4621,17 @@ mod hir_opt_tests { end test p "); - assert_snapshot!(hir_string("test"), @" + assert_snapshot!(hir_string("test"), @r" fn test@:4: bb0(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :p@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -4433,7 +4654,7 @@ mod hir_opt_tests { end test p "); - assert_snapshot!(hir_string("test"), @" + assert_snapshot!(hir_string("test"), @r" fn test@:4: bb0(): EntryPoint interpreter @@ -4441,8 +4662,10 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :p, l0, SP@5 v3:NilClass = Const Value(nil) Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :p@1 v8:NilClass = Const Value(nil) Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): @@ -4464,15 +4687,17 @@ mod hir_opt_tests { end test p "); - assert_snapshot!(hir_string("test"), @" + assert_snapshot!(hir_string("test"), @r" fn test@:4: bb0(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :p@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -4500,8 +4725,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): IncrCounter definedivar_fallback_not_t_object @@ -4532,8 +4758,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): IncrCounter definedivar_fallback_not_monomorphic @@ -4565,8 +4792,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): IncrCounter definedivar_fallback_too_complex @@ -4589,8 +4817,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[5] = Const Value(5) @@ -4617,8 +4846,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[5] = Const Value(5) @@ -4650,8 +4880,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -4694,8 +4925,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[5] = Const Value(5) @@ -4728,8 +4960,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[5] = Const Value(5) @@ -4763,8 +4996,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[5] = Const Value(5) @@ -4795,8 +5029,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[5] = Const Value(5) @@ -4819,8 +5054,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -4844,8 +5080,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): SideExit PatchPoint(BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE)) @@ -4863,8 +5100,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -4886,8 +5124,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:HashExact = NewHash @@ -4911,8 +5150,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:HashExact = NewHash @@ -4934,8 +5174,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -4956,8 +5197,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -4979,8 +5221,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact = NewArray @@ -5004,8 +5247,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact = NewArray @@ -5027,8 +5271,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5049,8 +5294,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5072,8 +5318,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -5098,8 +5345,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -5122,8 +5370,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_UMINUS) @@ -5144,8 +5393,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5167,8 +5417,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -5193,8 +5444,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -5217,8 +5469,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -5247,8 +5500,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -5279,8 +5534,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -5308,8 +5565,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -5340,8 +5599,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -5369,8 +5629,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -5397,8 +5658,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -5432,8 +5694,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5464,8 +5727,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5496,8 +5760,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5528,8 +5793,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5563,8 +5829,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5596,8 +5863,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :arr@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v16:Fixnum[1] = Const Value(1) @@ -5622,8 +5891,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -5652,8 +5922,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -5675,8 +5946,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:RegexpExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -5700,8 +5972,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -5733,8 +6006,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[100] = Const Value(100) @@ -5757,8 +6031,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = Send v6, 0x1000, :bmethod # SendFallbackReason: Send: unsupported method type Bmethod @@ -5784,8 +6059,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -5811,8 +6087,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:NilClass = Const Value(nil) @@ -5838,8 +6115,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:NilClass = Const Value(nil) @@ -5862,8 +6140,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -5889,8 +6168,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -5916,8 +6196,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :val@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(NilClass@0x1000, nil?@0x1008, cme:0x1010) @@ -5943,8 +6225,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :val@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(FalseClass@0x1000, nil?@0x1008, cme:0x1010) @@ -5970,8 +6254,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :val@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(TrueClass@0x1000, nil?@0x1008, cme:0x1010) @@ -5997,8 +6283,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :val@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Symbol@0x1000, nil?@0x1008, cme:0x1010) @@ -6024,8 +6312,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :val@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, nil?@0x1008, cme:0x1010) @@ -6051,8 +6341,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :val@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Float@0x1000, nil?@0x1008, cme:0x1010) @@ -6078,8 +6370,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :val@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -6106,8 +6400,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) @@ -6134,8 +6430,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(FalseClass@0x1000, !@0x1008, cme:0x1010) @@ -6161,8 +6459,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(NilClass@0x1000, !@0x1008, cme:0x1010) @@ -6191,8 +6491,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): CheckInterrupts @@ -6230,8 +6532,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) @@ -6261,8 +6565,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Hash@0x1000) @@ -6291,8 +6597,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -6321,8 +6630,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, &@0x1008, cme:0x1010) @@ -6350,8 +6662,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, |@0x1008, cme:0x1010) @@ -6379,8 +6694,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -6415,8 +6731,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -6455,8 +6773,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -6486,8 +6806,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -6516,8 +6837,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -6548,8 +6870,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -6579,8 +6902,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): SideExit UnhandledYARVInsn(getinstancevariable) @@ -6606,8 +6930,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = Send v6, :foo # SendFallbackReason: Uncategorized(opt_send_without_block) @@ -6649,8 +6974,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:CBool = HasType v9, HeapObject[class_exact:C] @@ -6702,8 +7029,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -6728,8 +7057,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -6763,8 +7093,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -6798,8 +7129,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :block, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :block@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:ArrayExact = NewArray @@ -6829,8 +7162,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :block, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :block@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:ArrayExact = NewArray @@ -6863,8 +7198,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact = NewArray @@ -6898,8 +7234,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -6929,8 +7266,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -6964,8 +7302,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -6999,8 +7338,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -7032,8 +7373,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -7065,8 +7408,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v16:Fixnum[5] = Const Value(5) @@ -7101,8 +7446,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v16:Fixnum[5] = Const Value(5) @@ -7134,8 +7481,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -7162,8 +7511,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -7194,8 +7545,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -7224,8 +7577,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :o, l0, SP@5 v3:BasicObject = GetLocal :v, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :o@1 + v8:BasicObject = LoadArg :v@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -7257,8 +7613,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :o, l0, SP@5 v3:BasicObject = GetLocal :v, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :o@1 + v8:BasicObject = LoadArg :v@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -7285,8 +7644,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact = NewArray @@ -7312,8 +7672,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact = NewArray @@ -7336,8 +7697,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact = NewArray @@ -7362,8 +7724,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -7387,8 +7750,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -7414,8 +7778,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -7440,8 +7806,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, to_s@0x1008, cme:0x1010) @@ -7465,8 +7833,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, to_s@0x1008, cme:0x1010) @@ -7490,8 +7860,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -7519,8 +7891,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -7557,8 +7930,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :arr, l0, SP@5 v3:BasicObject = GetLocal :idx, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :arr@1 + v8:BasicObject = LoadArg :idx@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) @@ -7594,8 +7970,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :arr, l0, SP@5 v3:BasicObject = GetLocal :idx, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :arr@1 + v8:BasicObject = LoadArg :idx@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -7629,8 +8008,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -7662,8 +8042,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :hash, l0, SP@5 v3:BasicObject = GetLocal :key, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :hash@1 + v8:BasicObject = LoadArg :key@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(Hash@0x1000) @@ -7693,8 +8076,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :hash, l0, SP@5 v3:BasicObject = GetLocal :key, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :hash@1 + v8:BasicObject = LoadArg :key@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -7719,8 +8105,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -7751,8 +8138,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -7786,8 +8174,12 @@ mod hir_opt_tests { v3:BasicObject = GetLocal :key, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :hash@1 + v9:BasicObject = LoadArg :key@2 + v10:BasicObject = LoadArg :val@3 Jump bb2(v7, v8, v9, v10) bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(Hash@0x1000) @@ -7818,8 +8210,12 @@ mod hir_opt_tests { v3:BasicObject = GetLocal :key, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :hash@1 + v9:BasicObject = LoadArg :key@2 + v10:BasicObject = LoadArg :val@3 Jump bb2(v7, v8, v9, v10) bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -7843,8 +8239,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -7876,8 +8273,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :arr@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v16:Fixnum[1] = Const Value(1) @@ -7919,8 +8318,12 @@ mod hir_opt_tests { v3:BasicObject = GetLocal :index, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :arr@1 + v9:BasicObject = LoadArg :index@2 + v10:BasicObject = LoadArg :val@3 Jump bb2(v7, v8, v9, v10) bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) @@ -7963,8 +8366,12 @@ mod hir_opt_tests { v3:BasicObject = GetLocal :index, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :arr@1 + v9:BasicObject = LoadArg :index@2 + v10:BasicObject = LoadArg :val@3 Jump bb2(v7, v8, v9, v10) bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(MyArray@0x1000) @@ -7991,8 +8398,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :arr@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -8021,8 +8430,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :arr@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -8051,8 +8462,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :arr@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -8081,8 +8494,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :arr@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) @@ -8110,8 +8525,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :arr@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) @@ -8139,8 +8556,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :s@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:RegexpExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -8167,8 +8586,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :s, l0, SP@5 v3:BasicObject = GetLocal :i, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :s@1 + v8:BasicObject = LoadArg :i@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -8204,8 +8626,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :s, l0, SP@5 v3:BasicObject = GetLocal :i, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :s@1 + v8:BasicObject = LoadArg :i@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -8241,8 +8666,12 @@ mod hir_opt_tests { v3:BasicObject = GetLocal :idx, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :s@1 + v9:BasicObject = LoadArg :idx@2 + v10:BasicObject = LoadArg :val@3 Jump bb2(v7, v8, v9, v10) bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -8283,8 +8712,12 @@ mod hir_opt_tests { v3:BasicObject = GetLocal :idx, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :s@1 + v9:BasicObject = LoadArg :idx@2 + v10:BasicObject = LoadArg :val@3 Jump bb2(v7, v8, v9, v10) bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(MyString@0x1000) @@ -8323,8 +8756,12 @@ mod hir_opt_tests { v3:BasicObject = GetLocal :idx, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :s@1 + v9:BasicObject = LoadArg :idx@2 + v10:BasicObject = LoadArg :val@3 Jump bb2(v7, v8, v9, v10) bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -8351,8 +8788,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :s@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -8384,8 +8823,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :s@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -8412,8 +8853,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, succ@0x1008, cme:0x1010) @@ -8440,8 +8883,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, succ@0x1008, cme:0x1010) @@ -8466,8 +8911,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[5] = Const Value(5) @@ -8494,8 +8941,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[-5] = Const Value(-5) @@ -8521,8 +8970,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[64] = Const Value(64) @@ -8549,8 +9000,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, <<@0x1008, cme:0x1010) @@ -8574,8 +9028,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[5] = Const Value(5) @@ -8601,8 +9057,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[-5] = Const Value(-5) @@ -8627,8 +9085,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[64] = Const Value(64) @@ -8654,8 +9114,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, >>@0x1008, cme:0x1010) @@ -8680,8 +9143,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -8709,8 +9175,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -8740,8 +9209,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -8771,8 +9243,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(MyString@0x1000) @@ -8795,8 +9270,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -8822,8 +9298,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[0] = Const Value(0) @@ -8849,8 +9326,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -8875,8 +9354,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[0] = Const Value(0) @@ -8897,8 +9377,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[4] = Const Value(4) @@ -8923,8 +9404,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, ^@0x1008, cme:0x1010) @@ -8954,8 +9438,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, ^@0x1008, cme:0x1010) @@ -8982,8 +9469,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, ^@0x1008, cme:0x1010) @@ -9005,8 +9495,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, ^@0x1008, cme:0x1010) @@ -9028,8 +9521,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(TrueClass@0x1000, ^@0x1008, cme:0x1010) @@ -9053,8 +9549,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v17:BasicObject = Send v11, :^ # SendFallbackReason: Uncategorized(opt_send_without_block) @@ -9076,8 +9575,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :hash, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :hash@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Hash@0x1000) @@ -9106,8 +9607,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :hash, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :hash@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Hash@0x1000) @@ -9136,8 +9639,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -9168,8 +9673,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -9203,8 +9710,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -9237,8 +9746,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -9272,8 +9783,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -9307,8 +9820,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -9341,8 +9856,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -9375,8 +9892,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -9408,8 +9927,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -9444,8 +9965,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -9471,8 +9994,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -9498,8 +10022,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -9525,8 +10050,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -9552,8 +10078,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -9579,8 +10106,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -9606,8 +10134,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -9633,8 +10162,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -9660,8 +10190,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[3] = Const Value(3) @@ -9687,8 +10218,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[1] = Const Value(1) @@ -9724,8 +10256,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -9761,8 +10294,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Symbol@0x1000, to_sym@0x1008, cme:0x1010) @@ -9786,8 +10321,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, to_i@0x1008, cme:0x1010) @@ -9814,8 +10351,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -9844,8 +10382,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -9874,8 +10413,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -9904,8 +10444,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:StaticSymbol[:the_block] = Const Value(VALUE(0x1000)) @@ -9929,8 +10470,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :l@1 + v8:BasicObject = LoadArg :r@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -9960,8 +10504,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :l@1 + v8:BasicObject = LoadArg :r@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -9991,8 +10538,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :l@1 + v8:BasicObject = LoadArg :r@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -10020,8 +10570,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :l@1 + v8:BasicObject = LoadArg :r@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -10051,8 +10604,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :l@1 + v8:BasicObject = LoadArg :r@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -10082,8 +10638,11 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :l@1 + v8:BasicObject = LoadArg :r@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -10112,8 +10671,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :s@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -10142,8 +10703,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :s@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -10171,8 +10734,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :s@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -10202,8 +10767,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :s@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -10231,8 +10798,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :s@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -10258,8 +10827,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode @@ -10288,8 +10859,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode @@ -10318,8 +10891,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode @@ -10348,8 +10923,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode @@ -10380,8 +10957,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode @@ -10413,8 +10992,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode @@ -10443,8 +11024,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode @@ -10473,8 +11056,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode @@ -10505,8 +11090,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode @@ -10535,8 +11122,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[1] = Const Value(1) @@ -10562,8 +11150,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): IncrCounter complex_arg_pass_param_forwardable @@ -10589,8 +11178,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :s@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) @@ -10629,8 +11220,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -10668,8 +11260,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -10701,8 +11295,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -10728,8 +11324,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[5] = Const Value(5) @@ -10754,8 +11351,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) @@ -10798,8 +11396,12 @@ mod hir_opt_tests { v4:BasicObject = GetLocal :_c, l0, SP@5 v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject, v11:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :a@1 + v10:BasicObject = LoadArg :_b@2 + v11:BasicObject = LoadArg :_c@3 v12:NilClass = Const Value(nil) Jump bb2(v8, v9, v10, v11, v12) bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:BasicObject, v18:NilClass): @@ -10849,8 +11451,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -10889,8 +11492,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -10927,8 +11531,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -10965,8 +11570,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11003,8 +11609,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11043,8 +11650,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11081,8 +11689,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11119,8 +11728,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11157,8 +11767,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :obj, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :obj@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(TestDynamic@0x1000) @@ -11196,8 +11808,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11233,8 +11846,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11265,8 +11879,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -11295,8 +11910,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11322,8 +11938,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(BasicObject@0x1000) @@ -11349,8 +11966,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11376,8 +11994,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11404,8 +12023,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint NoSingletonClass(C@0x1000) @@ -11434,8 +12054,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -11476,8 +12097,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :s@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v9, :length # SendFallbackReason: Singleton class previously created for receiver class @@ -11515,8 +12138,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint MethodRedefined(A@0x1000, foo@0x1008, cme:0x1010) @@ -11538,14 +12162,15 @@ mod hir_opt_tests { itself "); - assert_snapshot!(hir_string("itself"), @" + assert_snapshot!(hir_string("itself"), @r" fn block in @:2: bb0(): EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = InvokeSuper v6, 0x1000 # SendFallbackReason: super: call from within a block @@ -11583,8 +12208,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(A@0x1000, foo@0x1008, cme:0x1010) @@ -11633,10 +12260,12 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:ArrayExact = GetLocal :x, l0, SP@4, * Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:ArrayExact): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:ArrayExact): + bb2(v8:BasicObject, v9:BasicObject): v15:ArrayExact = ToArray v9 v17:BasicObject = InvokeSuper v8, 0x1000, v15 # SendFallbackReason: super: complex argument passing to `super` call CheckInterrupts @@ -11673,8 +12302,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = InvokeSuper v6, 0x1000 # SendFallbackReason: super: call made with a block @@ -11704,8 +12334,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint MethodRedefined(Hash@0x1000, size@0x1008, cme:0x1010) @@ -11738,8 +12369,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint MethodRedefined(BasicObject@0x1000, initialize@0x1008, cme:0x1010) @@ -11783,15 +12415,20 @@ mod hir_opt_tests { v6:CBool = IsBitEqual v4, v5 IfTrue v6, bb2(v1, v2, v3) Jump bb4(v1, v2, v3) - bb1(v10:BasicObject, v11:BasicObject): + bb1(): EntryPoint JIT(0) + v10:BasicObject = LoadArg :self@0 + v11:BasicObject = LoadArg :needle@1 v12:NilClass = Const Value(nil) Jump bb2(v10, v11, v12) bb2(v19:BasicObject, v20:BasicObject, v21:BasicObject): v24:Fixnum[0] = Const Value(0) Jump bb4(v19, v20, v24) - bb3(v15:BasicObject, v16:BasicObject, v17:BasicObject): + bb3(): EntryPoint JIT(1) + v15:BasicObject = LoadArg :self@0 + v16:BasicObject = LoadArg :needle@1 + v17:BasicObject = LoadArg :offset@2 Jump bb4(v15, v16, v17) bb4(v27:BasicObject, v28:BasicObject, v29:BasicObject): PatchPoint MethodRedefined(String@0x1010, byteindex@0x1018, cme:0x1020) @@ -11837,8 +12474,10 @@ mod hir_opt_tests { v2:BasicObject = GetLocal :blk, l0, SP@5 v3:NilClass = Const Value(nil) Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :blk@1 v8:NilClass = Const Value(nil) Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): @@ -11884,8 +12523,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :items, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :items@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:StaticSymbol[:succ] = Const Value(VALUE(0x1000)) @@ -11927,16 +12568,19 @@ mod hir_opt_tests { v5:CBool = IsBitEqual v3, v4 IfTrue v5, bb2(v1, v2) Jump bb4(v1, v2) - bb1(v9:BasicObject): + bb1(): EntryPoint JIT(0) + v9:BasicObject = LoadArg :self@0 v10:NilClass = Const Value(nil) Jump bb2(v9, v10) bb2(v16:BasicObject, v17:BasicObject): v20:StringExact[VALUE(0x1010)] = Const Value(VALUE(0x1010)) v21:StringExact = StringCopy v20 Jump bb4(v16, v21) - bb3(v13:BasicObject, v14:BasicObject): + bb3(): EntryPoint JIT(1) + v13:BasicObject = LoadArg :self@0 + v14:BasicObject = LoadArg :content@1 Jump bb4(v13, v14) bb4(v24:BasicObject, v25:BasicObject): v31:BasicObject = InvokeSuper v24, 0x1018, v25 # SendFallbackReason: super: complex argument passing to `super` call @@ -11971,8 +12615,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): CheckInterrupts @@ -12019,8 +12665,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:CBool = HasType v9, HeapObject[class_exact:C] @@ -12071,8 +12719,10 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :o@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:CBool = HasType v9, HeapObject[class_exact:C] @@ -12115,8 +12765,9 @@ mod hir_opt_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -12194,8 +12845,10 @@ mod hir_opt_tests { v11:CBool = IsBitEqual v6, v10 IfTrue v11, bb4(v1, v2, v3, v4, v5) Jump bb6(v1, v2, v3, v4, v5) - bb1(v15:BasicObject, v16:BasicObject): + bb1(): EntryPoint JIT(0) + v15:BasicObject = LoadArg :self@0 + v16:BasicObject = LoadArg :list@1 v17:NilClass = Const Value(nil) v18:NilClass = Const Value(nil) v19:NilClass = Const Value(nil) @@ -12204,8 +12857,11 @@ mod hir_opt_tests { v42:NilClass = Const Value(nil) SetLocal :sep, l0, EP@5, v42 Jump bb4(v35, v36, v42, v38, v39) - bb3(v22:BasicObject, v23:BasicObject, v24:BasicObject): + bb3(): EntryPoint JIT(1) + v22:BasicObject = LoadArg :self@0 + v23:BasicObject = LoadArg :list@1 + v24:BasicObject = LoadArg :sep@2 v25:NilClass = Const Value(nil) v26:NilClass = Const Value(nil) Jump bb4(v22, v23, v24, v25, v26) @@ -12213,8 +12869,12 @@ mod hir_opt_tests { v53:StaticSymbol[:each] = Const Value(VALUE(0x1010)) SetLocal :iter_method, l0, EP@4, v53 Jump bb6(v46, v47, v48, v53, v50) - bb5(v29:BasicObject, v30:BasicObject, v31:BasicObject, v32:BasicObject): + bb5(): EntryPoint JIT(2) + v29:BasicObject = LoadArg :self@0 + v30:BasicObject = LoadArg :list@1 + v31:BasicObject = LoadArg :sep@2 + v32:BasicObject = LoadArg :iter_method@3 v33:NilClass = Const Value(nil) Jump bb6(v29, v30, v31, v32, v33) bb6(v57:BasicObject, v58:BasicObject, v59:BasicObject, v60:BasicObject, v61:NilClass): @@ -12259,8 +12919,9 @@ mod hir_opt_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): diff --git a/zjit/src/hir/tests.rs b/zjit/src/hir/tests.rs index 8b15d7d23fb238..effd1bc0c2aeac 100644 --- a/zjit/src/hir/tests.rs +++ b/zjit/src/hir/tests.rs @@ -35,8 +35,11 @@ mod snapshot_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v13:Any = Snapshot FrameState { pc: 0x1000, stack: [], locals: [a=v11, b=v12] } @@ -66,8 +69,9 @@ mod snapshot_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v8:Any = Snapshot FrameState { pc: 0x1000, stack: [], locals: [] } @@ -102,8 +106,9 @@ mod snapshot_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v8:Any = Snapshot FrameState { pc: 0x1000, stack: [], locals: [] } @@ -136,8 +141,9 @@ mod snapshot_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v8:Any = Snapshot FrameState { pc: 0x1000, stack: [], locals: [] } @@ -250,15 +256,18 @@ pub mod hir_build_tests { v5:CBool = IsBitEqual v3, v4 IfTrue v5, bb2(v1, v2) Jump bb4(v1, v2) - bb1(v9:BasicObject): + bb1(): EntryPoint JIT(0) + v9:BasicObject = LoadArg :self@0 v10:NilClass = Const Value(nil) Jump bb2(v9, v10) bb2(v16:BasicObject, v17:BasicObject): v20:Fixnum[1] = Const Value(1) Jump bb4(v16, v20) - bb3(v13:BasicObject, v14:BasicObject): + bb3(): EntryPoint JIT(1) + v13:BasicObject = LoadArg :self@0 + v14:BasicObject = LoadArg :x@1 Jump bb4(v13, v14) bb4(v23:BasicObject, v24:BasicObject): v28:Fixnum[123] = Const Value(123) @@ -277,8 +286,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[123] = Const Value(123) @@ -297,8 +307,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact = NewArray @@ -318,8 +329,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:ArrayExact = NewArray v9 @@ -340,8 +353,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:ArrayExact = NewArray v11, v12 @@ -361,8 +377,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[10] = Const Value(10) @@ -384,8 +402,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:RangeExact = NewRange v11 NewRangeInclusive v12 @@ -405,8 +426,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[10] = Const Value(10) @@ -428,8 +451,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:RangeExact = NewRange v11 NewRangeExclusive v12 @@ -448,8 +474,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -469,8 +496,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:HashExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -490,8 +518,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:HashExact = NewHash @@ -512,8 +541,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :aval, l0, SP@5 v3:BasicObject = GetLocal :bval, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :aval@1 + v8:BasicObject = LoadArg :bval@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v16:StaticSymbol[:a] = Const Value(VALUE(0x1000)) @@ -534,8 +566,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -555,8 +588,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Bignum[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -575,8 +609,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Flonum[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -595,8 +630,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:HeapFloat[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -615,8 +651,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) @@ -635,8 +672,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -659,8 +697,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -685,8 +724,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): SideExit PatchPoint(BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE)) @@ -705,8 +745,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -731,8 +772,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): SideExit PatchPoint(BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE)) @@ -751,8 +793,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -777,8 +820,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): SideExit PatchPoint(BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE)) @@ -797,8 +841,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_UMINUS) @@ -823,8 +868,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): SideExit PatchPoint(BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_UMINUS)) @@ -847,8 +893,9 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -886,8 +933,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:BasicObject = GetLocal :l2, l2, EP@4 @@ -924,16 +972,19 @@ pub mod hir_build_tests { v6:CBool = IsBitEqual v4, v5 IfTrue v6, bb2(v1, v2, v3) Jump bb4(v1, v2, v3) - bb1(v10:BasicObject): + bb1(): EntryPoint JIT(0) + v10:BasicObject = LoadArg :self@0 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) Jump bb2(v10, v11, v12) bb2(v19:BasicObject, v20:BasicObject, v21:NilClass): v25:Fixnum[1] = Const Value(1) Jump bb4(v19, v25, v25) - bb3(v15:BasicObject, v16:BasicObject): + bb3(): EntryPoint JIT(1) + v15:BasicObject = LoadArg :self@0 + v16:BasicObject = LoadArg :a@1 v17:NilClass = Const Value(nil) Jump bb4(v15, v16, v17) bb4(v30:BasicObject, v31:BasicObject, v32:NilClass|Fixnum): @@ -962,15 +1013,18 @@ pub mod hir_build_tests { v6:CBool = IsBitEqual v4, v5 IfTrue v6, bb2(v1, v2, v3) Jump bb4(v1, v2, v3) - bb1(v10:BasicObject): + bb1(): EntryPoint JIT(0) + v10:BasicObject = LoadArg :self@0 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) Jump bb2(v10, v11, v12) bb2(v19:BasicObject, v20:BasicObject, v21:NilClass): SideExit UnhandledYARVInsn(trace_putobject_INT2FIX_1_) - bb3(v15:BasicObject, v16:BasicObject): + bb3(): EntryPoint JIT(1) + v15:BasicObject = LoadArg :self@0 + v16:BasicObject = LoadArg :a@1 v17:NilClass = Const Value(nil) Jump bb4(v15, v16, v17) bb4(v26:BasicObject, v27:BasicObject, v28:NilClass): @@ -996,14 +1050,17 @@ pub mod hir_build_tests { v5:CBool = IsBitEqual v3, v4 IfTrue v5, bb2(v1, v2) Jump bb4(v1, v2) - bb1(v9:BasicObject): + bb1(): EntryPoint JIT(0) + v9:BasicObject = LoadArg :self@0 v10:NilClass = Const Value(nil) Jump bb2(v9, v10) bb2(v16:BasicObject, v17:BasicObject): SideExit UnhandledYARVInsn(definemethod) - bb3(v13:BasicObject, v14:BasicObject): + bb3(): EntryPoint JIT(1) + v13:BasicObject = LoadArg :self@0 + v14:BasicObject = LoadArg :a@1 Jump bb4(v13, v14) bb4(v22:BasicObject, v23:BasicObject): CheckInterrupts @@ -1023,12 +1080,15 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) - bb3(v9:BasicObject, v10:BasicObject): + bb3(): EntryPoint JIT(1) + v9:BasicObject = LoadArg :self@0 + v10:BasicObject = LoadArg :a@1 Jump bb2(v9, v10) bb2(v12:BasicObject, v13:BasicObject): CheckInterrupts @@ -1048,8 +1108,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact|NilClass = DefinedIvar v6, :@foo @@ -1076,8 +1137,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:TrueClass|NilClass = DefinedIvar v6, :@foo @@ -1108,8 +1170,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:NilClass = Const Value(nil) @@ -1135,8 +1198,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:NilClass = Const Value(nil) @@ -1158,8 +1222,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:NilClass = Const Value(nil) @@ -1188,8 +1253,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :cond, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :cond@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): CheckInterrupts @@ -1227,8 +1294,10 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :cond, l0, SP@5 v3:NilClass = Const Value(nil) Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :cond@1 v8:NilClass = Const Value(nil) Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): @@ -1264,8 +1333,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :+, v12 # SendFallbackReason: Uncategorized(opt_plus) @@ -1289,8 +1361,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :-, v12 # SendFallbackReason: Uncategorized(opt_minus) @@ -1314,8 +1389,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :*, v12 # SendFallbackReason: Uncategorized(opt_mult) @@ -1339,8 +1417,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :/, v12 # SendFallbackReason: Uncategorized(opt_div) @@ -1364,8 +1445,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :%, v12 # SendFallbackReason: Uncategorized(opt_mod) @@ -1389,8 +1473,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :==, v12 # SendFallbackReason: Uncategorized(opt_eq) @@ -1414,8 +1501,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :!=, v12 # SendFallbackReason: Uncategorized(opt_neq) @@ -1439,8 +1529,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :<, v12 # SendFallbackReason: Uncategorized(opt_lt) @@ -1464,8 +1557,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :<=, v12 # SendFallbackReason: Uncategorized(opt_le) @@ -1489,8 +1585,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :>, v12 # SendFallbackReason: Uncategorized(opt_gt) @@ -1521,8 +1620,9 @@ pub mod hir_build_tests { v2:NilClass = Const Value(nil) v3:NilClass = Const Value(nil) Jump bb2(v1, v2, v3) - bb1(v6:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 v7:NilClass = Const Value(nil) v8:NilClass = Const Value(nil) Jump bb2(v6, v7, v8) @@ -1566,8 +1666,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :>=, v12 # SendFallbackReason: Uncategorized(opt_ge) @@ -1595,8 +1698,9 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): @@ -1633,8 +1737,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:Fixnum[2] = Const Value(2) @@ -1663,8 +1768,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:BasicObject = Send v9, 0x1000, :each # SendFallbackReason: Uncategorized(send) @@ -1688,8 +1795,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -1714,8 +1822,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -1744,8 +1853,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:ArrayExact = ToArray v9 @@ -1767,8 +1878,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v8, 0x1000, :foo, v9 # SendFallbackReason: Uncategorized(send) @@ -1789,8 +1902,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -1812,8 +1927,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v8, :foo, v9 # SendFallbackReason: Uncategorized(opt_send_without_block) @@ -1835,8 +1952,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = InvokeSuper v6, 0x1000 # SendFallbackReason: Uncategorized(invokesuper) @@ -1856,8 +1974,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = InvokeSuper v6, 0x1000 # SendFallbackReason: Uncategorized(invokesuper) @@ -1877,8 +1996,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:NilClass = Const Value(nil) @@ -1900,8 +2020,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :...@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:BasicObject = InvokeSuperForward v8, 0x1000, v9 # SendFallbackReason: Uncategorized(invokesuperforward) @@ -1922,8 +2044,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :...@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:BasicObject = InvokeSuperForward v8, 0x1000, v9 # SendFallbackReason: Uncategorized(invokesuperforward) @@ -1945,8 +2069,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :...@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:BasicObject = InvokeSuperForward v8, 0x1000, v9 # SendFallbackReason: Uncategorized(invokesuperforward) @@ -1969,8 +2095,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :...@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) @@ -1990,8 +2118,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :...@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:NilClass = Const Value(nil) @@ -2014,8 +2144,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:Class[VMFrozenCore] = Const Value(VALUE(0x1000)) @@ -2044,10 +2176,12 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:ArrayExact = GetLocal :*, l0, SP@4, * Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:ArrayExact): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :*@1 Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:ArrayExact): + bb2(v8:BasicObject, v9:BasicObject): v15:ArrayExact = ToNewArray v9 v17:Fixnum[1] = Const Value(1) ArrayPush v15, v17 @@ -2069,8 +2203,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :...@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:BasicObject = SendForward v8, 0x1000, :foo, v9 # SendFallbackReason: Uncategorized(sendforward) @@ -2095,11 +2231,16 @@ pub mod hir_build_tests { v5:BasicObject = GetLocal :&, l0, SP@5 v6:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5, v6) - bb1(v9:BasicObject, v10:BasicObject, v11:ArrayExact, v12:BasicObject, v13:BasicObject): + bb1(): EntryPoint JIT(0) + v9:BasicObject = LoadArg :self@0 + v10:BasicObject = LoadArg :a@1 + v11:BasicObject = LoadArg :*@2 + v12:BasicObject = LoadArg :**@3 + v13:BasicObject = LoadArg :&@4 v14:NilClass = Const Value(nil) Jump bb2(v9, v10, v11, v12, v13, v14) - bb2(v16:BasicObject, v17:BasicObject, v18:ArrayExact, v19:BasicObject, v20:BasicObject, v21:NilClass): + bb2(v16:BasicObject, v17:BasicObject, v18:BasicObject, v19:BasicObject, v20:BasicObject, v21:NilClass): v28:ArrayExact = ToArray v18 PatchPoint NoEPEscape(test) v33:CPtr = GetEP 0 @@ -2125,8 +2266,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v11:BasicObject = GetConstantPath 0x1000 @@ -2159,8 +2301,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_MAX) @@ -2184,8 +2327,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_MAX) @@ -2216,8 +2362,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): SideExit PatchPoint(BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_MAX)) @@ -2245,8 +2394,11 @@ pub mod hir_build_tests { v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :a@1 + v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) Jump bb2(v8, v9, v10, v11, v12) @@ -2277,8 +2429,11 @@ pub mod hir_build_tests { v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :a@1 + v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) Jump bb2(v8, v9, v10, v11, v12) @@ -2319,8 +2474,11 @@ pub mod hir_build_tests { v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :a@1 + v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) Jump bb2(v8, v9, v10, v11, v12) @@ -2351,8 +2509,11 @@ pub mod hir_build_tests { v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :a@1 + v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) Jump bb2(v8, v9, v10, v11, v12) @@ -2385,8 +2546,11 @@ pub mod hir_build_tests { v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :a@1 + v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) Jump bb2(v8, v9, v10, v11, v12) @@ -2429,8 +2593,11 @@ pub mod hir_build_tests { v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :a@1 + v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) Jump bb2(v8, v9, v10, v11, v12) @@ -2466,8 +2633,11 @@ pub mod hir_build_tests { v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :a@1 + v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) Jump bb2(v8, v9, v10, v11, v12) @@ -2513,8 +2683,11 @@ pub mod hir_build_tests { v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :a@1 + v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) Jump bb2(v8, v9, v10, v11, v12) @@ -2539,8 +2712,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_INCLUDE_P) @@ -2571,8 +2746,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): SideExit PatchPoint(BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_INCLUDE_P)) @@ -2593,8 +2770,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:ArrayExact = NewArray v11, v12 @@ -2618,8 +2798,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:ArrayExact = NewArray v11, v12 @@ -2644,8 +2827,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :klass, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :klass@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:FalseClass = Const Value(false) @@ -2668,8 +2853,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): PatchPoint SingleRactorMode @@ -2692,8 +2878,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -2748,8 +2935,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:BasicObject = GetClassVar :@@foo @@ -2774,8 +2962,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[42] = Const Value(42) @@ -2798,8 +2987,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -2822,8 +3012,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:BasicObject = GetGlobal :$foo @@ -2844,8 +3035,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :block, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :block@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:CBool = IsBlockParamModified l0 @@ -2878,8 +3071,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:CBool = IsBlockParamModified l1 @@ -2910,8 +3104,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:ArrayExact = ToNewArray v9 @@ -2933,8 +3129,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) @@ -2959,8 +3157,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:ArrayExact = ToNewArray v9 @@ -2984,8 +3184,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :a@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v14:ArrayExact = ToNewArray v9 @@ -3014,8 +3216,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v16:NilClass = Const Value(nil) @@ -3040,8 +3245,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :a@1 + v8:BasicObject = LoadArg :b@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :[], v12 # SendFallbackReason: Uncategorized(opt_aref) @@ -3063,8 +3271,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v9, :empty? # SendFallbackReason: Uncategorized(opt_empty_p) @@ -3086,8 +3296,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v9, :succ # SendFallbackReason: Uncategorized(opt_succ) @@ -3110,8 +3322,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :&, v12 # SendFallbackReason: Uncategorized(opt_and) @@ -3134,8 +3349,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :|, v12 # SendFallbackReason: Uncategorized(opt_or) @@ -3157,8 +3375,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v9, :! # SendFallbackReason: Uncategorized(opt_not) @@ -3181,8 +3401,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :regexp, l0, SP@5 v3:BasicObject = GetLocal :matchee, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :regexp@1 + v8:BasicObject = LoadArg :matchee@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :=~, v12 # SendFallbackReason: Uncategorized(opt_regexpmatch2) @@ -3207,8 +3430,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Class[VMFrozenCore] = Const Value(VALUE(0x1000)) @@ -3245,8 +3469,9 @@ pub mod hir_build_tests { v3:NilClass = Const Value(nil) v4:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 v8:NilClass = Const Value(nil) v9:NilClass = Const Value(nil) v10:NilClass = Const Value(nil) @@ -3272,8 +3497,9 @@ pub mod hir_build_tests { v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 v9:NilClass = Const Value(nil) v10:NilClass = Const Value(nil) v11:NilClass = Const Value(nil) @@ -3308,8 +3534,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): CheckInterrupts @@ -3345,8 +3573,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): CheckInterrupts @@ -3397,8 +3627,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): CheckInterrupts @@ -3446,8 +3678,11 @@ pub mod hir_build_tests { v3:BasicObject = GetLocal :exception, l0, SP@5 v4:BasicObject = GetLocal , l0, SP@4 Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject, v9:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :arg@1 + v9:BasicObject = LoadArg :exception@2 v10:BasicObject = GetLocal , l0, EP@3 Jump bb2(v7, v8, v9, v10) bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): @@ -3468,8 +3703,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:HeapObject = InvokeBuiltin leaf , v6 @@ -3497,9 +3733,13 @@ pub mod hir_build_tests { v5:BasicObject = GetLocal :block, l0, SP@5 v6:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5, v6) - bb1(v9:BasicObject, v10:BasicObject, v11:BasicObject, v13:BasicObject): + bb1(): EntryPoint JIT(0) + v9:BasicObject = LoadArg :self@0 + v10:BasicObject = LoadArg :name@1 + v11:BasicObject = LoadArg :encoding@2 v12:BasicObject = GetLocal , l0, EP@5 + v13:BasicObject = LoadArg :block@3 v14:NilClass = Const Value(nil) Jump bb2(v9, v10, v11, v12, v13, v14) bb2(v16:BasicObject, v17:BasicObject, v18:BasicObject, v19:BasicObject, v20:BasicObject, v21:NilClass): @@ -3537,8 +3777,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:BasicObject = InvokeBuiltin gc_enable, v6 @@ -3564,8 +3805,12 @@ pub mod hir_build_tests { v4:BasicObject = GetLocal :immediate_sweep, l0, SP@5 v5:BasicObject = GetLocal , l0, SP@4 Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject, v10:BasicObject, v11:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :full_mark@1 + v10:BasicObject = LoadArg :immediate_mark@2 + v11:BasicObject = LoadArg :immediate_sweep@3 v12:BasicObject = GetLocal , l0, EP@3 Jump bb2(v8, v9, v10, v11, v12) bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:BasicObject, v18:BasicObject): @@ -3586,8 +3831,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact = InvokeBuiltin leaf , v6 @@ -3608,8 +3854,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact = InvokeBuiltin leaf , v6 @@ -3633,8 +3880,10 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 Jump bb2(v1, v2) - bb1(v5:BasicObject, v6:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 + v6:BasicObject = LoadArg :x@1 Jump bb2(v5, v6) bb2(v8:BasicObject, v9:BasicObject): v13:NilClass = Const Value(nil) @@ -3668,8 +3917,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -3694,8 +3944,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -3725,8 +3976,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) @@ -3751,8 +4003,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -3782,8 +4035,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:Fixnum[1] = Const Value(1) @@ -3812,8 +4066,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v12:Fixnum[1] = Const Value(1) @@ -3824,8 +4079,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v12:Fixnum[2] = Const Value(2) @@ -3846,8 +4102,9 @@ pub mod hir_build_tests { EntryPoint interpreter v1:BasicObject = LoadSelf Jump bb2(v1) - bb1(v4:BasicObject): + bb1(): EntryPoint JIT(0) + v4:BasicObject = LoadArg :self@0 Jump bb2(v4) bb2(v6:BasicObject): v10:BasicObject = InvokeBlock # SendFallbackReason: Uncategorized(invokeblock) @@ -3871,8 +4128,11 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :x@1 + v8:BasicObject = LoadArg :y@2 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:BasicObject = InvokeBlock, v11, v12 # SendFallbackReason: Uncategorized(invokeblock) @@ -3898,8 +4158,10 @@ pub mod hir_build_tests { v3:NilClass = Const Value(nil) v4:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :o@1 v9:NilClass = Const Value(nil) v10:NilClass = Const Value(nil) Jump bb2(v7, v8, v9, v10) @@ -3935,8 +4197,10 @@ pub mod hir_build_tests { v3:NilClass = Const Value(nil) v4:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4) - bb1(v7:BasicObject, v8:BasicObject): + bb1(): EntryPoint JIT(0) + v7:BasicObject = LoadArg :self@0 + v8:BasicObject = LoadArg :o@1 v9:NilClass = Const Value(nil) v10:NilClass = Const Value(nil) Jump bb2(v7, v8, v9, v10) @@ -3963,8 +4227,10 @@ pub mod hir_build_tests { v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) Jump bb2(v1, v2, v3, v4, v5) - bb1(v8:BasicObject, v9:BasicObject): + bb1(): EntryPoint JIT(0) + v8:BasicObject = LoadArg :self@0 + v9:BasicObject = LoadArg :o@1 v10:NilClass = Const Value(nil) v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) @@ -3988,8 +4254,10 @@ pub mod hir_build_tests { v2:BasicObject = GetLocal :kw, l0, SP@5 v3:BasicObject = GetLocal , l0, SP@4 Jump bb2(v1, v2, v3) - bb1(v6:BasicObject, v7:BasicObject): + bb1(): EntryPoint JIT(0) + v6:BasicObject = LoadArg :self@0 + v7:BasicObject = LoadArg :kw@1 v8:BasicObject = GetLocal , l0, EP@3 Jump bb2(v6, v7, v8) bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): @@ -4061,8 +4329,42 @@ pub mod hir_build_tests { v34:BasicObject = GetLocal :k33, l0, SP@5 v35:BasicObject = GetLocal , l0, SP@4 Jump bb2(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) - bb1(v38:BasicObject, v39:BasicObject, v40:BasicObject, v41:BasicObject, v42:BasicObject, v43:BasicObject, v44:BasicObject, v45:BasicObject, v46:BasicObject, v47:BasicObject, v48:BasicObject, v49:BasicObject, v50:BasicObject, v51:BasicObject, v52:BasicObject, v53:BasicObject, v54:BasicObject, v55:BasicObject, v56:BasicObject, v57:BasicObject, v58:BasicObject, v59:BasicObject, v60:BasicObject, v61:BasicObject, v62:BasicObject, v63:BasicObject, v64:BasicObject, v65:BasicObject, v66:BasicObject, v67:BasicObject, v68:BasicObject, v69:BasicObject, v70:BasicObject, v71:BasicObject): + bb1(): EntryPoint JIT(0) + v38:BasicObject = LoadArg :self@0 + v39:BasicObject = LoadArg :k1@1 + v40:BasicObject = LoadArg :k2@2 + v41:BasicObject = LoadArg :k3@3 + v42:BasicObject = LoadArg :k4@4 + v43:BasicObject = LoadArg :k5@5 + v44:BasicObject = LoadArg :k6@6 + v45:BasicObject = LoadArg :k7@7 + v46:BasicObject = LoadArg :k8@8 + v47:BasicObject = LoadArg :k9@9 + v48:BasicObject = LoadArg :k10@10 + v49:BasicObject = LoadArg :k11@11 + v50:BasicObject = LoadArg :k12@12 + v51:BasicObject = LoadArg :k13@13 + v52:BasicObject = LoadArg :k14@14 + v53:BasicObject = LoadArg :k15@15 + v54:BasicObject = LoadArg :k16@16 + v55:BasicObject = LoadArg :k17@17 + v56:BasicObject = LoadArg :k18@18 + v57:BasicObject = LoadArg :k19@19 + v58:BasicObject = LoadArg :k20@20 + v59:BasicObject = LoadArg :k21@21 + v60:BasicObject = LoadArg :k22@22 + v61:BasicObject = LoadArg :k23@23 + v62:BasicObject = LoadArg :k24@24 + v63:BasicObject = LoadArg :k25@25 + v64:BasicObject = LoadArg :k26@26 + v65:BasicObject = LoadArg :k27@27 + v66:BasicObject = LoadArg :k28@28 + v67:BasicObject = LoadArg :k29@29 + v68:BasicObject = LoadArg :k30@30 + v69:BasicObject = LoadArg :k31@31 + v70:BasicObject = LoadArg :k32@32 + v71:BasicObject = LoadArg :k33@33 v72:BasicObject = GetLocal , l0, EP@3 Jump bb2(v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66, v67, v68, v69, v70, v71, v72) bb2(v74:BasicObject, v75:BasicObject, v76:BasicObject, v77:BasicObject, v78:BasicObject, v79:BasicObject, v80:BasicObject, v81:BasicObject, v82:BasicObject, v83:BasicObject, v84:BasicObject, v85:BasicObject, v86:BasicObject, v87:BasicObject, v88:BasicObject, v89:BasicObject, v90:BasicObject, v91:BasicObject, v92:BasicObject, v93:BasicObject, v94:BasicObject, v95:BasicObject, v96:BasicObject, v97:BasicObject, v98:BasicObject, v99:BasicObject, v100:BasicObject, v101:BasicObject, v102:BasicObject, v103:BasicObject, v104:BasicObject, v105:BasicObject, v106:BasicObject, v107:BasicObject, v108:BasicObject): @@ -4079,8 +4381,9 @@ pub mod hir_build_tests { v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) Jump bb2(v1, v2) - bb1(v5:BasicObject): + bb1(): EntryPoint JIT(0) + v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) Jump bb2(v5, v6) bb2(v8:BasicObject, v9:NilClass): From f5782840a3c03eaf5682a2e096741f5e8cf3a574 Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Wed, 18 Feb 2026 20:08:30 -0500 Subject: [PATCH 02/22] ZJIT: Add Entries superblock as single CFG root --- zjit/src/codegen.rs | 6 +- zjit/src/hir.rs | 241 +- zjit/src/hir/opt_tests.rs | 6288 ++++++++++++++++++------------------- zjit/src/hir/tests.rs | 1847 +++++------ 4 files changed, 4261 insertions(+), 4121 deletions(-) diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs index 203372c364532d..cadb14a8d43de9 100644 --- a/zjit/src/codegen.rs +++ b/zjit/src/codegen.rs @@ -279,12 +279,16 @@ fn gen_function(cb: &mut CodeBlock, iseq: IseqPtr, version: IseqVersionRef, func // Create all LIR basic blocks corresponding to HIR basic blocks for (rpo_idx, &block_id) in reverse_post_order.iter().enumerate() { + // Skip the entries superblock — it's an internal CFG artifact + if block_id == function.entries_block { continue; } let lir_block_id = asm.new_block(block_id, function.is_entry_block(block_id), rpo_idx); hir_to_lir[block_id.0] = Some(lir_block_id); } // Compile each basic block for (rpo_idx, &block_id) in reverse_post_order.iter().enumerate() { + // Skip the entries superblock — it's an internal CFG artifact + if block_id == function.entries_block { continue; } // Set the current block to the LIR block that corresponds to this // HIR block. let lir_block_id = hir_to_lir[block_id.0].unwrap(); @@ -611,7 +615,7 @@ fn gen_insn(cb: &mut CodeBlock, jit: &mut JITState, asm: &mut Assembler, functio | &Insn::Throw { state, .. } => return Err(state), &Insn::IfFalse { .. } | Insn::IfTrue { .. } - | &Insn::Jump { .. } => unreachable!(), + | &Insn::Jump { .. } | Insn::Entries { .. } => unreachable!(), }; assert!(insn.has_output(), "Cannot write LIR output of HIR instruction with no output: {insn}"); diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index 77d6972e4778a1..e6f33541581ddc 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -736,6 +736,10 @@ pub enum Insn { /// Used in JIT entry blocks. idx is the calling convention index, id is for display. LoadArg { idx: u32, id: ID, val_type: Type }, + /// Synthetic terminator for the entries superblock. Targets all entry blocks + /// so that CFG analyses see a single root. Not lowered to machine code. + Entries { targets: Vec }, + StringCopy { val: InsnId, chilled: bool, state: InsnId }, StringIntern { val: InsnId, state: InsnId }, StringConcat { strings: Vec, state: InsnId }, @@ -1059,6 +1063,7 @@ impl Insn { pub fn has_output(&self) -> bool { match self { Insn::Jump(_) + | Insn::Entries { .. } | Insn::IfTrue { .. } | Insn::IfFalse { .. } | Insn::EntryPoint { .. } | Insn::Return { .. } | Insn::PatchPoint { .. } | Insn::SetIvar { .. } | Insn::SetClassVar { .. } | Insn::ArrayExtend { .. } | Insn::ArrayPush { .. } | Insn::SideExit { .. } | Insn::SetGlobal { .. } @@ -1073,7 +1078,7 @@ impl Insn { /// Return true if the instruction ends a basic block and false otherwise. pub fn is_terminator(&self) -> bool { match self { - Insn::Jump(_) | Insn::Return { .. } | Insn::SideExit { .. } | Insn::Throw { .. } => true, + Insn::Jump(_) | Insn::Entries { .. } | Insn::Return { .. } | Insn::SideExit { .. } | Insn::Throw { .. } => true, _ => false, } } @@ -1231,6 +1236,7 @@ impl Insn { Insn::InvokeProc { .. } => effects::Any, Insn::RefineType { .. } => effects::Empty, Insn::HasType { .. } => effects::Empty, + Insn::Entries { .. } => effects::Any, } } @@ -1309,6 +1315,15 @@ impl<'a> std::fmt::Display for InsnPrinter<'a> { Insn::Const { val } => { write!(f, "Const {}", val.print(self.ptr_map)) } Insn::Param => { write!(f, "Param") } Insn::LoadArg { idx, id, .. } => { write!(f, "LoadArg :{}@{idx}", id.contents_lossy()) } + Insn::Entries { targets } => { + write!(f, "Entries")?; + let mut prefix = " "; + for target in targets { + write!(f, "{prefix}{target}")?; + prefix = ", "; + } + Ok(()) + } Insn::NewArray { elements, .. } => { write!(f, "NewArray")?; let mut prefix = " "; @@ -1927,6 +1942,8 @@ pub struct Function { union_find: std::cell::RefCell>, insn_types: Vec, blocks: Vec, + /// Superblock that targets all entry blocks. The sole root for RPO/dominator computation. + pub entries_block: BlockId, /// Entry block for the interpreter entry_block: BlockId, /// Entry block for JIT-to-JIT calls. Length will be `opt_num+1`, for callers @@ -2026,8 +2043,9 @@ impl Function { insns: vec![], insn_types: vec![], union_find: UnionFind::new().into(), - blocks: vec![Block::default()], - entry_block: BlockId(0), + blocks: vec![Block::default(), Block::default()], + entries_block: BlockId(0), + entry_block: BlockId(1), jit_entry_blocks: vec![], param_types: vec![], profiles: None, @@ -2188,6 +2206,7 @@ impl Function { result@(Const {..} | Param | LoadArg {..} + | Entries {..} | GetConstantPath {..} | PatchPoint {..} | PutSpecialObject {..} @@ -2427,7 +2446,7 @@ impl Function { match &self.insns[insn.0] { Insn::Param => unimplemented!("params should not be present in block.insns"), Insn::LoadArg { val_type, .. } => *val_type, - Insn::SetGlobal { .. } | Insn::Jump(_) | Insn::EntryPoint { .. } + Insn::SetGlobal { .. } | Insn::Jump(_) | Insn::Entries { .. } | Insn::EntryPoint { .. } | Insn::IfTrue { .. } | Insn::IfFalse { .. } | Insn::Return { .. } | Insn::Throw { .. } | Insn::PatchPoint { .. } | Insn::SetIvar { .. } | Insn::SetClassVar { .. } | Insn::ArrayExtend { .. } | Insn::ArrayPush { .. } | Insn::SideExit { .. } | Insn::SetLocal { .. } @@ -2612,10 +2631,8 @@ impl Function { }; } - for entry_block in self.entry_blocks() { - reachable.insert(entry_block); - worklist_add!(entry_block); - } + reachable.insert(self.entries_block); + worklist_add!(self.entries_block); // Helper to propagate types along a branch edge and enqueue the target if anything changed macro_rules! enqueue { @@ -2660,6 +2677,14 @@ impl Function { enqueue!(self, target); continue; } + Insn::Entries { targets } => { + for target in &targets { + if reachable.insert(*target) { + worklist_add!(*target); + } + } + continue; + } insn if insn.has_output() => self.infer_type(*insn_id), _ => continue, }; @@ -4605,6 +4630,7 @@ impl Function { &Insn::Const { .. } | &Insn::Param | &Insn::LoadArg { .. } + | &Insn::Entries { .. } | &Insn::EntryPoint { .. } | &Insn::LoadPC | &Insn::LoadEC @@ -4930,8 +4956,16 @@ impl Function { let mut num_in_edges = vec![0; self.blocks.len()]; for block in self.rpo() { for &insn in &self.blocks[block.0].insns { - if let Insn::IfTrue { target, .. } | Insn::IfFalse { target, .. } | Insn::Jump(target) = self.find(insn) { - num_in_edges[target.target.0] += 1; + match self.find(insn) { + Insn::IfTrue { target, .. } | Insn::IfFalse { target, .. } | Insn::Jump(target) => { + num_in_edges[target.target.0] += 1; + } + Insn::Entries { ref targets } => { + for target in targets { + num_in_edges[target.0] += 1; + } + } + _ => {} } } } @@ -4966,9 +5000,16 @@ impl Function { self.entry_block == block_id || self.jit_entry_blocks.contains(&block_id) } + /// Populate the entries superblock with an Entries instruction targeting all entry blocks. + /// Must be called after all entry blocks have been created. + fn seal_entries(&mut self) { + let targets = self.entry_blocks(); + self.push_insn(self.entries_block, Insn::Entries { targets }); + } + /// Return a traversal of the `Function`'s `BlockId`s in reverse post-order. pub fn rpo(&self) -> Vec { - let mut result = self.po_from(self.entry_blocks()); + let mut result = self.po_from(vec![self.entries_block]); result.reverse(); result } @@ -4991,8 +5032,16 @@ impl Function { stack.push((block, Action::VisitSelf)); for insn_id in &self.blocks[block.0].insns { let insn = self.find(*insn_id); - if let Insn::IfTrue { target, .. } | Insn::IfFalse { target, .. } | Insn::Jump(target) = insn { - stack.push((target.target, Action::VisitEdges)); + match insn { + Insn::IfTrue { target, .. } | Insn::IfFalse { target, .. } | Insn::Jump(target) => { + stack.push((target.target, Action::VisitEdges)); + } + Insn::Entries { ref targets } => { + for target in targets { + stack.push((*target, Action::VisitEdges)); + } + } + _ => {} } } } @@ -5265,11 +5314,10 @@ impl Function { // missing location. let mut assigned_in = vec![None; self.num_blocks()]; let rpo = self.rpo(); - // Begin with every block having every variable defined, except for the entry blocks, which - // start with nothing defined. - let entry_blocks = self.entry_blocks(); + // Begin with every block having every variable defined, except for entries_block, which + // starts with nothing defined. for &block in &rpo { - if entry_blocks.contains(&block) { + if block == self.entries_block { assigned_in[block.0] = Some(InsnSet::with_capacity(self.insns.len())); } else { let mut all_ones = InsnSet::with_capacity(self.insns.len()); @@ -5278,7 +5326,7 @@ impl Function { } } let mut worklist = VecDeque::with_capacity(self.num_blocks()); - worklist.push_back(self.entry_block); + worklist.push_back(self.entries_block); while let Some(block) = worklist.pop_front() { let mut assigned = assigned_in[block.0].clone().unwrap(); for ¶m in &self.blocks[block.0].params { @@ -5296,6 +5344,17 @@ impl Function { worklist.push_back(target.target); } } + Insn::Entries { ref targets } => { + for &target in targets { + let Some(block_in) = assigned_in[target.0].as_mut() else { + return Err(ValidationError::JumpTargetNotInRPO(target)); + }; + // jump target's block_in was modified, we need to queue the block for processing. + if block_in.intersect_with(&assigned) { + worklist.push_back(target); + } + } + } insn if insn.has_output() => { assigned.insert(insn_id); } @@ -5397,6 +5456,7 @@ impl Function { | Insn::LoadSelf | Insn::Snapshot { .. } | Insn::Jump { .. } + | Insn::Entries { .. } | Insn::EntryPoint { .. } | Insn::PatchPoint { .. } | Insn::SideExit { .. } @@ -5692,6 +5752,11 @@ impl<'a> std::fmt::Display for FunctionPrinter<'a> { }; writeln!(f, "fn {iseq_name}:")?; for block_id in fun.rpo() { + if !self.display_snapshot_and_tp_patchpoints && block_id == fun.entries_block { + // Unless we're doing --zjit-dump-hir=all, skip the entries superblock — it's an + // internal CFG artifact + continue; + } write!(f, "{block_id}(")?; if !fun.blocks[block_id.0].params.is_empty() { let mut sep = ""; @@ -7442,6 +7507,9 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result { } } + // Populate the entries superblock with an Entries instruction targeting all entry blocks + fun.seal_entries(); + fun.set_param_types(); fun.infer_types(); @@ -7611,16 +7679,14 @@ impl<'a> Dominators<'a> { // When we've run the algorithm and the dominator set no longer changes // between iterations, then we have found the dominator sets. - // Set up entry blocks. - // Entry blocks are only dominated by themselves. - for entry_block in &f.entry_blocks() { - dominators[entry_block.0] = vec![*entry_block]; - } + // Set up entries_block as the sole root. + // The entries_block is only dominated by itself. + dominators[f.entries_block.0] = vec![f.entries_block]; // Setup the initial dominator sets. for block_id in &block_ids { - if !f.entry_blocks().contains(block_id) { - // Non entry blocks are initially dominated by all other blocks. + if *block_id != f.entries_block { + // Non-root blocks are initially dominated by all other blocks. dominators[block_id.0] = block_ids.clone(); } } @@ -7630,7 +7696,7 @@ impl<'a> Dominators<'a> { changed = false; for block_id in &block_ids { - if *block_id == f.entry_block { + if *block_id == f.entries_block { continue; } @@ -7701,14 +7767,20 @@ impl<'a> ControlFlowInfo<'a> { // Ordering is important so that the expect tests that serialize the predecessors // and successors don't fail intermittently. // todo(aidenfoxivey): Use `BlockSet` in lieu of `BTreeSet` - let successors: BTreeSet = block - .insns - .iter() - .map(|&insn_id| uf.find_const(insn_id)) - .filter_map(|insn_id| { - Self::extract_jump_target(&function.insns[insn_id.0]) - }) - .collect(); + let mut successors: BTreeSet = BTreeSet::new(); + for &insn_id in &block.insns { + let insn_id = uf.find_const(insn_id); + match &function.insns[insn_id.0] { + Insn::Entries { targets } => { + successors.extend(targets); + } + insn => { + if let Some(target) = Self::extract_jump_target(insn) { + successors.insert(target); + } + } + } + } // Update predecessors for successor blocks. for &succ_id in &successors { @@ -7883,26 +7955,31 @@ mod rpo_tests { #[test] fn one_block() { let mut function = Function::new(std::ptr::null()); + let entries = function.entries_block; let entry = function.entry_block; let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) }); function.push_insn(entry, Insn::Return { val }); - assert_eq!(function.rpo(), vec![entry]); + function.seal_entries(); + assert_eq!(function.rpo(), vec![entries, entry]); } #[test] fn jump() { let mut function = Function::new(std::ptr::null()); + let entries = function.entries_block; let entry = function.entry_block; let exit = function.new_block(0); function.push_insn(entry, Insn::Jump(BranchEdge { target: exit, args: vec![] })); let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) }); function.push_insn(entry, Insn::Return { val }); - assert_eq!(function.rpo(), vec![entry, exit]); + function.seal_entries(); + assert_eq!(function.rpo(), vec![entries, entry, exit]); } #[test] fn diamond_iftrue() { let mut function = Function::new(std::ptr::null()); + let entries = function.entries_block; let entry = function.entry_block; let side = function.new_block(0); let exit = function.new_block(0); @@ -7912,12 +7989,14 @@ mod rpo_tests { function.push_insn(entry, Insn::Jump(BranchEdge { target: exit, args: vec![] })); let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) }); function.push_insn(entry, Insn::Return { val }); - assert_eq!(function.rpo(), vec![entry, side, exit]); + function.seal_entries(); + assert_eq!(function.rpo(), vec![entries, entry, side, exit]); } #[test] fn diamond_iffalse() { let mut function = Function::new(std::ptr::null()); + let entries = function.entries_block; let entry = function.entry_block; let side = function.new_block(0); let exit = function.new_block(0); @@ -7927,15 +8006,18 @@ mod rpo_tests { function.push_insn(entry, Insn::Jump(BranchEdge { target: exit, args: vec![] })); let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) }); function.push_insn(entry, Insn::Return { val }); - assert_eq!(function.rpo(), vec![entry, side, exit]); + function.seal_entries(); + assert_eq!(function.rpo(), vec![entries, entry, side, exit]); } #[test] fn a_loop() { let mut function = Function::new(std::ptr::null()); + let entries = function.entries_block; let entry = function.entry_block; function.push_insn(entry, Insn::Jump(BranchEdge { target: entry, args: vec![] })); - assert_eq!(function.rpo(), vec![entry]); + function.seal_entries(); + assert_eq!(function.rpo(), vec![entries, entry]); } } @@ -7958,6 +8040,7 @@ mod validation_tests { let mut function = Function::new(std::ptr::null()); let entry = function.entry_block; function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) }); + function.seal_entries(); assert_matches_err(function.validate(), ValidationError::BlockHasNoTerminator(entry)); } @@ -7968,6 +8051,7 @@ mod validation_tests { let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) }); let insn_id = function.push_insn(entry, Insn::Return { val }); function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) }); + function.seal_entries(); assert_matches_err(function.validate(), ValidationError::TerminatorNotAtEnd(entry, insn_id, 1)); } @@ -7978,6 +8062,7 @@ mod validation_tests { let side = function.new_block(0); let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) }); function.push_insn(entry, Insn::IfTrue { val, target: BranchEdge { target: side, args: vec![val, val, val] } }); + function.seal_entries(); assert_matches_err(function.validate(), ValidationError::MismatchedBlockArity(entry, 0, 3)); } @@ -7988,6 +8073,7 @@ mod validation_tests { let side = function.new_block(0); let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) }); function.push_insn(entry, Insn::IfFalse { val, target: BranchEdge { target: side, args: vec![val, val, val] } }); + function.seal_entries(); assert_matches_err(function.validate(), ValidationError::MismatchedBlockArity(entry, 0, 3)); } @@ -7998,6 +8084,7 @@ mod validation_tests { let side = function.new_block(0); let val = function.push_insn(entry, Insn::Const { val: Const::Value(Qnil) }); function.push_insn(entry, Insn::Jump ( BranchEdge { target: side, args: vec![val, val, val] } )); + function.seal_entries(); assert_matches_err(function.validate(), ValidationError::MismatchedBlockArity(entry, 0, 3)); } @@ -8008,6 +8095,7 @@ mod validation_tests { // Create an instruction without making it belong to anything. let dangling = function.new_insn(Insn::Const{val: Const::CBool(true)}); let val = function.push_insn(function.entry_block, Insn::ArrayDup { val: dangling, state: InsnId(0usize) }); + function.seal_entries(); assert_matches_err(function.validate_definite_assignment(), ValidationError::OperandNotDefined(entry, val, dangling)); } @@ -8018,6 +8106,7 @@ mod validation_tests { // Create an instruction without making it belong to anything. let dangling = function.new_insn(Insn::Const{val: Const::CBool(true)}); let val = function.push_insn(function.entry_block, Insn::ArrayDup { val: dangling, state: InsnId(0usize) }); + function.seal_entries(); assert_matches_err(function.temporary_validate_block_local_definite_assignment(), ValidationError::OperandNotDefined(entry, val, dangling)); } @@ -8029,6 +8118,7 @@ mod validation_tests { // Ret is a non-output instruction. let ret = function.push_insn(function.entry_block, Insn::Return { val: const_ }); let val = function.push_insn(function.entry_block, Insn::ArrayDup { val: ret, state: InsnId(0usize) }); + function.seal_entries(); assert_matches_err(function.validate_definite_assignment(), ValidationError::OperandNotDefined(entry, val, ret)); } @@ -8040,6 +8130,7 @@ mod validation_tests { // Ret is a non-output instruction. let ret = function.push_insn(function.entry_block, Insn::Return { val: const_ }); let val = function.push_insn(function.entry_block, Insn::ArrayDup { val: ret, state: InsnId(0usize) }); + function.seal_entries(); assert_matches_err(function.temporary_validate_block_local_definite_assignment(), ValidationError::OperandNotDefined(entry, val, ret)); } @@ -8056,6 +8147,7 @@ mod validation_tests { function.push_insn(entry, Insn::IfFalse { val: val1, target: BranchEdge { target: side, args: vec![] } }); function.push_insn(entry, Insn::Jump(BranchEdge { target: exit, args: vec![] })); let val2 = function.push_insn(exit, Insn::ArrayDup { val: v0, state: v0 }); + function.seal_entries(); crate::cruby::with_rubyvm(|| { function.infer_types(); assert_matches_err(function.validate_definite_assignment(), ValidationError::OperandNotDefined(exit, val2, v0)); @@ -8075,6 +8167,7 @@ mod validation_tests { function.push_insn(entry, Insn::IfFalse { val, target: BranchEdge { target: side, args: vec![] } }); function.push_insn(entry, Insn::Jump(BranchEdge { target: exit, args: vec![] })); let _val = function.push_insn(exit, Insn::ArrayDup { val: v0, state: v0 }); + function.seal_entries(); crate::cruby::with_rubyvm(|| { function.infer_types(); // Just checking that we don't panic. @@ -8090,6 +8183,7 @@ mod validation_tests { let val = function.push_insn(block, Insn::Const { val: Const::Value(Qnil) }); function.push_insn_id(block, val); function.push_insn(block, Insn::Return { val }); + function.seal_entries(); assert_matches_err(function.validate(), ValidationError::DuplicateInstruction(block, val)); } @@ -8102,6 +8196,7 @@ mod validation_tests { let val1 = function.push_insn(block, Insn::Const { val: Const::Value(Qnil) }); function.make_equal_to(val1, val0); function.push_insn(block, Insn::Return { val: val0 }); + function.seal_entries(); assert_matches_err(function.validate(), ValidationError::DuplicateInstruction(block, val0)); } @@ -8115,6 +8210,7 @@ mod validation_tests { function.push_insn(block, Insn::Jump(BranchEdge { target: exit, args: vec![] })); function.push_insn_id(exit, val); function.push_insn(exit, Insn::Return { val }); + function.seal_entries(); assert_matches_err(function.validate(), ValidationError::DuplicateInstruction(exit, val)); } } @@ -8146,6 +8242,7 @@ mod infer_tests { let mut function = Function::new(std::ptr::null()); let nil = function.push_insn(function.entry_block, Insn::Const { val: Const::Value(Qnil) }); let val = function.push_insn(function.entry_block, Insn::Test { val: nil }); + function.seal_entries(); function.infer_types(); assert_bit_equal(function.type_of(val), Type::from_cbool(false)); }); @@ -8157,6 +8254,7 @@ mod infer_tests { let mut function = Function::new(std::ptr::null()); let false_ = function.push_insn(function.entry_block, Insn::Const { val: Const::Value(Qfalse) }); let val = function.push_insn(function.entry_block, Insn::Test { val: false_ }); + function.seal_entries(); function.infer_types(); assert_bit_equal(function.type_of(val), Type::from_cbool(false)); }); @@ -8168,6 +8266,7 @@ mod infer_tests { let mut function = Function::new(std::ptr::null()); let true_ = function.push_insn(function.entry_block, Insn::Const { val: Const::Value(Qtrue) }); let val = function.push_insn(function.entry_block, Insn::Test { val: true_ }); + function.seal_entries(); function.infer_types(); assert_bit_equal(function.type_of(val), Type::from_cbool(true)); }); @@ -8203,6 +8302,7 @@ mod infer_tests { let v1 = function.push_insn(entry, Insn::Const { val: Const::Value(VALUE::fixnum_from_usize(4)) }); function.push_insn(entry, Insn::Jump(BranchEdge { target: exit, args: vec![v1] })); let param = function.push_insn(exit, Insn::Param); + function.seal_entries(); crate::cruby::with_rubyvm(|| { function.infer_types(); }); @@ -8222,6 +8322,7 @@ mod infer_tests { let v1 = function.push_insn(entry, Insn::Const { val: Const::Value(Qfalse) }); function.push_insn(entry, Insn::Jump(BranchEdge { target: exit, args: vec![v1] })); let param = function.push_insn(exit, Insn::Param); + function.seal_entries(); crate::cruby::with_rubyvm(|| { function.infer_types(); assert_bit_equal(function.type_of(param), types::TrueClass.union(types::FalseClass)); @@ -8257,35 +8358,39 @@ mod graphviz_tests { mode=hier; overlap=false; splines=true; bb0 [label=< + +
bb0() 
Entries bb1, bb2 
>]; + bb1 [label=< + - +
bb1() 
EntryPoint interpreter 
v1:BasicObject = LoadSelf 
v2:BasicObject = GetLocal :x, l0, SP@5 
v3:BasicObject = GetLocal :y, l0, SP@4 
Jump bb2(v1, v2, v3) 
Jump bb3(v1, v2, v3) 
>]; - bb0:v4 -> bb2:params:n; - bb1 [label=< - + bb1:v4 -> bb3:params:n; + bb2 [label=<
bb1() 
+ - +
bb2() 
EntryPoint JIT(0) 
v6:BasicObject = LoadArg :self@0 
v7:BasicObject = LoadArg :x@1 
v8:BasicObject = LoadArg :y@2 
Jump bb2(v6, v7, v8) 
Jump bb3(v6, v7, v8) 
>]; - bb1:v9 -> bb2:params:n; - bb2 [label=< - + bb2:v9 -> bb3:params:n; + bb3 [label=<
bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject) 
+ - - - - - - + + + + + + - +
bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject) 
PatchPoint NoTracePoint 
PatchPoint NoTracePoint 
PatchPoint NoTracePoint 
PatchPoint MethodRedefined(Integer@0x1000, |@0x1008, cme:0x1010) 
v26:Fixnum = GuardType v11, Fixnum 
v27:Fixnum = GuardType v12, Fixnum 
v28:Fixnum = FixnumOr v26, v27 
IncrCounter inline_cfunc_optimized_send_count 
PatchPoint NoTracePoint 
PatchPoint MethodRedefined(Integer@0x1000, |@0x1008, cme:0x1010) 
v27:Fixnum = GuardType v11, Fixnum 
v28:Fixnum = GuardType v12, Fixnum 
v29:Fixnum = FixnumOr v27, v28 
IncrCounter inline_cfunc_optimized_send_count 
PatchPoint NoTracePoint 
CheckInterrupts 
Return v28 
Return v29 
>]; } "#); @@ -8311,27 +8416,31 @@ mod graphviz_tests { mode=hier; overlap=false; splines=true; bb0 [label=< + +
bb0() 
Entries bb1, bb2 
>]; + bb1 [label=< + - +
bb1() 
EntryPoint interpreter 
v1:BasicObject = LoadSelf 
v2:BasicObject = GetLocal :c, l0, SP@4 
Jump bb2(v1, v2) 
Jump bb3(v1, v2) 
>]; - bb0:v3 -> bb2:params:n; - bb1 [label=< - + bb1:v3 -> bb3:params:n; + bb2 [label=<
bb1() 
+ - +
bb2() 
EntryPoint JIT(0) 
v5:BasicObject = LoadArg :self@0 
v6:BasicObject = LoadArg :c@1 
Jump bb2(v5, v6) 
Jump bb3(v5, v6) 
>]; - bb1:v7 -> bb2:params:n; - bb2 [label=< - + bb2:v7 -> bb3:params:n; + bb3 [label=<
bb2(v8:BasicObject, v9:BasicObject) 
+ - + @@ -8339,9 +8448,9 @@ mod graphviz_tests {
bb3(v8:BasicObject, v9:BasicObject) 
PatchPoint NoTracePoint 
CheckInterrupts 
v15:CBool = Test v9 
v16:Falsy = RefineType v9, Falsy 
IfFalse v15, bb3(v8, v16) 
IfFalse v15, bb4(v8, v16) 
v18:Truthy = RefineType v9, Truthy 
PatchPoint NoTracePoint 
v21:Fixnum[3] = Const Value(3) 
CheckInterrupts 
Return v21 
>]; - bb2:v17 -> bb3:params:n; - bb3 [label=< - + bb3:v17 -> bb4:params:n; + bb4 [label=<
bb3(v26:BasicObject, v27:Falsy) 
+ diff --git a/zjit/src/hir/opt_tests.rs b/zjit/src/hir/opt_tests.rs index 514d2e530652c6..952f2fe77f4356 100644 --- a/zjit/src/hir/opt_tests.rs +++ b/zjit/src/hir/opt_tests.rs @@ -40,17 +40,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:TrueClass = Const Value(true) CheckInterrupts v22:TrueClass = RefineType v13, Truthy @@ -74,17 +74,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:FalseClass = Const Value(false) CheckInterrupts v20:FalseClass = RefineType v13, Falsy @@ -103,26 +103,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v12:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) - v33:Fixnum[3] = Const Value(3) + v34:Fixnum[3] = Const Value(3) IncrCounter inline_cfunc_optimized_send_count v17:Fixnum[3] = Const Value(3) PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) - v34:Fixnum[6] = Const Value(6) + v35:Fixnum[6] = Const Value(6) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v34 + Return v35 "); } @@ -135,26 +135,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[5] = Const Value(5) v12:Fixnum[3] = Const Value(3) PatchPoint MethodRedefined(Integer@0x1000, -@0x1008, cme:0x1010) - v33:Fixnum[2] = Const Value(2) + v34:Fixnum[2] = Const Value(2) IncrCounter inline_cfunc_optimized_send_count v17:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, -@0x1008, cme:0x1010) - v34:Fixnum[1] = Const Value(1) + v35:Fixnum[1] = Const Value(1) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v34 + Return v35 "); } @@ -167,22 +167,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[0] = Const Value(0) v12:Fixnum[1073741825] = Const Value(1073741825) PatchPoint MethodRedefined(Integer@0x1000, -@0x1008, cme:0x1010) - v24:Fixnum[-1073741825] = Const Value(-1073741825) + v25:Fixnum[-1073741825] = Const Value(-1073741825) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -195,22 +195,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[6] = Const Value(6) v12:Fixnum[7] = Const Value(7) PatchPoint MethodRedefined(Integer@0x1000, *@0x1008, cme:0x1010) - v24:Fixnum[42] = Const Value(42) + v25:Fixnum[42] = Const Value(42) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -224,32 +224,32 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :n, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :n@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:Fixnum[0] = Const Value(0) PatchPoint MethodRedefined(Integer@0x1000, *@0x1008, cme:0x1010) - v33:Fixnum = GuardType v9, Fixnum - v45:Fixnum[0] = Const Value(0) + v34:Fixnum = GuardType v9, Fixnum + v46:Fixnum[0] = Const Value(0) IncrCounter inline_cfunc_optimized_send_count v20:Fixnum[0] = Const Value(0) PatchPoint MethodRedefined(Integer@0x1000, *@0x1008, cme:0x1010) - v38:Fixnum = GuardType v9, Fixnum - v46:Fixnum[0] = Const Value(0) + v39:Fixnum = GuardType v9, Fixnum + v47:Fixnum[0] = Const Value(0) IncrCounter inline_cfunc_optimized_send_count PatchPoint MethodRedefined(Integer@0x1000, +@0x1038, cme:0x1040) - v47:Fixnum[0] = Const Value(0) + v48:Fixnum[0] = Const Value(0) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v47 + Return v48 "); } @@ -263,22 +263,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[0] = Const Value(0) v12:Fixnum[0] = Const Value(0) PatchPoint MethodRedefined(Integer@0x1000, %@0x1008, cme:0x1010) - v22:Fixnum = FixnumMod v10, v12 + v23:Fixnum = FixnumMod v10, v12 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v22 + Return v23 "); } @@ -291,22 +291,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[11] = Const Value(11) v12:Fixnum[0] = Const Value(0) PatchPoint MethodRedefined(Integer@0x1000, %@0x1008, cme:0x1010) - v22:Fixnum = FixnumMod v10, v12 + v23:Fixnum = FixnumMod v10, v12 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v22 + Return v23 "); } @@ -319,22 +319,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[0] = Const Value(0) v12:Fixnum[11] = Const Value(11) PatchPoint MethodRedefined(Integer@0x1000, %@0x1008, cme:0x1010) - v24:Fixnum[0] = Const Value(0) + v25:Fixnum[0] = Const Value(0) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -347,22 +347,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[11] = Const Value(11) v12:Fixnum[3] = Const Value(3) PatchPoint MethodRedefined(Integer@0x1000, %@0x1008, cme:0x1010) - v24:Fixnum[2] = Const Value(2) + v25:Fixnum[2] = Const Value(2) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -375,22 +375,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[-7] = Const Value(-7) v12:Fixnum[3] = Const Value(3) PatchPoint MethodRedefined(Integer@0x1000, %@0x1008, cme:0x1010) - v24:Fixnum[2] = Const Value(2) + v25:Fixnum[2] = Const Value(2) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -403,22 +403,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[7] = Const Value(7) v12:Fixnum[-3] = Const Value(-3) PatchPoint MethodRedefined(Integer@0x1000, %@0x1008, cme:0x1010) - v24:Fixnum[-2] = Const Value(-2) + v25:Fixnum[-2] = Const Value(-2) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -431,22 +431,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[-7] = Const Value(-7) v12:Fixnum[-3] = Const Value(-3) PatchPoint MethodRedefined(Integer@0x1000, %@0x1008, cme:0x1010) - v24:Fixnum[-1] = Const Value(-1) + v25:Fixnum[-1] = Const Value(-1) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -463,19 +463,19 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v12:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1000, <@0x1008, cme:0x1010) - v42:TrueClass = Const Value(true) + v43:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v24:Fixnum[3] = Const Value(3) @@ -497,25 +497,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v12:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1000, <=@0x1008, cme:0x1010) - v59:TrueClass = Const Value(true) + v60:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v23:Fixnum[2] = Const Value(2) v25:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1000, <=@0x1008, cme:0x1010) - v61:TrueClass = Const Value(true) + v62:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v37:Fixnum[3] = Const Value(3) @@ -537,19 +537,19 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[2] = Const Value(2) v12:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, >@0x1008, cme:0x1010) - v42:TrueClass = Const Value(true) + v43:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v24:Fixnum[3] = Const Value(3) @@ -571,25 +571,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[2] = Const Value(2) v12:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, >=@0x1008, cme:0x1010) - v59:TrueClass = Const Value(true) + v60:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v23:Fixnum[2] = Const Value(2) v25:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1000, >=@0x1008, cme:0x1010) - v61:TrueClass = Const Value(true) + v62:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v37:Fixnum[3] = Const Value(3) @@ -611,19 +611,19 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v12:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1000, ==@0x1008, cme:0x1010) - v42:FalseClass = Const Value(false) + v43:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v33:Fixnum[4] = Const Value(4) @@ -645,19 +645,19 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[2] = Const Value(2) v12:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1000, ==@0x1008, cme:0x1010) - v42:TrueClass = Const Value(true) + v43:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v24:Fixnum[3] = Const Value(3) @@ -679,20 +679,20 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v12:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1000, !=@0x1008, cme:0x1010) PatchPoint BOPRedefined(INTEGER_REDEFINED_OP_FLAG, BOP_EQ) - v43:TrueClass = Const Value(true) + v44:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v24:Fixnum[3] = Const Value(3) @@ -714,20 +714,20 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[2] = Const Value(2) v12:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1000, !=@0x1008, cme:0x1010) PatchPoint BOPRedefined(INTEGER_REDEFINED_OP_FLAG, BOP_EQ) - v43:FalseClass = Const Value(false) + v44:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v33:Fixnum[4] = Const Value(4) @@ -763,21 +763,21 @@ mod hir_opt_tests { assert_eq!(VALUE::fixnum_from_usize(2), result); assert_snapshot!(hir_string("test"), @r" fn test@:13: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :object, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :object@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(CustomEq@0x1000) PatchPoint MethodRedefined(CustomEq@0x1000, !=@0x1008, cme:0x1010) - v28:HeapObject[class_exact:CustomEq] = GuardType v9, HeapObject[class_exact:CustomEq] - v29:BoolExact = CCallWithFrame v28, :BasicObject#!=@0x1038, v9 + v29:HeapObject[class_exact:CustomEq] = GuardType v9, HeapObject[class_exact:CustomEq] + v30:BoolExact = CCallWithFrame v29, :BasicObject#!=@0x1038, v9 v20:NilClass = Const Value(nil) CheckInterrupts Return v20 @@ -794,24 +794,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) - v24:Fixnum = GuardType v9, Fixnum - v25:Fixnum = FixnumAdd v24, v14 + v25:Fixnum = GuardType v9, Fixnum + v26:Fixnum = FixnumAdd v25, v14 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -826,82 +826,82 @@ mod hir_opt_tests { "); assert_snapshot!(hir_strings!("rest", "kw", "kw_rest", "block", "post"), @r" fn rest@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:ArrayExact = GetLocal :array, l0, SP@4, * - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :array@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): CheckInterrupts Return v9 fn kw@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :k, l0, SP@5 v3:BasicObject = GetLocal , l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :k@1 v8:BasicObject = GetLocal , l0, EP@3 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): CheckInterrupts Return v11 fn kw_rest@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :k, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :k@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): CheckInterrupts Return v9 fn block@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :b@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:NilClass = Const Value(nil) CheckInterrupts Return v13 fn post@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:ArrayExact = GetLocal :rest, l0, SP@5, * v3:BasicObject = GetLocal :post, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :rest@1 v8:BasicObject = LoadArg :post@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): CheckInterrupts Return v12 "); @@ -918,21 +918,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v19:BasicObject = SendDirect v18, 0x1038, :foo (0x1048) + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v20:BasicObject = SendDirect v19, 0x1038, :foo (0x1048) CheckInterrupts - Return v19 + Return v20 "); } @@ -947,22 +947,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, baz@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:Fixnum[1] = Const Value(1) + v22:Fixnum[1] = Const Value(1) CheckInterrupts - Return v21 + Return v22 "); } @@ -976,21 +976,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, baz@0x1008, cme:0x1010) - v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v20:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v19 + Return v20 "); } @@ -1014,22 +1014,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:8: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v20:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v21:BasicObject = SendDirect v20, 0x1038, :foo (0x1048), v11 + v21:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v22:BasicObject = SendDirect v21, 0x1038, :foo (0x1048), v11 CheckInterrupts - Return v21 + Return v22 "); } @@ -1044,24 +1044,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, fun_new_map@0x1008, cme:0x1010) - v22:ArraySubclass[class_exact:C] = GuardType v9, ArraySubclass[class_exact:C] - v23:BasicObject = SendDirect v22, 0x1038, :fun_new_map (0x1048) + v23:ArraySubclass[class_exact:C] = GuardType v9, ArraySubclass[class_exact:C] + v24:BasicObject = SendDirect v23, 0x1038, :fun_new_map (0x1048) v15:BasicObject = GetLocal :o, l0, EP@3 CheckInterrupts - Return v23 + Return v24 "); } @@ -1078,24 +1078,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:7: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, bar@0x1008, cme:0x1010) - v23:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v24:BasicObject = CCallWithFrame v23, :Enumerable#bar@0x1038, block=0x1040 + v24:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v25:BasicObject = CCallWithFrame v24, :Enumerable#bar@0x1038, block=0x1040 v15:BasicObject = GetLocal :o, l0, EP@3 CheckInterrupts - Return v24 + Return v25 "); } @@ -1112,23 +1112,23 @@ mod hir_opt_tests { ", "{ specialized_instruction: false }"); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, length@0x1008, cme:0x1010) - v22:ArrayExact = GuardType v9, ArrayExact - v23:BasicObject = CCallWithFrame v22, :Array#length@0x1038 + v23:ArrayExact = GuardType v9, ArrayExact + v24:BasicObject = CCallWithFrame v23, :Array#length@0x1038 CheckInterrupts - Return v23 + Return v24 "); } @@ -1145,15 +1145,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = Send v6, :foo # SendFallbackReason: SendWithoutBlock: unsupported method type Null CheckInterrupts Return v11 @@ -1172,21 +1172,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v19:BasicObject = SendDirect v18, 0x1038, :foo (0x1048) + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v20:BasicObject = SendDirect v19, 0x1038, :foo (0x1048) CheckInterrupts - Return v19 + Return v20 "); } @@ -1200,22 +1200,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[3] = Const Value(3) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, Integer@0x1008, cme:0x1010) - v20:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v21:BasicObject = SendDirect v20, 0x1038, :Integer (0x1048), v11 + v21:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v22:BasicObject = SendDirect v21, 0x1038, :Integer (0x1048), v11 CheckInterrupts - Return v21 + Return v22 "); } @@ -1230,23 +1230,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) v13:Fixnum[2] = Const Value(2) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 + v23:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v24:BasicObject = SendDirect v23, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts - Return v23 + Return v24 "); } @@ -1263,25 +1263,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v23:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v24:BasicObject = SendDirect v23, 0x1038, :foo (0x1048) + v24:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v25:BasicObject = SendDirect v24, 0x1038, :foo (0x1048) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, bar@0x1050, cme:0x1058) - v27:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v28:BasicObject = SendDirect v27, 0x1038, :bar (0x1048) + v28:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v29:BasicObject = SendDirect v28, 0x1038, :bar (0x1048) CheckInterrupts - Return v28 + Return v29 "); } @@ -1294,21 +1294,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v19:BasicObject = SendDirect v18, 0x1038, :foo (0x1048) + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v20:BasicObject = SendDirect v19, 0x1038, :foo (0x1048) CheckInterrupts - Return v19 + Return v20 "); } @@ -1321,22 +1321,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[3] = Const Value(3) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v20:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v21:BasicObject = SendDirect v20, 0x1038, :foo (0x1048), v11 + v21:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v22:BasicObject = SendDirect v21, 0x1038, :foo (0x1048), v11 CheckInterrupts - Return v21 + Return v22 "); } @@ -1349,23 +1349,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[3] = Const Value(3) v13:Fixnum[4] = Const Value(4) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 + v23:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v24:BasicObject = SendDirect v23, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts - Return v23 + Return v24 "); } @@ -1379,33 +1379,33 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, target@0x1008, cme:0x1010) - v44:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v45:BasicObject = SendDirect v44, 0x1038, :target (0x1048) + v45:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v46:BasicObject = SendDirect v45, 0x1038, :target (0x1048) v14:Fixnum[10] = Const Value(10) v16:Fixnum[20] = Const Value(20) v18:Fixnum[30] = Const Value(30) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, target@0x1008, cme:0x1010) - v48:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v49:BasicObject = SendDirect v48, 0x1038, :target (0x1048), v14, v16, v18 + v49:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v50:BasicObject = SendDirect v49, 0x1038, :target (0x1048), v14, v16, v18 v24:Fixnum[10] = Const Value(10) v26:Fixnum[20] = Const Value(20) v28:Fixnum[30] = Const Value(30) v30:Fixnum[40] = Const Value(40) v32:Fixnum[50] = Const Value(50) v34:BasicObject = Send v6, :target, v24, v26, v28, v30, v32 # SendFallbackReason: Argument count does not match parameter count - v37:ArrayExact = NewArray v45, v49, v34 + v37:ArrayExact = NewArray v46, v50, v34 CheckInterrupts Return v37 "); @@ -1421,23 +1421,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v12:StringExact = StringCopy v11 PatchPoint NoSingletonClass(Object@0x1008) PatchPoint MethodRedefined(Object@0x1008, puts@0x1010, cme:0x1018) - v22:HeapObject[class_exact*:Object@VALUE(0x1008)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1008)] - v23:BasicObject = CCallVariadic v22, :Kernel#puts@0x1040, v12 + v23:HeapObject[class_exact*:Object@VALUE(0x1008)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1008)] + v24:BasicObject = CCallVariadic v23, :Kernel#puts@0x1040, v12 CheckInterrupts - Return v23 + Return v24 "); } @@ -1454,25 +1454,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:7: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) - v25:Fixnum = GuardType v11, Fixnum + v26:Fixnum = GuardType v11, Fixnum IncrCounter inline_iseq_optimized_send_count - v28:Fixnum[100] = Const Value(100) + v29:Fixnum[100] = Const Value(100) CheckInterrupts - Return v28 + Return v29 "); } @@ -1484,26 +1484,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) - v26:Fixnum = GuardType v11, Fixnum - v27:Fixnum = GuardType v12, Fixnum - v28:Fixnum = FixnumAdd v26, v27 + v27:Fixnum = GuardType v11, Fixnum + v28:Fixnum = GuardType v12, Fixnum + v29:Fixnum = FixnumAdd v27, v28 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -1515,24 +1515,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) - v24:Fixnum = GuardType v9, Fixnum - v25:Fixnum = FixnumAdd v24, v14 + v25:Fixnum = GuardType v9, Fixnum + v26:Fixnum = FixnumAdd v25, v14 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -1544,24 +1544,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) - v24:Fixnum = GuardType v9, Fixnum - v25:Fixnum = FixnumAdd v13, v24 + v25:Fixnum = GuardType v9, Fixnum + v26:Fixnum = FixnumAdd v13, v25 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -1573,26 +1573,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, []@0x1008, cme:0x1010) - v26:Fixnum = GuardType v11, Fixnum - v27:Fixnum = GuardType v12, Fixnum - v28:Fixnum = FixnumAref v26, v27 + v27:Fixnum = GuardType v11, Fixnum + v28:Fixnum = GuardType v12, Fixnum + v29:Fixnum = FixnumAref v27, v28 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -1606,15 +1606,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v12:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1000, []@0x1008, cme:0x1010) @@ -1632,22 +1632,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v12:Fixnum[2] = Const Value(2) v14:Fixnum[3] = Const Value(3) PatchPoint MethodRedefined(Integer@0x1000, []@0x1008, cme:0x1010) - v23:BasicObject = CCallVariadic v10, :Integer#[]@0x1038, v12, v14 + v24:BasicObject = CCallVariadic v10, :Integer#[]@0x1038, v12, v14 CheckInterrupts - Return v23 + Return v24 "); } @@ -1658,22 +1658,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v12:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v13:StringExact = StringCopy v12 PatchPoint MethodRedefined(Integer@0x1008, []@0x1010, cme:0x1018) - v23:BasicObject = CCallVariadic v10, :Integer#[]@0x1040, v13 + v24:BasicObject = CCallVariadic v10, :Integer#[]@0x1040, v13 CheckInterrupts - Return v23 + Return v24 "); } @@ -1685,26 +1685,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, <@0x1008, cme:0x1010) - v26:Fixnum = GuardType v11, Fixnum - v27:Fixnum = GuardType v12, Fixnum - v28:BoolExact = FixnumLt v26, v27 + v27:Fixnum = GuardType v11, Fixnum + v28:Fixnum = GuardType v12, Fixnum + v29:BoolExact = FixnumLt v27, v28 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -1716,24 +1716,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, <@0x1008, cme:0x1010) - v24:Fixnum = GuardType v9, Fixnum - v25:BoolExact = FixnumLt v24, v14 + v25:Fixnum = GuardType v9, Fixnum + v26:BoolExact = FixnumLt v25, v14 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -1745,24 +1745,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, <@0x1008, cme:0x1010) - v24:Fixnum = GuardType v9, Fixnum - v25:BoolExact = FixnumLt v13, v24 + v25:Fixnum = GuardType v9, Fixnum + v26:BoolExact = FixnumLt v13, v25 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -1777,22 +1777,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:Fixnum[2] = Const Value(2) v17:Fixnum[1] = Const Value(1) - v25:RangeExact = NewRangeFixnum v17 NewRangeInclusive v13 + v26:RangeExact = NewRangeFixnum v17 NewRangeInclusive v13 CheckInterrupts - Return v25 + Return v26 "); } @@ -1808,22 +1808,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:Fixnum[2] = Const Value(2) v17:Fixnum[1] = Const Value(1) - v25:RangeExact = NewRangeFixnum v17 NewRangeExclusive v13 + v26:RangeExact = NewRangeFixnum v17 NewRangeExclusive v13 CheckInterrupts - Return v25 + Return v26 "); } @@ -1837,22 +1837,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) - v21:Fixnum = GuardType v9, Fixnum - v22:RangeExact = NewRangeFixnum v13 NewRangeInclusive v21 + v22:Fixnum = GuardType v9, Fixnum + v23:RangeExact = NewRangeFixnum v13 NewRangeInclusive v22 CheckInterrupts - Return v22 + Return v23 "); } @@ -1866,22 +1866,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) - v21:Fixnum = GuardType v9, Fixnum - v22:RangeExact = NewRangeFixnum v13 NewRangeExclusive v21 + v22:Fixnum = GuardType v9, Fixnum + v23:RangeExact = NewRangeFixnum v13 NewRangeExclusive v22 CheckInterrupts - Return v22 + Return v23 "); } @@ -1895,22 +1895,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[10] = Const Value(10) - v21:Fixnum = GuardType v9, Fixnum - v22:RangeExact = NewRangeFixnum v21 NewRangeInclusive v14 + v22:Fixnum = GuardType v9, Fixnum + v23:RangeExact = NewRangeFixnum v22 NewRangeInclusive v14 CheckInterrupts - Return v22 + Return v23 "); } @@ -1924,22 +1924,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[10] = Const Value(10) - v21:Fixnum = GuardType v9, Fixnum - v22:RangeExact = NewRangeFixnum v21 NewRangeExclusive v14 + v22:Fixnum = GuardType v9, Fixnum + v23:RangeExact = NewRangeFixnum v22 NewRangeExclusive v14 CheckInterrupts - Return v22 + Return v23 "); } @@ -1954,17 +1954,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:ArrayExact = NewArray v17:Fixnum[5] = Const Value(5) CheckInterrupts @@ -1981,30 +1981,30 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :arr@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[0] = Const Value(0) PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, []@0x1008, cme:0x1010) - v25:ArrayExact = GuardType v9, ArrayExact - v26:CInt64[0] = UnboxFixnum v14 - v27:CInt64 = ArrayLength v25 - v28:CInt64[0] = GuardLess v26, v27 - v29:CInt64[0] = Const CInt64(0) - v30:CInt64[0] = GuardGreaterEq v28, v29 - v31:BasicObject = ArrayAref v25, v30 + v26:ArrayExact = GuardType v9, ArrayExact + v27:CInt64[0] = UnboxFixnum v14 + v28:CInt64 = ArrayLength v26 + v29:CInt64[0] = GuardLess v27, v28 + v30:CInt64[0] = Const CInt64(0) + v31:CInt64[0] = GuardGreaterEq v29, v30 + v32:BasicObject = ArrayAref v26, v31 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v31 + Return v32 "); assert_snapshot!(inspect("test [1,2,3]"), @"1"); } @@ -2018,25 +2018,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :arr@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[0] = Const Value(0) PatchPoint NoSingletonClass(Hash@0x1000) PatchPoint MethodRedefined(Hash@0x1000, []@0x1008, cme:0x1010) - v25:HashExact = GuardType v9, HashExact - v26:BasicObject = HashAref v25, v14 + v26:HashExact = GuardType v9, HashExact + v27:BasicObject = HashAref v26, v14 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v26 + Return v27 "); assert_snapshot!(inspect("test({0 => 4})"), @"4"); } @@ -2052,17 +2052,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:RangeExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v17:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2081,17 +2081,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_UMINUS) v14:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v16:StringExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) @@ -2115,19 +2115,19 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:NilClass = Const Value(nil) - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:NilClass): v17:ArrayExact = NewArray v11 v21:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2145,17 +2145,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:HashExact = NewHash PatchPoint NoEPEscape(test) v19:Fixnum[5] = Const Value(5) @@ -2174,21 +2174,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :aval, l0, SP@6 v3:BasicObject = GetLocal :bval, l0, SP@5 v4:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :aval@1 v9:BasicObject = LoadArg :bval@2 v10:NilClass = Const Value(nil) - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:NilClass): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:NilClass): v19:StaticSymbol[:a] = Const Value(VALUE(0x1000)) v22:StaticSymbol[:b] = Const Value(VALUE(0x1008)) v25:HashExact = NewHash v19: v13, v22: v14 @@ -2210,17 +2210,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v14:ArrayExact = ArrayDup v13 v18:Fixnum[5] = Const Value(5) @@ -2239,17 +2239,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:HashExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v14:HashExact = HashDup v13 v18:Fixnum[5] = Const Value(5) @@ -2269,17 +2269,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v16:Fixnum[5] = Const Value(5) CheckInterrupts Return v16 @@ -2297,17 +2297,17 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v14:StringExact = StringCopy v13 v18:Fixnum[5] = Const Value(5) @@ -2327,22 +2327,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, +@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum - v31:Fixnum = GuardType v12, Fixnum + v31:Fixnum = GuardType v11, Fixnum + v32:Fixnum = GuardType v12, Fixnum IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2361,22 +2361,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, -@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum - v31:Fixnum = GuardType v12, Fixnum + v31:Fixnum = GuardType v11, Fixnum + v32:Fixnum = GuardType v12, Fixnum IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2395,22 +2395,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, *@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum - v31:Fixnum = GuardType v12, Fixnum + v31:Fixnum = GuardType v11, Fixnum + v32:Fixnum = GuardType v12, Fixnum IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2429,23 +2429,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, /@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum - v31:Fixnum = GuardType v12, Fixnum - v32:Fixnum = FixnumDiv v30, v31 + v31:Fixnum = GuardType v11, Fixnum + v32:Fixnum = GuardType v12, Fixnum + v33:Fixnum = FixnumDiv v31, v32 IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2464,23 +2464,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, %@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum - v31:Fixnum = GuardType v12, Fixnum - v32:Fixnum = FixnumMod v30, v31 + v31:Fixnum = GuardType v11, Fixnum + v32:Fixnum = GuardType v12, Fixnum + v33:Fixnum = FixnumMod v31, v32 IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2499,22 +2499,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, <@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum - v31:Fixnum = GuardType v12, Fixnum + v31:Fixnum = GuardType v11, Fixnum + v32:Fixnum = GuardType v12, Fixnum IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2533,22 +2533,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, <=@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum - v31:Fixnum = GuardType v12, Fixnum + v31:Fixnum = GuardType v11, Fixnum + v32:Fixnum = GuardType v12, Fixnum IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2567,22 +2567,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, >@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum - v31:Fixnum = GuardType v12, Fixnum + v31:Fixnum = GuardType v11, Fixnum + v32:Fixnum = GuardType v12, Fixnum IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2601,22 +2601,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, >=@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum - v31:Fixnum = GuardType v12, Fixnum + v31:Fixnum = GuardType v11, Fixnum + v32:Fixnum = GuardType v12, Fixnum IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2635,22 +2635,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, ==@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum - v31:Fixnum = GuardType v12, Fixnum + v31:Fixnum = GuardType v11, Fixnum + v32:Fixnum = GuardType v12, Fixnum IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2669,23 +2669,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, !=@0x1008, cme:0x1010) - v30:Fixnum = GuardType v11, Fixnum + v31:Fixnum = GuardType v11, Fixnum PatchPoint BOPRedefined(INTEGER_REDEFINED_OP_FLAG, BOP_EQ) - v32:Fixnum = GuardType v12, Fixnum + v33:Fixnum = GuardType v12, Fixnum IncrCounter inline_cfunc_optimized_send_count v23:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2703,15 +2703,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = GetConstantPath 0x1000 v15:Fixnum[5] = Const Value(5) CheckInterrupts @@ -2729,17 +2729,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :klass, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :klass@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:FalseClass = Const Value(false) v16:BasicObject = GetConstant v9, :ARGV, v14 v20:Fixnum[5] = Const Value(5) @@ -2757,22 +2757,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, itself@0x1008, cme:0x1010) - v21:Fixnum = GuardType v9, Fixnum + v22:Fixnum = GuardType v9, Fixnum IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v21 + Return v22 "); } @@ -2783,15 +2783,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact = NewArray PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, itself@0x1008, cme:0x1010) @@ -2811,17 +2811,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:ArrayExact = NewArray PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, itself@0x1008, cme:0x1010) @@ -2845,24 +2845,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, M) - v29:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v30:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(Module@0x1010) PatchPoint MethodRedefined(Module@0x1010, name@0x1018, cme:0x1020) IncrCounter inline_cfunc_optimized_send_count - v34:StringExact|NilClass = CCall v29, :Module#name@0x1048 + v35:StringExact|NilClass = CCall v30, :Module#name@0x1048 PatchPoint NoEPEscape(test) v22:Fixnum[1] = Const Value(1) CheckInterrupts @@ -2880,15 +2880,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact = NewArray PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, length@0x1008, cme:0x1010) @@ -2908,20 +2908,20 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, C) - v18:Class[C@0x1008] = Const Value(VALUE(0x1008)) + v19:Class[C@0x1008] = Const Value(VALUE(0x1008)) CheckInterrupts - Return v18 + Return v19 "); } @@ -2933,28 +2933,28 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, String) - v29:Class[String@0x1008] = Const Value(VALUE(0x1008)) + v30:Class[String@0x1008] = Const Value(VALUE(0x1008)) PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1010, Class) - v32:Class[Class@0x1018] = Const Value(VALUE(0x1018)) + v33:Class[Class@0x1018] = Const Value(VALUE(0x1018)) PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1020, Module) - v35:Class[Module@0x1028] = Const Value(VALUE(0x1028)) + v36:Class[Module@0x1028] = Const Value(VALUE(0x1028)) PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1030, BasicObject) - v38:Class[BasicObject@0x1038] = Const Value(VALUE(0x1038)) - v22:ArrayExact = NewArray v29, v32, v35, v38 + v39:Class[BasicObject@0x1038] = Const Value(VALUE(0x1038)) + v22:ArrayExact = NewArray v30, v33, v36, v39 CheckInterrupts Return v22 "); @@ -2968,22 +2968,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Enumerable) - v23:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v24:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1010, Kernel) - v26:ModuleExact[VALUE(0x1018)] = Const Value(VALUE(0x1018)) - v16:ArrayExact = NewArray v23, v26 + v27:ModuleExact[VALUE(0x1018)] = Const Value(VALUE(0x1018)) + v16:ArrayExact = NewArray v24, v27 CheckInterrupts Return v16 "); @@ -2999,20 +2999,20 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, MY_MODULE) - v18:ModuleSubclass[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v19:ModuleSubclass[VALUE(0x1008)] = Const Value(VALUE(0x1008)) CheckInterrupts - Return v18 + Return v19 "); } @@ -3026,15 +3026,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact = NewArray PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, size@0x1008, cme:0x1010) @@ -3055,15 +3055,15 @@ mod hir_opt_tests { // Not specialized assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v12:Fixnum[0] = Const Value(0) v14:BasicObject = Send v10, :itself, v12 # SendFallbackReason: SendWithoutBlock: unsupported method type Cfunc @@ -3080,23 +3080,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, block_given?@0x1008, cme:0x1010) - v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v20:CPtr = GetLEP - v21:BoolExact = IsBlockGiven v20 + v20:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v21:CPtr = GetLEP + v22:BoolExact = IsBlockGiven v21 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v21 + Return v22 "); } @@ -3108,22 +3108,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("TEST"), @r" fn block in @:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, block_given?@0x1008, cme:0x1010) - v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v20:FalseClass = Const Value(false) + v20:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v21:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v20 + Return v21 "); } @@ -3138,18 +3138,18 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, block_given?@0x1008, cme:0x1010) - v23:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v24:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_cfunc_optimized_send_count v15:Fixnum[5] = Const Value(5) CheckInterrupts @@ -3164,23 +3164,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, zero?@0x1008, cme:0x1010) IncrCounter inline_iseq_optimized_send_count - v23:BasicObject = InvokeBuiltin leaf , v13 + v24:BasicObject = InvokeBuiltin leaf , v13 CheckInterrupts - Return v23 + Return v24 "); } @@ -3194,27 +3194,27 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:NilClass = Const Value(nil) - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:NilClass): v16:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v17:ArrayExact = ArrayDup v16 PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, first@0x1010, cme:0x1018) IncrCounter inline_iseq_optimized_send_count - v31:BasicObject = InvokeBuiltin leaf , v17 + v32:BasicObject = InvokeBuiltin leaf , v17 CheckInterrupts - Return v31 + Return v32 "); } @@ -3228,25 +3228,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, M) - v20:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(Module@0x1010) PatchPoint MethodRedefined(Module@0x1010, class@0x1018, cme:0x1020) IncrCounter inline_iseq_optimized_send_count - v26:Class[Module@0x1010] = Const Value(VALUE(0x1010)) + v27:Class[Module@0x1010] = Const Value(VALUE(0x1010)) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v26 + Return v27 "); } @@ -3265,23 +3265,23 @@ mod hir_opt_tests { assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :c, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :c@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) - v21:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v22:BasicObject = SendDirect v21, 0x1038, :foo (0x1048) + v22:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048) CheckInterrupts - Return v22 + Return v23 "); } @@ -3296,23 +3296,23 @@ mod hir_opt_tests { assert_eq!(VALUE::fixnum_from_usize(3), result); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) v13:Fixnum[2] = Const Value(2) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 + v23:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v24:BasicObject = SendDirect v23, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts - Return v23 + Return v24 "); } @@ -3330,21 +3330,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v31:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v8, HeapObject[class_exact*:Object@VALUE(0x1000)] + v32:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v8, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count v19:BasicObject = GetLocal :a, l0, EP@3 PatchPoint NoEPEscape(test) @@ -3363,15 +3363,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) IncrCounter complex_arg_pass_param_rest v13:BasicObject = Send v6, :foo, v11 # SendFallbackReason: Complex argument passing @@ -3389,15 +3389,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[10] = Const Value(10) IncrCounter complex_arg_pass_param_post v13:BasicObject = Send v6, :foo, v11 # SendFallbackReason: Complex argument passing @@ -3416,23 +3416,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) v13:Fixnum[2] = Const Value(2) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 + v23:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v24:BasicObject = SendDirect v23, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts - Return v23 + Return v24 "); } @@ -3446,24 +3446,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[3] = Const Value(3) v13:Fixnum[1] = Const Value(1) v15:Fixnum[2] = Const Value(2) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v24:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v26:BasicObject = SendDirect v24, 0x1038, :foo (0x1048), v13, v15, v11 + v25:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v27:BasicObject = SendDirect v25, 0x1038, :foo (0x1048), v13, v15, v11 CheckInterrupts - Return v26 + Return v27 "); } @@ -3477,24 +3477,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[0] = Const Value(0) v13:Fixnum[2] = Const Value(2) v15:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v24:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v26:BasicObject = SendDirect v24, 0x1038, :foo (0x1048), v11, v15, v13 + v25:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v27:BasicObject = SendDirect v25, 0x1038, :foo (0x1048), v11, v15, v13 CheckInterrupts - Return v26 + Return v27 "); } @@ -3508,23 +3508,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[0] = Const Value(0) v13:Fixnum[2] = Const Value(2) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v22:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v23:BasicObject = SendDirect v22, 0x1038, :foo (0x1048), v11, v13 + v23:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v24:BasicObject = SendDirect v23, 0x1038, :foo (0x1048), v11, v13 CheckInterrupts - Return v23 + Return v24 "); } @@ -3538,31 +3538,31 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) v13:Fixnum[3] = Const Value(3) v15:Fixnum[4] = Const Value(4) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v37:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v38:BasicObject = SendDirect v37, 0x1038, :foo (0x1048), v11, v13, v15 + v38:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v39:BasicObject = SendDirect v38, 0x1038, :foo (0x1048), v11, v13, v15 v20:Fixnum[1] = Const Value(1) v22:Fixnum[2] = Const Value(2) v24:Fixnum[4] = Const Value(4) v26:Fixnum[3] = Const Value(3) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v41:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v43:BasicObject = SendDirect v41, 0x1038, :foo (0x1048), v20, v22, v26, v24 - v30:ArrayExact = NewArray v38, v43 + v42:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v44:BasicObject = SendDirect v42, 0x1038, :foo (0x1048), v20, v22, v26, v24 + v30:ArrayExact = NewArray v39, v44 CheckInterrupts Return v30 "); @@ -3578,31 +3578,31 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) v13:Fixnum[3] = Const Value(3) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v35:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v36:Fixnum[4] = Const Value(4) - v38:BasicObject = SendDirect v35, 0x1038, :foo (0x1048), v11, v13, v36 + v36:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v37:Fixnum[4] = Const Value(4) + v39:BasicObject = SendDirect v36, 0x1038, :foo (0x1048), v11, v13, v37 v18:Fixnum[1] = Const Value(1) v20:Fixnum[2] = Const Value(2) v22:Fixnum[40] = Const Value(40) v24:Fixnum[30] = Const Value(30) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v41:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v43:BasicObject = SendDirect v41, 0x1038, :foo (0x1048), v18, v20, v24, v22 - v28:ArrayExact = NewArray v38, v43 + v42:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v44:BasicObject = SendDirect v42, 0x1038, :foo (0x1048), v18, v20, v24, v22 + v28:ArrayExact = NewArray v39, v44 CheckInterrupts Return v28 "); @@ -3618,28 +3618,28 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[6] = Const Value(6) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, target@0x1008, cme:0x1010) - v48:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v49:BasicObject = SendDirect v48, 0x1038, :target (0x1048), v11 + v49:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v50:BasicObject = SendDirect v49, 0x1038, :target (0x1048), v11 v16:Fixnum[10] = Const Value(10) v18:Fixnum[20] = Const Value(20) v20:Fixnum[30] = Const Value(30) v22:Fixnum[6] = Const Value(6) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, target@0x1008, cme:0x1010) - v52:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v53:BasicObject = SendDirect v52, 0x1038, :target (0x1048), v16, v18, v20, v22 + v53:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v54:BasicObject = SendDirect v53, 0x1038, :target (0x1048), v16, v18, v20, v22 v27:Fixnum[10] = Const Value(10) v29:Fixnum[20] = Const Value(20) v31:Fixnum[30] = Const Value(30) @@ -3647,7 +3647,7 @@ mod hir_opt_tests { v35:Fixnum[50] = Const Value(50) v37:Fixnum[60] = Const Value(60) v39:BasicObject = Send v6, :target, v27, v29, v31, v33, v35, v37 # SendFallbackReason: Too many arguments for LIR - v41:ArrayExact = NewArray v49, v53, v39 + v41:ArrayExact = NewArray v50, v54, v39 CheckInterrupts Return v41 "); @@ -3663,22 +3663,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[2] = Const Value(2) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v20:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v21:BasicObject = SendDirect v20, 0x1038, :foo (0x1048), v11 + v21:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v22:BasicObject = SendDirect v21, 0x1038, :foo (0x1048), v11 CheckInterrupts - Return v21 + Return v22 "); } @@ -3692,15 +3692,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) IncrCounter complex_arg_pass_param_kwrest v13:BasicObject = Send v6, :foo, v11 # SendFallbackReason: Complex argument passing @@ -3719,22 +3719,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v19:Fixnum[1] = Const Value(1) - v21:BasicObject = SendDirect v18, 0x1038, :foo (0x1048), v19 + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v20:Fixnum[1] = Const Value(1) + v22:BasicObject = SendDirect v19, 0x1038, :foo (0x1048), v20 CheckInterrupts - Return v21 + Return v22 "); } @@ -3748,15 +3748,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:HashExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v12:HashExact = HashDup v11 IncrCounter complex_arg_pass_caller_kw_splat @@ -3776,15 +3776,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): IncrCounter complex_arg_pass_param_kwrest v11:BasicObject = Send v6, :foo # SendFallbackReason: Complex argument passing CheckInterrupts @@ -3801,15 +3801,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v12:StringExact = StringCopy v11 v14:Fixnum[1] = Const Value(1) @@ -3833,19 +3833,19 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@5 v3:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :s@1 v8:NilClass = Const Value(nil) - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:NilClass): v16:ArrayExact = NewArray v21:TrueClass = Const Value(true) IncrCounter complex_arg_pass_caller_kwarg @@ -3865,15 +3865,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = GetConstantPath 0x1000 CheckInterrupts Return v11 @@ -3889,15 +3889,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = GetConstantPath 0x1000 CheckInterrupts Return v11 @@ -3912,20 +3912,20 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Kernel) - v18:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v19:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) CheckInterrupts - Return v18 + Return v19 "); } @@ -3943,20 +3943,20 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:8: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Foo::Bar::C) - v18:Class[Foo::Bar::C@0x1008] = Const Value(VALUE(0x1008)) + v19:Class[Foo::Bar::C@0x1008] = Const Value(VALUE(0x1008)) CheckInterrupts - Return v18 + Return v19 "); } @@ -3969,28 +3969,28 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, C) - v43:Class[C@0x1008] = Const Value(VALUE(0x1008)) + v44:Class[C@0x1008] = Const Value(VALUE(0x1008)) v13:NilClass = Const Value(nil) PatchPoint MethodRedefined(C@0x1008, new@0x1009, cme:0x1010) - v46:HeapObject[class_exact:C] = ObjectAllocClass C:VALUE(0x1008) + v47:HeapObject[class_exact:C] = ObjectAllocClass C:VALUE(0x1008) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, initialize@0x1038, cme:0x1040) - v50:NilClass = Const Value(nil) + v51:NilClass = Const Value(nil) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts CheckInterrupts - Return v46 + Return v47 "); } @@ -4007,28 +4007,28 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:7: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, C) - v46:Class[C@0x1008] = Const Value(VALUE(0x1008)) + v47:Class[C@0x1008] = Const Value(VALUE(0x1008)) v13:NilClass = Const Value(nil) v16:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(C@0x1008, new@0x1009, cme:0x1010) - v49:HeapObject[class_exact:C] = ObjectAllocClass C:VALUE(0x1008) + v50:HeapObject[class_exact:C] = ObjectAllocClass C:VALUE(0x1008) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, initialize@0x1038, cme:0x1040) - v52:BasicObject = SendDirect v49, 0x1068, :initialize (0x1078), v16 + v53:BasicObject = SendDirect v50, 0x1068, :initialize (0x1078), v16 CheckInterrupts CheckInterrupts - Return v49 + Return v50 "); } @@ -4040,28 +4040,28 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Object) - v43:Class[Object@0x1008] = Const Value(VALUE(0x1008)) + v44:Class[Object@0x1008] = Const Value(VALUE(0x1008)) v13:NilClass = Const Value(nil) PatchPoint MethodRedefined(Object@0x1008, new@0x1009, cme:0x1010) - v46:ObjectExact = ObjectAllocClass Object:VALUE(0x1008) + v47:ObjectExact = ObjectAllocClass Object:VALUE(0x1008) PatchPoint NoSingletonClass(Object@0x1008) PatchPoint MethodRedefined(Object@0x1008, initialize@0x1038, cme:0x1040) - v50:NilClass = Const Value(nil) + v51:NilClass = Const Value(nil) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts CheckInterrupts - Return v46 + Return v47 "); } @@ -4073,28 +4073,28 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, BasicObject) - v43:Class[BasicObject@0x1008] = Const Value(VALUE(0x1008)) + v44:Class[BasicObject@0x1008] = Const Value(VALUE(0x1008)) v13:NilClass = Const Value(nil) PatchPoint MethodRedefined(BasicObject@0x1008, new@0x1009, cme:0x1010) - v46:BasicObjectExact = ObjectAllocClass BasicObject:VALUE(0x1008) + v47:BasicObjectExact = ObjectAllocClass BasicObject:VALUE(0x1008) PatchPoint NoSingletonClass(BasicObject@0x1008) PatchPoint MethodRedefined(BasicObject@0x1008, initialize@0x1038, cme:0x1040) - v50:NilClass = Const Value(nil) + v51:NilClass = Const Value(nil) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts CheckInterrupts - Return v46 + Return v47 "); } @@ -4106,26 +4106,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Hash) - v43:Class[Hash@0x1008] = Const Value(VALUE(0x1008)) + v44:Class[Hash@0x1008] = Const Value(VALUE(0x1008)) v13:NilClass = Const Value(nil) PatchPoint MethodRedefined(Hash@0x1008, new@0x1009, cme:0x1010) - v46:HashExact = ObjectAllocClass Hash:VALUE(0x1008) + v47:HashExact = ObjectAllocClass Hash:VALUE(0x1008) IncrCounter complex_arg_pass_param_block - v20:BasicObject = Send v46, :initialize # SendFallbackReason: Complex argument passing + v20:BasicObject = Send v47, :initialize # SendFallbackReason: Complex argument passing CheckInterrupts CheckInterrupts - Return v46 + Return v47 "); assert_snapshot!(inspect("test"), @"{}"); } @@ -4138,26 +4138,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Array) - v46:Class[Array@0x1008] = Const Value(VALUE(0x1008)) + v47:Class[Array@0x1008] = Const Value(VALUE(0x1008)) v13:NilClass = Const Value(nil) v16:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Array@0x1008, new@0x1009, cme:0x1010) PatchPoint NoSingletonClass(Class@0x1038) PatchPoint MethodRedefined(Class@0x1038, new@0x1009, cme:0x1010) - v57:BasicObject = CCallVariadic v46, :Array.new@0x1040, v16 + v58:BasicObject = CCallVariadic v47, :Array.new@0x1040, v16 CheckInterrupts - Return v57 + Return v58 "); } @@ -4169,25 +4169,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Set) - v43:Class[Set@0x1008] = Const Value(VALUE(0x1008)) + v44:Class[Set@0x1008] = Const Value(VALUE(0x1008)) v13:NilClass = Const Value(nil) PatchPoint MethodRedefined(Set@0x1008, new@0x1009, cme:0x1010) - v18:HeapBasicObject = ObjectAlloc v43 + v18:HeapBasicObject = ObjectAlloc v44 PatchPoint NoSingletonClass(Set@0x1008) PatchPoint MethodRedefined(Set@0x1008, initialize@0x1038, cme:0x1040) - v49:SetExact = GuardType v18, SetExact - v50:BasicObject = CCallVariadic v49, :Set#initialize@0x1068 + v50:SetExact = GuardType v18, SetExact + v51:BasicObject = CCallVariadic v50, :Set#initialize@0x1068 CheckInterrupts CheckInterrupts Return v18 @@ -4202,25 +4202,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, String) - v43:Class[String@0x1008] = Const Value(VALUE(0x1008)) + v44:Class[String@0x1008] = Const Value(VALUE(0x1008)) v13:NilClass = Const Value(nil) PatchPoint MethodRedefined(String@0x1008, new@0x1009, cme:0x1010) PatchPoint NoSingletonClass(Class@0x1038) PatchPoint MethodRedefined(Class@0x1038, new@0x1009, cme:0x1010) - v54:BasicObject = CCallVariadic v43, :String.new@0x1040 + v55:BasicObject = CCallVariadic v44, :String.new@0x1040 CheckInterrupts - Return v54 + Return v55 "); } @@ -4232,29 +4232,29 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Regexp) - v47:Class[Regexp@0x1008] = Const Value(VALUE(0x1008)) + v48:Class[Regexp@0x1008] = Const Value(VALUE(0x1008)) v13:NilClass = Const Value(nil) v16:StringExact[VALUE(0x1010)] = Const Value(VALUE(0x1010)) v17:StringExact = StringCopy v16 PatchPoint MethodRedefined(Regexp@0x1008, new@0x1018, cme:0x1020) - v50:RegexpExact = ObjectAllocClass Regexp:VALUE(0x1008) + v51:RegexpExact = ObjectAllocClass Regexp:VALUE(0x1008) PatchPoint NoSingletonClass(Regexp@0x1008) PatchPoint MethodRedefined(Regexp@0x1008, initialize@0x1048, cme:0x1050) - v54:BasicObject = CCallVariadic v50, :Regexp#initialize@0x1078, v17 + v55:BasicObject = CCallVariadic v51, :Regexp#initialize@0x1078, v17 CheckInterrupts CheckInterrupts - Return v50 + Return v51 "); } @@ -4265,27 +4265,27 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:ArrayExact = NewArray v11, v12 PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, length@0x1008, cme:0x1010) - v29:CInt64 = ArrayLength v18 - v30:Fixnum = BoxFixnum v29 + v30:CInt64 = ArrayLength v18 + v31:Fixnum = BoxFixnum v30 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -4296,27 +4296,27 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:ArrayExact = NewArray v11, v12 PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, size@0x1008, cme:0x1010) - v29:CInt64 = ArrayLength v18 - v30:Fixnum = BoxFixnum v29 + v30:CInt64 = ArrayLength v18 + v31:Fixnum = BoxFixnum v30 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -4327,17 +4327,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :block, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :block@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:CPtr = GetEP 0 v15:CInt64 = LoadField v14, :_env_data_index_flags@0x1000 v16:CInt64 = GuardNoBitsSet v15, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM=CUInt64(512) @@ -4357,25 +4357,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :block, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :block@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:CBool = IsBlockParamModified l0 - IfTrue v13, bb3(v8, v9) + IfTrue v13, bb4(v8, v9) v24:BasicObject = GetBlockParam :block, l0, EP@3 - Jump bb5(v8, v24, v24) - bb3(v14:BasicObject, v15:BasicObject): + Jump bb6(v8, v24, v24) + bb4(v14:BasicObject, v15:BasicObject): v22:BasicObject = GetLocal :block, l0, EP@3 - Jump bb5(v14, v22, v22) - bb5(v26:BasicObject, v27:BasicObject, v28:BasicObject): + Jump bb6(v14, v22, v22) + bb6(v26:BasicObject, v27:BasicObject, v28:BasicObject): CheckInterrupts Return v28 "); @@ -4392,23 +4392,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("test"), @r" fn block in test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:CBool = IsBlockParamModified l1 - IfTrue v10, bb3(v6) + IfTrue v10, bb4(v6) v19:BasicObject = GetBlockParam :block, l1, EP@3 - Jump bb5(v6, v19) - bb3(v11:BasicObject): + Jump bb6(v6, v19) + bb4(v11:BasicObject): v17:BasicObject = GetLocal :block, l1, EP@3 - Jump bb5(v11, v17) - bb5(v21:BasicObject, v22:BasicObject): + Jump bb6(v11, v17) + bb6(v21:BasicObject, v22:BasicObject): CheckInterrupts Return v22 "); @@ -4421,15 +4421,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode IncrCounter getivar_fallback_not_monomorphic v11:BasicObject = GetIvar v6, :@foo @@ -4445,15 +4445,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) PatchPoint SingleRactorMode IncrCounter setivar_fallback_not_monomorphic @@ -4472,21 +4472,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): - v15:HeapBasicObject = GuardType v6, HeapBasicObject - v16:CShape = LoadField v15, :_shape_id@0x1000 - v17:CShape[0x1001] = GuardBitEquals v16, CShape(0x1001) - v18:StringExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + Jump bb3(v4) + bb3(v6:BasicObject): + v16:HeapBasicObject = GuardType v6, HeapBasicObject + v17:CShape = LoadField v16, :_shape_id@0x1000 + v18:CShape[0x1001] = GuardBitEquals v17, CShape(0x1001) + v19:StringExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) CheckInterrupts - Return v18 + Return v19 "); } @@ -4498,21 +4498,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): - v15:HeapBasicObject = GuardType v6, HeapBasicObject - v16:CShape = LoadField v15, :_shape_id@0x1000 - v17:CShape[0x1001] = GuardBitEquals v16, CShape(0x1001) - v18:NilClass = Const Value(nil) + Jump bb3(v4) + bb3(v6:BasicObject): + v16:HeapBasicObject = GuardType v6, HeapBasicObject + v17:CShape = LoadField v16, :_shape_id@0x1000 + v18:CShape[0x1001] = GuardBitEquals v17, CShape(0x1001) + v19:NilClass = Const Value(nil) CheckInterrupts - Return v18 + Return v19 "); } @@ -4527,24 +4527,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :p@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Proc@0x1000) PatchPoint MethodRedefined(Proc@0x1000, call@0x1008, cme:0x1010) - v23:HeapObject[class_exact:Proc] = GuardType v9, HeapObject[class_exact:Proc] - v24:BasicObject = InvokeProc v23, v14 + v24:HeapObject[class_exact:Proc] = GuardType v9, HeapObject[class_exact:Proc] + v25:BasicObject = InvokeProc v24, v14 CheckInterrupts - Return v24 + Return v25 "); } @@ -4559,24 +4559,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :p@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[2] = Const Value(2) PatchPoint NoSingletonClass(Proc@0x1000) PatchPoint MethodRedefined(Proc@0x1000, []@0x1008, cme:0x1010) - v24:HeapObject[class_exact:Proc] = GuardType v9, HeapObject[class_exact:Proc] - v25:BasicObject = InvokeProc v24, v14 + v25:HeapObject[class_exact:Proc] = GuardType v9, HeapObject[class_exact:Proc] + v26:BasicObject = InvokeProc v25, v14 CheckInterrupts - Return v25 + Return v26 "); } @@ -4591,24 +4591,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :p@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[3] = Const Value(3) PatchPoint NoSingletonClass(Proc@0x1000) PatchPoint MethodRedefined(Proc@0x1000, yield@0x1008, cme:0x1010) - v23:HeapObject[class_exact:Proc] = GuardType v9, HeapObject[class_exact:Proc] - v24:BasicObject = InvokeProc v23, v14 + v24:HeapObject[class_exact:Proc] = GuardType v9, HeapObject[class_exact:Proc] + v25:BasicObject = InvokeProc v24, v14 CheckInterrupts - Return v24 + Return v25 "); } @@ -4623,24 +4623,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :p@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Proc@0x1000) PatchPoint MethodRedefined(Proc@0x1000, ===@0x1008, cme:0x1010) - v23:HeapObject[class_exact:Proc] = GuardType v9, HeapObject[class_exact:Proc] - v24:BasicObject = InvokeProc v23, v14 + v24:HeapObject[class_exact:Proc] = GuardType v9, HeapObject[class_exact:Proc] + v25:BasicObject = InvokeProc v24, v14 CheckInterrupts - Return v24 + Return v25 "); } @@ -4656,19 +4656,19 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@5 v3:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :p@1 v8:NilClass = Const Value(nil) - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:NilClass): v16:ArrayExact = NewArray v22:ArrayExact = ToArray v16 IncrCounter complex_arg_pass_caller_splat @@ -4689,17 +4689,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :p, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :p@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) IncrCounter complex_arg_pass_caller_kwarg v16:BasicObject = Send v9, :call, v14 # SendFallbackReason: Complex argument passing @@ -4721,15 +4721,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("TEST"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): IncrCounter definedivar_fallback_not_t_object v10:StringExact|NilClass = DefinedIvar v6, :@a CheckInterrupts @@ -4754,15 +4754,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("TEST"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): IncrCounter definedivar_fallback_not_monomorphic v10:StringExact|NilClass = DefinedIvar v6, :@a CheckInterrupts @@ -4788,15 +4788,15 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string_proc("TEST"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): IncrCounter definedivar_fallback_too_complex v10:StringExact|NilClass = DefinedIvar v6, :@a CheckInterrupts @@ -4813,22 +4813,22 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[5] = Const Value(5) PatchPoint SingleRactorMode - v20:HeapBasicObject = GuardType v6, HeapBasicObject - v21:CShape = LoadField v20, :_shape_id@0x1000 - v22:CShape[0x1001] = GuardBitEquals v21, CShape(0x1001) - StoreField v20, :@foo@0x1002, v10 - WriteBarrier v20, v10 + v21:HeapBasicObject = GuardType v6, HeapBasicObject + v22:CShape = LoadField v21, :_shape_id@0x1000 + v23:CShape[0x1001] = GuardBitEquals v22, CShape(0x1001) + StoreField v21, :@foo@0x1002, v10 + WriteBarrier v21, v10 CheckInterrupts Return v10 "); @@ -4842,24 +4842,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[5] = Const Value(5) PatchPoint SingleRactorMode - v20:HeapBasicObject = GuardType v6, HeapBasicObject - v21:CShape = LoadField v20, :_shape_id@0x1000 - v22:CShape[0x1001] = GuardBitEquals v21, CShape(0x1001) - StoreField v20, :@foo@0x1002, v10 - WriteBarrier v20, v10 - v25:CShape[0x1003] = Const CShape(0x1003) - StoreField v20, :_shape_id@0x1000, v25 + v21:HeapBasicObject = GuardType v6, HeapBasicObject + v22:CShape = LoadField v21, :_shape_id@0x1000 + v23:CShape[0x1001] = GuardBitEquals v22, CShape(0x1001) + StoreField v21, :@foo@0x1002, v10 + WriteBarrier v21, v10 + v26:CShape[0x1003] = Const CShape(0x1003) + StoreField v21, :_shape_id@0x1000, v26 CheckInterrupts Return v10 "); @@ -4876,33 +4876,33 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) PatchPoint SingleRactorMode - v27:HeapBasicObject = GuardType v6, HeapBasicObject - v28:CShape = LoadField v27, :_shape_id@0x1000 - v29:CShape[0x1001] = GuardBitEquals v28, CShape(0x1001) - StoreField v27, :@foo@0x1002, v10 - WriteBarrier v27, v10 - v32:CShape[0x1003] = Const CShape(0x1003) - StoreField v27, :_shape_id@0x1000, v32 + v28:HeapBasicObject = GuardType v6, HeapBasicObject + v29:CShape = LoadField v28, :_shape_id@0x1000 + v30:CShape[0x1001] = GuardBitEquals v29, CShape(0x1001) + StoreField v28, :@foo@0x1002, v10 + WriteBarrier v28, v10 + v33:CShape[0x1003] = Const CShape(0x1003) + StoreField v28, :_shape_id@0x1000, v33 v14:HeapBasicObject = RefineType v6, HeapBasicObject v17:Fixnum[2] = Const Value(2) PatchPoint SingleRactorMode - v35:CShape = LoadField v14, :_shape_id@0x1000 - v36:CShape[0x1003] = GuardBitEquals v35, CShape(0x1003) + v36:CShape = LoadField v14, :_shape_id@0x1000 + v37:CShape[0x1003] = GuardBitEquals v36, CShape(0x1003) StoreField v14, :@bar@0x1004, v17 WriteBarrier v14, v17 - v39:CShape[0x1005] = Const CShape(0x1005) - StoreField v14, :_shape_id@0x1000, v39 + v40:CShape[0x1005] = Const CShape(0x1005) + StoreField v14, :_shape_id@0x1000, v40 CheckInterrupts Return v17 "); @@ -4921,15 +4921,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("TEST"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[5] = Const Value(5) PatchPoint SingleRactorMode IncrCounter setivar_fallback_not_t_object @@ -4956,15 +4956,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("TEST"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[5] = Const Value(5) PatchPoint SingleRactorMode IncrCounter setivar_fallback_not_monomorphic @@ -4992,15 +4992,15 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string_proc("TEST"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[5] = Const Value(5) PatchPoint SingleRactorMode IncrCounter setivar_fallback_too_complex @@ -5025,15 +5025,15 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string_proc("TEST"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[5] = Const Value(5) PatchPoint SingleRactorMode IncrCounter setivar_fallback_new_shape_too_complex @@ -5050,15 +5050,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE) v11:HashExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts @@ -5076,15 +5076,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): SideExit PatchPoint(BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE)) "); } @@ -5096,15 +5096,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE) v11:HashExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) PatchPoint BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5120,20 +5120,20 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:HashExact = NewHash PatchPoint NoSingletonClass(Hash@0x1000) PatchPoint MethodRedefined(Hash@0x1000, dup@0x1008, cme:0x1010) - v22:BasicObject = CCallWithFrame v10, :Kernel#dup@0x1038 - v14:BasicObject = Send v22, :freeze # SendFallbackReason: Uncategorized(opt_send_without_block) + v23:BasicObject = CCallWithFrame v10, :Kernel#dup@0x1038 + v14:BasicObject = Send v23, :freeze # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts Return v14 "); @@ -5146,15 +5146,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:HashExact = NewHash v12:NilClass = Const Value(nil) v14:BasicObject = Send v10, :freeze, v12 # SendFallbackReason: SendWithoutBlock: unsupported method type Cfunc @@ -5170,15 +5170,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) v11:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts @@ -5193,15 +5193,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) v11:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5217,20 +5217,20 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact = NewArray PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, dup@0x1008, cme:0x1010) - v22:BasicObject = CCallWithFrame v10, :Kernel#dup@0x1038 - v14:BasicObject = Send v22, :freeze # SendFallbackReason: Uncategorized(opt_send_without_block) + v23:BasicObject = CCallWithFrame v10, :Kernel#dup@0x1038 + v14:BasicObject = Send v23, :freeze # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts Return v14 "); @@ -5243,15 +5243,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact = NewArray v12:NilClass = Const Value(nil) v14:BasicObject = Send v10, :freeze, v12 # SendFallbackReason: SendWithoutBlock: unsupported method type Cfunc @@ -5267,15 +5267,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE) v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts @@ -5290,15 +5290,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE) v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE) @@ -5314,21 +5314,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:StringExact = StringCopy v10 PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, dup@0x1010, cme:0x1018) - v23:BasicObject = CCallWithFrame v11, :String#dup@0x1040 - v15:BasicObject = Send v23, :freeze # SendFallbackReason: Uncategorized(opt_send_without_block) + v24:BasicObject = CCallWithFrame v11, :String#dup@0x1040 + v15:BasicObject = Send v24, :freeze # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts Return v15 "); @@ -5341,15 +5341,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:StringExact = StringCopy v10 v13:NilClass = Const Value(nil) @@ -5366,15 +5366,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_UMINUS) v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts @@ -5389,15 +5389,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE) v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_UMINUS) @@ -5413,21 +5413,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:StringExact = StringCopy v10 PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, dup@0x1010, cme:0x1018) - v23:BasicObject = CCallWithFrame v11, :String#dup@0x1040 - v15:BasicObject = Send v23, :-@ # SendFallbackReason: Uncategorized(opt_send_without_block) + v24:BasicObject = CCallWithFrame v11, :String#dup@0x1040 + v15:BasicObject = Send v24, :-@ # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts Return v15 "); @@ -5440,15 +5440,15 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v13:StringExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) v14:StringExact = StringCopy v13 @@ -5465,15 +5465,15 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v12:Fixnum[1] = Const Value(1) v15:BasicObject = ObjToString v12 @@ -5495,21 +5495,21 @@ mod hir_opt_tests { assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) PatchPoint NoSingletonClass(String@0x1008) - v27:String = GuardType v9, String - v21:StringExact = StringConcat v13, v27 + v28:String = GuardType v9, String + v21:StringExact = StringConcat v13, v28 CheckInterrupts Return v21 "); @@ -5529,21 +5529,21 @@ mod hir_opt_tests { assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) PatchPoint NoSingletonClass(MyString@0x1008) - v27:String = GuardType v9, String - v21:StringExact = StringConcat v13, v27 + v28:String = GuardType v9, String + v21:StringExact = StringConcat v13, v28 CheckInterrupts Return v21 "); @@ -5560,23 +5560,23 @@ mod hir_opt_tests { assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) - v26:ArrayExact = GuardType v9, ArrayExact + v27:ArrayExact = GuardType v9, ArrayExact PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, to_s@0x1010, cme:0x1018) - v31:BasicObject = CCallWithFrame v26, :Array#to_s@0x1040 - v19:String = AnyToString v9, str: v31 + v32:BasicObject = CCallWithFrame v27, :Array#to_s@0x1040 + v19:String = AnyToString v9, str: v32 v21:StringExact = StringConcat v13, v19 CheckInterrupts Return v21 @@ -5594,17 +5594,17 @@ mod hir_opt_tests { assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:NilClass = Const Value(nil) CheckInterrupts v21:NilClass = Const Value(nil) @@ -5624,17 +5624,17 @@ mod hir_opt_tests { assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:Fixnum[1] = Const Value(1) CheckInterrupts v23:Fixnum[1] = RefineType v13, NotNil @@ -5654,30 +5654,30 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, S) - v23:ArrayExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v24:ArrayExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) v13:Fixnum[0] = Const Value(0) PatchPoint NoSingletonClass(Array@0x1010) PatchPoint MethodRedefined(Array@0x1010, []@0x1018, cme:0x1020) - v27:CInt64[0] = UnboxFixnum v13 - v28:CInt64 = ArrayLength v23 - v29:CInt64[0] = GuardLess v27, v28 - v30:CInt64[0] = Const CInt64(0) - v31:CInt64[0] = GuardGreaterEq v29, v30 - v32:BasicObject = ArrayAref v23, v31 + v28:CInt64[0] = UnboxFixnum v13 + v29:CInt64 = ArrayLength v24 + v30:CInt64[0] = GuardLess v28, v29 + v31:CInt64[0] = Const CInt64(0) + v32:CInt64[0] = GuardGreaterEq v30, v31 + v33:BasicObject = ArrayAref v24, v32 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v32 + Return v33 "); // TODO(max): Check the result of `S[0] = 5; test` using `inspect` to make sure that we // actually do the load at run-time. @@ -5690,29 +5690,29 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) v11:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v13:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []@0x1010, cme:0x1018) - v24:CInt64[1] = UnboxFixnum v13 - v25:CInt64 = ArrayLength v11 - v26:CInt64[1] = GuardLess v24, v25 - v27:CInt64[0] = Const CInt64(0) - v28:CInt64[1] = GuardGreaterEq v26, v27 - v31:Fixnum[5] = Const Value(5) + v25:CInt64[1] = UnboxFixnum v13 + v26:CInt64 = ArrayLength v11 + v27:CInt64[1] = GuardLess v25, v26 + v28:CInt64[0] = Const CInt64(0) + v29:CInt64[1] = GuardGreaterEq v27, v28 + v32:Fixnum[5] = Const Value(5) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v31 + Return v32 "); } @@ -5723,29 +5723,29 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) v11:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v13:Fixnum[-3] = Const Value(-3) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []@0x1010, cme:0x1018) - v24:CInt64[-3] = UnboxFixnum v13 - v25:CInt64 = ArrayLength v11 - v26:CInt64[-3] = GuardLess v24, v25 - v27:CInt64[0] = Const CInt64(0) - v28:CInt64[-3] = GuardGreaterEq v26, v27 - v31:Fixnum[4] = Const Value(4) + v25:CInt64[-3] = UnboxFixnum v13 + v26:CInt64 = ArrayLength v11 + v27:CInt64[-3] = GuardLess v25, v26 + v28:CInt64[0] = Const CInt64(0) + v29:CInt64[-3] = GuardGreaterEq v27, v28 + v32:Fixnum[4] = Const Value(4) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v31 + Return v32 "); } @@ -5756,29 +5756,29 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) v11:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v13:Fixnum[-10] = Const Value(-10) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []@0x1010, cme:0x1018) - v24:CInt64[-10] = UnboxFixnum v13 - v25:CInt64 = ArrayLength v11 - v26:CInt64[-10] = GuardLess v24, v25 - v27:CInt64[0] = Const CInt64(0) - v28:CInt64[-10] = GuardGreaterEq v26, v27 - v31:NilClass = Const Value(nil) + v25:CInt64[-10] = UnboxFixnum v13 + v26:CInt64 = ArrayLength v11 + v27:CInt64[-10] = GuardLess v25, v26 + v28:CInt64[0] = Const CInt64(0) + v29:CInt64[-10] = GuardGreaterEq v27, v28 + v32:NilClass = Const Value(nil) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v31 + Return v32 "); } @@ -5789,29 +5789,29 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) v11:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v13:Fixnum[10] = Const Value(10) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []@0x1010, cme:0x1018) - v24:CInt64[10] = UnboxFixnum v13 - v25:CInt64 = ArrayLength v11 - v26:CInt64[10] = GuardLess v24, v25 - v27:CInt64[0] = Const CInt64(0) - v28:CInt64[10] = GuardGreaterEq v26, v27 - v31:NilClass = Const Value(nil) + v25:CInt64[10] = UnboxFixnum v13 + v26:CInt64 = ArrayLength v11 + v27:CInt64[10] = GuardLess v25, v26 + v28:CInt64[0] = Const CInt64(0) + v29:CInt64[10] = GuardGreaterEq v27, v28 + v32:NilClass = Const Value(nil) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v31 + Return v32 "); } @@ -5825,23 +5825,23 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) v11:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v13:Fixnum[10] = Const Value(10) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []@0x1010, cme:0x1018) - v23:BasicObject = SendDirect v11, 0x1040, :[] (0x1050), v13 + v24:BasicObject = SendDirect v11, 0x1040, :[] (0x1050), v13 CheckInterrupts - Return v23 + Return v24 "); } @@ -5858,17 +5858,17 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:7: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :arr@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v16:Fixnum[1] = Const Value(1) v18:Fixnum[10] = Const Value(10) v22:BasicObject = Send v9, :[]=, v16, v18 # SendFallbackReason: Uncategorized(opt_aset) @@ -5887,22 +5887,22 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:ArrayExact = ArrayDup v10 PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, max@0x1010, cme:0x1018) - v20:BasicObject = SendDirect v11, 0x1040, :max (0x1050) + v21:BasicObject = SendDirect v11, 0x1040, :max (0x1050) CheckInterrupts - Return v20 + Return v21 "); } @@ -5918,20 +5918,20 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, MY_SET) - v18:SetExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v19:SetExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) CheckInterrupts - Return v18 + Return v19 "); } @@ -5942,15 +5942,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:RegexpExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts Return v10 @@ -5968,28 +5968,28 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, zero@0x1008, cme:0x1010) - v22:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v23:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v30:StaticSymbol[:b] = Const Value(VALUE(0x1038)) + v31:StaticSymbol[:b] = Const Value(VALUE(0x1038)) PatchPoint SingleRactorMode PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, one@0x1040, cme:0x1048) - v27:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v28:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -6002,15 +6002,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[100] = Const Value(100) v13:BasicObject = Send v6, :identity, v11 # SendFallbackReason: Bmethod: Proc object is not defined by an ISEQ CheckInterrupts @@ -6027,15 +6027,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = Send v6, 0x1000, :bmethod # SendFallbackReason: Send: unsupported method type Bmethod CheckInterrupts Return v11 @@ -6055,18 +6055,18 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:7: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Foo) - v22:Class[Foo@0x1008] = Const Value(VALUE(0x1008)) + v23:Class[Foo@0x1008] = Const Value(VALUE(0x1008)) v13:Fixnum[100] = Const Value(100) PatchPoint NoSingletonClass(Class@0x1010) PatchPoint MethodRedefined(Class@0x1010, identity@0x1018, cme:0x1020) @@ -6083,21 +6083,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:NilClass = Const Value(nil) PatchPoint MethodRedefined(NilClass@0x1000, nil?@0x1008, cme:0x1010) - v20:TrueClass = Const Value(true) + v21:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v20 + Return v21 "); } @@ -6111,15 +6111,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:NilClass = Const Value(nil) PatchPoint MethodRedefined(NilClass@0x1000, nil?@0x1008, cme:0x1010) IncrCounter inline_cfunc_optimized_send_count @@ -6136,21 +6136,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, nil?@0x1008, cme:0x1010) - v20:FalseClass = Const Value(false) + v21:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v20 + Return v21 "); } @@ -6164,15 +6164,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1000, nil?@0x1008, cme:0x1010) IncrCounter inline_cfunc_optimized_send_count @@ -6191,23 +6191,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :val@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(NilClass@0x1000, nil?@0x1008, cme:0x1010) - v22:NilClass = GuardType v9, NilClass - v23:TrueClass = Const Value(true) + v23:NilClass = GuardType v9, NilClass + v24:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v23 + Return v24 "); } @@ -6220,23 +6220,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :val@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(FalseClass@0x1000, nil?@0x1008, cme:0x1010) - v22:FalseClass = GuardType v9, FalseClass - v23:FalseClass = Const Value(false) + v23:FalseClass = GuardType v9, FalseClass + v24:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v23 + Return v24 "); } @@ -6249,23 +6249,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :val@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(TrueClass@0x1000, nil?@0x1008, cme:0x1010) - v22:TrueClass = GuardType v9, TrueClass - v23:FalseClass = Const Value(false) + v23:TrueClass = GuardType v9, TrueClass + v24:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v23 + Return v24 "); } @@ -6278,23 +6278,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :val@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Symbol@0x1000, nil?@0x1008, cme:0x1010) - v22:StaticSymbol = GuardType v9, StaticSymbol - v23:FalseClass = Const Value(false) + v23:StaticSymbol = GuardType v9, StaticSymbol + v24:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v23 + Return v24 "); } @@ -6307,23 +6307,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :val@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, nil?@0x1008, cme:0x1010) - v22:Fixnum = GuardType v9, Fixnum - v23:FalseClass = Const Value(false) + v23:Fixnum = GuardType v9, Fixnum + v24:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v23 + Return v24 "); } @@ -6336,23 +6336,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :val@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Float@0x1000, nil?@0x1008, cme:0x1010) - v22:Flonum = GuardType v9, Flonum - v23:FalseClass = Const Value(false) + v23:Flonum = GuardType v9, Flonum + v24:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v23 + Return v24 "); } @@ -6365,24 +6365,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :val@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, nil?@0x1008, cme:0x1010) - v23:StringExact = GuardType v9, StringExact - v24:FalseClass = Const Value(false) + v24:StringExact = GuardType v9, StringExact + v25:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -6395,24 +6395,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, !@0x1008, cme:0x1010) - v23:ArrayExact = GuardType v9, ArrayExact - v24:FalseClass = Const Value(false) + v24:ArrayExact = GuardType v9, ArrayExact + v25:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -6425,23 +6425,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(FalseClass@0x1000, !@0x1008, cme:0x1010) - v22:FalseClass = GuardType v9, FalseClass - v23:TrueClass = Const Value(true) + v23:FalseClass = GuardType v9, FalseClass + v24:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v23 + Return v24 "); } @@ -6454,23 +6454,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(NilClass@0x1000, !@0x1008, cme:0x1010) - v22:NilClass = GuardType v9, NilClass - v23:TrueClass = Const Value(true) + v23:NilClass = GuardType v9, NilClass + v24:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v23 + Return v24 "); } @@ -6486,35 +6486,35 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): CheckInterrupts v15:CBool = Test v9 v16:Falsy = RefineType v9, Falsy - IfFalse v15, bb3(v8, v16) + IfFalse v15, bb4(v8, v16) v18:Truthy = RefineType v9, Truthy v20:FalseClass = Const Value(false) CheckInterrupts - Jump bb4(v8, v18, v20) - bb3(v24:BasicObject, v25:Falsy): + Jump bb5(v8, v18, v20) + bb4(v24:BasicObject, v25:Falsy): v28:NilClass = Const Value(nil) - Jump bb4(v24, v25, v28) - bb4(v30:BasicObject, v31:BasicObject, v32:Falsy): + Jump bb5(v24, v25, v28) + bb5(v30:BasicObject, v31:BasicObject, v32:Falsy): PatchPoint MethodRedefined(NilClass@0x1000, !@0x1008, cme:0x1010) - v43:NilClass = GuardType v32, NilClass - v44:TrueClass = Const Value(true) + v44:NilClass = GuardType v32, NilClass + v45:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v44 + Return v45 "); } @@ -6527,27 +6527,27 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, empty?@0x1008, cme:0x1010) - v23:ArrayExact = GuardType v9, ArrayExact - v24:CInt64 = ArrayLength v23 - v25:CInt64[0] = Const CInt64(0) - v26:CBool = IsBitEqual v24, v25 - v27:BoolExact = BoxBool v26 + v24:ArrayExact = GuardType v9, ArrayExact + v25:CInt64 = ArrayLength v24 + v26:CInt64[0] = Const CInt64(0) + v27:CBool = IsBitEqual v25, v26 + v28:BoolExact = BoxBool v27 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v27 + Return v28 "); } @@ -6560,24 +6560,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Hash@0x1000) PatchPoint MethodRedefined(Hash@0x1000, empty?@0x1008, cme:0x1010) - v23:HashExact = GuardType v9, HashExact + v24:HashExact = GuardType v9, HashExact IncrCounter inline_cfunc_optimized_send_count - v25:BoolExact = CCall v23, :Hash#empty?@0x1038 + v26:BoolExact = CCall v24, :Hash#empty?@0x1038 CheckInterrupts - Return v25 + Return v26 "); } @@ -6591,27 +6591,27 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, ==@0x1008, cme:0x1010) - v27:HeapObject[class_exact:C] = GuardType v11, HeapObject[class_exact:C] - v28:CBool = IsBitEqual v27, v12 - v29:BoolExact = BoxBool v28 + v28:HeapObject[class_exact:C] = GuardType v11, HeapObject[class_exact:C] + v29:CBool = IsBitEqual v28, v12 + v30:BoolExact = BoxBool v29 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v29 + Return v30 "); } @@ -6624,26 +6624,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, &@0x1008, cme:0x1010) - v26:Fixnum = GuardType v11, Fixnum - v27:Fixnum = GuardType v12, Fixnum - v28:Fixnum = FixnumAnd v26, v27 + v27:Fixnum = GuardType v11, Fixnum + v28:Fixnum = GuardType v12, Fixnum + v29:Fixnum = FixnumAnd v27, v28 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -6656,26 +6656,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, |@0x1008, cme:0x1010) - v26:Fixnum = GuardType v11, Fixnum - v27:Fixnum = GuardType v12, Fixnum - v28:Fixnum = FixnumOr v26, v27 + v27:Fixnum = GuardType v11, Fixnum + v28:Fixnum = GuardType v12, Fixnum + v29:Fixnum = FixnumOr v27, v28 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -6690,22 +6690,22 @@ mod hir_opt_tests { assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:NilClass = Const Value(nil) + v22:NilClass = Const Value(nil) CheckInterrupts - Return v21 + Return v22 "); } @@ -6726,25 +6726,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:10: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) - v21:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v24:CShape = LoadField v21, :_shape_id@0x1038 - v25:CShape[0x1039] = GuardBitEquals v24, CShape(0x1039) - v26:BasicObject = LoadField v21, :@foo@0x103a + v22:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v25:CShape = LoadField v22, :_shape_id@0x1038 + v26:CShape[0x1039] = GuardBitEquals v25, CShape(0x1039) + v27:BasicObject = LoadField v22, :@foo@0x103a CheckInterrupts - Return v26 + Return v27 "); } @@ -6768,26 +6768,26 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:13: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) - v21:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v24:CShape = LoadField v21, :_shape_id@0x1038 - v25:CShape[0x1039] = GuardBitEquals v24, CShape(0x1039) - v26:CPtr = LoadField v21, :_as_heap@0x103a - v27:BasicObject = LoadField v26, :@foo@0x103b + v22:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v25:CShape = LoadField v22, :_shape_id@0x1038 + v26:CShape[0x1039] = GuardBitEquals v25, CShape(0x1039) + v27:CPtr = LoadField v22, :_as_heap@0x103a + v28:BasicObject = LoadField v27, :@foo@0x103b CheckInterrupts - Return v27 + Return v28 "); } @@ -6802,23 +6802,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("M.method(:test)"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode - v16:HeapBasicObject = GuardType v6, HeapBasicObject - v17:CShape = LoadField v16, :_shape_id@0x1000 - v18:CShape[0x1001] = GuardBitEquals v17, CShape(0x1001) - v19:CUInt16[0] = Const CUInt16(0) - v20:BasicObject = CCall v16, :rb_ivar_get_at_no_ractor_check@0x1008, v19 + v17:HeapBasicObject = GuardType v6, HeapBasicObject + v18:CShape = LoadField v17, :_shape_id@0x1000 + v19:CShape[0x1001] = GuardBitEquals v18, CShape(0x1001) + v20:CUInt16[0] = Const CUInt16(0) + v21:BasicObject = CCall v17, :rb_ivar_get_at_no_ractor_check@0x1008, v20 CheckInterrupts - Return v20 + Return v21 "); } @@ -6833,23 +6833,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("C.method(:test)"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode - v16:HeapBasicObject = GuardType v6, HeapBasicObject - v17:CShape = LoadField v16, :_shape_id@0x1000 - v18:CShape[0x1001] = GuardBitEquals v17, CShape(0x1001) - v19:CUInt16[0] = Const CUInt16(0) - v20:BasicObject = CCall v16, :rb_ivar_get_at_no_ractor_check@0x1008, v19 + v17:HeapBasicObject = GuardType v6, HeapBasicObject + v18:CShape = LoadField v17, :_shape_id@0x1000 + v19:CShape[0x1001] = GuardBitEquals v18, CShape(0x1001) + v20:CUInt16[0] = Const CUInt16(0) + v21:BasicObject = CCall v17, :rb_ivar_get_at_no_ractor_check@0x1008, v20 CheckInterrupts - Return v20 + Return v21 "); } @@ -6866,23 +6866,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("TEST"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode - v16:HeapBasicObject = GuardType v6, HeapBasicObject - v17:CShape = LoadField v16, :_shape_id@0x1000 - v18:CShape[0x1001] = GuardBitEquals v17, CShape(0x1001) - v19:CUInt16[0] = Const CUInt16(0) - v20:BasicObject = CCall v16, :rb_ivar_get_at_no_ractor_check@0x1008, v19 + v17:HeapBasicObject = GuardType v6, HeapBasicObject + v18:CShape = LoadField v17, :_shape_id@0x1000 + v19:CShape[0x1001] = GuardBitEquals v18, CShape(0x1001) + v20:CUInt16[0] = Const CUInt16(0) + v21:BasicObject = CCall v17, :rb_ivar_get_at_no_ractor_check@0x1008, v20 CheckInterrupts - Return v20 + Return v21 "); } @@ -6898,15 +6898,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("M.method(:test)"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): SideExit UnhandledYARVInsn(getinstancevariable) "); } @@ -6926,15 +6926,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("M.method(:test)"), @r" fn test@:7: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = Send v6, :foo # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts Return v11 @@ -6969,38 +6969,38 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:20: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:CBool = HasType v9, HeapObject[class_exact:C] - IfTrue v14, bb4(v8, v9, v9) + IfTrue v14, bb5(v8, v9, v9) v23:CBool = HasType v9, HeapObject[class_exact:C] - IfTrue v23, bb5(v8, v9, v9) + IfTrue v23, bb6(v8, v9, v9) v32:BasicObject = Send v9, :foo # SendFallbackReason: SendWithoutBlock: polymorphic fallback - Jump bb3(v8, v9, v32) - bb4(v15:BasicObject, v16:BasicObject, v17:BasicObject): + Jump bb4(v8, v9, v32) + bb5(v15:BasicObject, v16:BasicObject, v17:BasicObject): v19:HeapObject[class_exact:C] = RefineType v17, HeapObject[class_exact:C] PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) IncrCounter getivar_fallback_not_monomorphic - v44:BasicObject = GetIvar v19, :@foo - Jump bb3(v15, v16, v44) - bb5(v24:BasicObject, v25:BasicObject, v26:BasicObject): + v45:BasicObject = GetIvar v19, :@foo + Jump bb4(v15, v16, v45) + bb6(v24:BasicObject, v25:BasicObject, v26:BasicObject): v28:HeapObject[class_exact:C] = RefineType v26, HeapObject[class_exact:C] PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) IncrCounter getivar_fallback_not_monomorphic - v47:BasicObject = GetIvar v28, :@foo - Jump bb3(v24, v25, v47) - bb3(v34:BasicObject, v35:BasicObject, v36:BasicObject): + v48:BasicObject = GetIvar v28, :@foo + Jump bb4(v24, v25, v48) + bb4(v34:BasicObject, v35:BasicObject, v36:BasicObject): CheckInterrupts Return v36 "); @@ -7024,24 +7024,24 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:12: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) - v21:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v22:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] IncrCounter getivar_fallback_too_complex - v22:BasicObject = GetIvar v21, :@foo + v23:BasicObject = GetIvar v22, :@foo CheckInterrupts - Return v22 + Return v23 "); } @@ -7053,22 +7053,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:ArrayExact = ArrayDup v10 PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, map@0x1010, cme:0x1018) - v20:BasicObject = SendDirect v11, 0x1040, :map (0x1050) + v21:BasicObject = SendDirect v11, 0x1040, :map (0x1050) CheckInterrupts - Return v20 + Return v21 "); } @@ -7088,27 +7088,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:ArrayExact = NewArray PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, A) - v36:ArrayExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v37:ArrayExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1010, B) - v39:ArrayExact[VALUE(0x1018)] = Const Value(VALUE(0x1018)) + v40:ArrayExact[VALUE(0x1018)] = Const Value(VALUE(0x1018)) PatchPoint NoSingletonClass(Array@0x1020) PatchPoint MethodRedefined(Array@0x1020, zip@0x1028, cme:0x1030) - v43:BasicObject = CCallVariadic v36, :zip@0x1058, v39 + v44:BasicObject = CCallVariadic v37, :zip@0x1058, v40 v24:BasicObject = GetLocal :result, l0, EP@3 PatchPoint NoEPEscape(test) CheckInterrupts @@ -7124,17 +7124,17 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :block, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :block@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:ArrayExact = NewArray v15:CPtr = GetEP 0 v16:CInt64 = LoadField v15, :_env_data_index_flags@0x1000 @@ -7157,17 +7157,17 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :block, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :block@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:ArrayExact = NewArray v15:CPtr = GetEP 0 v16:CInt64 = LoadField v15, :_env_data_index_flags@0x1000 @@ -7194,15 +7194,15 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string_proc("test"), @r" fn block in test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact = NewArray v12:CPtr = GetEP 1 v13:CInt64 = LoadField v12, :_env_data_index_flags@0x1000 @@ -7230,21 +7230,21 @@ mod hir_opt_tests { assert_eq!(VALUE::fixnum_from_usize(2), result); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, foo@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] - v19:BasicObject = SendDirect v18, 0x1038, :foo (0x1048) + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v20:BasicObject = SendDirect v19, 0x1038, :foo (0x1048) CheckInterrupts - Return v19 + Return v20 "); } @@ -7262,25 +7262,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:7: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, O) - v20:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, foo@0x1018, cme:0x1020) - v25:CShape = LoadField v20, :_shape_id@0x1048 - v26:CShape[0x1049] = GuardBitEquals v25, CShape(0x1049) - v27:NilClass = Const Value(nil) + v26:CShape = LoadField v21, :_shape_id@0x1048 + v27:CShape[0x1049] = GuardBitEquals v26, CShape(0x1049) + v28:NilClass = Const Value(nil) CheckInterrupts - Return v27 + Return v28 "); } @@ -7298,25 +7298,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:7: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, O) - v20:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(C@0x1010) PatchPoint MethodRedefined(C@0x1010, foo@0x1018, cme:0x1020) - v25:CShape = LoadField v20, :_shape_id@0x1048 - v26:CShape[0x1049] = GuardBitEquals v25, CShape(0x1049) - v27:NilClass = Const Value(nil) + v26:CShape = LoadField v21, :_shape_id@0x1048 + v27:CShape[0x1049] = GuardBitEquals v26, CShape(0x1049) + v28:NilClass = Const Value(nil) CheckInterrupts - Return v27 + Return v28 "); } @@ -7333,25 +7333,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) - v21:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v24:CShape = LoadField v21, :_shape_id@0x1038 - v25:CShape[0x1039] = GuardBitEquals v24, CShape(0x1039) - v26:NilClass = Const Value(nil) + v22:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v25:CShape = LoadField v22, :_shape_id@0x1038 + v26:CShape[0x1039] = GuardBitEquals v25, CShape(0x1039) + v27:NilClass = Const Value(nil) CheckInterrupts - Return v26 + Return v27 "); } @@ -7368,25 +7368,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) - v21:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v24:CShape = LoadField v21, :_shape_id@0x1038 - v25:CShape[0x1039] = GuardBitEquals v24, CShape(0x1039) - v26:NilClass = Const Value(nil) + v22:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v25:CShape = LoadField v22, :_shape_id@0x1038 + v26:CShape[0x1039] = GuardBitEquals v25, CShape(0x1039) + v27:NilClass = Const Value(nil) CheckInterrupts - Return v26 + Return v27 "); } @@ -7403,26 +7403,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v16:Fixnum[5] = Const Value(5) PatchPoint MethodRedefined(C@0x1000, foo=@0x1008, cme:0x1010) - v26:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v29:CShape = LoadField v26, :_shape_id@0x1038 - v30:CShape[0x1039] = GuardBitEquals v29, CShape(0x1039) - StoreField v26, :@foo@0x103a, v16 - WriteBarrier v26, v16 - v33:CShape[0x103b] = Const CShape(0x103b) - StoreField v26, :_shape_id@0x1038, v33 + v27:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v30:CShape = LoadField v27, :_shape_id@0x1038 + v31:CShape[0x1039] = GuardBitEquals v30, CShape(0x1039) + StoreField v27, :@foo@0x103a, v16 + WriteBarrier v27, v16 + v34:CShape[0x103b] = Const CShape(0x103b) + StoreField v27, :_shape_id@0x1038, v34 CheckInterrupts Return v16 "); @@ -7441,26 +7441,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v16:Fixnum[5] = Const Value(5) PatchPoint MethodRedefined(C@0x1000, foo=@0x1008, cme:0x1010) - v26:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v29:CShape = LoadField v26, :_shape_id@0x1038 - v30:CShape[0x1039] = GuardBitEquals v29, CShape(0x1039) - StoreField v26, :@foo@0x103a, v16 - WriteBarrier v26, v16 - v33:CShape[0x103b] = Const CShape(0x103b) - StoreField v26, :_shape_id@0x1038, v33 + v27:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v30:CShape = LoadField v27, :_shape_id@0x1038 + v31:CShape[0x1039] = GuardBitEquals v30, CShape(0x1039) + StoreField v27, :@foo@0x103a, v16 + WriteBarrier v27, v16 + v34:CShape[0x103b] = Const CShape(0x103b) + StoreField v27, :_shape_id@0x1038, v34 CheckInterrupts Return v16 "); @@ -7476,23 +7476,23 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) - v21:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v22:BasicObject = LoadField v21, :foo@0x1038 + v22:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v23:BasicObject = LoadField v22, :foo@0x1038 CheckInterrupts - Return v22 + Return v23 "); } @@ -7506,24 +7506,24 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) - v21:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v22:CPtr = LoadField v21, :_as_heap@0x1038 - v23:BasicObject = LoadField v22, :foo@0x1039 + v22:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v23:CPtr = LoadField v22, :_as_heap@0x1038 + v24:BasicObject = LoadField v23, :foo@0x1039 CheckInterrupts - Return v23 + Return v24 "); } @@ -7540,20 +7540,20 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) - v25:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v26:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] v18:Fixnum[5] = Const Value(5) CheckInterrupts Return v18 @@ -7571,26 +7571,26 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@5 v3:BasicObject = GetLocal :v, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :o@1 v8:BasicObject = LoadArg :v@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo=@0x1008, cme:0x1010) - v29:HeapObject[class_exact:C] = GuardType v11, HeapObject[class_exact:C] - v30:CUInt64 = LoadField v29, :_rbasic_flags@0x1038 - v31:CUInt64 = GuardNoBitsSet v30, RUBY_FL_FREEZE=CUInt64(2048) - StoreField v29, :foo=@0x1039, v12 - WriteBarrier v29, v12 + v30:HeapObject[class_exact:C] = GuardType v11, HeapObject[class_exact:C] + v31:CUInt64 = LoadField v30, :_rbasic_flags@0x1038 + v32:CUInt64 = GuardNoBitsSet v31, RUBY_FL_FREEZE=CUInt64(2048) + StoreField v30, :foo=@0x1039, v12 + WriteBarrier v30, v12 CheckInterrupts Return v12 "); @@ -7607,27 +7607,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@5 v3:BasicObject = GetLocal :v, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :o@1 v8:BasicObject = LoadArg :v@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo=@0x1008, cme:0x1010) - v29:HeapObject[class_exact:C] = GuardType v11, HeapObject[class_exact:C] - v30:CUInt64 = LoadField v29, :_rbasic_flags@0x1038 - v31:CUInt64 = GuardNoBitsSet v30, RUBY_FL_FREEZE=CUInt64(2048) - v32:CPtr = LoadField v29, :_as_heap@0x1039 - StoreField v32, :foo=@0x103a, v12 - WriteBarrier v29, v12 + v30:HeapObject[class_exact:C] = GuardType v11, HeapObject[class_exact:C] + v31:CUInt64 = LoadField v30, :_rbasic_flags@0x1038 + v32:CUInt64 = GuardNoBitsSet v31, RUBY_FL_FREEZE=CUInt64(2048) + v33:CPtr = LoadField v30, :_as_heap@0x1039 + StoreField v33, :foo=@0x103a, v12 + WriteBarrier v30, v12 CheckInterrupts Return v12 "); @@ -7640,21 +7640,21 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact = NewArray PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, reverse@0x1008, cme:0x1010) - v20:ArrayExact = CCallWithFrame v10, :Array#reverse@0x1038 + v21:ArrayExact = CCallWithFrame v10, :Array#reverse@0x1038 CheckInterrupts - Return v20 + Return v21 "); } @@ -7668,15 +7668,15 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact = NewArray PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, reverse@0x1008, cme:0x1010) @@ -7693,23 +7693,23 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact = NewArray v12:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v13:StringExact = StringCopy v12 PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, join@0x1010, cme:0x1018) - v23:StringExact = CCallVariadic v10, :Array#join@0x1040, v13 + v24:StringExact = CCallVariadic v10, :Array#join@0x1040, v13 CheckInterrupts - Return v23 + Return v24 "); } @@ -7720,15 +7720,15 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:StringExact = StringCopy v10 PatchPoint NoSingletonClass(String@0x1008) @@ -7746,15 +7746,15 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:StringExact = StringCopy v10 PatchPoint NoSingletonClass(String@0x1008) @@ -7773,23 +7773,23 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, to_s@0x1008, cme:0x1010) - v22:StringExact = GuardType v9, StringExact + v23:StringExact = GuardType v9, StringExact IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v22 + Return v23 "); } @@ -7801,22 +7801,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, to_s@0x1008, cme:0x1010) - v21:Fixnum = GuardType v9, Fixnum - v22:StringExact = CCallVariadic v21, :Integer#to_s@0x1038 + v22:Fixnum = GuardType v9, Fixnum + v23:StringExact = CCallVariadic v22, :Integer#to_s@0x1038 CheckInterrupts - Return v22 + Return v23 "); } @@ -7828,22 +7828,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, to_s@0x1008, cme:0x1010) - v21:Integer = GuardType v9, Integer - v22:StringExact = CCallVariadic v21, :Integer#to_s@0x1038 + v22:Integer = GuardType v9, Integer + v23:StringExact = CCallVariadic v22, :Integer#to_s@0x1038 CheckInterrupts - Return v22 + Return v23 "); } @@ -7855,22 +7855,22 @@ mod hir_opt_tests { "##); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) - v26:Fixnum = GuardType v9, Fixnum + v27:Fixnum = GuardType v9, Fixnum PatchPoint MethodRedefined(Integer@0x1008, to_s@0x1010, cme:0x1018) - v30:StringExact = CCallVariadic v26, :Integer#to_s@0x1040 - v21:StringExact = StringConcat v13, v30 + v31:StringExact = CCallVariadic v27, :Integer#to_s@0x1040 + v21:StringExact = StringConcat v13, v31 CheckInterrupts Return v21 "); @@ -7886,31 +7886,31 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v14:ArrayExact = ArrayDup v13 v19:Fixnum[0] = Const Value(0) PatchPoint NoSingletonClass(Array@0x1008) PatchPoint MethodRedefined(Array@0x1008, []@0x1010, cme:0x1018) - v30:CInt64[0] = UnboxFixnum v19 - v31:CInt64 = ArrayLength v14 - v32:CInt64[0] = GuardLess v30, v31 - v33:CInt64[0] = Const CInt64(0) - v34:CInt64[0] = GuardGreaterEq v32, v33 - v35:BasicObject = ArrayAref v14, v34 + v31:CInt64[0] = UnboxFixnum v19 + v32:CInt64 = ArrayLength v14 + v33:CInt64[0] = GuardLess v31, v32 + v34:CInt64[0] = Const CInt64(0) + v35:CInt64[0] = GuardGreaterEq v33, v34 + v36:BasicObject = ArrayAref v14, v35 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v35 + Return v36 "); } @@ -7924,32 +7924,32 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@5 v3:BasicObject = GetLocal :idx, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :arr@1 v8:BasicObject = LoadArg :idx@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, []@0x1008, cme:0x1010) - v27:ArrayExact = GuardType v11, ArrayExact - v28:Fixnum = GuardType v12, Fixnum - v29:CInt64 = UnboxFixnum v28 - v30:CInt64 = ArrayLength v27 - v31:CInt64 = GuardLess v29, v30 - v32:CInt64[0] = Const CInt64(0) - v33:CInt64 = GuardGreaterEq v31, v32 - v34:BasicObject = ArrayAref v27, v33 + v28:ArrayExact = GuardType v11, ArrayExact + v29:Fixnum = GuardType v12, Fixnum + v30:CInt64 = UnboxFixnum v29 + v31:CInt64 = ArrayLength v28 + v32:CInt64 = GuardLess v30, v31 + v33:CInt64[0] = Const CInt64(0) + v34:CInt64 = GuardGreaterEq v32, v33 + v35:BasicObject = ArrayAref v28, v34 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v34 + Return v35 "); } @@ -7964,32 +7964,32 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@5 v3:BasicObject = GetLocal :idx, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :arr@1 v8:BasicObject = LoadArg :idx@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, []@0x1008, cme:0x1010) - v27:ArraySubclass[class_exact:C] = GuardType v11, ArraySubclass[class_exact:C] - v28:Fixnum = GuardType v12, Fixnum - v29:CInt64 = UnboxFixnum v28 - v30:CInt64 = ArrayLength v27 - v31:CInt64 = GuardLess v29, v30 - v32:CInt64[0] = Const CInt64(0) - v33:CInt64 = GuardGreaterEq v31, v32 - v34:BasicObject = ArrayAref v27, v33 + v28:ArraySubclass[class_exact:C] = GuardType v11, ArraySubclass[class_exact:C] + v29:Fixnum = GuardType v12, Fixnum + v30:CInt64 = UnboxFixnum v29 + v31:CInt64 = ArrayLength v28 + v32:CInt64 = GuardLess v30, v31 + v33:CInt64[0] = Const CInt64(0) + v34:CInt64 = GuardGreaterEq v32, v33 + v35:BasicObject = ArrayAref v28, v34 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v34 + Return v35 "); } @@ -8003,26 +8003,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:HashExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v14:HashExact = HashDup v13 v19:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Hash@0x1008) PatchPoint MethodRedefined(Hash@0x1008, []@0x1010, cme:0x1018) - v30:BasicObject = HashAref v14, v19 + v31:BasicObject = HashAref v14, v19 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -8036,26 +8036,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :hash, l0, SP@5 v3:BasicObject = GetLocal :key, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :hash@1 v8:BasicObject = LoadArg :key@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(Hash@0x1000) PatchPoint MethodRedefined(Hash@0x1000, []@0x1008, cme:0x1010) - v27:HashExact = GuardType v11, HashExact - v28:BasicObject = HashAref v27, v12 + v28:HashExact = GuardType v11, HashExact + v29:BasicObject = HashAref v28, v12 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -8070,25 +8070,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :hash, l0, SP@5 v3:BasicObject = GetLocal :key, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :hash@1 v8:BasicObject = LoadArg :key@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, []@0x1008, cme:0x1010) - v27:HashSubclass[class_exact:C] = GuardType v11, HashSubclass[class_exact:C] - v28:BasicObject = CCallWithFrame v27, :Hash#[]@0x1038, v12 + v28:HashSubclass[class_exact:C] = GuardType v11, HashSubclass[class_exact:C] + v29:BasicObject = CCallWithFrame v28, :Hash#[]@0x1038, v12 CheckInterrupts - Return v28 + Return v29 "); } @@ -8101,25 +8101,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, H) - v23:HashExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v24:HashExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) v13:StaticSymbol[:a] = Const Value(VALUE(0x1010)) PatchPoint NoSingletonClass(Hash@0x1018) PatchPoint MethodRedefined(Hash@0x1018, []@0x1020, cme:0x1028) - v27:BasicObject = HashAref v23, v13 + v28:BasicObject = HashAref v24, v13 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v27 + Return v28 "); } @@ -8133,17 +8133,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:HashExact = NewHash PatchPoint NoEPEscape(test) v22:Fixnum[1] = Const Value(1) @@ -8167,25 +8167,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :hash, l0, SP@6 v3:BasicObject = GetLocal :key, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :hash@1 v9:BasicObject = LoadArg :key@2 v10:BasicObject = LoadArg :val@3 - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(Hash@0x1000) PatchPoint MethodRedefined(Hash@0x1000, []=@0x1008, cme:0x1010) - v35:HashExact = GuardType v13, HashExact - HashAset v35, v14, v15 + v36:HashExact = GuardType v13, HashExact + HashAset v36, v14, v15 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts Return v15 @@ -8203,25 +8203,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :hash, l0, SP@6 v3:BasicObject = GetLocal :key, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :hash@1 v9:BasicObject = LoadArg :key@2 v10:BasicObject = LoadArg :val@3 - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, []=@0x1008, cme:0x1010) - v35:HashSubclass[class_exact:C] = GuardType v13, HashSubclass[class_exact:C] - v36:BasicObject = CCallWithFrame v35, :Hash#[]=@0x1038, v14, v15 + v36:HashSubclass[class_exact:C] = GuardType v13, HashSubclass[class_exact:C] + v37:BasicObject = CCallWithFrame v36, :Hash#[]=@0x1038, v14, v15 CheckInterrupts Return v15 "); @@ -8235,26 +8235,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Thread) - v20:Class[Thread@0x1008] = Const Value(VALUE(0x1008)) + v21:Class[Thread@0x1008] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(Class@0x1010) PatchPoint MethodRedefined(Class@0x1010, current@0x1018, cme:0x1020) - v24:CPtr = LoadEC - v25:CPtr = LoadField v24, :thread_ptr@0x1048 - v26:BasicObject = LoadField v25, :self@0x1049 + v25:CPtr = LoadEC + v26:CPtr = LoadField v25, :thread_ptr@0x1048 + v27:BasicObject = LoadField v26, :self@0x1049 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v26 + Return v27 "); } @@ -8268,33 +8268,33 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :arr@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v16:Fixnum[1] = Const Value(1) v18:Fixnum[10] = Const Value(10) PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, []=@0x1008, cme:0x1010) - v31:ArrayExact = GuardType v9, ArrayExact - v32:CUInt64 = LoadField v31, :_rbasic_flags@0x1038 - v33:CUInt64 = GuardNoBitsSet v32, RUBY_FL_FREEZE=CUInt64(2048) - v34:CUInt64 = LoadField v31, :_rbasic_flags@0x1038 - v35:CUInt64 = GuardNoBitsSet v34, RUBY_ELTS_SHARED=CUInt64(4096) - v36:CInt64[1] = UnboxFixnum v16 - v37:CInt64 = ArrayLength v31 - v38:CInt64[1] = GuardLess v36, v37 - v39:CInt64[0] = Const CInt64(0) - v40:CInt64[1] = GuardGreaterEq v38, v39 - ArrayAset v31, v40, v18 - WriteBarrier v31, v18 + v32:ArrayExact = GuardType v9, ArrayExact + v33:CUInt64 = LoadField v32, :_rbasic_flags@0x1038 + v34:CUInt64 = GuardNoBitsSet v33, RUBY_FL_FREEZE=CUInt64(2048) + v35:CUInt64 = LoadField v32, :_rbasic_flags@0x1038 + v36:CUInt64 = GuardNoBitsSet v35, RUBY_ELTS_SHARED=CUInt64(4096) + v37:CInt64[1] = UnboxFixnum v16 + v38:CInt64 = ArrayLength v32 + v39:CInt64[1] = GuardLess v37, v38 + v40:CInt64[0] = Const CInt64(0) + v41:CInt64[1] = GuardGreaterEq v39, v40 + ArrayAset v32, v41, v18 + WriteBarrier v32, v18 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts Return v18 @@ -8311,36 +8311,36 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@6 v3:BasicObject = GetLocal :index, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :arr@1 v9:BasicObject = LoadArg :index@2 v10:BasicObject = LoadArg :val@3 - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, []=@0x1008, cme:0x1010) - v35:ArrayExact = GuardType v13, ArrayExact - v36:Fixnum = GuardType v14, Fixnum - v37:CUInt64 = LoadField v35, :_rbasic_flags@0x1038 - v38:CUInt64 = GuardNoBitsSet v37, RUBY_FL_FREEZE=CUInt64(2048) - v39:CUInt64 = LoadField v35, :_rbasic_flags@0x1038 - v40:CUInt64 = GuardNoBitsSet v39, RUBY_ELTS_SHARED=CUInt64(4096) - v41:CInt64 = UnboxFixnum v36 - v42:CInt64 = ArrayLength v35 - v43:CInt64 = GuardLess v41, v42 - v44:CInt64[0] = Const CInt64(0) - v45:CInt64 = GuardGreaterEq v43, v44 - ArrayAset v35, v45, v15 - WriteBarrier v35, v15 + v36:ArrayExact = GuardType v13, ArrayExact + v37:Fixnum = GuardType v14, Fixnum + v38:CUInt64 = LoadField v36, :_rbasic_flags@0x1038 + v39:CUInt64 = GuardNoBitsSet v38, RUBY_FL_FREEZE=CUInt64(2048) + v40:CUInt64 = LoadField v36, :_rbasic_flags@0x1038 + v41:CUInt64 = GuardNoBitsSet v40, RUBY_ELTS_SHARED=CUInt64(4096) + v42:CInt64 = UnboxFixnum v37 + v43:CInt64 = ArrayLength v36 + v44:CInt64 = GuardLess v42, v43 + v45:CInt64[0] = Const CInt64(0) + v46:CInt64 = GuardGreaterEq v44, v45 + ArrayAset v36, v46, v15 + WriteBarrier v36, v15 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts Return v15 @@ -8359,25 +8359,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@6 v3:BasicObject = GetLocal :index, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :arr@1 v9:BasicObject = LoadArg :index@2 v10:BasicObject = LoadArg :val@3 - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(MyArray@0x1000) PatchPoint MethodRedefined(MyArray@0x1000, []=@0x1008, cme:0x1010) - v35:ArraySubclass[class_exact:MyArray] = GuardType v13, ArraySubclass[class_exact:MyArray] - v36:BasicObject = CCallVariadic v35, :Array#[]=@0x1038, v14, v15 + v36:ArraySubclass[class_exact:MyArray] = GuardType v13, ArraySubclass[class_exact:MyArray] + v37:BasicObject = CCallVariadic v36, :Array#[]=@0x1038, v14, v15 CheckInterrupts Return v15 "); @@ -8393,25 +8393,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :arr@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, <<@0x1008, cme:0x1010) - v25:ArrayExact = GuardType v9, ArrayExact - ArrayPush v25, v14 + v26:ArrayExact = GuardType v9, ArrayExact + ArrayPush v26, v14 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -8425,25 +8425,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :arr@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, push@0x1008, cme:0x1010) - v24:ArrayExact = GuardType v9, ArrayExact - ArrayPush v24, v14 + v25:ArrayExact = GuardType v9, ArrayExact + ArrayPush v25, v14 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -8457,26 +8457,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :arr@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) v16:Fixnum[2] = Const Value(2) v18:Fixnum[3] = Const Value(3) PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, push@0x1008, cme:0x1010) - v28:ArrayExact = GuardType v9, ArrayExact - v29:BasicObject = CCallVariadic v28, :Array#push@0x1038, v14, v16, v18 + v29:ArrayExact = GuardType v9, ArrayExact + v30:BasicObject = CCallVariadic v29, :Array#push@0x1038, v14, v16, v18 CheckInterrupts - Return v29 + Return v30 "); } @@ -8489,25 +8489,25 @@ mod hir_opt_tests { assert_contains_opcode("test", YARVINSN_opt_length); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :arr@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, length@0x1008, cme:0x1010) - v23:ArrayExact = GuardType v9, ArrayExact - v24:CInt64 = ArrayLength v23 - v25:Fixnum = BoxFixnum v24 + v24:ArrayExact = GuardType v9, ArrayExact + v25:CInt64 = ArrayLength v24 + v26:Fixnum = BoxFixnum v25 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -8520,25 +8520,25 @@ mod hir_opt_tests { assert_contains_opcode("test", YARVINSN_opt_size); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arr, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :arr@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Array@0x1000) PatchPoint MethodRedefined(Array@0x1000, size@0x1008, cme:0x1010) - v23:ArrayExact = GuardType v9, ArrayExact - v24:CInt64 = ArrayLength v23 - v25:Fixnum = BoxFixnum v24 + v24:ArrayExact = GuardType v9, ArrayExact + v25:CInt64 = ArrayLength v24 + v26:Fixnum = BoxFixnum v25 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -8551,24 +8551,24 @@ mod hir_opt_tests { assert_contains_opcode("test", YARVINSN_opt_regexpmatch2); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :s@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:RegexpExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, =~@0x1010, cme:0x1018) - v25:StringExact = GuardType v9, StringExact - v26:BasicObject = CCallWithFrame v25, :String#=~@0x1040, v14 + v26:StringExact = GuardType v9, StringExact + v27:BasicObject = CCallWithFrame v26, :String#=~@0x1040, v14 CheckInterrupts - Return v26 + Return v27 "); } @@ -8580,32 +8580,32 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@5 v3:BasicObject = GetLocal :i, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :s@1 v8:BasicObject = LoadArg :i@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, getbyte@0x1008, cme:0x1010) - v26:StringExact = GuardType v11, StringExact - v27:Fixnum = GuardType v12, Fixnum - v28:CInt64 = UnboxFixnum v27 - v29:CInt64 = LoadField v26, :len@0x1038 - v30:CInt64 = GuardLess v28, v29 - v31:CInt64[0] = Const CInt64(0) - v32:CInt64 = GuardGreaterEq v30, v31 - v33:Fixnum = StringGetbyte v26, v30 + v27:StringExact = GuardType v11, StringExact + v28:Fixnum = GuardType v12, Fixnum + v29:CInt64 = UnboxFixnum v28 + v30:CInt64 = LoadField v27, :len@0x1038 + v31:CInt64 = GuardLess v29, v30 + v32:CInt64[0] = Const CInt64(0) + v33:CInt64 = GuardGreaterEq v31, v32 + v34:Fixnum = StringGetbyte v27, v31 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v33 + Return v34 "); } @@ -8620,28 +8620,28 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@5 v3:BasicObject = GetLocal :i, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :s@1 v8:BasicObject = LoadArg :i@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, getbyte@0x1008, cme:0x1010) - v30:StringExact = GuardType v11, StringExact - v31:Fixnum = GuardType v12, Fixnum - v32:CInt64 = UnboxFixnum v31 - v33:CInt64 = LoadField v30, :len@0x1038 - v34:CInt64 = GuardLess v32, v33 - v35:CInt64[0] = Const CInt64(0) - v36:CInt64 = GuardGreaterEq v34, v35 + v31:StringExact = GuardType v11, StringExact + v32:Fixnum = GuardType v12, Fixnum + v33:CInt64 = UnboxFixnum v32 + v34:CInt64 = LoadField v31, :len@0x1038 + v35:CInt64 = GuardLess v33, v34 + v36:CInt64[0] = Const CInt64(0) + v37:CInt64 = GuardGreaterEq v35, v36 IncrCounter inline_cfunc_optimized_send_count v22:Fixnum[5] = Const Value(5) CheckInterrupts @@ -8659,37 +8659,37 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@6 v3:BasicObject = GetLocal :idx, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :s@1 v9:BasicObject = LoadArg :idx@2 v10:BasicObject = LoadArg :val@3 - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, setbyte@0x1008, cme:0x1010) - v30:StringExact = GuardType v13, StringExact - v31:Fixnum = GuardType v14, Fixnum - v32:Fixnum = GuardType v15, Fixnum - v33:CInt64 = UnboxFixnum v31 - v34:CInt64 = LoadField v30, :len@0x1038 - v35:CInt64 = GuardLess v33, v34 - v36:CInt64[0] = Const CInt64(0) - v37:CInt64 = GuardGreaterEq v35, v36 - v38:CUInt64 = LoadField v30, :_rbasic_flags@0x1039 - v39:CUInt64 = GuardNoBitsSet v38, RUBY_FL_FREEZE=CUInt64(2048) - v40:Fixnum = StringSetbyteFixnum v30, v31, v32 + v31:StringExact = GuardType v13, StringExact + v32:Fixnum = GuardType v14, Fixnum + v33:Fixnum = GuardType v15, Fixnum + v34:CInt64 = UnboxFixnum v32 + v35:CInt64 = LoadField v31, :len@0x1038 + v36:CInt64 = GuardLess v34, v35 + v37:CInt64[0] = Const CInt64(0) + v38:CInt64 = GuardGreaterEq v36, v37 + v39:CUInt64 = LoadField v31, :_rbasic_flags@0x1039 + v40:CUInt64 = GuardNoBitsSet v39, RUBY_FL_FREEZE=CUInt64(2048) + v41:Fixnum = StringSetbyteFixnum v31, v32, v33 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v32 + Return v33 "); } @@ -8705,37 +8705,37 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@6 v3:BasicObject = GetLocal :idx, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :s@1 v9:BasicObject = LoadArg :idx@2 v10:BasicObject = LoadArg :val@3 - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(MyString@0x1000) PatchPoint MethodRedefined(MyString@0x1000, setbyte@0x1008, cme:0x1010) - v30:StringSubclass[class_exact:MyString] = GuardType v13, StringSubclass[class_exact:MyString] - v31:Fixnum = GuardType v14, Fixnum - v32:Fixnum = GuardType v15, Fixnum - v33:CInt64 = UnboxFixnum v31 - v34:CInt64 = LoadField v30, :len@0x1038 - v35:CInt64 = GuardLess v33, v34 - v36:CInt64[0] = Const CInt64(0) - v37:CInt64 = GuardGreaterEq v35, v36 - v38:CUInt64 = LoadField v30, :_rbasic_flags@0x1039 - v39:CUInt64 = GuardNoBitsSet v38, RUBY_FL_FREEZE=CUInt64(2048) - v40:Fixnum = StringSetbyteFixnum v30, v31, v32 + v31:StringSubclass[class_exact:MyString] = GuardType v13, StringSubclass[class_exact:MyString] + v32:Fixnum = GuardType v14, Fixnum + v33:Fixnum = GuardType v15, Fixnum + v34:CInt64 = UnboxFixnum v32 + v35:CInt64 = LoadField v31, :len@0x1038 + v36:CInt64 = GuardLess v34, v35 + v37:CInt64[0] = Const CInt64(0) + v38:CInt64 = GuardGreaterEq v36, v37 + v39:CUInt64 = LoadField v31, :_rbasic_flags@0x1039 + v40:CUInt64 = GuardNoBitsSet v39, RUBY_FL_FREEZE=CUInt64(2048) + v41:Fixnum = StringSetbyteFixnum v31, v32, v33 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v32 + Return v33 "); } @@ -8749,27 +8749,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@6 v3:BasicObject = GetLocal :idx, l0, SP@5 v4:BasicObject = GetLocal :val, l0, SP@4 - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :s@1 v9:BasicObject = LoadArg :idx@2 v10:BasicObject = LoadArg :val@3 - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, setbyte@0x1008, cme:0x1010) - v30:StringExact = GuardType v13, StringExact - v31:BasicObject = CCallWithFrame v30, :String#setbyte@0x1038, v14, v15 + v31:StringExact = GuardType v13, StringExact + v32:BasicObject = CCallWithFrame v31, :String#setbyte@0x1038, v14, v15 CheckInterrupts - Return v31 + Return v32 "); } @@ -8783,27 +8783,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :s@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, empty?@0x1008, cme:0x1010) - v23:StringExact = GuardType v9, StringExact - v24:CInt64 = LoadField v23, :len@0x1038 - v25:CInt64[0] = Const CInt64(0) - v26:CBool = IsBitEqual v24, v25 - v27:BoolExact = BoxBool v26 + v24:StringExact = GuardType v9, StringExact + v25:CInt64 = LoadField v24, :len@0x1038 + v26:CInt64[0] = Const CInt64(0) + v27:CBool = IsBitEqual v25, v26 + v28:BoolExact = BoxBool v27 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v27 + Return v28 "); } @@ -8818,20 +8818,20 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :s@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, empty?@0x1008, cme:0x1010) - v27:StringExact = GuardType v9, StringExact + v28:StringExact = GuardType v9, StringExact IncrCounter inline_cfunc_optimized_send_count v19:Fixnum[4] = Const Value(4) CheckInterrupts @@ -8848,24 +8848,24 @@ mod hir_opt_tests { assert_contains_opcode("test", YARVINSN_opt_succ); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, succ@0x1008, cme:0x1010) - v22:Fixnum = GuardType v9, Fixnum - v23:Fixnum[1] = Const Value(1) - v24:Fixnum = FixnumAdd v22, v23 + v23:Fixnum = GuardType v9, Fixnum + v24:Fixnum[1] = Const Value(1) + v25:Fixnum = FixnumAdd v23, v24 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -8878,22 +8878,22 @@ mod hir_opt_tests { assert_contains_opcode("test", YARVINSN_opt_succ); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, succ@0x1008, cme:0x1010) - v22:Integer = GuardType v9, Integer - v23:BasicObject = CCallWithFrame v22, :Integer#succ@0x1038 + v23:Integer = GuardType v9, Integer + v24:BasicObject = CCallWithFrame v23, :Integer#succ@0x1038 CheckInterrupts - Return v23 + Return v24 "); } @@ -8906,24 +8906,24 @@ mod hir_opt_tests { assert_contains_opcode("test", YARVINSN_opt_ltlt); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[5] = Const Value(5) PatchPoint MethodRedefined(Integer@0x1000, <<@0x1008, cme:0x1010) - v24:Fixnum = GuardType v9, Fixnum - v25:Fixnum = FixnumLShift v24, v14 + v25:Fixnum = GuardType v9, Fixnum + v26:Fixnum = FixnumLShift v25, v14 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -8936,23 +8936,23 @@ mod hir_opt_tests { assert_contains_opcode("test", YARVINSN_opt_ltlt); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[-5] = Const Value(-5) PatchPoint MethodRedefined(Integer@0x1000, <<@0x1008, cme:0x1010) - v24:Fixnum = GuardType v9, Fixnum - v25:BasicObject = CCallWithFrame v24, :Integer#<<@0x1038, v14 + v25:Fixnum = GuardType v9, Fixnum + v26:BasicObject = CCallWithFrame v25, :Integer#<<@0x1038, v14 CheckInterrupts - Return v25 + Return v26 "); } @@ -8965,23 +8965,23 @@ mod hir_opt_tests { assert_contains_opcode("test", YARVINSN_opt_ltlt); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[64] = Const Value(64) PatchPoint MethodRedefined(Integer@0x1000, <<@0x1008, cme:0x1010) - v24:Fixnum = GuardType v9, Fixnum - v25:BasicObject = CCallWithFrame v24, :Integer#<<@0x1038, v14 + v25:Fixnum = GuardType v9, Fixnum + v26:BasicObject = CCallWithFrame v25, :Integer#<<@0x1038, v14 CheckInterrupts - Return v25 + Return v26 "); } @@ -8994,24 +8994,24 @@ mod hir_opt_tests { assert_contains_opcode("test", YARVINSN_opt_ltlt); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, <<@0x1008, cme:0x1010) - v26:Fixnum = GuardType v11, Fixnum - v27:BasicObject = CCallWithFrame v26, :Integer#<<@0x1038, v12 + v27:Fixnum = GuardType v11, Fixnum + v28:BasicObject = CCallWithFrame v27, :Integer#<<@0x1038, v12 CheckInterrupts - Return v27 + Return v28 "); } @@ -9023,24 +9023,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[5] = Const Value(5) PatchPoint MethodRedefined(Integer@0x1000, >>@0x1008, cme:0x1010) - v23:Fixnum = GuardType v9, Fixnum - v24:Fixnum = FixnumRShift v23, v14 + v24:Fixnum = GuardType v9, Fixnum + v25:Fixnum = FixnumRShift v24, v14 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -9052,23 +9052,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[-5] = Const Value(-5) PatchPoint MethodRedefined(Integer@0x1000, >>@0x1008, cme:0x1010) - v23:Fixnum = GuardType v9, Fixnum - v24:BasicObject = CCallWithFrame v23, :Integer#>>@0x1038, v14 + v24:Fixnum = GuardType v9, Fixnum + v25:BasicObject = CCallWithFrame v24, :Integer#>>@0x1038, v14 CheckInterrupts - Return v24 + Return v25 "); } @@ -9080,23 +9080,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[64] = Const Value(64) PatchPoint MethodRedefined(Integer@0x1000, >>@0x1008, cme:0x1010) - v23:Fixnum = GuardType v9, Fixnum - v24:BasicObject = CCallWithFrame v23, :Integer#>>@0x1038, v14 + v24:Fixnum = GuardType v9, Fixnum + v25:BasicObject = CCallWithFrame v24, :Integer#>>@0x1038, v14 CheckInterrupts - Return v24 + Return v25 "); } @@ -9108,24 +9108,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, >>@0x1008, cme:0x1010) - v25:Fixnum = GuardType v11, Fixnum - v26:BasicObject = CCallWithFrame v25, :Integer#>>@0x1038, v12 + v26:Fixnum = GuardType v11, Fixnum + v27:BasicObject = CCallWithFrame v26, :Integer#>>@0x1038, v12 CheckInterrupts - Return v26 + Return v27 "); } @@ -9137,27 +9137,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, <<@0x1008, cme:0x1010) - v27:StringExact = GuardType v11, StringExact - v28:String = GuardType v12, String - v29:StringExact = StringAppend v27, v28 + v28:StringExact = GuardType v11, StringExact + v29:String = GuardType v12, String + v30:StringExact = StringAppend v28, v29 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v27 + Return v28 "); } @@ -9169,27 +9169,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, <<@0x1008, cme:0x1010) - v27:StringExact = GuardType v11, StringExact - v28:Fixnum = GuardType v12, Fixnum - v29:StringExact = StringAppendCodepoint v27, v28 + v28:StringExact = GuardType v11, StringExact + v29:Fixnum = GuardType v12, Fixnum + v30:StringExact = StringAppendCodepoint v28, v29 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v27 + Return v28 "); } @@ -9203,27 +9203,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, <<@0x1008, cme:0x1010) - v27:StringExact = GuardType v11, StringExact - v28:String = GuardType v12, String - v29:StringExact = StringAppend v27, v28 + v28:StringExact = GuardType v11, StringExact + v29:String = GuardType v12, String + v30:StringExact = StringAppend v28, v29 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v27 + Return v28 "); } @@ -9237,25 +9237,25 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(MyString@0x1000) PatchPoint MethodRedefined(MyString@0x1000, <<@0x1008, cme:0x1010) - v27:StringSubclass[class_exact:MyString] = GuardType v11, StringSubclass[class_exact:MyString] - v28:BasicObject = CCallWithFrame v27, :String#<<@0x1038, v12 + v28:StringSubclass[class_exact:MyString] = GuardType v11, StringSubclass[class_exact:MyString] + v29:BasicObject = CCallWithFrame v28, :String#<<@0x1038, v12 CheckInterrupts - Return v28 + Return v29 "); } @@ -9266,23 +9266,23 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:StringExact = StringCopy v10 v13:StaticSymbol[:a] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(String@0x1010) PatchPoint MethodRedefined(String@0x1010, <<@0x1018, cme:0x1020) - v24:BasicObject = CCallWithFrame v11, :String#<<@0x1048, v13 + v25:BasicObject = CCallWithFrame v11, :String#<<@0x1048, v13 CheckInterrupts - Return v24 + Return v25 "); } @@ -9294,15 +9294,15 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[0] = Const Value(0) v12:Fixnum[3] = Const Value(3) v14:Fixnum[3] = Const Value(3) @@ -9321,24 +9321,24 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, ascii_only?@0x1008, cme:0x1010) - v22:StringExact = GuardType v9, StringExact + v23:StringExact = GuardType v9, StringExact IncrCounter inline_cfunc_optimized_send_count - v24:BoolExact = CCall v22, :String#ascii_only?@0x1038 + v25:BoolExact = CCall v23, :String#ascii_only?@0x1038 CheckInterrupts - Return v24 + Return v25 "); } @@ -9350,15 +9350,15 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[0] = Const Value(0) v12:BasicObject = Send v10, :foo # SendFallbackReason: Argument count does not match parameter count CheckInterrupts @@ -9373,15 +9373,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[4] = Const Value(4) v12:Fixnum[1] = Const Value(1) v14:BasicObject = Send v10, :succ, v12 # SendFallbackReason: SendWithoutBlock: unsupported method type Cfunc @@ -9398,26 +9398,26 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, ^@0x1008, cme:0x1010) - v25:Fixnum = GuardType v11, Fixnum - v26:Fixnum = GuardType v12, Fixnum - v27:Fixnum = FixnumXor v25, v26 + v26:Fixnum = GuardType v11, Fixnum + v27:Fixnum = GuardType v12, Fixnum + v28:Fixnum = FixnumXor v26, v27 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v27 + Return v28 "); } @@ -9432,22 +9432,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, ^@0x1008, cme:0x1010) - v29:Fixnum = GuardType v11, Fixnum - v30:Fixnum = GuardType v12, Fixnum + v30:Fixnum = GuardType v11, Fixnum + v31:Fixnum = GuardType v12, Fixnum IncrCounter inline_cfunc_optimized_send_count v22:Fixnum[42] = Const Value(42) CheckInterrupts @@ -9463,24 +9463,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, ^@0x1008, cme:0x1010) - v25:Integer = GuardType v11, Integer - v26:BasicObject = CCallWithFrame v25, :Integer#^@0x1038, v12 + v26:Integer = GuardType v11, Integer + v27:BasicObject = CCallWithFrame v26, :Integer#^@0x1038, v12 CheckInterrupts - Return v26 + Return v27 "); eval(" @@ -9489,24 +9489,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, ^@0x1008, cme:0x1010) - v25:Fixnum = GuardType v11, Fixnum - v26:BasicObject = CCallWithFrame v25, :Integer#^@0x1038, v12 + v26:Fixnum = GuardType v11, Fixnum + v27:BasicObject = CCallWithFrame v26, :Integer#^@0x1038, v12 CheckInterrupts - Return v26 + Return v27 "); eval(" @@ -9515,24 +9515,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint MethodRedefined(TrueClass@0x1000, ^@0x1008, cme:0x1010) - v25:TrueClass = GuardType v11, TrueClass - v26:BasicObject = CCallWithFrame v25, :TrueClass#^@0x1038, v12 + v26:TrueClass = GuardType v11, TrueClass + v27:BasicObject = CCallWithFrame v26, :TrueClass#^@0x1038, v12 CheckInterrupts - Return v26 + Return v27 "); } @@ -9543,19 +9543,19 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v17:BasicObject = Send v11, :^ # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts Return v17 @@ -9570,24 +9570,24 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :hash, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :hash@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Hash@0x1000) PatchPoint MethodRedefined(Hash@0x1000, size@0x1008, cme:0x1010) - v23:HashExact = GuardType v9, HashExact + v24:HashExact = GuardType v9, HashExact IncrCounter inline_cfunc_optimized_send_count - v25:Fixnum = CCall v23, :Hash#size@0x1038 + v26:Fixnum = CCall v24, :Hash#size@0x1038 CheckInterrupts - Return v25 + Return v26 "); } @@ -9602,20 +9602,20 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :hash, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :hash@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(Hash@0x1000) PatchPoint MethodRedefined(Hash@0x1000, size@0x1008, cme:0x1010) - v27:HashExact = GuardType v9, HashExact + v28:HashExact = GuardType v9, HashExact IncrCounter inline_cfunc_optimized_send_count v19:Fixnum[5] = Const Value(5) CheckInterrupts @@ -9634,27 +9634,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, respond_to?@0x1010, cme:0x1018) - v24:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v25:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1040, cme:0x1048) - v28:TrueClass = Const Value(true) + v29:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -9668,28 +9668,28 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, respond_to?@0x1010, cme:0x1018) - v24:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v25:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] PatchPoint MethodRedefined(C@0x1008, respond_to_missing?@0x1040, cme:0x1048) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1070, cme:0x1078) - v30:FalseClass = Const Value(false) + v31:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -9705,27 +9705,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, respond_to?@0x1010, cme:0x1018) - v24:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v25:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1040, cme:0x1048) - v28:FalseClass = Const Value(false) + v29:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -9741,28 +9741,28 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) v16:FalseClass = Const Value(false) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, respond_to?@0x1010, cme:0x1018) - v26:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v27:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1040, cme:0x1048) - v30:FalseClass = Const Value(false) + v31:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -9778,28 +9778,28 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) v16:NilClass = Const Value(nil) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, respond_to?@0x1010, cme:0x1018) - v26:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v27:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1040, cme:0x1048) - v30:FalseClass = Const Value(false) + v31:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -9815,28 +9815,28 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) v16:TrueClass = Const Value(true) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, respond_to?@0x1010, cme:0x1018) - v26:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v27:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1040, cme:0x1048) - v30:TrueClass = Const Value(true) + v31:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -9851,28 +9851,28 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) v16:Fixnum[4] = Const Value(4) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, respond_to?@0x1010, cme:0x1018) - v26:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v27:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1040, cme:0x1048) - v30:TrueClass = Const Value(true) + v31:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -9887,28 +9887,28 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) v16:NilClass = Const Value(nil) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, respond_to?@0x1010, cme:0x1018) - v26:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v27:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1040, cme:0x1048) - v30:TrueClass = Const Value(true) + v31:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -9922,28 +9922,28 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, respond_to?@0x1010, cme:0x1018) - v24:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v25:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] PatchPoint MethodRedefined(C@0x1008, respond_to_missing?@0x1040, cme:0x1048) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, foo@0x1070, cme:0x1078) - v30:FalseClass = Const Value(false) + v31:FalseClass = Const Value(false) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -9960,24 +9960,24 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:7: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) PatchPoint NoSingletonClass(C@0x1008) PatchPoint MethodRedefined(C@0x1008, respond_to?@0x1010, cme:0x1018) - v24:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] - v25:BasicObject = CCallVariadic v24, :Kernel#respond_to?@0x1040, v14 + v25:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v26:BasicObject = CCallVariadic v25, :Kernel#respond_to?@0x1040, v14 CheckInterrupts - Return v25 + Return v26 "); } @@ -9990,21 +9990,21 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count CheckInterrupts - Return v18 + Return v19 "); } @@ -10018,22 +10018,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:StringExact[VALUE(0x1038)] = Const Value(VALUE(0x1038)) + v22:StringExact[VALUE(0x1038)] = Const Value(VALUE(0x1038)) CheckInterrupts - Return v21 + Return v22 "); } @@ -10046,22 +10046,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:NilClass = Const Value(nil) + v22:NilClass = Const Value(nil) CheckInterrupts - Return v21 + Return v22 "); } @@ -10074,22 +10074,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:TrueClass = Const Value(true) + v22:TrueClass = Const Value(true) CheckInterrupts - Return v21 + Return v22 "); } @@ -10102,22 +10102,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:FalseClass = Const Value(false) + v22:FalseClass = Const Value(false) CheckInterrupts - Return v21 + Return v22 "); } @@ -10130,22 +10130,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:Fixnum[0] = Const Value(0) + v22:Fixnum[0] = Const Value(0) CheckInterrupts - Return v21 + Return v22 "); } @@ -10158,22 +10158,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:Fixnum[1] = Const Value(1) + v22:Fixnum[1] = Const Value(1) CheckInterrupts - Return v21 + Return v22 "); } @@ -10186,19 +10186,19 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[3] = Const Value(3) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v20:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v21:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count CheckInterrupts Return v11 @@ -10214,21 +10214,21 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) v13:Fixnum[2] = Const Value(2) v15:Fixnum[3] = Const Value(3) PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v24:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v25:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count CheckInterrupts Return v15 @@ -10251,17 +10251,17 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:ArrayExact = NewArray v19:ArrayExact = ToArray v13 IncrCounter complex_arg_pass_caller_splat @@ -10289,22 +10289,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Symbol@0x1000, to_sym@0x1008, cme:0x1010) - v20:StaticSymbol = GuardType v9, StaticSymbol + v21:StaticSymbol = GuardType v9, StaticSymbol IncrCounter inline_iseq_optimized_send_count CheckInterrupts - Return v20 + Return v21 "); } @@ -10316,22 +10316,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(Integer@0x1000, to_i@0x1008, cme:0x1010) - v20:Fixnum = GuardType v9, Fixnum + v21:Fixnum = GuardType v9, Fixnum IncrCounter inline_iseq_optimized_send_count CheckInterrupts - Return v20 + Return v21 "); } @@ -10347,22 +10347,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:Fixnum[123] = Const Value(123) + v22:Fixnum[123] = Const Value(123) CheckInterrupts - Return v21 + Return v22 "); } @@ -10378,22 +10378,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:Fixnum[123] = Const Value(123) + v22:Fixnum[123] = Const Value(123) CheckInterrupts - Return v21 + Return v22 "); } @@ -10409,22 +10409,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, callee@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v21:Fixnum[123] = Const Value(123) + v22:Fixnum[123] = Const Value(123) CheckInterrupts - Return v21 + Return v22 "); } @@ -10440,15 +10440,15 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:StaticSymbol[:the_block] = Const Value(VALUE(0x1000)) v13:BasicObject = Send v6, 0x1008, :callee, v11 # SendFallbackReason: Uncategorized(send) CheckInterrupts @@ -10464,27 +10464,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :l@1 v8:BasicObject = LoadArg :r@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) - PatchPoint MethodRedefined(String@0x1000, ==@0x1008, cme:0x1010) - v27:StringExact = GuardType v11, StringExact - v28:String = GuardType v12, String - v29:BoolExact = CCall v27, :String#==@0x1038, v28 + PatchPoint MethodRedefined(String@0x1000, ==@0x1008, cme:0x1010) + v28:StringExact = GuardType v11, StringExact + v29:String = GuardType v12, String + v30:BoolExact = CCall v28, :String#==@0x1038, v29 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v29 + Return v30 "); } @@ -10498,27 +10498,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :l@1 v8:BasicObject = LoadArg :r@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, ==@0x1008, cme:0x1010) - v27:StringSubclass[class_exact:C] = GuardType v11, StringSubclass[class_exact:C] - v28:String = GuardType v12, String - v29:BoolExact = CCall v27, :String#==@0x1038, v28 + v28:StringSubclass[class_exact:C] = GuardType v11, StringSubclass[class_exact:C] + v29:String = GuardType v12, String + v30:BoolExact = CCall v28, :String#==@0x1038, v29 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v29 + Return v30 "); } @@ -10532,27 +10532,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :l@1 v8:BasicObject = LoadArg :r@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, ==@0x1008, cme:0x1010) - v27:StringExact = GuardType v11, StringExact - v28:String = GuardType v12, String - v29:BoolExact = CCall v27, :String#==@0x1038, v28 + v28:StringExact = GuardType v11, StringExact + v29:String = GuardType v12, String + v30:BoolExact = CCall v28, :String#==@0x1038, v29 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v29 + Return v30 "); } @@ -10564,27 +10564,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :l@1 v8:BasicObject = LoadArg :r@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, ===@0x1008, cme:0x1010) - v26:StringExact = GuardType v11, StringExact - v27:String = GuardType v12, String - v28:BoolExact = CCall v26, :String#==@0x1038, v27 + v27:StringExact = GuardType v11, StringExact + v28:String = GuardType v12, String + v29:BoolExact = CCall v27, :String#==@0x1038, v28 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -10598,27 +10598,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :l@1 v8:BasicObject = LoadArg :r@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, ===@0x1008, cme:0x1010) - v26:StringSubclass[class_exact:C] = GuardType v11, StringSubclass[class_exact:C] - v27:String = GuardType v12, String - v28:BoolExact = CCall v26, :String#==@0x1038, v27 + v27:StringSubclass[class_exact:C] = GuardType v11, StringSubclass[class_exact:C] + v28:String = GuardType v12, String + v29:BoolExact = CCall v27, :String#==@0x1038, v28 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -10632,27 +10632,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :l, l0, SP@5 v3:BasicObject = GetLocal :r, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :l@1 v8:BasicObject = LoadArg :r@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, ===@0x1008, cme:0x1010) - v26:StringExact = GuardType v11, StringExact - v27:String = GuardType v12, String - v28:BoolExact = CCall v26, :String#==@0x1038, v27 + v27:StringExact = GuardType v11, StringExact + v28:String = GuardType v12, String + v29:BoolExact = CCall v27, :String#==@0x1038, v28 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v28 + Return v29 "); } @@ -10666,24 +10666,24 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :s@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, size@0x1008, cme:0x1010) - v23:StringExact = GuardType v9, StringExact + v24:StringExact = GuardType v9, StringExact IncrCounter inline_cfunc_optimized_send_count - v25:Fixnum = CCall v23, :String#size@0x1038 + v26:Fixnum = CCall v24, :String#size@0x1038 CheckInterrupts - Return v25 + Return v26 "); } @@ -10698,20 +10698,20 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :s@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, size@0x1008, cme:0x1010) - v27:StringExact = GuardType v9, StringExact + v28:StringExact = GuardType v9, StringExact IncrCounter inline_cfunc_optimized_send_count v19:Fixnum[5] = Const Value(5) CheckInterrupts @@ -10729,25 +10729,25 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :s@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, bytesize@0x1008, cme:0x1010) - v22:StringExact = GuardType v9, StringExact - v23:CInt64 = LoadField v22, :len@0x1038 - v24:Fixnum = BoxFixnum v23 + v23:StringExact = GuardType v9, StringExact + v24:CInt64 = LoadField v23, :len@0x1038 + v25:Fixnum = BoxFixnum v24 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v24 + Return v25 "); } @@ -10762,20 +10762,20 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :s@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, bytesize@0x1008, cme:0x1010) - v26:StringExact = GuardType v9, StringExact + v27:StringExact = GuardType v9, StringExact IncrCounter inline_cfunc_optimized_send_count v18:Fixnum[5] = Const Value(5) CheckInterrupts @@ -10793,24 +10793,24 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :s@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, length@0x1008, cme:0x1010) - v23:StringExact = GuardType v9, StringExact + v24:StringExact = GuardType v9, StringExact IncrCounter inline_cfunc_optimized_send_count - v25:Fixnum = CCall v23, :String#length@0x1038 + v26:Fixnum = CCall v24, :String#length@0x1038 CheckInterrupts - Return v25 + Return v26 "); } @@ -10822,27 +10822,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, String) - v26:Class[String@0x1008] = Const Value(VALUE(0x1008)) + v27:Class[String@0x1008] = Const Value(VALUE(0x1008)) PatchPoint NoEPEscape(test) PatchPoint NoSingletonClass(Class@0x1010) PatchPoint MethodRedefined(Class@0x1010, ===@0x1018, cme:0x1020) - v30:BoolExact = IsA v9, v26 + v31:BoolExact = IsA v9, v27 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v30 + Return v31 "); } @@ -10854,27 +10854,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Kernel) - v26:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v27:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoEPEscape(test) PatchPoint NoSingletonClass(Module@0x1010) PatchPoint MethodRedefined(Module@0x1010, ===@0x1018, cme:0x1020) IncrCounter inline_cfunc_optimized_send_count - v31:BoolExact = CCall v26, :Module#===@0x1048, v9 + v32:BoolExact = CCall v27, :Module#===@0x1048, v9 CheckInterrupts - Return v31 + Return v32 "); } @@ -10886,27 +10886,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, String) - v24:Class[String@0x1008] = Const Value(VALUE(0x1008)) + v25:Class[String@0x1008] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, is_a?@0x1009, cme:0x1010) - v28:StringExact = GuardType v9, StringExact - v29:BoolExact = IsA v28, v24 + v29:StringExact = GuardType v9, StringExact + v30:BoolExact = IsA v29, v25 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v29 + Return v30 "); } @@ -10918,26 +10918,26 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Kernel) - v24:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v25:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(String@0x1010) PatchPoint MethodRedefined(String@0x1010, is_a?@0x1018, cme:0x1020) - v28:StringExact = GuardType v9, StringExact - v29:BasicObject = CCallWithFrame v28, :Kernel#is_a?@0x1048, v24 + v29:StringExact = GuardType v9, StringExact + v30:BasicObject = CCallWithFrame v29, :Kernel#is_a?@0x1048, v25 CheckInterrupts - Return v29 + Return v30 "); } @@ -10952,23 +10952,23 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Integer) - v28:Class[Integer@0x1008] = Const Value(VALUE(0x1008)) + v29:Class[Integer@0x1008] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(String@0x1010) PatchPoint MethodRedefined(String@0x1010, is_a?@0x1018, cme:0x1020) - v32:StringExact = GuardType v9, StringExact + v33:StringExact = GuardType v9, StringExact IncrCounter inline_cfunc_optimized_send_count v21:Fixnum[5] = Const Value(5) CheckInterrupts @@ -10987,20 +10987,20 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Integer) - v30:Class[Integer@0x1008] = Const Value(VALUE(0x1008)) + v31:Class[Integer@0x1008] = Const Value(VALUE(0x1008)) PatchPoint NoEPEscape(test) PatchPoint NoSingletonClass(Class@0x1010) PatchPoint MethodRedefined(Class@0x1010, ===@0x1018, cme:0x1020) @@ -11019,27 +11019,27 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, String) - v24:Class[String@0x1008] = Const Value(VALUE(0x1008)) + v25:Class[String@0x1008] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(String@0x1008) PatchPoint MethodRedefined(String@0x1008, kind_of?@0x1009, cme:0x1010) - v28:StringExact = GuardType v9, StringExact - v29:BoolExact = IsA v28, v24 + v29:StringExact = GuardType v9, StringExact + v30:BoolExact = IsA v29, v25 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v29 + Return v30 "); } @@ -11051,26 +11051,26 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Kernel) - v24:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v25:ModuleExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(String@0x1010) PatchPoint MethodRedefined(String@0x1010, kind_of?@0x1018, cme:0x1020) - v28:StringExact = GuardType v9, StringExact - v29:BasicObject = CCallWithFrame v28, :Kernel#kind_of?@0x1048, v24 + v29:StringExact = GuardType v9, StringExact + v30:BasicObject = CCallWithFrame v29, :Kernel#kind_of?@0x1048, v25 CheckInterrupts - Return v29 + Return v30 "); } @@ -11085,23 +11085,23 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Integer) - v28:Class[Integer@0x1008] = Const Value(VALUE(0x1008)) + v29:Class[Integer@0x1008] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(String@0x1010) PatchPoint MethodRedefined(String@0x1010, kind_of?@0x1018, cme:0x1020) - v32:StringExact = GuardType v9, StringExact + v33:StringExact = GuardType v9, StringExact IncrCounter inline_cfunc_optimized_send_count v21:Fixnum[5] = Const Value(5) CheckInterrupts @@ -11118,15 +11118,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[1] = Const Value(1) IncrCounter complex_arg_pass_param_rest IncrCounter complex_arg_pass_param_block @@ -11146,15 +11146,15 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("call_forwardable"), @r" fn call_forwardable@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): IncrCounter complex_arg_pass_param_forwardable v11:BasicObject = Send v6, :forwardable # SendFallbackReason: Complex argument passing CheckInterrupts @@ -11173,20 +11173,20 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :s@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(String@0x1000) PatchPoint MethodRedefined(String@0x1000, length@0x1008, cme:0x1010) - v27:StringExact = GuardType v9, StringExact + v28:StringExact = GuardType v9, StringExact IncrCounter inline_cfunc_optimized_send_count v19:Fixnum[4] = Const Value(4) CheckInterrupts @@ -11216,20 +11216,20 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string_proc("TEST"), @r" fn initialize@:9: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, class@0x1008, cme:0x1010) - v42:HeapObject[class_exact:C] = GuardType v6, HeapObject[class_exact:C] + v43:HeapObject[class_exact:C] = GuardType v6, HeapObject[class_exact:C] IncrCounter inline_iseq_optimized_send_count - v46:Class[C@0x1000] = Const Value(VALUE(0x1000)) + v47:Class[C@0x1000] = Const Value(VALUE(0x1000)) IncrCounter inline_cfunc_optimized_send_count v13:StaticSymbol[:_lex_actions] = Const Value(VALUE(0x1038)) v15:TrueClass = Const Value(true) @@ -11237,7 +11237,7 @@ mod hir_opt_tests { PatchPoint MethodRedefined(Class@0x1040, respond_to?@0x1048, cme:0x1050) PatchPoint NoSingletonClass(Class@0x1040) PatchPoint MethodRedefined(Class@0x1040, _lex_actions@0x1078, cme:0x1080) - v54:TrueClass = Const Value(true) + v55:TrueClass = Const Value(true) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts v26:StaticSymbol[:CORRECT] = Const Value(VALUE(0x10a8)) @@ -11255,29 +11255,29 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, class@0x1008, cme:0x1010) - v23:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v24:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] IncrCounter inline_iseq_optimized_send_count - v27:Class[C@0x1000] = Const Value(VALUE(0x1000)) + v28:Class[C@0x1000] = Const Value(VALUE(0x1000)) IncrCounter inline_cfunc_optimized_send_count PatchPoint NoSingletonClass(Class@0x1038) PatchPoint MethodRedefined(Class@0x1038, name@0x1040, cme:0x1048) IncrCounter inline_cfunc_optimized_send_count - v33:StringExact|NilClass = CCall v27, :Module#name@0x1070 + v34:StringExact|NilClass = CCall v28, :Module#name@0x1070 CheckInterrupts - Return v33 + Return v34 "); } @@ -11290,25 +11290,25 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, class@0x1008, cme:0x1010) - v21:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] + v22:HeapObject[class_exact:C] = GuardType v9, HeapObject[class_exact:C] IncrCounter inline_iseq_optimized_send_count - v25:Class[C@0x1000] = Const Value(VALUE(0x1000)) + v26:Class[C@0x1000] = Const Value(VALUE(0x1000)) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -11320,22 +11320,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[5] = Const Value(5) PatchPoint MethodRedefined(Integer@0x1000, class@0x1008, cme:0x1010) IncrCounter inline_iseq_optimized_send_count - v21:Class[Integer@0x1000] = Const Value(VALUE(0x1000)) + v22:Class[Integer@0x1000] = Const Value(VALUE(0x1000)) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v21 + Return v22 "); } @@ -11347,23 +11347,23 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(Object@0x1000) PatchPoint MethodRedefined(Object@0x1000, class@0x1008, cme:0x1010) - v18:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] + v19:HeapObject[class_exact*:Object@VALUE(0x1000)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1000)] IncrCounter inline_iseq_optimized_send_count - v22:Class[Object@0x1038] = Const Value(VALUE(0x1038)) + v23:Class[Object@0x1038] = Const Value(VALUE(0x1038)) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v22 + Return v23 "); } @@ -11388,43 +11388,43 @@ mod hir_opt_tests { assert_eq!(Qtrue, formatted, "{}", formatted.obj_info()); assert_snapshot!(hir_string("read_nil_local"), @r" fn read_nil_local@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@7 v3:BasicObject = GetLocal :_b, l0, SP@6 v4:BasicObject = GetLocal :_c, l0, SP@5 v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :a@1 v10:BasicObject = LoadArg :_b@2 v11:BasicObject = LoadArg :_c@3 v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:BasicObject, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:BasicObject, v18:NilClass): CheckInterrupts SetLocal :formatted, l0, EP@3, v15 PatchPoint SingleRactorMode - v57:HeapBasicObject = GuardType v14, HeapBasicObject - v58:CShape = LoadField v57, :_shape_id@0x1000 - v59:CShape[0x1001] = GuardBitEquals v58, CShape(0x1001) - StoreField v57, :@formatted@0x1002, v15 - WriteBarrier v57, v15 - v62:CShape[0x1003] = Const CShape(0x1003) - StoreField v57, :_shape_id@0x1000, v62 + v58:HeapBasicObject = GuardType v14, HeapBasicObject + v59:CShape = LoadField v58, :_shape_id@0x1000 + v60:CShape[0x1001] = GuardBitEquals v59, CShape(0x1001) + StoreField v58, :@formatted@0x1002, v15 + WriteBarrier v58, v15 + v63:CShape[0x1003] = Const CShape(0x1003) + StoreField v58, :_shape_id@0x1000, v63 v46:Class[VMFrozenCore] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(Class@0x1010) PatchPoint MethodRedefined(Class@0x1010, lambda@0x1018, cme:0x1020) - v67:BasicObject = CCallWithFrame v46, :RubyVM::FrozenCore.lambda@0x1048, block=0x1050 + v68:BasicObject = CCallWithFrame v46, :RubyVM::FrozenCore.lambda@0x1048, block=0x1050 v49:BasicObject = GetLocal :a, l0, EP@6 v50:BasicObject = GetLocal :_b, l0, EP@5 v51:BasicObject = GetLocal :_c, l0, EP@4 v52:BasicObject = GetLocal :formatted, l0, EP@3 CheckInterrupts - Return v67 + Return v68 "); } @@ -11447,23 +11447,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:11: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, FROZEN_OBJ) - v20:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(TestFrozen@0x1010) PatchPoint MethodRedefined(TestFrozen@0x1010, a@0x1018, cme:0x1020) - v29:Fixnum[1] = Const Value(1) + v30:Fixnum[1] = Const Value(1) CheckInterrupts - Return v29 + Return v30 "); } @@ -11488,23 +11488,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:13: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, MULTI_FROZEN) - v20:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(TestMultiIvars@0x1010) PatchPoint MethodRedefined(TestMultiIvars@0x1010, b@0x1018, cme:0x1020) - v29:Fixnum[20] = Const Value(20) + v30:Fixnum[20] = Const Value(20) CheckInterrupts - Return v29 + Return v30 "); } @@ -11527,23 +11527,23 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:11: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, FROZEN_STR) - v20:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(TestFrozenStr@0x1010) PatchPoint MethodRedefined(TestFrozenStr@0x1010, name@0x1018, cme:0x1020) - v29:StringExact[VALUE(0x1048)] = Const Value(VALUE(0x1048)) + v30:StringExact[VALUE(0x1048)] = Const Value(VALUE(0x1048)) CheckInterrupts - Return v29 + Return v30 "); } @@ -11566,23 +11566,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:11: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, FROZEN_NIL) - v20:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(TestFrozenNil@0x1010) PatchPoint MethodRedefined(TestFrozenNil@0x1010, value@0x1018, cme:0x1020) - v29:NilClass = Const Value(nil) + v30:NilClass = Const Value(nil) CheckInterrupts - Return v29 + Return v30 "); } @@ -11605,25 +11605,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:11: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, UNFROZEN_OBJ) - v20:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(TestUnfrozen@0x1010) PatchPoint MethodRedefined(TestUnfrozen@0x1010, a@0x1018, cme:0x1020) - v25:CShape = LoadField v20, :_shape_id@0x1048 - v26:CShape[0x1049] = GuardBitEquals v25, CShape(0x1049) - v27:BasicObject = LoadField v20, :@a@0x104a + v26:CShape = LoadField v21, :_shape_id@0x1048 + v27:CShape[0x1049] = GuardBitEquals v26, CShape(0x1049) + v28:BasicObject = LoadField v21, :@a@0x104a CheckInterrupts - Return v27 + Return v28 "); } @@ -11646,23 +11646,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:11: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, FROZEN_READER) - v20:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(TestAttrReader@0x1010) PatchPoint MethodRedefined(TestAttrReader@0x1010, value@0x1018, cme:0x1020) - v29:Fixnum[42] = Const Value(42) + v30:Fixnum[42] = Const Value(42) CheckInterrupts - Return v29 + Return v30 "); } @@ -11685,23 +11685,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:11: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, FROZEN_SYM) - v20:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(TestFrozenSym@0x1010) PatchPoint MethodRedefined(TestFrozenSym@0x1010, sym@0x1018, cme:0x1020) - v29:StaticSymbol[:hello] = Const Value(VALUE(0x1048)) + v30:StaticSymbol[:hello] = Const Value(VALUE(0x1048)) CheckInterrupts - Return v29 + Return v30 "); } @@ -11724,23 +11724,23 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:11: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, FROZEN_TRUE) - v20:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(TestFrozenBool@0x1010) PatchPoint MethodRedefined(TestFrozenBool@0x1010, flag@0x1018, cme:0x1020) - v29:TrueClass = Const Value(true) + v30:TrueClass = Const Value(true) CheckInterrupts - Return v29 + Return v30 "); } @@ -11762,25 +11762,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:9: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :obj, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :obj@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint NoSingletonClass(TestDynamic@0x1000) PatchPoint MethodRedefined(TestDynamic@0x1000, val@0x1008, cme:0x1010) - v21:HeapObject[class_exact:TestDynamic] = GuardType v9, HeapObject[class_exact:TestDynamic] - v24:CShape = LoadField v21, :_shape_id@0x1038 - v25:CShape[0x1039] = GuardBitEquals v24, CShape(0x1039) - v26:BasicObject = LoadField v21, :@val@0x103a + v22:HeapObject[class_exact:TestDynamic] = GuardType v9, HeapObject[class_exact:TestDynamic] + v25:CShape = LoadField v22, :_shape_id@0x1038 + v26:CShape[0x1039] = GuardBitEquals v25, CShape(0x1039) + v27:BasicObject = LoadField v22, :@val@0x103a CheckInterrupts - Return v26 + Return v27 "); } @@ -11804,32 +11804,32 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:12: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, NESTED_FROZEN) - v28:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v29:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(TestNestedAccess@0x1010) PatchPoint MethodRedefined(TestNestedAccess@0x1010, x@0x1018, cme:0x1020) - v53:Fixnum[100] = Const Value(100) + v54:Fixnum[100] = Const Value(100) PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1048, NESTED_FROZEN) - v34:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v35:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(TestNestedAccess@0x1010) PatchPoint MethodRedefined(TestNestedAccess@0x1010, y@0x1050, cme:0x1058) - v55:Fixnum[200] = Const Value(200) + v56:Fixnum[200] = Const Value(200) PatchPoint MethodRedefined(Integer@0x1080, +@0x1088, cme:0x1090) - v56:Fixnum[300] = Const Value(300) + v57:Fixnum[300] = Const Value(300) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v56 + Return v57 "); } @@ -11842,25 +11842,25 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, S) - v20:StringExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v21:StringExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) PatchPoint NoSingletonClass(String@0x1010) PatchPoint MethodRedefined(String@0x1010, bytesize@0x1018, cme:0x1020) - v24:CInt64 = LoadField v20, :len@0x1048 - v25:Fixnum = BoxFixnum v24 + v25:CInt64 = LoadField v21, :len@0x1048 + v26:Fixnum = BoxFixnum v25 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v25 + Return v26 "); } @@ -11875,22 +11875,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string_proc("C.instance_method(:callprivate)"), @r" fn callprivate@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, secret@0x1008, cme:0x1010) - v18:HeapObject[class_exact:C] = GuardType v6, HeapObject[class_exact:C] + v19:HeapObject[class_exact:C] = GuardType v6, HeapObject[class_exact:C] IncrCounter inline_iseq_optimized_send_count - v21:Fixnum[42] = Const Value(42) + v22:Fixnum[42] = Const Value(42) CheckInterrupts - Return v21 + Return v22 "); } @@ -11906,19 +11906,19 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Obj) - v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) - v13:BasicObject = Send v21, :secret # SendFallbackReason: SendWithoutBlock: method private or protected and no FCALL + v22:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v13:BasicObject = Send v22, :secret # SendFallbackReason: SendWithoutBlock: method private or protected and no FCALL CheckInterrupts Return v13 "); @@ -11934,22 +11934,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string_proc("BasicObject.instance_method(:callprivate)"), @r" fn callprivate@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(BasicObject@0x1000) PatchPoint MethodRedefined(BasicObject@0x1000, initialize@0x1008, cme:0x1010) - v20:BasicObjectExact = GuardType v6, BasicObjectExact - v21:NilClass = Const Value(nil) + v21:BasicObjectExact = GuardType v6, BasicObjectExact + v22:NilClass = Const Value(nil) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v21 + Return v22 "); } @@ -11962,19 +11962,19 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Obj) - v21:BasicObjectExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) - v13:BasicObject = Send v21, :initialize # SendFallbackReason: SendWithoutBlock: method private or protected and no FCALL + v22:BasicObjectExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v13:BasicObject = Send v22, :initialize # SendFallbackReason: SendWithoutBlock: method private or protected and no FCALL CheckInterrupts Return v13 "); @@ -11990,19 +11990,19 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Obj) - v21:ObjectExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) - v13:BasicObject = Send v21, :toplevel_method # SendFallbackReason: SendWithoutBlock: method private or protected and no FCALL + v22:ObjectExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v13:BasicObject = Send v22, :toplevel_method # SendFallbackReason: SendWithoutBlock: method private or protected and no FCALL CheckInterrupts Return v13 "); @@ -12019,22 +12019,22 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string_proc("C.instance_method(:callprotected)"), @r" fn callprotected@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, secret@0x1008, cme:0x1010) - v18:HeapObject[class_exact:C] = GuardType v6, HeapObject[class_exact:C] + v19:HeapObject[class_exact:C] = GuardType v6, HeapObject[class_exact:C] IncrCounter inline_iseq_optimized_send_count - v21:Fixnum[42] = Const Value(42) + v22:Fixnum[42] = Const Value(42) CheckInterrupts - Return v21 + Return v22 "); } @@ -12050,19 +12050,19 @@ mod hir_opt_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1000, Obj) - v21:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) - v13:BasicObject = Send v21, :secret # SendFallbackReason: SendWithoutBlock: method private or protected and no FCALL + v22:HeapObject[VALUE(0x1008)] = Const Value(VALUE(0x1008)) + v13:BasicObject = Send v22, :secret # SendFallbackReason: SendWithoutBlock: method private or protected and no FCALL CheckInterrupts Return v13 "); @@ -12092,17 +12092,17 @@ mod hir_opt_tests { // fall back to SendWithoutBlock instead of the optimized CCall path. assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :s, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :s@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v9, :length # SendFallbackReason: Singleton class previously created for receiver class CheckInterrupts Return v15 @@ -12134,24 +12134,24 @@ mod hir_opt_tests { assert_snapshot!(hir, @r" fn foo@:10: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint MethodRedefined(A@0x1000, foo@0x1008, cme:0x1010) - v17:CPtr = GetLEP - v18:RubyValue = LoadField v17, :_ep_method_entry@0x1038 - v19:CallableMethodEntry[VALUE(0x1040)] = GuardBitEquals v18, Value(VALUE(0x1040)) - v20:RubyValue = LoadField v17, :_ep_specval@0x1048 - v21:FalseClass = GuardBitEquals v20, Value(false) - v22:BasicObject = SendDirect v6, 0x1050, :foo (0x1060) + v18:CPtr = GetLEP + v19:RubyValue = LoadField v18, :_ep_method_entry@0x1038 + v20:CallableMethodEntry[VALUE(0x1040)] = GuardBitEquals v19, Value(VALUE(0x1040)) + v21:RubyValue = LoadField v18, :_ep_specval@0x1048 + v22:FalseClass = GuardBitEquals v21, Value(false) + v23:BasicObject = SendDirect v6, 0x1050, :foo (0x1060) CheckInterrupts - Return v22 + Return v23 "); } @@ -12164,15 +12164,15 @@ mod hir_opt_tests { assert_snapshot!(hir_string("itself"), @r" fn block in @:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = InvokeSuper v6, 0x1000 # SendFallbackReason: super: call from within a block CheckInterrupts Return v11 @@ -12203,31 +12203,31 @@ mod hir_opt_tests { assert_snapshot!(hir, @r" fn foo@:10: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint MethodRedefined(A@0x1000, foo@0x1008, cme:0x1010) - v26:CPtr = GetLEP - v27:RubyValue = LoadField v26, :_ep_method_entry@0x1038 - v28:CallableMethodEntry[VALUE(0x1040)] = GuardBitEquals v27, Value(VALUE(0x1040)) - v29:RubyValue = LoadField v26, :_ep_specval@0x1048 - v30:FalseClass = GuardBitEquals v29, Value(false) - v31:BasicObject = SendDirect v8, 0x1050, :foo (0x1060), v9 + v27:CPtr = GetLEP + v28:RubyValue = LoadField v27, :_ep_method_entry@0x1038 + v29:CallableMethodEntry[VALUE(0x1040)] = GuardBitEquals v28, Value(VALUE(0x1040)) + v30:RubyValue = LoadField v27, :_ep_specval@0x1048 + v31:FalseClass = GuardBitEquals v30, Value(false) + v32:BasicObject = SendDirect v8, 0x1050, :foo (0x1060), v9 v17:Fixnum[1] = Const Value(1) PatchPoint MethodRedefined(Integer@0x1068, +@0x1070, cme:0x1078) - v34:Fixnum = GuardType v31, Fixnum - v35:Fixnum = FixnumAdd v34, v17 + v35:Fixnum = GuardType v32, Fixnum + v36:Fixnum = FixnumAdd v35, v17 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v35 + Return v36 "); } @@ -12255,17 +12255,17 @@ mod hir_opt_tests { assert_snapshot!(hir, @r" fn foo@:10: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:ArrayExact = GetLocal :x, l0, SP@4, * - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:ArrayExact = ToArray v9 v17:BasicObject = InvokeSuper v8, 0x1000, v15 # SendFallbackReason: super: complex argument passing to `super` call CheckInterrupts @@ -12298,15 +12298,15 @@ mod hir_opt_tests { // With a block, we don't optimize to SendDirect assert_snapshot!(hir, @r" fn foo@:10: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = InvokeSuper v6, 0x1000 # SendFallbackReason: super: call made with a block CheckInterrupts Return v11 @@ -12330,25 +12330,25 @@ mod hir_opt_tests { assert_snapshot!(hir, @r" fn size@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint MethodRedefined(Hash@0x1000, size@0x1008, cme:0x1010) - v17:CPtr = GetLEP - v18:RubyValue = LoadField v17, :_ep_method_entry@0x1038 - v19:CallableMethodEntry[VALUE(0x1040)] = GuardBitEquals v18, Value(VALUE(0x1040)) - v20:RubyValue = LoadField v17, :_ep_specval@0x1048 - v21:FalseClass = GuardBitEquals v20, Value(false) + v18:CPtr = GetLEP + v19:RubyValue = LoadField v18, :_ep_method_entry@0x1038 + v20:CallableMethodEntry[VALUE(0x1040)] = GuardBitEquals v19, Value(VALUE(0x1040)) + v21:RubyValue = LoadField v18, :_ep_specval@0x1048 + v22:FalseClass = GuardBitEquals v21, Value(false) IncrCounter inline_cfunc_optimized_send_count - v23:Fixnum = CCall v6, :Hash#size@0x1050 + v24:Fixnum = CCall v6, :Hash#size@0x1050 CheckInterrupts - Return v23 + Return v24 "); } @@ -12365,25 +12365,25 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string_proc("C.instance_method(:initialize)"), @r" fn initialize@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint MethodRedefined(BasicObject@0x1000, initialize@0x1008, cme:0x1010) - v17:CPtr = GetLEP - v18:RubyValue = LoadField v17, :_ep_method_entry@0x1038 - v19:CallableMethodEntry[VALUE(0x1040)] = GuardBitEquals v18, Value(VALUE(0x1040)) - v20:RubyValue = LoadField v17, :_ep_specval@0x1048 - v21:FalseClass = GuardBitEquals v20, Value(false) - v22:NilClass = Const Value(nil) + v18:CPtr = GetLEP + v19:RubyValue = LoadField v18, :_ep_method_entry@0x1038 + v20:CallableMethodEntry[VALUE(0x1040)] = GuardBitEquals v19, Value(VALUE(0x1040)) + v21:RubyValue = LoadField v18, :_ep_specval@0x1048 + v22:FalseClass = GuardBitEquals v21, Value(false) + v23:NilClass = Const Value(nil) IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v22 + Return v23 "); } @@ -12405,7 +12405,7 @@ mod hir_opt_tests { assert_snapshot!(hir, @r" fn byteindex@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :needle, l0, SP@5 @@ -12413,33 +12413,33 @@ mod hir_opt_tests { v4:CPtr = LoadPC v5:CPtr[CPtr(0x1000)] = Const CPtr(0x1008) v6:CBool = IsBitEqual v4, v5 - IfTrue v6, bb2(v1, v2, v3) - Jump bb4(v1, v2, v3) - bb1(): + IfTrue v6, bb3(v1, v2, v3) + Jump bb5(v1, v2, v3) + bb2(): EntryPoint JIT(0) v10:BasicObject = LoadArg :self@0 v11:BasicObject = LoadArg :needle@1 v12:NilClass = Const Value(nil) - Jump bb2(v10, v11, v12) - bb2(v19:BasicObject, v20:BasicObject, v21:BasicObject): + Jump bb3(v10, v11, v12) + bb3(v19:BasicObject, v20:BasicObject, v21:BasicObject): v24:Fixnum[0] = Const Value(0) - Jump bb4(v19, v20, v24) - bb3(): + Jump bb5(v19, v20, v24) + bb4(): EntryPoint JIT(1) v15:BasicObject = LoadArg :self@0 v16:BasicObject = LoadArg :needle@1 v17:BasicObject = LoadArg :offset@2 - Jump bb4(v15, v16, v17) - bb4(v27:BasicObject, v28:BasicObject, v29:BasicObject): + Jump bb5(v15, v16, v17) + bb5(v27:BasicObject, v28:BasicObject, v29:BasicObject): PatchPoint MethodRedefined(String@0x1010, byteindex@0x1018, cme:0x1020) - v42:CPtr = GetLEP - v43:RubyValue = LoadField v42, :_ep_method_entry@0x1048 - v44:CallableMethodEntry[VALUE(0x1050)] = GuardBitEquals v43, Value(VALUE(0x1050)) - v45:RubyValue = LoadField v42, :_ep_specval@0x1058 - v46:FalseClass = GuardBitEquals v45, Value(false) - v47:BasicObject = CCallVariadic v27, :String#byteindex@0x1060, v28, v29 + v43:CPtr = GetLEP + v44:RubyValue = LoadField v43, :_ep_method_entry@0x1048 + v45:CallableMethodEntry[VALUE(0x1050)] = GuardBitEquals v44, Value(VALUE(0x1050)) + v46:RubyValue = LoadField v43, :_ep_specval@0x1058 + v47:FalseClass = GuardBitEquals v46, Value(false) + v48:BasicObject = CCallVariadic v27, :String#byteindex@0x1060, v28, v29 CheckInterrupts - Return v47 + Return v48 "); } @@ -12468,25 +12468,25 @@ mod hir_opt_tests { assert_snapshot!(hir, @r" fn foo@:10: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :blk, l0, SP@5 v3:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :blk@1 v8:NilClass = Const Value(nil) - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:NilClass): PatchPoint NoSingletonClass(B@0x1000) PatchPoint MethodRedefined(B@0x1000, proc@0x1008, cme:0x1010) - v35:HeapObject[class_exact:B] = GuardType v10, HeapObject[class_exact:B] - v36:BasicObject = CCallWithFrame v35, :Kernel#proc@0x1038, block=0x1040 + v36:HeapObject[class_exact:B] = GuardType v10, HeapObject[class_exact:B] + v37:BasicObject = CCallWithFrame v36, :Kernel#proc@0x1038, block=0x1040 v18:BasicObject = GetLocal :blk, l0, EP@4 - SetLocal :other_block, l0, EP@3, v36 + SetLocal :other_block, l0, EP@3, v37 v25:BasicObject = GetLocal :other_block, l0, EP@3 v27:BasicObject = InvokeSuper v10, 0x1048, v25 # SendFallbackReason: super: complex argument passing to `super` call CheckInterrupts @@ -12518,17 +12518,17 @@ mod hir_opt_tests { assert_snapshot!(hir, @r" fn foo@:10: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :items, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :items@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:StaticSymbol[:succ] = Const Value(VALUE(0x1000)) v17:BasicObject = InvokeSuper v8, 0x1008, v9, v15 # SendFallbackReason: super: complex argument passing to `super` call CheckInterrupts @@ -12559,30 +12559,30 @@ mod hir_opt_tests { assert_snapshot!(hir, @r" fn foo@:9: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :content, l0, SP@4 v3:CPtr = LoadPC v4:CPtr[CPtr(0x1000)] = Const CPtr(0x1008) v5:CBool = IsBitEqual v3, v4 - IfTrue v5, bb2(v1, v2) - Jump bb4(v1, v2) - bb1(): + IfTrue v5, bb3(v1, v2) + Jump bb5(v1, v2) + bb2(): EntryPoint JIT(0) v9:BasicObject = LoadArg :self@0 v10:NilClass = Const Value(nil) - Jump bb2(v9, v10) - bb2(v16:BasicObject, v17:BasicObject): + Jump bb3(v9, v10) + bb3(v16:BasicObject, v17:BasicObject): v20:StringExact[VALUE(0x1010)] = Const Value(VALUE(0x1010)) v21:StringExact = StringCopy v20 - Jump bb4(v16, v21) - bb3(): + Jump bb5(v16, v21) + bb4(): EntryPoint JIT(1) v13:BasicObject = LoadArg :self@0 v14:BasicObject = LoadArg :content@1 - Jump bb4(v13, v14) - bb4(v24:BasicObject, v25:BasicObject): + Jump bb5(v13, v14) + bb5(v24:BasicObject, v25:BasicObject): v31:BasicObject = InvokeSuper v24, 0x1018, v25 # SendFallbackReason: super: complex argument passing to `super` call CheckInterrupts Return v31 @@ -12610,21 +12610,21 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): CheckInterrupts v15:CBool = Test v9 v16:Falsy = RefineType v9, Falsy - IfFalse v15, bb5(v8, v16) + IfFalse v15, bb6(v8, v16) v18:Truthy = RefineType v9, Truthy CheckInterrupts v26:Truthy = RefineType v18, Truthy @@ -12633,7 +12633,7 @@ mod hir_opt_tests { v37:Fixnum[3] = Const Value(3) CheckInterrupts Return v37 - bb5(v42:BasicObject, v43:Falsy): + bb6(v42:BasicObject, v43:Falsy): v47:Fixnum[6] = Const Value(6) CheckInterrupts Return v47 @@ -12660,43 +12660,43 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:11: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:CBool = HasType v9, HeapObject[class_exact:C] - IfTrue v14, bb4(v8, v9, v9) + IfTrue v14, bb5(v8, v9, v9) v23:CBool = HasType v9, HeapObject[class_exact:D] - IfTrue v23, bb5(v8, v9, v9) + IfTrue v23, bb6(v8, v9, v9) v32:BasicObject = Send v9, :foo # SendFallbackReason: SendWithoutBlock: polymorphic fallback - Jump bb3(v8, v9, v32) - bb4(v15:BasicObject, v16:BasicObject, v17:BasicObject): + Jump bb4(v8, v9, v32) + bb5(v15:BasicObject, v16:BasicObject, v17:BasicObject): PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, foo@0x1008, cme:0x1010) IncrCounter inline_iseq_optimized_send_count - v54:Fixnum[3] = Const Value(3) - Jump bb3(v15, v16, v54) - bb5(v24:BasicObject, v25:BasicObject, v26:BasicObject): + v55:Fixnum[3] = Const Value(3) + Jump bb4(v15, v16, v55) + bb6(v24:BasicObject, v25:BasicObject, v26:BasicObject): PatchPoint NoSingletonClass(D@0x1038) PatchPoint MethodRedefined(D@0x1038, foo@0x1008, cme:0x1040) IncrCounter inline_iseq_optimized_send_count - v56:Fixnum[4] = Const Value(4) - Jump bb3(v24, v25, v56) - bb3(v34:BasicObject, v35:BasicObject, v36:BasicObject): + v57:Fixnum[4] = Const Value(4) + Jump bb4(v24, v25, v57) + bb4(v34:BasicObject, v35:BasicObject, v36:BasicObject): v39:Fixnum[2] = Const Value(2) PatchPoint MethodRedefined(Integer@0x1068, +@0x1070, cme:0x1078) - v59:Fixnum = GuardType v36, Fixnum - v60:Fixnum = FixnumAdd v59, v39 + v60:Fixnum = GuardType v36, Fixnum + v61:Fixnum = FixnumAdd v60, v39 IncrCounter inline_cfunc_optimized_send_count CheckInterrupts - Return v60 + Return v61 "); } @@ -12714,35 +12714,35 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :o@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:CBool = HasType v9, HeapObject[class_exact:C] - IfTrue v14, bb4(v8, v9, v9) + IfTrue v14, bb5(v8, v9, v9) v23:CBool = HasType v9, Fixnum - IfTrue v23, bb5(v8, v9, v9) + IfTrue v23, bb6(v8, v9, v9) v32:BasicObject = Send v9, :itself # SendFallbackReason: SendWithoutBlock: polymorphic fallback - Jump bb3(v8, v9, v32) - bb4(v15:BasicObject, v16:BasicObject, v17:BasicObject): + Jump bb4(v8, v9, v32) + bb5(v15:BasicObject, v16:BasicObject, v17:BasicObject): v19:HeapObject[class_exact:C] = RefineType v17, HeapObject[class_exact:C] PatchPoint NoSingletonClass(C@0x1000) PatchPoint MethodRedefined(C@0x1000, itself@0x1008, cme:0x1010) IncrCounter inline_cfunc_optimized_send_count - Jump bb3(v15, v16, v19) - bb5(v24:BasicObject, v25:BasicObject, v26:BasicObject): + Jump bb4(v15, v16, v19) + bb6(v24:BasicObject, v25:BasicObject, v26:BasicObject): v28:Fixnum = RefineType v26, Fixnum PatchPoint MethodRedefined(Integer@0x1038, itself@0x1008, cme:0x1010) IncrCounter inline_cfunc_optimized_send_count - Jump bb3(v24, v25, v28) - bb3(v34:BasicObject, v35:BasicObject, v36:BasicObject): + Jump bb4(v24, v25, v28) + bb4(v34:BasicObject, v35:BasicObject, v36:BasicObject): CheckInterrupts Return v36 "); @@ -12761,42 +12761,42 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) PatchPoint SingleRactorMode - v41:HeapBasicObject = GuardType v6, HeapBasicObject - v42:CShape = LoadField v41, :_shape_id@0x1000 - v43:CShape[0x1001] = GuardBitEquals v42, CShape(0x1001) - StoreField v41, :@a@0x1002, v10 - WriteBarrier v41, v10 - v46:CShape[0x1003] = Const CShape(0x1003) - StoreField v41, :_shape_id@0x1000, v46 + v42:HeapBasicObject = GuardType v6, HeapBasicObject + v43:CShape = LoadField v42, :_shape_id@0x1000 + v44:CShape[0x1001] = GuardBitEquals v43, CShape(0x1001) + StoreField v42, :@a@0x1002, v10 + WriteBarrier v42, v10 + v47:CShape[0x1003] = Const CShape(0x1003) + StoreField v42, :_shape_id@0x1000, v47 v14:HeapBasicObject = RefineType v6, HeapBasicObject v17:Fixnum[2] = Const Value(2) PatchPoint SingleRactorMode - v49:CShape = LoadField v14, :_shape_id@0x1000 - v50:CShape[0x1003] = GuardBitEquals v49, CShape(0x1003) + v50:CShape = LoadField v14, :_shape_id@0x1000 + v51:CShape[0x1003] = GuardBitEquals v50, CShape(0x1003) StoreField v14, :@b@0x1004, v17 WriteBarrier v14, v17 - v53:CShape[0x1005] = Const CShape(0x1005) - StoreField v14, :_shape_id@0x1000, v53 + v54:CShape[0x1005] = Const CShape(0x1005) + StoreField v14, :_shape_id@0x1000, v54 v21:HeapBasicObject = RefineType v14, HeapBasicObject v24:Fixnum[3] = Const Value(3) PatchPoint SingleRactorMode - v56:CShape = LoadField v21, :_shape_id@0x1000 - v57:CShape[0x1005] = GuardBitEquals v56, CShape(0x1005) + v57:CShape = LoadField v21, :_shape_id@0x1000 + v58:CShape[0x1005] = GuardBitEquals v57, CShape(0x1005) StoreField v21, :@c@0x1006, v24 WriteBarrier v21, v24 - v60:CShape[0x1007] = Const CShape(0x1007) - StoreField v21, :_shape_id@0x1000, v60 + v61:CShape[0x1007] = Const CShape(0x1007) + StoreField v21, :_shape_id@0x1000, v61 v28:HeapBasicObject = RefineType v21, HeapBasicObject v31:Fixnum[4] = Const Value(4) PatchPoint SingleRactorMode @@ -12830,7 +12830,7 @@ mod hir_opt_tests { "); assert_snapshot!(hir_string("test_ep_escape"), @r" fn test_ep_escape@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :list, l0, SP@7 @@ -12840,63 +12840,63 @@ mod hir_opt_tests { v6:CPtr = LoadPC v7:CPtr[CPtr(0x1000)] = Const CPtr(0x1008) v8:CBool = IsBitEqual v6, v7 - IfTrue v8, bb2(v1, v2, v3, v4, v5) + IfTrue v8, bb3(v1, v2, v3, v4, v5) v10:CPtr[CPtr(0x1000)] = Const CPtr(0x1008) v11:CBool = IsBitEqual v6, v10 - IfTrue v11, bb4(v1, v2, v3, v4, v5) - Jump bb6(v1, v2, v3, v4, v5) - bb1(): + IfTrue v11, bb5(v1, v2, v3, v4, v5) + Jump bb7(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v15:BasicObject = LoadArg :self@0 v16:BasicObject = LoadArg :list@1 v17:NilClass = Const Value(nil) v18:NilClass = Const Value(nil) v19:NilClass = Const Value(nil) - Jump bb2(v15, v16, v17, v18, v19) - bb2(v35:BasicObject, v36:BasicObject, v37:BasicObject, v38:BasicObject, v39:NilClass): + Jump bb3(v15, v16, v17, v18, v19) + bb3(v35:BasicObject, v36:BasicObject, v37:BasicObject, v38:BasicObject, v39:NilClass): v42:NilClass = Const Value(nil) SetLocal :sep, l0, EP@5, v42 - Jump bb4(v35, v36, v42, v38, v39) - bb3(): + Jump bb5(v35, v36, v42, v38, v39) + bb4(): EntryPoint JIT(1) v22:BasicObject = LoadArg :self@0 v23:BasicObject = LoadArg :list@1 v24:BasicObject = LoadArg :sep@2 v25:NilClass = Const Value(nil) v26:NilClass = Const Value(nil) - Jump bb4(v22, v23, v24, v25, v26) - bb4(v46:BasicObject, v47:BasicObject, v48:BasicObject, v49:BasicObject, v50:NilClass): + Jump bb5(v22, v23, v24, v25, v26) + bb5(v46:BasicObject, v47:BasicObject, v48:BasicObject, v49:BasicObject, v50:NilClass): v53:StaticSymbol[:each] = Const Value(VALUE(0x1010)) SetLocal :iter_method, l0, EP@4, v53 - Jump bb6(v46, v47, v48, v53, v50) - bb5(): + Jump bb7(v46, v47, v48, v53, v50) + bb6(): EntryPoint JIT(2) v29:BasicObject = LoadArg :self@0 v30:BasicObject = LoadArg :list@1 v31:BasicObject = LoadArg :sep@2 v32:BasicObject = LoadArg :iter_method@3 v33:NilClass = Const Value(nil) - Jump bb6(v29, v30, v31, v32, v33) - bb6(v57:BasicObject, v58:BasicObject, v59:BasicObject, v60:BasicObject, v61:NilClass): + Jump bb7(v29, v30, v31, v32, v33) + bb7(v57:BasicObject, v58:BasicObject, v59:BasicObject, v60:BasicObject, v61:NilClass): CheckInterrupts v67:CBool = Test v59 v68:Truthy = RefineType v59, Truthy - IfTrue v67, bb7(v57, v58, v68, v60, v61) + IfTrue v67, bb8(v57, v58, v68, v60, v61) v70:Falsy = RefineType v59, Falsy PatchPoint NoSingletonClass(Object@0x1018) PatchPoint MethodRedefined(Object@0x1018, lambda@0x1020, cme:0x1028) - v114:HeapObject[class_exact*:Object@VALUE(0x1018)] = GuardType v57, HeapObject[class_exact*:Object@VALUE(0x1018)] - v115:BasicObject = CCallWithFrame v114, :Kernel#lambda@0x1050, block=0x1058 + v115:HeapObject[class_exact*:Object@VALUE(0x1018)] = GuardType v57, HeapObject[class_exact*:Object@VALUE(0x1018)] + v116:BasicObject = CCallWithFrame v115, :Kernel#lambda@0x1050, block=0x1058 v74:BasicObject = GetLocal :list, l0, EP@6 v76:BasicObject = GetLocal :iter_method, l0, EP@4 v77:BasicObject = GetLocal :kwsplat, l0, EP@3 - SetLocal :sep, l0, EP@5, v115 - Jump bb7(v57, v74, v115, v76, v77) - bb7(v81:BasicObject, v82:BasicObject, v83:BasicObject, v84:BasicObject, v85:BasicObject): + SetLocal :sep, l0, EP@5, v116 + Jump bb8(v57, v74, v116, v76, v77) + bb8(v81:BasicObject, v82:BasicObject, v83:BasicObject, v84:BasicObject, v85:BasicObject): PatchPoint SingleRactorMode PatchPoint StableConstantNames(0x1060, CONST) - v110:HashExact[VALUE(0x1068)] = Const Value(VALUE(0x1068)) - SetLocal :kwsplat, l0, EP@3, v110 + v111:HashExact[VALUE(0x1068)] = Const Value(VALUE(0x1068)) + SetLocal :kwsplat, l0, EP@3, v111 v95:BasicObject = GetLocal :list, l0, EP@6 v97:BasicObject = GetLocal :iter_method, l0, EP@4 v99:BasicObject = Send v95, 0x1070, :__send__, v97 # SendFallbackReason: Send: unsupported method type Optimized @@ -12914,48 +12914,48 @@ mod hir_opt_tests { eval("[1, 2, 3].each { |x| x }"); assert_snapshot!(hir_string_proc("Array.instance_method(:each)"), @r" fn each@: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:NilClass = Const Value(nil) v15:TrueClass|NilClass = Defined yield, v13 v17:CBool = Test v15 - IfFalse v17, bb3(v8, v9) + IfFalse v17, bb4(v8, v9) v35:Fixnum[0] = Const Value(0) - Jump bb7(v8, v35) - bb3(v23:BasicObject, v24:NilClass): + Jump bb8(v8, v35) + bb4(v23:BasicObject, v24:NilClass): v28:BasicObject = InvokeBuiltin , v23 CheckInterrupts Return v28 - bb7(v48:BasicObject, v49:Fixnum): - v83:Array = RefineType v48, Array - v84:CInt64 = ArrayLength v83 - v85:Fixnum = BoxFixnum v84 - v86:BoolExact = FixnumGe v49, v85 + bb8(v48:BasicObject, v49:Fixnum): + v84:Array = RefineType v48, Array + v85:CInt64 = ArrayLength v84 + v86:Fixnum = BoxFixnum v85 + v87:BoolExact = FixnumGe v49, v86 IncrCounter inline_cfunc_optimized_send_count - v54:CBool = Test v86 - IfFalse v54, bb6(v48, v49) + v54:CBool = Test v87 + IfFalse v54, bb7(v48, v49) CheckInterrupts Return v48 - bb6(v67:BasicObject, v68:Fixnum): - v88:Array = RefineType v67, Array - v89:CInt64 = UnboxFixnum v68 - v90:BasicObject = ArrayAref v88, v89 + bb7(v67:BasicObject, v68:Fixnum): + v89:Array = RefineType v67, Array + v90:CInt64 = UnboxFixnum v68 + v91:BasicObject = ArrayAref v89, v90 IncrCounter inline_cfunc_optimized_send_count - v74:BasicObject = InvokeBlock, v90 # SendFallbackReason: Uncategorized(invokeblock) - v92:Fixnum[1] = Const Value(1) - v93:Fixnum = FixnumAdd v68, v92 + v74:BasicObject = InvokeBlock, v91 # SendFallbackReason: Uncategorized(invokeblock) + v93:Fixnum[1] = Const Value(1) + v94:Fixnum = FixnumAdd v68, v93 IncrCounter inline_cfunc_optimized_send_count PatchPoint NoEPEscape(each) - Jump bb7(v67, v93) + Jump bb8(v67, v94) "); } } diff --git a/zjit/src/hir/tests.rs b/zjit/src/hir/tests.rs index effd1bc0c2aeac..27f88ef5b6b543 100644 --- a/zjit/src/hir/tests.rs +++ b/zjit/src/hir/tests.rs @@ -30,18 +30,20 @@ mod snapshot_tests { assert_snapshot!(hir_string("test"), @r" fn test@:1: bb0(): + Entries bb1, bb2 + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v13:Any = Snapshot FrameState { pc: 0x1000, stack: [], locals: [a=v11, b=v12] } v14:Any = Snapshot FrameState { pc: 0x1008, stack: [], locals: [a=v11, b=v12] } PatchPoint NoTracePoint @@ -66,14 +68,16 @@ mod snapshot_tests { assert_snapshot!(optimized_hir_string("test"), @r" fn test@:3: bb0(): + Entries bb1, bb2 + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v8:Any = Snapshot FrameState { pc: 0x1000, stack: [], locals: [] } PatchPoint NoTracePoint v11:Fixnum[3] = Const Value(3) @@ -82,13 +86,13 @@ mod snapshot_tests { v16:Any = Snapshot FrameState { pc: 0x1008, stack: [v6, v11, v13, v15], locals: [] } PatchPoint NoSingletonClass(Object@0x1010) PatchPoint MethodRedefined(Object@0x1010, foo@0x1018, cme:0x1020) - v24:HeapObject[class_exact*:Object@VALUE(0x1010)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1010)] - v25:Any = Snapshot FrameState { pc: 0x1008, stack: [v6, v13, v15, v11], locals: [] } - v26:BasicObject = SendDirect v24, 0x1048, :foo (0x1058), v13, v15, v11 - v18:Any = Snapshot FrameState { pc: 0x1060, stack: [v26], locals: [] } + v25:HeapObject[class_exact*:Object@VALUE(0x1010)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1010)] + v26:Any = Snapshot FrameState { pc: 0x1008, stack: [v6, v13, v15, v11], locals: [] } + v27:BasicObject = SendDirect v25, 0x1048, :foo (0x1058), v13, v15, v11 + v18:Any = Snapshot FrameState { pc: 0x1060, stack: [v27], locals: [] } PatchPoint NoTracePoint CheckInterrupts - Return v26 + Return v27 "); } @@ -103,14 +107,16 @@ mod snapshot_tests { assert_snapshot!(optimized_hir_string("test"), @r" fn test@:3: bb0(): + Entries bb1, bb2 + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v8:Any = Snapshot FrameState { pc: 0x1000, stack: [], locals: [] } PatchPoint NoTracePoint v11:Fixnum[1] = Const Value(1) @@ -118,12 +124,12 @@ mod snapshot_tests { v14:Any = Snapshot FrameState { pc: 0x1008, stack: [v6, v11, v13], locals: [] } PatchPoint NoSingletonClass(Object@0x1010) PatchPoint MethodRedefined(Object@0x1010, foo@0x1018, cme:0x1020) - v22:HeapObject[class_exact*:Object@VALUE(0x1010)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1010)] - v23:BasicObject = SendDirect v22, 0x1048, :foo (0x1058), v11, v13 - v16:Any = Snapshot FrameState { pc: 0x1060, stack: [v23], locals: [] } + v23:HeapObject[class_exact*:Object@VALUE(0x1010)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x1010)] + v24:BasicObject = SendDirect v23, 0x1048, :foo (0x1058), v11, v13 + v16:Any = Snapshot FrameState { pc: 0x1060, stack: [v24], locals: [] } PatchPoint NoTracePoint CheckInterrupts - Return v23 + Return v24 "); } @@ -138,14 +144,16 @@ mod snapshot_tests { assert_snapshot!(optimized_hir_string("test"), @r" fn test@:3: bb0(): + Entries bb1, bb2 + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v8:Any = Snapshot FrameState { pc: 0x1000, stack: [], locals: [] } PatchPoint NoTracePoint v11:Fixnum[5] = Const Value(5) @@ -247,29 +255,29 @@ pub mod hir_build_tests { eval("def test(x=1) = 123"); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 v3:CPtr = LoadPC v4:CPtr[CPtr(0x1000)] = Const CPtr(0x1008) v5:CBool = IsBitEqual v3, v4 - IfTrue v5, bb2(v1, v2) - Jump bb4(v1, v2) - bb1(): + IfTrue v5, bb3(v1, v2) + Jump bb5(v1, v2) + bb2(): EntryPoint JIT(0) v9:BasicObject = LoadArg :self@0 v10:NilClass = Const Value(nil) - Jump bb2(v9, v10) - bb2(v16:BasicObject, v17:BasicObject): + Jump bb3(v9, v10) + bb3(v16:BasicObject, v17:BasicObject): v20:Fixnum[1] = Const Value(1) - Jump bb4(v16, v20) - bb3(): + Jump bb5(v16, v20) + bb4(): EntryPoint JIT(1) v13:BasicObject = LoadArg :self@0 v14:BasicObject = LoadArg :x@1 - Jump bb4(v13, v14) - bb4(v23:BasicObject, v24:BasicObject): + Jump bb5(v13, v14) + bb5(v23:BasicObject, v24:BasicObject): v28:Fixnum[123] = Const Value(123) CheckInterrupts Return v28 @@ -282,15 +290,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_putobject); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[123] = Const Value(123) CheckInterrupts Return v10 @@ -303,15 +311,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_newarray); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact = NewArray CheckInterrupts Return v10 @@ -324,17 +332,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_newarray); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:ArrayExact = NewArray v9 CheckInterrupts Return v14 @@ -347,19 +355,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_newarray); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:ArrayExact = NewArray v11, v12 CheckInterrupts Return v18 @@ -372,17 +380,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_newrange); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[10] = Const Value(10) v16:RangeExact = NewRange v9 NewRangeInclusive v14 CheckInterrupts @@ -396,19 +404,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_newrange); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:RangeExact = NewRange v11 NewRangeInclusive v12 CheckInterrupts Return v18 @@ -421,17 +429,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_newrange); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[10] = Const Value(10) v16:RangeExact = NewRange v9 NewRangeExclusive v14 CheckInterrupts @@ -445,19 +453,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_newrange); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:RangeExact = NewRange v11 NewRangeExclusive v12 CheckInterrupts Return v18 @@ -470,15 +478,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_duparray); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:ArrayExact = ArrayDup v10 CheckInterrupts @@ -492,15 +500,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_duphash); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:HashExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:HashExact = HashDup v10 CheckInterrupts @@ -514,15 +522,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_newhash); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:HashExact = NewHash CheckInterrupts Return v10 @@ -535,19 +543,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_newhash); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :aval, l0, SP@5 v3:BasicObject = GetLocal :bval, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :aval@1 v8:BasicObject = LoadArg :bval@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v16:StaticSymbol[:a] = Const Value(VALUE(0x1000)) v19:StaticSymbol[:b] = Const Value(VALUE(0x1008)) v22:HashExact = NewHash v16: v11, v19: v12 @@ -562,15 +570,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_putchilledstring); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v11:StringExact = StringCopy v10 CheckInterrupts @@ -584,15 +592,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_putobject); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Bignum[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts Return v10 @@ -605,15 +613,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_putobject); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Flonum[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts Return v10 @@ -626,15 +634,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_putobject); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:HeapFloat[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts Return v10 @@ -647,15 +655,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_putobject); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StaticSymbol[:foo] = Const Value(VALUE(0x1000)) CheckInterrupts Return v10 @@ -668,15 +676,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_plus); assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v12:Fixnum[2] = Const Value(2) v15:BasicObject = Send v10, :+, v12 # SendFallbackReason: Uncategorized(opt_plus) @@ -693,15 +701,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_hash_freeze); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE) v11:HashExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts @@ -720,15 +728,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_hash_freeze); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): SideExit PatchPoint(BOPRedefined(HASH_REDEFINED_OP_FLAG, BOP_FREEZE)) "); } @@ -741,15 +749,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_ary_freeze); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE) v11:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts @@ -768,15 +776,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_ary_freeze); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): SideExit PatchPoint(BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_FREEZE)) "); } @@ -789,15 +797,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_str_freeze); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE) v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts @@ -816,15 +824,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_str_freeze); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): SideExit PatchPoint(BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_FREEZE)) "); } @@ -837,15 +845,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_str_uminus); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_UMINUS) v11:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) CheckInterrupts @@ -864,15 +872,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_str_uminus); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): SideExit PatchPoint(BOPRedefined(STRING_REDEFINED_OP_FLAG, BOP_UMINUS)) "); } @@ -888,17 +896,17 @@ pub mod hir_build_tests { assert_contains_opcodes("test", &[YARVINSN_getlocal_WC_0, YARVINSN_setlocal_WC_0]); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:Fixnum[1] = Const Value(1) CheckInterrupts Return v13 @@ -929,15 +937,15 @@ pub mod hir_build_tests { YARVINSN_getlocal, YARVINSN_setlocal]); assert_snapshot!(hir_string("test"), @r" fn block (3 levels) in @:10: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:BasicObject = GetLocal :l2, l2, EP@4 SetLocal :l1, l1, EP@3, v10 v15:BasicObject = GetLocal :l1, l1, EP@3 @@ -962,7 +970,7 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_setlocal_WC_0); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 @@ -970,24 +978,24 @@ pub mod hir_build_tests { v4:CPtr = LoadPC v5:CPtr[CPtr(0x1000)] = Const CPtr(0x1008) v6:CBool = IsBitEqual v4, v5 - IfTrue v6, bb2(v1, v2, v3) - Jump bb4(v1, v2, v3) - bb1(): + IfTrue v6, bb3(v1, v2, v3) + Jump bb5(v1, v2, v3) + bb2(): EntryPoint JIT(0) v10:BasicObject = LoadArg :self@0 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v10, v11, v12) - bb2(v19:BasicObject, v20:BasicObject, v21:NilClass): + Jump bb3(v10, v11, v12) + bb3(v19:BasicObject, v20:BasicObject, v21:NilClass): v25:Fixnum[1] = Const Value(1) - Jump bb4(v19, v25, v25) - bb3(): + Jump bb5(v19, v25, v25) + bb4(): EntryPoint JIT(1) v15:BasicObject = LoadArg :self@0 v16:BasicObject = LoadArg :a@1 v17:NilClass = Const Value(nil) - Jump bb4(v15, v16, v17) - bb4(v30:BasicObject, v31:BasicObject, v32:NilClass|Fixnum): + Jump bb5(v15, v16, v17) + bb5(v30:BasicObject, v31:BasicObject, v32:NilClass|Fixnum): v38:ArrayExact = NewArray v31, v32 CheckInterrupts Return v38 @@ -1003,7 +1011,7 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 @@ -1011,23 +1019,23 @@ pub mod hir_build_tests { v4:CPtr = LoadPC v5:CPtr[CPtr(0x1000)] = Const CPtr(0x1008) v6:CBool = IsBitEqual v4, v5 - IfTrue v6, bb2(v1, v2, v3) - Jump bb4(v1, v2, v3) - bb1(): + IfTrue v6, bb3(v1, v2, v3) + Jump bb5(v1, v2, v3) + bb2(): EntryPoint JIT(0) v10:BasicObject = LoadArg :self@0 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v10, v11, v12) - bb2(v19:BasicObject, v20:BasicObject, v21:NilClass): + Jump bb3(v10, v11, v12) + bb3(v19:BasicObject, v20:BasicObject, v21:NilClass): SideExit UnhandledYARVInsn(trace_putobject_INT2FIX_1_) - bb3(): + bb4(): EntryPoint JIT(1) v15:BasicObject = LoadArg :self@0 v16:BasicObject = LoadArg :a@1 v17:NilClass = Const Value(nil) - Jump bb4(v15, v16, v17) - bb4(v26:BasicObject, v27:BasicObject, v28:NilClass): + Jump bb5(v15, v16, v17) + bb5(v26:BasicObject, v27:BasicObject, v28:NilClass): v34:ArrayExact = NewArray v27, v28 CheckInterrupts Return v34 @@ -1041,28 +1049,28 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 v3:CPtr = LoadPC v4:CPtr[CPtr(0x1000)] = Const CPtr(0x1008) v5:CBool = IsBitEqual v3, v4 - IfTrue v5, bb2(v1, v2) - Jump bb4(v1, v2) - bb1(): + IfTrue v5, bb3(v1, v2) + Jump bb5(v1, v2) + bb2(): EntryPoint JIT(0) v9:BasicObject = LoadArg :self@0 v10:NilClass = Const Value(nil) - Jump bb2(v9, v10) - bb2(v16:BasicObject, v17:BasicObject): + Jump bb3(v9, v10) + bb3(v16:BasicObject, v17:BasicObject): SideExit UnhandledYARVInsn(definemethod) - bb3(): + bb4(): EntryPoint JIT(1) v13:BasicObject = LoadArg :self@0 v14:BasicObject = LoadArg :a@1 - Jump bb4(v13, v14) - bb4(v22:BasicObject, v23:BasicObject): + Jump bb5(v13, v14) + bb5(v22:BasicObject, v23:BasicObject): CheckInterrupts Return v23 "); @@ -1075,22 +1083,22 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string_proc("test"), @r" fn block in test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb3(): + Jump bb3(v5, v6) + bb4(): EntryPoint JIT(1) v9:BasicObject = LoadArg :self@0 v10:BasicObject = LoadArg :a@1 - Jump bb2(v9, v10) - bb2(v12:BasicObject, v13:BasicObject): + Jump bb3(v9, v10) + bb3(v12:BasicObject, v13:BasicObject): CheckInterrupts Return v13 "); @@ -1104,15 +1112,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_definedivar); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact|NilClass = DefinedIvar v6, :@foo CheckInterrupts Return v10 @@ -1133,25 +1141,25 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_definedivar); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:TrueClass|NilClass = DefinedIvar v6, :@foo CheckInterrupts v13:CBool = Test v10 v14:NilClass = RefineType v10, Falsy - IfFalse v13, bb3(v6) + IfFalse v13, bb4(v6) v16:TrueClass = RefineType v10, Truthy v19:Fixnum[3] = Const Value(3) CheckInterrupts Return v19 - bb3(v24:BasicObject): + bb4(v24:BasicObject): v28:Fixnum[4] = Const Value(4) CheckInterrupts Return v28 @@ -1166,15 +1174,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_defined); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:NilClass = Const Value(nil) v12:StringExact|NilClass = Defined constant, v10 v15:StringExact|NilClass = Defined func, v6 @@ -1194,15 +1202,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_defined); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:NilClass = Const Value(nil) v12:StringExact|NilClass = Defined yield, v10 CheckInterrupts @@ -1218,15 +1226,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_defined); assert_snapshot!(hir_string("test"), @r" fn block in @:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) CheckInterrupts @@ -1248,26 +1256,26 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_leave); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :cond, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :cond@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): CheckInterrupts v15:CBool = Test v9 v16:Falsy = RefineType v9, Falsy - IfFalse v15, bb3(v8, v16) + IfFalse v15, bb4(v8, v16) v18:Truthy = RefineType v9, Truthy v21:Fixnum[3] = Const Value(3) CheckInterrupts Return v21 - bb3(v26:BasicObject, v27:Falsy): + bb4(v26:BasicObject, v27:Falsy): v31:Fixnum[4] = Const Value(4) CheckInterrupts Return v31 @@ -1288,31 +1296,31 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :cond, l0, SP@5 v3:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :cond@1 v8:NilClass = Const Value(nil) - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:NilClass): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:NilClass): CheckInterrupts v18:CBool = Test v11 v19:Falsy = RefineType v11, Falsy - IfFalse v18, bb3(v10, v19, v12) + IfFalse v18, bb4(v10, v19, v12) v21:Truthy = RefineType v11, Truthy v24:Fixnum[3] = Const Value(3) CheckInterrupts - Jump bb4(v10, v21, v24) - bb3(v29:BasicObject, v30:Falsy, v31:NilClass): + Jump bb5(v10, v21, v24) + bb4(v29:BasicObject, v30:Falsy, v31:NilClass): v35:Fixnum[4] = Const Value(4) - Jump bb4(v29, v30, v35) - bb4(v38:BasicObject, v39:BasicObject, v40:Fixnum): + Jump bb5(v29, v30, v35) + bb5(v38:BasicObject, v39:BasicObject, v40:Fixnum): CheckInterrupts Return v40 "); @@ -1327,19 +1335,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_plus); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :+, v12 # SendFallbackReason: Uncategorized(opt_plus) CheckInterrupts Return v19 @@ -1355,19 +1363,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_minus); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :-, v12 # SendFallbackReason: Uncategorized(opt_minus) CheckInterrupts Return v19 @@ -1383,19 +1391,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_mult); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :*, v12 # SendFallbackReason: Uncategorized(opt_mult) CheckInterrupts Return v19 @@ -1411,19 +1419,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_div); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :/, v12 # SendFallbackReason: Uncategorized(opt_div) CheckInterrupts Return v19 @@ -1439,19 +1447,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_mod); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :%, v12 # SendFallbackReason: Uncategorized(opt_mod) CheckInterrupts Return v19 @@ -1467,19 +1475,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_eq); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :==, v12 # SendFallbackReason: Uncategorized(opt_eq) CheckInterrupts Return v19 @@ -1495,19 +1503,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_neq); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :!=, v12 # SendFallbackReason: Uncategorized(opt_neq) CheckInterrupts Return v19 @@ -1523,19 +1531,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_lt); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :<, v12 # SendFallbackReason: Uncategorized(opt_lt) CheckInterrupts Return v19 @@ -1551,19 +1559,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_le); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :<=, v12 # SendFallbackReason: Uncategorized(opt_le) CheckInterrupts Return v19 @@ -1579,19 +1587,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_gt); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :>, v12 # SendFallbackReason: Uncategorized(opt_gt) CheckInterrupts Return v19 @@ -1614,40 +1622,40 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) v3:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:NilClass = Const Value(nil) v8:NilClass = Const Value(nil) - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:NilClass, v12:NilClass): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:NilClass, v12:NilClass): v16:Fixnum[0] = Const Value(0) v20:Fixnum[10] = Const Value(10) CheckInterrupts - Jump bb4(v10, v16, v20) - bb4(v26:BasicObject, v27:BasicObject, v28:BasicObject): + Jump bb5(v10, v16, v20) + bb5(v26:BasicObject, v27:BasicObject, v28:BasicObject): v32:Fixnum[0] = Const Value(0) v35:BasicObject = Send v28, :>, v32 # SendFallbackReason: Uncategorized(opt_gt) CheckInterrupts v38:CBool = Test v35 v39:Truthy = RefineType v35, Truthy - IfTrue v38, bb3(v26, v27, v28) + IfTrue v38, bb4(v26, v27, v28) v41:Falsy = RefineType v35, Falsy v43:NilClass = Const Value(nil) CheckInterrupts Return v27 - bb3(v51:BasicObject, v52:BasicObject, v53:BasicObject): + bb4(v51:BasicObject, v52:BasicObject, v53:BasicObject): v58:Fixnum[1] = Const Value(1) v61:BasicObject = Send v52, :+, v58 # SendFallbackReason: Uncategorized(opt_plus) v66:Fixnum[1] = Const Value(1) v69:BasicObject = Send v53, :-, v66 # SendFallbackReason: Uncategorized(opt_minus) - Jump bb4(v51, v61, v69) + Jump bb5(v51, v61, v69) "); } @@ -1660,19 +1668,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_ge); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :>=, v12 # SendFallbackReason: Uncategorized(opt_ge) CheckInterrupts Return v19 @@ -1693,27 +1701,27 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:TrueClass = Const Value(true) CheckInterrupts v19:CBool[true] = Test v13 v20 = RefineType v13, Falsy - IfFalse v19, bb3(v8, v20) + IfFalse v19, bb4(v8, v20) v22:TrueClass = RefineType v13, Truthy v25:Fixnum[3] = Const Value(3) CheckInterrupts Return v25 - bb3(v30, v31): + bb4(v30, v31): v35 = Const Value(4) CheckInterrupts Return v35 @@ -1733,15 +1741,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_send_without_block); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:Fixnum[2] = Const Value(2) v13:Fixnum[3] = Const Value(3) v15:BasicObject = Send v6, :bar, v11, v13 # SendFallbackReason: Uncategorized(opt_send_without_block) @@ -1763,17 +1771,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_send); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:BasicObject = Send v9, 0x1000, :each # SendFallbackReason: Uncategorized(send) v15:BasicObject = GetLocal :a, l0, EP@3 CheckInterrupts @@ -1791,15 +1799,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_intern); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v12:Fixnum[123] = Const Value(123) v15:BasicObject = ObjToString v12 @@ -1818,15 +1826,15 @@ pub mod hir_build_tests { // The 2 string literals have the same address because they're deduped. assert_snapshot!(hir_string("test"), @r" fn test@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:ArrayExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v12:ArrayExact = ArrayDup v11 v14:ArrayExact[VALUE(0x1008)] = Const Value(VALUE(0x1008)) @@ -1848,17 +1856,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:ArrayExact = ToArray v9 v17:BasicObject = Send v8, :foo, v15 # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts @@ -1873,17 +1881,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v8, 0x1000, :foo, v9 # SendFallbackReason: Uncategorized(send) CheckInterrupts Return v15 @@ -1897,17 +1905,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) v16:BasicObject = Send v8, :foo, v14 # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts @@ -1922,17 +1930,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v8, :foo, v9 # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts Return v15 @@ -1948,15 +1956,15 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = InvokeSuper v6, 0x1000 # SendFallbackReason: Uncategorized(invokesuper) CheckInterrupts Return v11 @@ -1970,15 +1978,15 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = InvokeSuper v6, 0x1000 # SendFallbackReason: Uncategorized(invokesuper) CheckInterrupts Return v11 @@ -1992,15 +2000,15 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:NilClass = Const Value(nil) v13:BasicObject = InvokeSuper v6, 0x1000, v11 # SendFallbackReason: Uncategorized(invokesuper) CheckInterrupts @@ -2015,17 +2023,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :...@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:BasicObject = InvokeSuperForward v8, 0x1000, v9 # SendFallbackReason: Uncategorized(invokesuperforward) CheckInterrupts Return v15 @@ -2039,17 +2047,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :...@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:BasicObject = InvokeSuperForward v8, 0x1000, v9 # SendFallbackReason: Uncategorized(invokesuperforward) v16:BasicObject = GetLocal :..., l0, EP@3 CheckInterrupts @@ -2064,17 +2072,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :...@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:BasicObject = InvokeSuperForward v8, 0x1000, v9 # SendFallbackReason: Uncategorized(invokesuperforward) v17:Fixnum[1] = Const Value(1) v20:BasicObject = Send v15, :+, v17 # SendFallbackReason: Uncategorized(opt_plus) @@ -2090,17 +2098,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :...@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Fixnum[1] = Const Value(1) v17:BasicObject = InvokeSuperForward v8, 0x1000, v14, v9 # SendFallbackReason: Uncategorized(invokesuperforward) CheckInterrupts @@ -2113,17 +2121,17 @@ pub mod hir_build_tests { eval("def forwardable(...) = nil"); assert_snapshot!(hir_string("forwardable"), @r" fn forwardable@:1: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :...@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:NilClass = Const Value(nil) CheckInterrupts Return v13 @@ -2139,17 +2147,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:Class[VMFrozenCore] = Const Value(VALUE(0x1000)) v16:HashExact = NewHash PatchPoint NoEPEscape(test) @@ -2171,17 +2179,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:ArrayExact = GetLocal :*, l0, SP@4, * - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :*@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:ArrayExact = ToNewArray v9 v17:Fixnum[1] = Const Value(1) ArrayPush v15, v17 @@ -2198,17 +2206,17 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :..., l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :...@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:BasicObject = SendForward v8, 0x1000, :foo, v9 # SendFallbackReason: Uncategorized(sendforward) CheckInterrupts Return v15 @@ -2222,7 +2230,7 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@8 @@ -2230,8 +2238,8 @@ pub mod hir_build_tests { v4:BasicObject = GetLocal :**, l0, SP@6 v5:BasicObject = GetLocal :&, l0, SP@5 v6:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5, v6) - bb1(): + Jump bb3(v1, v2, v3, v4, v5, v6) + bb2(): EntryPoint JIT(0) v9:BasicObject = LoadArg :self@0 v10:BasicObject = LoadArg :a@1 @@ -2239,8 +2247,8 @@ pub mod hir_build_tests { v12:BasicObject = LoadArg :**@3 v13:BasicObject = LoadArg :&@4 v14:NilClass = Const Value(nil) - Jump bb2(v9, v10, v11, v12, v13, v14) - bb2(v16:BasicObject, v17:BasicObject, v18:BasicObject, v19:BasicObject, v20:BasicObject, v21:NilClass): + Jump bb3(v9, v10, v11, v12, v13, v14) + bb3(v16:BasicObject, v17:BasicObject, v18:BasicObject, v19:BasicObject, v20:BasicObject, v21:NilClass): v28:ArrayExact = ToArray v18 PatchPoint NoEPEscape(test) v33:CPtr = GetEP 0 @@ -2262,27 +2270,27 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_new); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v11:BasicObject = GetConstantPath 0x1000 v13:NilClass = Const Value(nil) v16:CBool = IsMethodCFunc v11, :new - IfFalse v16, bb3(v6, v13, v11) + IfFalse v16, bb4(v6, v13, v11) v18:HeapBasicObject = ObjectAlloc v11 v20:BasicObject = Send v18, :initialize # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts - Jump bb4(v6, v18, v20) - bb3(v24:BasicObject, v25:NilClass, v26:BasicObject): + Jump bb5(v6, v18, v20) + bb4(v24:BasicObject, v25:NilClass, v26:BasicObject): v29:BasicObject = Send v26, :new # SendFallbackReason: Uncategorized(opt_send_without_block) - Jump bb4(v24, v29, v25) - bb4(v32:BasicObject, v33:BasicObject, v34:BasicObject): + Jump bb5(v24, v29, v25) + bb5(v32:BasicObject, v33:BasicObject, v34:BasicObject): CheckInterrupts Return v33 "); @@ -2297,15 +2305,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_MAX) v11:BasicObject = ArrayMax CheckInterrupts @@ -2321,19 +2329,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_MAX) v19:BasicObject = ArrayMax v11, v12 CheckInterrupts @@ -2356,19 +2364,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:9: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): SideExit PatchPoint(BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_MAX)) "); } @@ -2386,23 +2394,23 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@7 v3:BasicObject = GetLocal :b, l0, SP@6 v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :a@1 v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): v25:BasicObject = Send v15, :+, v16 # SendFallbackReason: Uncategorized(opt_plus) SideExit UnhandledNewarraySend(MIN) "); @@ -2421,23 +2429,23 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@7 v3:BasicObject = GetLocal :b, l0, SP@6 v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :a@1 v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): v25:BasicObject = Send v15, :+, v16 # SendFallbackReason: Uncategorized(opt_plus) PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_HASH) v32:Fixnum = ArrayHash v15, v16 @@ -2466,23 +2474,23 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:5: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@7 v3:BasicObject = GetLocal :b, l0, SP@6 v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :a@1 v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): v25:BasicObject = Send v15, :+, v16 # SendFallbackReason: Uncategorized(opt_plus) SideExit PatchPoint(BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_HASH)) "); @@ -2501,23 +2509,23 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@7 v3:BasicObject = GetLocal :b, l0, SP@6 v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :a@1 v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): v25:BasicObject = Send v15, :+, v16 # SendFallbackReason: Uncategorized(opt_plus) v31:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v32:StringExact = StringCopy v31 @@ -2538,23 +2546,23 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@7 v3:BasicObject = GetLocal :b, l0, SP@6 v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :a@1 v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): v25:BasicObject = Send v15, :+, v16 # SendFallbackReason: Uncategorized(opt_plus) v29:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v30:StringExact = StringCopy v29 @@ -2585,23 +2593,23 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:6: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@7 v3:BasicObject = GetLocal :b, l0, SP@6 v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :a@1 v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): v25:BasicObject = Send v15, :+, v16 # SendFallbackReason: Uncategorized(opt_plus) v29:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v30:StringExact = StringCopy v29 @@ -2625,23 +2633,23 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@7 v3:BasicObject = GetLocal :b, l0, SP@6 v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :a@1 v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): v25:BasicObject = Send v15, :+, v16 # SendFallbackReason: Uncategorized(opt_plus) PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_INCLUDE_P) v33:BoolExact = ArrayInclude v15, v16 | v16 @@ -2675,23 +2683,23 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_newarray_send); assert_snapshot!(hir_string("test"), @r" fn test@:10: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@7 v3:BasicObject = GetLocal :b, l0, SP@6 v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :a@1 v10:BasicObject = LoadArg :b@2 v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:NilClass, v18:NilClass): v25:BasicObject = Send v15, :+, v16 # SendFallbackReason: Uncategorized(opt_plus) SideExit PatchPoint(BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_INCLUDE_P)) "); @@ -2707,17 +2715,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_duparray_send); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): PatchPoint BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_INCLUDE_P) v15:BoolExact = DupArrayInclude VALUE(0x1000) | v9 CheckInterrupts @@ -2741,17 +2749,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_duparray_send); assert_snapshot!(hir_string("test"), @r" fn test@:9: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): SideExit PatchPoint(BOPRedefined(ARRAY_REDEFINED_OP_FLAG, BOP_INCLUDE_P)) "); } @@ -2764,19 +2772,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_length); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:ArrayExact = NewArray v11, v12 v21:BasicObject = Send v18, :length # SendFallbackReason: Uncategorized(opt_length) CheckInterrupts @@ -2792,19 +2800,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_size); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:ArrayExact = NewArray v11, v12 v21:BasicObject = Send v18, :size # SendFallbackReason: Uncategorized(opt_size) CheckInterrupts @@ -2822,17 +2830,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_getconstant); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :klass, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :klass@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:FalseClass = Const Value(false) v16:BasicObject = GetConstant v9, :ARGV, v14 CheckInterrupts @@ -2849,15 +2857,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_getinstancevariable); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): PatchPoint SingleRactorMode v11:BasicObject = GetIvar v6, :@foo CheckInterrupts @@ -2874,15 +2882,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_setinstancevariable); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) PatchPoint SingleRactorMode SetIvar v6, :@foo, v10 @@ -2931,15 +2939,15 @@ pub mod hir_build_tests { let function = iseq_to_hir(iseq).unwrap(); assert_snapshot!(hir_string_function(&function), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:BasicObject = GetClassVar :@@foo CheckInterrupts Return v10 @@ -2958,15 +2966,15 @@ pub mod hir_build_tests { let function = iseq_to_hir(iseq).unwrap(); assert_snapshot!(hir_string_function(&function), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[42] = Const Value(42) SetClassVar :@@foo, v10 CheckInterrupts @@ -2983,15 +2991,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_setglobal); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) SetGlobal :$foo, v10 CheckInterrupts @@ -3008,15 +3016,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_getglobal); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:BasicObject = GetGlobal :$foo CheckInterrupts Return v10 @@ -3030,27 +3038,27 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :block, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :block@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:CBool = IsBlockParamModified l0 - IfTrue v13, bb3(v8, v9) - Jump bb4(v8, v9) - bb3(v14:BasicObject, v15:BasicObject): + IfTrue v13, bb4(v8, v9) + Jump bb5(v8, v9) + bb4(v14:BasicObject, v15:BasicObject): v22:BasicObject = GetLocal :block, l0, EP@3 - Jump bb5(v14, v22, v22) - bb4(v17:BasicObject, v18:BasicObject): + Jump bb6(v14, v22, v22) + bb5(v17:BasicObject, v18:BasicObject): v24:BasicObject = GetBlockParam :block, l0, EP@3 - Jump bb5(v17, v24, v24) - bb5(v26:BasicObject, v27:BasicObject, v28:BasicObject): + Jump bb6(v17, v24, v24) + bb6(v26:BasicObject, v27:BasicObject, v28:BasicObject): CheckInterrupts Return v28 "); @@ -3067,25 +3075,25 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string_proc("test"), @r" fn block in test@:4: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:CBool = IsBlockParamModified l1 - IfTrue v10, bb3(v6) - Jump bb4(v6) - bb3(v11:BasicObject): + IfTrue v10, bb4(v6) + Jump bb5(v6) + bb4(v11:BasicObject): v17:BasicObject = GetLocal :block, l1, EP@3 - Jump bb5(v11, v17) - bb4(v13:BasicObject): + Jump bb6(v11, v17) + bb5(v13:BasicObject): v19:BasicObject = GetBlockParam :block, l1, EP@3 - Jump bb5(v13, v19) - bb5(v21:BasicObject, v22:BasicObject): + Jump bb6(v13, v19) + bb6(v21:BasicObject, v22:BasicObject): CheckInterrupts Return v22 "); @@ -3099,17 +3107,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_splatarray); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:ArrayExact = ToNewArray v9 CheckInterrupts Return v14 @@ -3124,17 +3132,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_concattoarray); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:Fixnum[1] = Const Value(1) v15:ArrayExact = NewArray v13 v18:ArrayExact = ToArray v9 @@ -3152,17 +3160,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_pushtoarray); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:ArrayExact = ToNewArray v9 v16:Fixnum[1] = Const Value(1) ArrayPush v14, v16 @@ -3179,17 +3187,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_pushtoarray); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :a@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v14:ArrayExact = ToNewArray v9 v16:Fixnum[1] = Const Value(1) v18:Fixnum[2] = Const Value(2) @@ -3210,19 +3218,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_aset); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v16:NilClass = Const Value(nil) v20:Fixnum[1] = Const Value(1) v24:BasicObject = Send v11, :[]=, v12, v20 # SendFallbackReason: Uncategorized(opt_aset) @@ -3239,19 +3247,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_aref); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :a, l0, SP@5 v3:BasicObject = GetLocal :b, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :a@1 v8:BasicObject = LoadArg :b@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :[], v12 # SendFallbackReason: Uncategorized(opt_aref) CheckInterrupts Return v19 @@ -3266,17 +3274,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_empty_p); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v9, :empty? # SendFallbackReason: Uncategorized(opt_empty_p) CheckInterrupts Return v15 @@ -3291,17 +3299,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_succ); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v9, :succ # SendFallbackReason: Uncategorized(opt_succ) CheckInterrupts Return v15 @@ -3316,19 +3324,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_and); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :&, v12 # SendFallbackReason: Uncategorized(opt_and) CheckInterrupts Return v19 @@ -3343,19 +3351,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_or); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :|, v12 # SendFallbackReason: Uncategorized(opt_or) CheckInterrupts Return v19 @@ -3370,17 +3378,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_not); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v15:BasicObject = Send v9, :! # SendFallbackReason: Uncategorized(opt_not) CheckInterrupts Return v15 @@ -3395,19 +3403,19 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_opt_regexpmatch2); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :regexp, l0, SP@5 v3:BasicObject = GetLocal :matchee, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :regexp@1 v8:BasicObject = LoadArg :matchee@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v19:BasicObject = Send v11, :=~, v12 # SendFallbackReason: Uncategorized(opt_regexpmatch2) CheckInterrupts Return v19 @@ -3426,15 +3434,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_putspecialobject); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Class[VMFrozenCore] = Const Value(VALUE(0x1000)) v12:BasicObject = PutSpecialObject CBase v14:StaticSymbol[:aliased] = Const Value(VALUE(0x1008)) @@ -3462,21 +3470,21 @@ pub mod hir_build_tests { assert_contains_opcode("reverse_even", YARVINSN_opt_reverse); assert_snapshot!(hir_strings!("reverse_odd", "reverse_even"), @r" fn reverse_odd@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) v3:NilClass = Const Value(nil) v4:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:NilClass = Const Value(nil) v9:NilClass = Const Value(nil) v10:NilClass = Const Value(nil) - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:NilClass, v14:NilClass, v15:NilClass): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:NilClass, v14:NilClass, v15:NilClass): PatchPoint SingleRactorMode v20:BasicObject = GetIvar v12, :@a PatchPoint SingleRactorMode @@ -3489,23 +3497,23 @@ pub mod hir_build_tests { Return v38 fn reverse_even@:8: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) v3:NilClass = Const Value(nil) v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:NilClass = Const Value(nil) v10:NilClass = Const Value(nil) v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:NilClass, v16:NilClass, v17:NilClass, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:NilClass, v16:NilClass, v17:NilClass, v18:NilClass): PatchPoint SingleRactorMode v23:BasicObject = GetIvar v14, :@a PatchPoint SingleRactorMode @@ -3529,25 +3537,25 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_branchnil); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): CheckInterrupts v16:CBool = IsNil v9 v17:NilClass = Const Value(nil) - IfTrue v16, bb3(v8, v17, v17) + IfTrue v16, bb4(v8, v17, v17) v19:NotNil = RefineType v9, NotNil v21:BasicObject = Send v19, :itself # SendFallbackReason: Uncategorized(opt_send_without_block) - Jump bb3(v8, v19, v21) - bb3(v23:BasicObject, v24:BasicObject, v25:BasicObject): + Jump bb4(v8, v19, v21) + bb4(v23:BasicObject, v24:BasicObject, v25:BasicObject): CheckInterrupts Return v25 "); @@ -3568,34 +3576,34 @@ pub mod hir_build_tests { // Note that IsNil has as its operand a value that we know statically *cannot* be nil assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): CheckInterrupts v15:CBool = Test v9 v16:Falsy = RefineType v9, Falsy - IfFalse v15, bb3(v8, v16) + IfFalse v15, bb4(v8, v16) v18:Truthy = RefineType v9, Truthy CheckInterrupts v24:CBool[false] = IsNil v18 v25:NilClass = Const Value(nil) - IfTrue v24, bb4(v8, v25, v25) + IfTrue v24, bb5(v8, v25, v25) v27:Truthy = RefineType v18, NotNil v29:BasicObject = Send v27, :itself # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts Return v29 - bb3(v34:BasicObject, v35:Falsy): + bb4(v34:BasicObject, v35:Falsy): v39:Fixnum[4] = Const Value(4) - Jump bb4(v34, v35, v39) - bb4(v41:BasicObject, v42:Falsy, v43:Fixnum[4]): + Jump bb5(v34, v35, v39) + bb5(v41:BasicObject, v42:Falsy, v43:Fixnum[4]): CheckInterrupts Return v43 "); @@ -3622,44 +3630,44 @@ pub mod hir_build_tests { "); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): CheckInterrupts v15:CBool = Test v9 v16:Falsy = RefineType v9, Falsy - IfFalse v15, bb5(v8, v16) + IfFalse v15, bb6(v8, v16) v18:Truthy = RefineType v9, Truthy CheckInterrupts v23:CBool[true] = Test v18 v24 = RefineType v18, Falsy - IfFalse v23, bb4(v8, v24) + IfFalse v23, bb5(v8, v24) v26:Truthy = RefineType v18, Truthy CheckInterrupts v31:CBool[true] = Test v26 v32 = RefineType v26, Falsy - IfFalse v31, bb3(v8, v32) + IfFalse v31, bb4(v8, v32) v34:Truthy = RefineType v26, Truthy v37:Fixnum[3] = Const Value(3) CheckInterrupts Return v37 - bb5(v42:BasicObject, v43:Falsy): + bb6(v42:BasicObject, v43:Falsy): v47:Fixnum[6] = Const Value(6) CheckInterrupts Return v47 - bb4(v52, v53): + bb5(v52, v53): v57 = Const Value(5) CheckInterrupts Return v57 - bb3(v62, v63): + bb4(v62, v63): v67 = Const Value(4) CheckInterrupts Return v67 @@ -3671,24 +3679,24 @@ pub mod hir_build_tests { assert_contains_opcode("Float", YARVINSN_opt_invokebuiltin_delegate_leave); assert_snapshot!(hir_string("Float"), @r" fn Float@: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :arg, l0, SP@6 v3:BasicObject = GetLocal :exception, l0, SP@5 v4:BasicObject = GetLocal , l0, SP@4 - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :arg@1 v9:BasicObject = LoadArg :exception@2 v10:BasicObject = GetLocal , l0, EP@3 - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:BasicObject, v15:BasicObject): v19:Float = InvokeBuiltin rb_f_float, v12, v13, v14 - Jump bb3(v12, v13, v14, v15, v19) - bb3(v21:BasicObject, v22:BasicObject, v23:BasicObject, v24:BasicObject, v25:Float): + Jump bb4(v12, v13, v14, v15, v19) + bb4(v21:BasicObject, v22:BasicObject, v23:BasicObject, v24:BasicObject, v25:Float): CheckInterrupts Return v25 "); @@ -3699,18 +3707,18 @@ pub mod hir_build_tests { assert_contains_opcode("class", YARVINSN_opt_invokebuiltin_delegate_leave); assert_snapshot!(hir_string("class"), @r" fn class@: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:HeapObject = InvokeBuiltin leaf , v6 - Jump bb3(v6, v10) - bb3(v12:BasicObject, v13:HeapObject): + Jump bb4(v6, v10) + bb4(v12:BasicObject, v13:HeapObject): CheckInterrupts Return v13 "); @@ -3724,7 +3732,7 @@ pub mod hir_build_tests { let function = iseq_to_hir(iseq).unwrap(); assert_snapshot!(hir_string_function(&function), @r" fn open@: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :name, l0, SP@8 @@ -3732,8 +3740,8 @@ pub mod hir_build_tests { v4:BasicObject = GetLocal , l0, SP@6 v5:BasicObject = GetLocal :block, l0, SP@5 v6:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5, v6) - bb1(): + Jump bb3(v1, v2, v3, v4, v5, v6) + bb2(): EntryPoint JIT(0) v9:BasicObject = LoadArg :self@0 v10:BasicObject = LoadArg :name@1 @@ -3741,8 +3749,8 @@ pub mod hir_build_tests { v12:BasicObject = GetLocal , l0, EP@5 v13:BasicObject = LoadArg :block@3 v14:NilClass = Const Value(nil) - Jump bb2(v9, v10, v11, v12, v13, v14) - bb2(v16:BasicObject, v17:BasicObject, v18:BasicObject, v19:BasicObject, v20:BasicObject, v21:NilClass): + Jump bb3(v9, v10, v11, v12, v13, v14) + bb3(v16:BasicObject, v17:BasicObject, v18:BasicObject, v19:BasicObject, v20:BasicObject, v21:NilClass): v25:BasicObject = InvokeBuiltin dir_s_open, v16, v17, v18 PatchPoint NoEPEscape(open) v31:CPtr = GetEP 0 @@ -3754,13 +3762,13 @@ pub mod hir_build_tests { CheckInterrupts v39:CBool[true] = Test v36 v40 = RefineType v36, Falsy - IfFalse v39, bb3(v16, v17, v18, v19, v20, v25) + IfFalse v39, bb4(v16, v17, v18, v19, v20, v25) v42:HeapObject[BlockParamProxy] = RefineType v36, Truthy v46:BasicObject = InvokeBlock, v25 # SendFallbackReason: Uncategorized(invokeblock) v49:BasicObject = InvokeBuiltin dir_s_close, v16, v25 CheckInterrupts Return v46 - bb3(v55, v56, v57, v58, v59, v60): + bb4(v55, v56, v57, v58, v59, v60): CheckInterrupts Return v60 "); @@ -3773,18 +3781,18 @@ pub mod hir_build_tests { let function = iseq_to_hir(iseq).unwrap(); assert_snapshot!(hir_string_function(&function), @r" fn enable@: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:BasicObject = InvokeBuiltin gc_enable, v6 - Jump bb3(v6, v10) - bb3(v12:BasicObject, v13:BasicObject): + Jump bb4(v6, v10) + bb4(v12:BasicObject, v13:BasicObject): CheckInterrupts Return v13 "); @@ -3797,23 +3805,23 @@ pub mod hir_build_tests { let function = iseq_to_hir(iseq).unwrap(); assert_snapshot!(hir_string_function(&function), @r" fn start@: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :full_mark, l0, SP@7 v3:BasicObject = GetLocal :immediate_mark, l0, SP@6 v4:BasicObject = GetLocal :immediate_sweep, l0, SP@5 v5:BasicObject = GetLocal , l0, SP@4 - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :full_mark@1 v10:BasicObject = LoadArg :immediate_mark@2 v11:BasicObject = LoadArg :immediate_sweep@3 v12:BasicObject = GetLocal , l0, EP@3 - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:BasicObject, v18:BasicObject): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:BasicObject, v18:BasicObject): v25:FalseClass = Const Value(false) v27:BasicObject = InvokeBuiltin gc_start_internal, v14, v15, v16, v17, v25 CheckInterrupts @@ -3827,18 +3835,18 @@ pub mod hir_build_tests { let function = iseq_to_hir(iseq).unwrap(); assert_snapshot!(hir_string_function(&function), @r" fn name@: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact = InvokeBuiltin leaf , v6 - Jump bb3(v6, v10) - bb3(v12:BasicObject, v13:StringExact): + Jump bb4(v6, v10) + bb4(v12:BasicObject, v13:StringExact): CheckInterrupts Return v13 "); @@ -3850,18 +3858,18 @@ pub mod hir_build_tests { let function = iseq_to_hir(iseq).unwrap(); assert_snapshot!(hir_string_function(&function), @r" fn to_s@: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact = InvokeBuiltin leaf , v6 - Jump bb3(v6, v10) - bb3(v12:BasicObject, v13:StringExact): + Jump bb4(v6, v10) + bb4(v12:BasicObject, v13:StringExact): CheckInterrupts Return v13 "); @@ -3875,17 +3883,17 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_dupn); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@4 - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:BasicObject = LoadArg :x@1 - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:BasicObject): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:BasicObject): v13:NilClass = Const Value(nil) v16:Fixnum[0] = Const Value(0) v18:Fixnum[1] = Const Value(1) @@ -3893,13 +3901,13 @@ pub mod hir_build_tests { CheckInterrupts v25:CBool = Test v21 v26:Truthy = RefineType v21, Truthy - IfTrue v25, bb3(v8, v9, v13, v9, v16, v18, v26) + IfTrue v25, bb4(v8, v9, v13, v9, v16, v18, v26) v28:Falsy = RefineType v21, Falsy v31:Fixnum[2] = Const Value(2) v34:BasicObject = Send v9, :[]=, v16, v18, v31 # SendFallbackReason: Uncategorized(opt_send_without_block) CheckInterrupts Return v31 - bb3(v40:BasicObject, v41:BasicObject, v42:NilClass, v43:BasicObject, v44:Fixnum[0], v45:Fixnum[1], v46:Truthy): + bb4(v40:BasicObject, v41:BasicObject, v42:NilClass, v43:BasicObject, v44:Fixnum[0], v45:Fixnum[1], v46:Truthy): CheckInterrupts Return v46 "); @@ -3913,15 +3921,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_objtostring); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v12:Fixnum[1] = Const Value(1) v15:BasicObject = ObjToString v12 @@ -3940,15 +3948,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_concatstrings); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v13:BasicObject = ObjToString v10 v15:String = AnyToString v10, str: v13 @@ -3972,15 +3980,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_concatstrings); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000)) v12:NilClass = Const Value(nil) v15:BasicObject = ObjToString v12 @@ -3999,15 +4007,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_toregexp); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v13:BasicObject = ObjToString v10 v15:String = AnyToString v10, str: v13 @@ -4031,15 +4039,15 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_toregexp); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:Fixnum[1] = Const Value(1) v13:BasicObject = ObjToString v10 v15:String = AnyToString v10, str: v13 @@ -4062,28 +4070,28 @@ pub mod hir_build_tests { assert_contains_opcode("throw_break", YARVINSN_throw); assert_snapshot!(hir_strings!("throw_return", "throw_break"), @r" fn block in @:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v12:Fixnum[1] = Const Value(1) Throw TAG_RETURN, v12 fn block in @:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v12:Fixnum[2] = Const Value(2) Throw TAG_BREAK, v12 "); @@ -4098,15 +4106,15 @@ pub mod hir_build_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf - Jump bb2(v1) - bb1(): + Jump bb3(v1) + bb2(): EntryPoint JIT(0) v4:BasicObject = LoadArg :self@0 - Jump bb2(v4) - bb2(v6:BasicObject): + Jump bb3(v4) + bb3(v6:BasicObject): v10:BasicObject = InvokeBlock # SendFallbackReason: Uncategorized(invokeblock) CheckInterrupts Return v10 @@ -4122,19 +4130,19 @@ pub mod hir_build_tests { "#); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :x, l0, SP@5 v3:BasicObject = GetLocal :y, l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :x@1 v8:BasicObject = LoadArg :y@2 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v18:BasicObject = InvokeBlock, v11, v12 # SendFallbackReason: Uncategorized(invokeblock) CheckInterrupts Return v18 @@ -4151,21 +4159,21 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_expandarray); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@6 v3:NilClass = Const Value(nil) v4:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :o@1 v9:NilClass = Const Value(nil) v10:NilClass = Const Value(nil) - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:NilClass, v15:NilClass): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:NilClass, v15:NilClass): v21:ArrayExact = GuardType v13, ArrayExact v22:CInt64 = ArrayLength v21 v23:CInt64[2] = Const CInt64(2) @@ -4190,21 +4198,21 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_expandarray); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@6 v3:NilClass = Const Value(nil) v4:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4) - bb1(): + Jump bb3(v1, v2, v3, v4) + bb2(): EntryPoint JIT(0) v7:BasicObject = LoadArg :self@0 v8:BasicObject = LoadArg :o@1 v9:NilClass = Const Value(nil) v10:NilClass = Const Value(nil) - Jump bb2(v7, v8, v9, v10) - bb2(v12:BasicObject, v13:BasicObject, v14:NilClass, v15:NilClass): + Jump bb3(v7, v8, v9, v10) + bb3(v12:BasicObject, v13:BasicObject, v14:NilClass, v15:NilClass): SideExit UnhandledYARVInsn(expandarray) "); } @@ -4219,23 +4227,23 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_expandarray); assert_snapshot!(hir_string("test"), @r" fn test@:3: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :o, l0, SP@7 v3:NilClass = Const Value(nil) v4:NilClass = Const Value(nil) v5:NilClass = Const Value(nil) - Jump bb2(v1, v2, v3, v4, v5) - bb1(): + Jump bb3(v1, v2, v3, v4, v5) + bb2(): EntryPoint JIT(0) v8:BasicObject = LoadArg :self@0 v9:BasicObject = LoadArg :o@1 v10:NilClass = Const Value(nil) v11:NilClass = Const Value(nil) v12:NilClass = Const Value(nil) - Jump bb2(v8, v9, v10, v11, v12) - bb2(v14:BasicObject, v15:BasicObject, v16:NilClass, v17:NilClass, v18:NilClass): + Jump bb3(v8, v9, v10, v11, v12) + bb3(v14:BasicObject, v15:BasicObject, v16:NilClass, v17:NilClass, v18:NilClass): SideExit UnhandledYARVInsn(expandarray) "); } @@ -4248,30 +4256,30 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_checkkeyword); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :kw, l0, SP@5 v3:BasicObject = GetLocal , l0, SP@4 - Jump bb2(v1, v2, v3) - bb1(): + Jump bb3(v1, v2, v3) + bb2(): EntryPoint JIT(0) v6:BasicObject = LoadArg :self@0 v7:BasicObject = LoadArg :kw@1 v8:BasicObject = GetLocal , l0, EP@3 - Jump bb2(v6, v7, v8) - bb2(v10:BasicObject, v11:BasicObject, v12:BasicObject): + Jump bb3(v6, v7, v8) + bb3(v10:BasicObject, v11:BasicObject, v12:BasicObject): v15:BoolExact = FixnumBitCheck v12, 0 CheckInterrupts v18:CBool = Test v15 v19:TrueClass = RefineType v15, Truthy - IfTrue v18, bb3(v10, v11, v12) + IfTrue v18, bb4(v10, v11, v12) v21:FalseClass = RefineType v15, Falsy v23:Fixnum[1] = Const Value(1) v25:Fixnum[1] = Const Value(1) v28:BasicObject = Send v23, :+, v25 # SendFallbackReason: Uncategorized(opt_plus) - Jump bb3(v10, v28, v12) - bb3(v31:BasicObject, v32:BasicObject, v33:BasicObject): + Jump bb4(v10, v28, v12) + bb4(v31:BasicObject, v32:BasicObject, v33:BasicObject): CheckInterrupts Return v32 "); @@ -4291,7 +4299,7 @@ pub mod hir_build_tests { assert_contains_opcode("test", YARVINSN_checkkeyword); assert_snapshot!(hir_string("test"), @r" fn test@:2: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:BasicObject = GetLocal :k1, l0, SP@37 @@ -4328,8 +4336,8 @@ pub mod hir_build_tests { v33:BasicObject = GetLocal :k32, l0, SP@6 v34:BasicObject = GetLocal :k33, l0, SP@5 v35:BasicObject = GetLocal , l0, SP@4 - Jump bb2(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) - bb1(): + Jump bb3(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) + bb2(): EntryPoint JIT(0) v38:BasicObject = LoadArg :self@0 v39:BasicObject = LoadArg :k1@1 @@ -4366,8 +4374,8 @@ pub mod hir_build_tests { v70:BasicObject = LoadArg :k32@32 v71:BasicObject = LoadArg :k33@33 v72:BasicObject = GetLocal , l0, EP@3 - Jump bb2(v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66, v67, v68, v69, v70, v71, v72) - bb2(v74:BasicObject, v75:BasicObject, v76:BasicObject, v77:BasicObject, v78:BasicObject, v79:BasicObject, v80:BasicObject, v81:BasicObject, v82:BasicObject, v83:BasicObject, v84:BasicObject, v85:BasicObject, v86:BasicObject, v87:BasicObject, v88:BasicObject, v89:BasicObject, v90:BasicObject, v91:BasicObject, v92:BasicObject, v93:BasicObject, v94:BasicObject, v95:BasicObject, v96:BasicObject, v97:BasicObject, v98:BasicObject, v99:BasicObject, v100:BasicObject, v101:BasicObject, v102:BasicObject, v103:BasicObject, v104:BasicObject, v105:BasicObject, v106:BasicObject, v107:BasicObject, v108:BasicObject): + Jump bb3(v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66, v67, v68, v69, v70, v71, v72) + bb3(v74:BasicObject, v75:BasicObject, v76:BasicObject, v77:BasicObject, v78:BasicObject, v79:BasicObject, v80:BasicObject, v81:BasicObject, v82:BasicObject, v83:BasicObject, v84:BasicObject, v85:BasicObject, v86:BasicObject, v87:BasicObject, v88:BasicObject, v89:BasicObject, v90:BasicObject, v91:BasicObject, v92:BasicObject, v93:BasicObject, v94:BasicObject, v95:BasicObject, v96:BasicObject, v97:BasicObject, v98:BasicObject, v99:BasicObject, v100:BasicObject, v101:BasicObject, v102:BasicObject, v103:BasicObject, v104:BasicObject, v105:BasicObject, v106:BasicObject, v107:BasicObject, v108:BasicObject): SideExit TooManyKeywordParameters "); } @@ -4376,48 +4384,48 @@ pub mod hir_build_tests { fn test_array_each() { assert_snapshot!(hir_string_proc("Array.instance_method(:each)"), @r" fn each@: - bb0(): + bb1(): EntryPoint interpreter v1:BasicObject = LoadSelf v2:NilClass = Const Value(nil) - Jump bb2(v1, v2) - bb1(): + Jump bb3(v1, v2) + bb2(): EntryPoint JIT(0) v5:BasicObject = LoadArg :self@0 v6:NilClass = Const Value(nil) - Jump bb2(v5, v6) - bb2(v8:BasicObject, v9:NilClass): + Jump bb3(v5, v6) + bb3(v8:BasicObject, v9:NilClass): v13:NilClass = Const Value(nil) v15:TrueClass|NilClass = Defined yield, v13 v17:CBool = Test v15 v18:NilClass = RefineType v15, Falsy - IfFalse v17, bb3(v8, v9) + IfFalse v17, bb4(v8, v9) v20:TrueClass = RefineType v15, Truthy - Jump bb5(v8, v9) - bb3(v23:BasicObject, v24:NilClass): + Jump bb6(v8, v9) + bb4(v23:BasicObject, v24:NilClass): v28:BasicObject = InvokeBuiltin , v23 - Jump bb4(v23, v24, v28) - bb4(v40:BasicObject, v41:NilClass, v42:BasicObject): + Jump bb5(v23, v24, v28) + bb5(v40:BasicObject, v41:NilClass, v42:BasicObject): CheckInterrupts Return v42 - bb5(v30:BasicObject, v31:NilClass): + bb6(v30:BasicObject, v31:NilClass): v35:Fixnum[0] = Const Value(0) - Jump bb7(v30, v35) - bb7(v48:BasicObject, v49:Fixnum): + Jump bb8(v30, v35) + bb8(v48:BasicObject, v49:Fixnum): v52:BoolExact = InvokeBuiltin rb_jit_ary_at_end, v48, v49 v54:CBool = Test v52 v55:FalseClass = RefineType v52, Falsy - IfFalse v54, bb6(v48, v49) + IfFalse v54, bb7(v48, v49) v57:TrueClass = RefineType v52, Truthy v59:NilClass = Const Value(nil) CheckInterrupts Return v48 - bb6(v67:BasicObject, v68:Fixnum): + bb7(v67:BasicObject, v68:Fixnum): v72:BasicObject = InvokeBuiltin rb_jit_ary_at, v67, v68 v74:BasicObject = InvokeBlock, v72 # SendFallbackReason: Uncategorized(invokeblock) v78:Fixnum = InvokeBuiltin rb_jit_fixnum_inc, v67, v68 PatchPoint NoEPEscape(each) - Jump bb7(v67, v78) + Jump bb8(v67, v78) "); } } @@ -4447,6 +4455,7 @@ pub mod hir_build_tests { let retval = function.push_insn(bb3, Insn::Const { val: Const::CBool(true) }); function.push_insn(bb3, Insn::Return { val: retval }); + function.seal_entries(); let cfi = ControlFlowInfo::new(&function); assert!(cfi.is_preceded_by(bb1, bb2)); @@ -4472,6 +4481,7 @@ pub mod hir_build_tests { let retval = function.push_insn(bb3, Insn::Const { val: Const::CBool(true) }); function.push_insn(bb3, Insn::Return { val: retval }); + function.seal_entries(); let cfi = ControlFlowInfo::new(&function); assert!(cfi.is_preceded_by(bb2, bb3)); @@ -4496,6 +4506,7 @@ pub mod hir_build_tests { let retval = function.push_insn(bb1, Insn::Const { val: Const::CBool(true) }); function.push_insn(bb1, Insn::Return { val: retval }); + function.seal_entries(); let cfi = ControlFlowInfo::new(&function); assert_eq!(cfi.predecessors(bb1).collect::>().len(), 1); @@ -4524,6 +4535,7 @@ pub mod hir_build_tests { fn test_linked_list() { let mut function = Function::new(std::ptr::null()); + let entries = function.entries_block; let bb0 = function.entry_block; let bb1 = function.new_block(0); let bb2 = function.new_block(0); @@ -4536,31 +4548,33 @@ pub mod hir_build_tests { let retval = function.push_insn(bb3, Insn::Const { val: Const::CBool(true) }); function.push_insn(bb3, Insn::Return { val: retval }); + function.seal_entries(); assert_snapshot!(format!("{}", FunctionPrinter::without_snapshot(&function)), @r" fn : - bb0(): - Jump bb1() bb1(): Jump bb2() bb2(): Jump bb3() bb3(): + Jump bb4() + bb4(): v3:Any = Const CBool(true) Return v3 "); let dominators = Dominators::new(&function); assert_dominators_contains_self(&function, &dominators); - assert!(dominators.dominators(bb0).eq([bb0].iter())); - assert!(dominators.dominators(bb1).eq([bb0, bb1].iter())); - assert!(dominators.dominators(bb2).eq([bb0, bb1, bb2].iter())); - assert!(dominators.dominators(bb3).eq([bb0, bb1, bb2, bb3].iter())); + assert!(dominators.dominators(bb0).eq([entries, bb0].iter())); + assert!(dominators.dominators(bb1).eq([entries, bb0, bb1].iter())); + assert!(dominators.dominators(bb2).eq([entries, bb0, bb1, bb2].iter())); + assert!(dominators.dominators(bb3).eq([entries, bb0, bb1, bb2, bb3].iter())); } #[test] fn test_diamond() { let mut function = Function::new(std::ptr::null()); + let entries = function.entries_block; let bb0 = function.entry_block; let bb1 = function.new_block(0); let bb2 = function.new_block(0); @@ -4576,33 +4590,35 @@ pub mod hir_build_tests { let retval = function.push_insn(bb3, Insn::Const { val: Const::CBool(true) }); function.push_insn(bb3, Insn::Return { val: retval }); + function.seal_entries(); assert_snapshot!(format!("{}", FunctionPrinter::without_snapshot(&function)), @r" fn : - bb0(): - v0:Any = Const Value(false) - IfTrue v0, bb1() - Jump bb2() bb1(): + v0:Any = Const Value(false) + IfTrue v0, bb2() Jump bb3() bb2(): - Jump bb3() + Jump bb4() bb3(): + Jump bb4() + bb4(): v5:Any = Const CBool(true) Return v5 "); let dominators = Dominators::new(&function); assert_dominators_contains_self(&function, &dominators); - assert!(dominators.dominators(bb0).eq([bb0].iter())); - assert!(dominators.dominators(bb1).eq([bb0, bb1].iter())); - assert!(dominators.dominators(bb2).eq([bb0, bb2].iter())); - assert!(dominators.dominators(bb3).eq([bb0, bb3].iter())); + assert!(dominators.dominators(bb0).eq([entries, bb0].iter())); + assert!(dominators.dominators(bb1).eq([entries, bb0, bb1].iter())); + assert!(dominators.dominators(bb2).eq([entries, bb0, bb2].iter())); + assert!(dominators.dominators(bb3).eq([entries, bb0, bb3].iter())); } #[test] fn test_complex_cfg() { let mut function = Function::new(std::ptr::null()); + let entries = function.entries_block; let bb0 = function.entry_block; let bb1 = function.new_block(0); let bb2 = function.new_block(0); @@ -4633,47 +4649,49 @@ pub mod hir_build_tests { let retval = function.push_insn(bb7, Insn::Const { val: Const::CBool(true) }); function.push_insn(bb7, Insn::Return { val: retval }); + function.seal_entries(); assert_snapshot!(format!("{}", FunctionPrinter::without_snapshot(&function)), @r" fn : - bb0(): - Jump bb1() bb1(): - v1:Any = Const Value(false) - IfTrue v1, bb2() - Jump bb4() + Jump bb2() bb2(): - Jump bb3() + v1:Any = Const Value(false) + IfTrue v1, bb3() + Jump bb5() bb3(): - v5:Any = Const Value(false) - IfTrue v5, bb5() - Jump bb7() + Jump bb4() bb4(): - Jump bb5() + v5:Any = Const Value(false) + IfTrue v5, bb6() + Jump bb8() bb5(): Jump bb6() bb6(): Jump bb7() bb7(): + Jump bb8() + bb8(): v11:Any = Const CBool(true) Return v11 "); let dominators = Dominators::new(&function); assert_dominators_contains_self(&function, &dominators); - assert!(dominators.dominators(bb0).eq([bb0].iter())); - assert!(dominators.dominators(bb1).eq([bb0, bb1].iter())); - assert!(dominators.dominators(bb2).eq([bb0, bb1, bb2].iter())); - assert!(dominators.dominators(bb3).eq([bb0, bb1, bb2, bb3].iter())); - assert!(dominators.dominators(bb4).eq([bb0, bb1, bb4].iter())); - assert!(dominators.dominators(bb5).eq([bb0, bb1, bb5].iter())); - assert!(dominators.dominators(bb6).eq([bb0, bb1, bb5, bb6].iter())); - assert!(dominators.dominators(bb7).eq([bb0, bb1, bb7].iter())); + assert!(dominators.dominators(bb0).eq([entries, bb0].iter())); + assert!(dominators.dominators(bb1).eq([entries, bb0, bb1].iter())); + assert!(dominators.dominators(bb2).eq([entries, bb0, bb1, bb2].iter())); + assert!(dominators.dominators(bb3).eq([entries, bb0, bb1, bb2, bb3].iter())); + assert!(dominators.dominators(bb4).eq([entries, bb0, bb1, bb4].iter())); + assert!(dominators.dominators(bb5).eq([entries, bb0, bb1, bb5].iter())); + assert!(dominators.dominators(bb6).eq([entries, bb0, bb1, bb5, bb6].iter())); + assert!(dominators.dominators(bb7).eq([entries, bb0, bb1, bb7].iter())); } #[test] fn test_back_edges() { let mut function = Function::new(std::ptr::null()); + let entries = function.entries_block; let bb0 = function.entry_block; let bb1 = function.new_block(0); let bb2 = function.new_block(0); @@ -4700,43 +4718,45 @@ pub mod hir_build_tests { let retval = function.push_insn(bb3, Insn::Const { val: Const::CBool(true) }); function.push_insn(bb3, Insn::Return { val: retval }); + function.seal_entries(); assert_snapshot!(format!("{}", FunctionPrinter::without_snapshot(&function)), @r" fn : - bb0(): - v0:Any = Const Value(false) - IfTrue v0, bb1() - Jump bb4() bb1(): - v3:Any = Const Value(false) - IfTrue v3, bb2() - Jump bb3() - bb2(): - Jump bb3() - bb4(): + v0:Any = Const Value(false) + IfTrue v0, bb2() Jump bb5() - bb5(): - v8:Any = Const Value(false) - IfTrue v8, bb3() + bb2(): + v3:Any = Const Value(false) + IfTrue v3, bb3() Jump bb4() bb3(): + Jump bb4() + bb5(): + Jump bb6() + bb6(): + v8:Any = Const Value(false) + IfTrue v8, bb4() + Jump bb5() + bb4(): v11:Any = Const CBool(true) Return v11 "); let dominators = Dominators::new(&function); assert_dominators_contains_self(&function, &dominators); - assert!(dominators.dominators(bb0).eq([bb0].iter())); - assert!(dominators.dominators(bb1).eq([bb0, bb1].iter())); - assert!(dominators.dominators(bb2).eq([bb0, bb1, bb2].iter())); - assert!(dominators.dominators(bb3).eq([bb0, bb3].iter())); - assert!(dominators.dominators(bb4).eq([bb0, bb4].iter())); - assert!(dominators.dominators(bb5).eq([bb0, bb4, bb5].iter())); + assert!(dominators.dominators(bb0).eq([entries, bb0].iter())); + assert!(dominators.dominators(bb1).eq([entries, bb0, bb1].iter())); + assert!(dominators.dominators(bb2).eq([entries, bb0, bb1, bb2].iter())); + assert!(dominators.dominators(bb3).eq([entries, bb0, bb3].iter())); + assert!(dominators.dominators(bb4).eq([entries, bb0, bb4].iter())); + assert!(dominators.dominators(bb5).eq([entries, bb0, bb4, bb5].iter())); } #[test] fn test_multiple_entry_blocks() { let mut function = Function::new(std::ptr::null()); + let entries = function.entries_block; let bb0 = function.entry_block; let bb1 = function.new_block(0); function.jit_entry_blocks.push(bb1); @@ -4749,13 +4769,14 @@ pub mod hir_build_tests { let retval = function.push_insn(bb2, Insn::Const { val: Const::CBool(true) }); function.push_insn(bb2, Insn::Return { val: retval }); + function.seal_entries(); assert_snapshot!(format!("{}", FunctionPrinter::without_snapshot(&function)), @r" fn : - bb0(): - Jump bb2() bb1(): - Jump bb2() + Jump bb3() bb2(): + Jump bb3() + bb3(): v2:Any = Const CBool(true) Return v2 "); @@ -4763,8 +4784,9 @@ pub mod hir_build_tests { let dominators = Dominators::new(&function); assert_dominators_contains_self(&function, &dominators); - assert!(dominators.dominators(bb1).eq([bb1].iter())); - assert!(dominators.dominators(bb2).eq([bb2].iter())); + assert!(dominators.dominators(bb0).eq([entries, bb0].iter())); + assert!(dominators.dominators(bb1).eq([entries, bb1].iter())); + assert!(dominators.dominators(bb2).eq([entries, bb2].iter())); assert!(!dominators.is_dominated_by(bb1, bb2)); } @@ -4805,21 +4827,22 @@ mod loop_info_tests { function.push_insn(bb1, Insn::Jump(edge(bb2))); + function.seal_entries(); let cfi = ControlFlowInfo::new(&function); let dominators = Dominators::new(&function); let loop_info = LoopInfo::new(&cfi, &dominators); assert_snapshot!(format!("{}", FunctionPrinter::without_snapshot(&function)), @r" fn : - bb0(): - Jump bb2() + bb1(): + Jump bb3() v1:Any = Const Value(false) - bb2(): - IfTrue v1, bb1() + bb3(): + IfTrue v1, bb2() v3:Any = Const CBool(true) Return v3 - bb1(): - Jump bb2() + bb2(): + Jump bb3() "); assert!(loop_info.is_loop_header(bb2)); @@ -4871,25 +4894,26 @@ mod loop_info_tests { let retval = function.push_insn(bb4, Insn::Const { val: Const::CBool(true) }); let _ = function.push_insn(bb4, Insn::Return { val: retval }); + function.seal_entries(); let cfi = ControlFlowInfo::new(&function); let dominators = Dominators::new(&function); let loop_info = LoopInfo::new(&cfi, &dominators); assert_snapshot!(format!("{}", FunctionPrinter::without_snapshot(&function)), @r" fn : - bb0(): - Jump bb1() bb1(): Jump bb2() bb2(): - v2:Any = Const Value(false) - IfTrue v2, bb1() Jump bb3() bb3(): - v5:Any = Const Value(true) - IfTrue v5, bb0() + v2:Any = Const Value(false) + IfTrue v2, bb2() Jump bb4() bb4(): + v5:Any = Const Value(true) + IfTrue v5, bb1() + Jump bb5() + bb5(): v8:Any = Const CBool(true) Return v8 "); @@ -4958,30 +4982,31 @@ mod loop_info_tests { let retval = function.push_insn(bb6, Insn::Const { val: Const::CBool(true) }); let _ = function.push_insn(bb6, Insn::Return { val: retval }); + function.seal_entries(); let cfi = ControlFlowInfo::new(&function); let dominators = Dominators::new(&function); let loop_info = LoopInfo::new(&cfi, &dominators); assert_snapshot!(format!("{}", FunctionPrinter::without_snapshot(&function)), @r" fn : - bb0(): - v0:Any = Const Value(false) - IfTrue v0, bb1() - Jump bb3() bb1(): - Jump bb2() + v0:Any = Const Value(false) + IfTrue v0, bb2() + Jump bb4() bb2(): - IfTrue v0, bb1() - Jump bb5() + Jump bb3() bb3(): - Jump bb4() + IfTrue v0, bb2() + Jump bb6() bb4(): - IfTrue v0, bb3() Jump bb5() bb5(): - IfTrue v0, bb0() + IfTrue v0, bb4() Jump bb6() bb6(): + IfTrue v0, bb1() + Jump bb7() + bb7(): v11:Any = Const CBool(true) Return v11 "); @@ -5032,17 +5057,18 @@ mod loop_info_tests { let retval = function.push_insn(bb2, Insn::Const { val: Const::CBool(true) }); let _ = function.push_insn(bb2, Insn::Return { val: retval }); + function.seal_entries(); let cfi = ControlFlowInfo::new(&function); let dominators = Dominators::new(&function); let loop_info = LoopInfo::new(&cfi, &dominators); assert_snapshot!(format!("{}", FunctionPrinter::without_snapshot(&function)), @r" fn : - bb0(): - Jump bb1() bb1(): Jump bb2() bb2(): + Jump bb3() + bb3(): v2:Any = Const CBool(true) Return v2 "); @@ -5104,23 +5130,24 @@ mod loop_info_tests { let _ = function.push_insn(bb4, Insn::IfTrue {val: cond, target: edge(bb1)}); let _ = function.push_insn(bb5, Insn::IfTrue {val: cond, target: edge(bb0)}); + function.seal_entries(); assert_snapshot!(format!("{}", FunctionPrinter::without_snapshot(&function)), @r" fn : - bb0(): - v0:Any = Const Value(false) - Jump bb1() bb1(): + v0:Any = Const Value(false) Jump bb2() bb2(): Jump bb3() bb3(): Jump bb4() - IfTrue v0, bb2() bb4(): Jump bb5() - IfTrue v0, bb1() + IfTrue v0, bb3() bb5(): - IfTrue v0, bb0() + Jump bb6() + IfTrue v0, bb2() + bb6(): + IfTrue v0, bb1() "); let cfi = ControlFlowInfo::new(&function); @@ -5169,7 +5196,7 @@ mod iongraph_tests { function.push_insn(bb0, Insn::Return { val: retval }); let json = function.to_iongraph_pass("simple"); - assert_snapshot!(json.to_string(), @r#"{"name":"simple", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[], "instructions":[{"ptr":4096, "id":0, "opcode":"Const CBool(true)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}, {"ptr":4097, "id":1, "opcode":"Return v0", "attributes":[], "inputs":[0], "uses":[], "memInputs":[], "type":""}]}]}, "lir":{"blocks":[]}}"#); + assert_snapshot!(json.to_string(), @r#"{"name":"simple", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[], "instructions":[]}]}, "lir":{"blocks":[]}}"#); } #[test] @@ -5184,7 +5211,7 @@ mod iongraph_tests { function.push_insn(bb1, Insn::Return { val: retval }); let json = function.to_iongraph_pass("two_blocks"); - assert_snapshot!(json.to_string(), @r#"{"name":"two_blocks", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[1], "instructions":[{"ptr":4096, "id":0, "opcode":"Jump bb1()", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":""}]}, {"ptr":4097, "id":1, "loopDepth":0, "attributes":[], "predecessors":[0], "successors":[], "instructions":[{"ptr":4097, "id":1, "opcode":"Const CBool(false)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}, {"ptr":4098, "id":2, "opcode":"Return v1", "attributes":[], "inputs":[1], "uses":[], "memInputs":[], "type":""}]}]}, "lir":{"blocks":[]}}"#); + assert_snapshot!(json.to_string(), @r#"{"name":"two_blocks", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[], "instructions":[]}]}, "lir":{"blocks":[]}}"#); } #[test] @@ -5196,7 +5223,7 @@ mod iongraph_tests { function.push_insn(bb0, Insn::Return { val: val1 }); let json = function.to_iongraph_pass("multiple_instructions"); - assert_snapshot!(json.to_string(), @r#"{"name":"multiple_instructions", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[], "instructions":[{"ptr":4096, "id":0, "opcode":"Const CBool(true)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}, {"ptr":4097, "id":1, "opcode":"Return v0", "attributes":[], "inputs":[0], "uses":[], "memInputs":[], "type":""}]}]}, "lir":{"blocks":[]}}"#); + assert_snapshot!(json.to_string(), @r#"{"name":"multiple_instructions", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[], "instructions":[]}]}, "lir":{"blocks":[]}}"#); } #[test] @@ -5215,7 +5242,7 @@ mod iongraph_tests { function.push_insn(bb1, Insn::Return { val: retval2 }); let json = function.to_iongraph_pass("conditional_branch"); - assert_snapshot!(json.to_string(), @r#"{"name":"conditional_branch", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[1], "instructions":[{"ptr":4096, "id":0, "opcode":"Const CBool(true)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}, {"ptr":4097, "id":1, "opcode":"IfTrue v0, bb1()", "attributes":[], "inputs":[0], "uses":[], "memInputs":[], "type":""}, {"ptr":4098, "id":2, "opcode":"Const CBool(false)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}, {"ptr":4099, "id":3, "opcode":"Return v2", "attributes":[], "inputs":[2], "uses":[], "memInputs":[], "type":""}]}, {"ptr":4097, "id":1, "loopDepth":0, "attributes":[], "predecessors":[0], "successors":[], "instructions":[{"ptr":4100, "id":4, "opcode":"Const CBool(true)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}, {"ptr":4101, "id":5, "opcode":"Return v4", "attributes":[], "inputs":[4], "uses":[], "memInputs":[], "type":""}]}]}, "lir":{"blocks":[]}}"#); + assert_snapshot!(json.to_string(), @r#"{"name":"conditional_branch", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[], "instructions":[]}]}, "lir":{"blocks":[]}}"#); } #[test] @@ -5236,7 +5263,7 @@ mod iongraph_tests { function.push_insn(bb1, Insn::Jump(edge(bb2))); let json = function.to_iongraph_pass("loop_structure"); - assert_snapshot!(json.to_string(), @r#"{"name":"loop_structure", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[2], "instructions":[{"ptr":4096, "id":0, "opcode":"Jump bb2()", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":""}, {"ptr":4097, "id":1, "opcode":"Const Value(false)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}]}, {"ptr":4098, "id":2, "loopDepth":1, "attributes":["loopheader"], "predecessors":[0, 1], "successors":[1], "instructions":[{"ptr":4098, "id":2, "opcode":"IfTrue v1, bb1()", "attributes":[], "inputs":[1], "uses":[], "memInputs":[], "type":""}, {"ptr":4099, "id":3, "opcode":"Const CBool(true)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}, {"ptr":4100, "id":4, "opcode":"Return v3", "attributes":[], "inputs":[3], "uses":[], "memInputs":[], "type":""}]}, {"ptr":4097, "id":1, "loopDepth":1, "attributes":["backedge"], "predecessors":[2], "successors":[2], "instructions":[{"ptr":4101, "id":5, "opcode":"Jump bb2()", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":""}]}]}, "lir":{"blocks":[]}}"#); + assert_snapshot!(json.to_string(), @r#"{"name":"loop_structure", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[], "instructions":[]}]}, "lir":{"blocks":[]}}"#); } #[test] @@ -5257,6 +5284,6 @@ mod iongraph_tests { function.push_insn(bb2, Insn::Return { val: retval2 }); let json = function.to_iongraph_pass("multiple_successors"); - assert_snapshot!(json.to_string(), @r#"{"name":"multiple_successors", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[1, 2], "instructions":[{"ptr":4096, "id":0, "opcode":"Const CBool(true)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}, {"ptr":4097, "id":1, "opcode":"IfTrue v0, bb1()", "attributes":[], "inputs":[0], "uses":[], "memInputs":[], "type":""}, {"ptr":4098, "id":2, "opcode":"Jump bb2()", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":""}]}, {"ptr":4097, "id":1, "loopDepth":0, "attributes":[], "predecessors":[0], "successors":[], "instructions":[{"ptr":4099, "id":3, "opcode":"Const CBool(true)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}, {"ptr":4100, "id":4, "opcode":"Return v3", "attributes":[], "inputs":[3], "uses":[], "memInputs":[], "type":""}]}, {"ptr":4098, "id":2, "loopDepth":0, "attributes":[], "predecessors":[0], "successors":[], "instructions":[{"ptr":4101, "id":5, "opcode":"Const CBool(false)", "attributes":[], "inputs":[], "uses":[], "memInputs":[], "type":"Any"}, {"ptr":4102, "id":6, "opcode":"Return v5", "attributes":[], "inputs":[5], "uses":[], "memInputs":[], "type":""}]}]}, "lir":{"blocks":[]}}"#); + assert_snapshot!(json.to_string(), @r#"{"name":"multiple_successors", "mir":{"blocks":[{"ptr":4096, "id":0, "loopDepth":0, "attributes":[], "predecessors":[], "successors":[], "instructions":[]}]}, "lir":{"blocks":[]}}"#); } } From c058a98866d59072ea0dc6009c2b5d4da9a566d2 Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Thu, 19 Feb 2026 13:05:41 -0500 Subject: [PATCH 03/22] ZJIT: Replace dominator set-intersection with Cooper's idom algorithm --- zjit/src/hir.rs | 155 ++++++++++++++++++++++++------------------ zjit/src/hir/tests.rs | 50 +++++++------- 2 files changed, 113 insertions(+), 92 deletions(-) diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index e6f33541581ddc..aa55c3044b4df7 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -7648,98 +7648,119 @@ fn compile_jit_entry_state(fun: &mut Function, jit_entry_block: BlockId, jit_ent (self_param, entry_state) } -pub struct Dominators<'a> { - f: &'a Function, - dominators: Vec>, +pub struct Dominators { + /// Immediate dominator for each block, indexed by BlockId. + /// idom(root) = root (self-loop is sentinel), idom[unreachable] == IDOM_NONE. + idoms: Vec, } -impl<'a> Dominators<'a> { - pub fn new(f: &'a Function) -> Self { +/// Sentinel value for "no idom computed yet". +const IDOM_NONE: BlockId = BlockId(usize::MAX); + +impl Dominators { + pub fn new(f: &Function) -> Self { let mut cfi = ControlFlowInfo::new(f); Self::with_cfi(f, &mut cfi) } - pub fn with_cfi(f: &'a Function, cfi: &mut ControlFlowInfo) -> Self { - let block_ids = f.rpo(); - let mut dominators = vec![vec![]; f.blocks.len()]; - - // Compute dominators for each node using fixed point iteration. - // Approach can be found in Figure 1 of: - // https://www.cs.tufts.edu/~nr/cs257/archive/keith-cooper/dom14.pdf - // - // Initially we set: - // - // dom(entry) = {entry} for each entry block - // dom(b != entry) = {all nodes} - // - // Iteratively, apply: - // - // dom(b) = {b} union intersect(dom(p) for p in predecessors(b)) - // - // When we've run the algorithm and the dominator set no longer changes - // between iterations, then we have found the dominator sets. - - // Set up entries_block as the sole root. - // The entries_block is only dominated by itself. - dominators[f.entries_block.0] = vec![f.entries_block]; + /// Compute immediate dominators using the "engineered algorithm" from + /// Cooper, Harvey & Kennedy, "A Simple, Fast Dominance Algorithm" (2001), + /// Figure 3: + pub fn with_cfi(f: &Function, cfi: &mut ControlFlowInfo) -> Self { + let rpo = f.rpo(); + let num_blocks = f.blocks.len(); - // Setup the initial dominator sets. - for block_id in &block_ids { - if *block_id != f.entries_block { - // Non-root blocks are initially dominated by all other blocks. - dominators[block_id.0] = block_ids.clone(); - } + // Map BlockId → RPO index for O(1) lookup in intersect. + let mut rpo_order = vec![usize::MAX; num_blocks]; + for (idx, &block) in rpo.iter().enumerate() { + rpo_order[block.0] = idx; } + // Initialize idom: root's idom is itself, everything else is undefined. + let mut idoms = vec![IDOM_NONE; num_blocks]; + let root = f.entries_block; + idoms[root.0] = root; + let mut changed = true; while changed { changed = false; - - for block_id in &block_ids { - if *block_id == f.entries_block { - continue; - } - - // Get all predecessors for a given block. - let block_preds: Vec = cfi.predecessors(*block_id).collect(); - if block_preds.is_empty() { - continue; - } - - let mut new_doms = dominators[block_preds[0].0].clone(); - - // Compute the intersection of predecessor dominator sets into `new_doms`. - for pred_id in &block_preds[1..] { - let pred_doms = &dominators[pred_id.0]; - // Only keep a dominator in `new_doms` if it is also found in pred_doms - new_doms.retain(|d| pred_doms.contains(d)); + for &block in &rpo { + if block == root { continue; } + + // Find the first predecessor that already has an idom computed. + let preds: Vec = cfi.predecessors(block).collect(); + let mut new_idom = IDOM_NONE; + for &p in &preds { + if idoms[p.0] != IDOM_NONE { + new_idom = p; + break; + } } + if new_idom == IDOM_NONE { continue; } - // Insert sorted into `new_doms`. - match new_doms.binary_search(block_id) { - Ok(_) => {} - Err(pos) => new_doms.insert(pos, *block_id) + // Intersect with remaining processed predecessors. + for &p in &preds { + if p == new_idom { continue; } + if idoms[p.0] != IDOM_NONE { + new_idom = Self::intersect(&idoms, &rpo_order, p, new_idom); + } } - // If we have computed a new dominator set, then we can update - // the dominators and mark that we need another iteration. - if dominators[block_id.0] != new_doms { - dominators[block_id.0] = new_doms; + if idoms[block.0] != new_idom { + idoms[block.0] = new_idom; changed = true; } } } - Self { f, dominators } + Self { idoms } } + /// Walk up the dominator tree from two fingers until they meet. + /// Uses RPO indices: a node with a *lower* RPO index is *higher* in the tree. + fn intersect(idoms: &[BlockId], rpo_order: &[usize], mut b1: BlockId, mut b2: BlockId) -> BlockId { + while b1 != b2 { + while rpo_order[b1.0] > rpo_order[b2.0] { + b1 = idoms[b1.0]; + } + while rpo_order[b2.0] > rpo_order[b1.0] { + b2 = idoms[b2.0]; + } + } + b1 + } + + /// Return the immediate dominator of `block`. + pub fn idom(&self, block: BlockId) -> BlockId { + self.idoms[block.0] + } + /// Return true if `left` is dominated by `right`. pub fn is_dominated_by(&self, left: BlockId, right: BlockId) -> bool { - self.dominators(left).any(|&b| b == right) + if self.idom(left) == IDOM_NONE { return false; } + let mut block = left; + loop { + if block == right { return true; } + if self.idom(block) == block { return false; } + block = self.idom(block); + } } - pub fn dominators(&self, block: BlockId) -> Iter<'_, BlockId> { - self.dominators[block.0].iter() + /// Compute the full dominator set for `block` by walking the idom chain to the root. + /// Returns dominators sorted by BlockId (ascending). Only used in tests; + /// production code should use `idom()` or `is_dominated_by()` instead. + pub fn dominators(&self, block: BlockId) -> Vec { + let mut doms = Vec::new(); + if self.idom(block) != IDOM_NONE { + let mut b = block; + loop { + doms.push(b); + if self.idom(b) == b { break; } + b = self.idom(b); + } + } + doms.sort(); + doms } } @@ -7831,14 +7852,14 @@ impl<'a> ControlFlowInfo<'a> { pub struct LoopInfo<'a> { cfi: &'a ControlFlowInfo<'a>, - dominators: &'a Dominators<'a>, + dominators: &'a Dominators, loop_depths: HashMap, loop_headers: BlockSet, back_edge_sources: BlockSet, } impl<'a> LoopInfo<'a> { - pub fn new(cfi: &'a ControlFlowInfo<'a>, dominators: &'a Dominators<'a>) -> Self { + pub fn new(cfi: &'a ControlFlowInfo<'a>, dominators: &'a Dominators) -> Self { let mut loop_headers: BlockSet = BlockSet::with_capacity(cfi.function.num_blocks()); let mut loop_depths: HashMap = HashMap::new(); let mut back_edge_sources: BlockSet = BlockSet::with_capacity(cfi.function.num_blocks()); diff --git a/zjit/src/hir/tests.rs b/zjit/src/hir/tests.rs index 27f88ef5b6b543..f94057d414bbf7 100644 --- a/zjit/src/hir/tests.rs +++ b/zjit/src/hir/tests.rs @@ -4564,10 +4564,10 @@ pub mod hir_build_tests { let dominators = Dominators::new(&function); assert_dominators_contains_self(&function, &dominators); - assert!(dominators.dominators(bb0).eq([entries, bb0].iter())); - assert!(dominators.dominators(bb1).eq([entries, bb0, bb1].iter())); - assert!(dominators.dominators(bb2).eq([entries, bb0, bb1, bb2].iter())); - assert!(dominators.dominators(bb3).eq([entries, bb0, bb1, bb2, bb3].iter())); + assert_eq!(dominators.dominators(bb0), vec![entries, bb0]); + assert_eq!(dominators.dominators(bb1), vec![entries, bb0, bb1]); + assert_eq!(dominators.dominators(bb2), vec![entries, bb0, bb1, bb2]); + assert_eq!(dominators.dominators(bb3), vec![entries, bb0, bb1, bb2, bb3]); } #[test] @@ -4608,10 +4608,10 @@ pub mod hir_build_tests { let dominators = Dominators::new(&function); assert_dominators_contains_self(&function, &dominators); - assert!(dominators.dominators(bb0).eq([entries, bb0].iter())); - assert!(dominators.dominators(bb1).eq([entries, bb0, bb1].iter())); - assert!(dominators.dominators(bb2).eq([entries, bb0, bb2].iter())); - assert!(dominators.dominators(bb3).eq([entries, bb0, bb3].iter())); + assert_eq!(dominators.dominators(bb0), vec![entries, bb0]); + assert_eq!(dominators.dominators(bb1), vec![entries, bb0, bb1]); + assert_eq!(dominators.dominators(bb2), vec![entries, bb0, bb2]); + assert_eq!(dominators.dominators(bb3), vec![entries, bb0, bb3]); } #[test] @@ -4677,14 +4677,14 @@ pub mod hir_build_tests { let dominators = Dominators::new(&function); assert_dominators_contains_self(&function, &dominators); - assert!(dominators.dominators(bb0).eq([entries, bb0].iter())); - assert!(dominators.dominators(bb1).eq([entries, bb0, bb1].iter())); - assert!(dominators.dominators(bb2).eq([entries, bb0, bb1, bb2].iter())); - assert!(dominators.dominators(bb3).eq([entries, bb0, bb1, bb2, bb3].iter())); - assert!(dominators.dominators(bb4).eq([entries, bb0, bb1, bb4].iter())); - assert!(dominators.dominators(bb5).eq([entries, bb0, bb1, bb5].iter())); - assert!(dominators.dominators(bb6).eq([entries, bb0, bb1, bb5, bb6].iter())); - assert!(dominators.dominators(bb7).eq([entries, bb0, bb1, bb7].iter())); + assert_eq!(dominators.dominators(bb0), vec![entries, bb0]); + assert_eq!(dominators.dominators(bb1), vec![entries, bb0, bb1]); + assert_eq!(dominators.dominators(bb2), vec![entries, bb0, bb1, bb2]); + assert_eq!(dominators.dominators(bb3), vec![entries, bb0, bb1, bb2, bb3]); + assert_eq!(dominators.dominators(bb4), vec![entries, bb0, bb1, bb4]); + assert_eq!(dominators.dominators(bb5), vec![entries, bb0, bb1, bb5]); + assert_eq!(dominators.dominators(bb6), vec![entries, bb0, bb1, bb5, bb6]); + assert_eq!(dominators.dominators(bb7), vec![entries, bb0, bb1, bb7]); } #[test] @@ -4744,12 +4744,12 @@ pub mod hir_build_tests { let dominators = Dominators::new(&function); assert_dominators_contains_self(&function, &dominators); - assert!(dominators.dominators(bb0).eq([entries, bb0].iter())); - assert!(dominators.dominators(bb1).eq([entries, bb0, bb1].iter())); - assert!(dominators.dominators(bb2).eq([entries, bb0, bb1, bb2].iter())); - assert!(dominators.dominators(bb3).eq([entries, bb0, bb3].iter())); - assert!(dominators.dominators(bb4).eq([entries, bb0, bb4].iter())); - assert!(dominators.dominators(bb5).eq([entries, bb0, bb4, bb5].iter())); + assert_eq!(dominators.dominators(bb0), vec![entries, bb0]); + assert_eq!(dominators.dominators(bb1), vec![entries, bb0, bb1]); + assert_eq!(dominators.dominators(bb2), vec![entries, bb0, bb1, bb2]); + assert_eq!(dominators.dominators(bb3), vec![entries, bb0, bb3]); + assert_eq!(dominators.dominators(bb4), vec![entries, bb0, bb4]); + assert_eq!(dominators.dominators(bb5), vec![entries, bb0, bb4, bb5]); } #[test] @@ -4784,9 +4784,9 @@ pub mod hir_build_tests { let dominators = Dominators::new(&function); assert_dominators_contains_self(&function, &dominators); - assert!(dominators.dominators(bb0).eq([entries, bb0].iter())); - assert!(dominators.dominators(bb1).eq([entries, bb1].iter())); - assert!(dominators.dominators(bb2).eq([entries, bb2].iter())); + assert_eq!(dominators.dominators(bb0), vec![entries, bb0]); + assert_eq!(dominators.dominators(bb1), vec![entries, bb1]); + assert_eq!(dominators.dominators(bb2), vec![entries, bb2]); assert!(!dominators.is_dominated_by(bb1, bb2)); } From 607af489a2f3fa3e3eeee5834517c89b38367409 Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Wed, 18 Feb 2026 10:16:48 -0500 Subject: [PATCH 04/22] ZJIT: Measure side-exit compile time Also report it as a percentage of overall compile time. --- zjit.rb | 7 ++++++- zjit/src/backend/lir.rs | 9 +++++++++ zjit/src/stats.rs | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/zjit.rb b/zjit.rb index 7c515c391b95c6..477475eedaa9ac 100644 --- a/zjit.rb +++ b/zjit.rb @@ -177,6 +177,9 @@ def stats_string if stats[:code_region_bytes]&.nonzero? stats[:side_exit_size_ratio] = stats[:side_exit_size].to_f / stats[:code_region_bytes] * 100 end + if stats[:compile_time_ns]&.nonzero? + stats[:compile_side_exit_time_ratio] = stats[:compile_side_exit_time_ns].to_f / stats[:compile_time_ns] * 100 + end # Show counters independent from exit_* or dynamic_send_* print_counters_with_prefix(prefix: 'not_inlined_cfuncs_', prompt: 'not inlined C methods', buf:, stats:, limit: 20) @@ -226,6 +229,8 @@ def stats_string :failed_iseq_count, :compile_time_ns, + :compile_side_exit_time_ns, + :compile_side_exit_time_ratio, :profile_time_ns, :gc_time_ns, :invalidation_time_ns, @@ -296,7 +301,7 @@ def print_counters(keys, buf:, stats:, right_align: false, base: nil) case key when :ratio_in_zjit value = '%0.1f%%' % value - when :guard_type_exit_ratio, :guard_shape_exit_ratio, :side_exit_size_ratio + when :guard_type_exit_ratio, :guard_shape_exit_ratio, :side_exit_size_ratio, :compile_side_exit_time_ratio value = '%0.1f%%' % value when /_time_ns\z/ key = key.to_s.sub(/_time_ns\z/, '_time') diff --git a/zjit/src/backend/lir.rs b/zjit/src/backend/lir.rs index f8590b1049f150..de3e55ac000c88 100644 --- a/zjit/src/backend/lir.rs +++ b/zjit/src/backend/lir.rs @@ -2291,6 +2291,9 @@ impl Assembler }); } + // Measure time spent compiling side-exit LIR + let side_exit_start = std::time::Instant::now(); + for ((block_id, idx), target) in targets { // Compile a side exit. Note that this is past the split pass and alloc_regs(), // so you can't use an instruction that returns a VReg. @@ -2353,6 +2356,12 @@ impl Assembler *self.basic_blocks[block_id].insns[idx].target_mut().unwrap() = counted_exit.unwrap_or(compiled_exit); } } + + // Measure time spent compiling side-exit LIR + if !compiled_exits.is_empty() { + let nanos = side_exit_start.elapsed().as_nanos(); + crate::stats::incr_counter_by(crate::stats::Counter::compile_side_exit_time_ns, nanos as u64); + } } } diff --git a/zjit/src/stats.rs b/zjit/src/stats.rs index 2fb233bb0f4493..8d7ca808aa703f 100644 --- a/zjit/src/stats.rs +++ b/zjit/src/stats.rs @@ -162,6 +162,7 @@ make_counters! { invalidation_time_ns, side_exit_size, + compile_side_exit_time_ns, } // Exit counters that are summed as side_exit_count From b205bf613ff56d21dcaa315c08d577c0a7a056dd Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Wed, 18 Feb 2026 11:09:48 -0500 Subject: [PATCH 05/22] ZJIT: Measure how much each part of compile-time costs --- zjit.rb | 7 +++++++ zjit/src/codegen.rs | 12 +++++++----- zjit/src/hir.rs | 21 ++++++++++++++++++++- zjit/src/stats.rs | 8 ++++++++ 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/zjit.rb b/zjit.rb index 477475eedaa9ac..ce489aaf932e0b 100644 --- a/zjit.rb +++ b/zjit.rb @@ -231,6 +231,13 @@ def stats_string :compile_time_ns, :compile_side_exit_time_ns, :compile_side_exit_time_ratio, + :compile_hir_time_ns, + :compile_hir_build_time_ns, + :compile_hir_strength_reduce_time_ns, + :compile_hir_fold_constants_time_ns, + :compile_hir_clean_cfg_time_ns, + :compile_hir_eliminate_dead_code_time_ns, + :compile_lir_time_ns, :profile_time_ns, :gc_time_ns, :invalidation_time_ns, diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs index cadb14a8d43de9..0d7c70d5971dae 100644 --- a/zjit/src/codegen.rs +++ b/zjit/src/codegen.rs @@ -133,9 +133,9 @@ fn gen_iseq_entry_point(cb: &mut CodeBlock, iseq: IseqPtr, jit_exception: bool) } // Compile ISEQ into High-level IR - let function = compile_iseq(iseq).inspect_err(|_| { + let function = crate::stats::with_time_stat(Counter::compile_hir_time_ns, || compile_iseq(iseq).inspect_err(|_| { incr_counter!(failed_iseq_count); - })?; + }))?; // Compile the High-level IR let IseqCodePtrs { start_ptr, .. } = gen_iseq(cb, iseq, Some(&function)).inspect_err(|err| { @@ -247,11 +247,12 @@ fn gen_iseq_body(cb: &mut CodeBlock, iseq: IseqPtr, mut version: IseqVersionRef, // Convert ISEQ into optimized High-level IR if not given let function = match function { Some(function) => function, - None => &compile_iseq(iseq)?, + None => &crate::stats::with_time_stat(Counter::compile_hir_time_ns, || compile_iseq(iseq))?, }; // Compile the High-level IR - let (iseq_code_ptrs, gc_offsets, iseq_calls) = gen_function(cb, iseq, version, function)?; + let (iseq_code_ptrs, gc_offsets, iseq_calls) = + crate::stats::with_time_stat(Counter::compile_lir_time_ns, || gen_function(cb, iseq, version, function))?; // Stub callee ISEQs for JIT-to-JIT calls for iseq_call in iseq_calls.iter() { @@ -2645,7 +2646,8 @@ fn compile_iseq(iseq: IseqPtr) -> Result { return Err(CompileError::IseqStackTooLarge); } - let mut function = match iseq_to_hir(iseq) { + let hir = crate::stats::with_time_stat(Counter::compile_hir_build_time_ns, || iseq_to_hir(iseq)); + let mut function = match hir { Ok(function) => function, Err(err) => { debug!("ZJIT: iseq_to_hir: {err:?}: {}", iseq_get_location(iseq, 0)); diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index aa55c3044b4df7..5b09c8dcfb1282 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -5193,9 +5193,28 @@ impl Function { let mut passes: Vec = Vec::new(); let should_dump = get_option!(dump_hir_iongraph); + macro_rules! ident_equal { + ($a:ident, $b:ident) => { stringify!($a) == stringify!($b) }; + } + macro_rules! run_pass { ($name:ident) => { - self.$name(); + // Bucket all strength reduction together + let counter = if ident_equal!($name, type_specialize) + || ident_equal!($name, inline) + || ident_equal!($name, optimize_getivar) + || ident_equal!($name, optimize_c_calls) { + Counter::compile_hir_strength_reduce_time_ns + } else if ident_equal!($name, fold_constants) { + Counter::compile_hir_fold_constants_time_ns + } else if ident_equal!($name, clean_cfg) { + Counter::compile_hir_clean_cfg_time_ns + } else if ident_equal!($name, eliminate_dead_code) { + Counter::compile_hir_eliminate_dead_code_time_ns + } else { + unimplemented!("Counter for pass {}", stringify!($name)); + }; + crate::stats::with_time_stat(counter, || self.$name()); #[cfg(debug_assertions)] self.assert_validates(); if should_dump { passes.push( diff --git a/zjit/src/stats.rs b/zjit/src/stats.rs index 8d7ca808aa703f..23ff9b16cf77e1 100644 --- a/zjit/src/stats.rs +++ b/zjit/src/stats.rs @@ -163,6 +163,14 @@ make_counters! { side_exit_size, compile_side_exit_time_ns, + + compile_hir_time_ns, + compile_hir_build_time_ns, + compile_hir_strength_reduce_time_ns, + compile_hir_fold_constants_time_ns, + compile_hir_clean_cfg_time_ns, + compile_hir_eliminate_dead_code_time_ns, + compile_lir_time_ns, } // Exit counters that are summed as side_exit_count From bb8881f31ee1367f50d228e970bdf2dfddd25e18 Mon Sep 17 00:00:00 2001 From: Andrii Furmanets Date: Wed, 18 Feb 2026 21:12:10 +0200 Subject: [PATCH 06/22] [ruby/rubygems] Honor concurrent_downloads from gemrc https://github.com/ruby/rubygems/commit/6a187a0a99 --- lib/rubygems/config_file.rb | 5 +++-- test/rubygems/test_gem_config_file.rb | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index d34480f4743871..06ca73157a1916 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -220,7 +220,8 @@ def initialize(args) @hash.transform_keys! do |k| # gemhome and gempath are not working with symbol keys if %w[backtrace bulk_threshold verbose update_sources cert_expiration_length_days - install_extension_in_lib ipv4_fallback_enabled global_gem_cache sources + concurrent_downloads install_extension_in_lib ipv4_fallback_enabled + global_gem_cache sources disable_default_gem_server ssl_verify_mode ssl_ca_cert ssl_client_cert].include?(k) k.to_sym else @@ -233,7 +234,7 @@ def initialize(args) @bulk_threshold = @hash[:bulk_threshold] if @hash.key? :bulk_threshold @verbose = @hash[:verbose] if @hash.key? :verbose @update_sources = @hash[:update_sources] if @hash.key? :update_sources - # TODO: We should handle concurrent_downloads same as other options + @concurrent_downloads = @hash[:concurrent_downloads] if @hash.key? :concurrent_downloads @cert_expiration_length_days = @hash[:cert_expiration_length_days] if @hash.key? :cert_expiration_length_days @install_extension_in_lib = @hash[:install_extension_in_lib] if @hash.key? :install_extension_in_lib @ipv4_fallback_enabled = @hash[:ipv4_fallback_enabled] if @hash.key? :ipv4_fallback_enabled diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb index 6ed51f2704b8b6..b38628fdc4d85c 100644 --- a/test/rubygems/test_gem_config_file.rb +++ b/test/rubygems/test_gem_config_file.rb @@ -113,6 +113,16 @@ def test_initialize_global_gem_cache_gemrc assert_equal true, @cfg.global_gem_cache end + def test_initialize_concurrent_downloads + File.open @temp_conf, "w" do |fp| + fp.puts "concurrent_downloads: 2" + end + + util_config_file %W[--config-file #{@temp_conf}] + + assert_equal 2, @cfg.concurrent_downloads + end + def test_initialize_handle_arguments_config_file util_config_file %W[--config-file #{@temp_conf}] From 7ca0aa5f73303268fbc3589c1ba792c7389cb4c1 Mon Sep 17 00:00:00 2001 From: Matt Valentine-House Date: Mon, 16 Feb 2026 16:47:50 +0000 Subject: [PATCH 07/22] Copy terminator when moving strings to the heap. The embedded-to-heap path copied RSTRING_LEN(str) bytes into an ALLOC_N buffer, missing the null terminator (and any slot padding). Copy str_embed_capa(str) bytes instead. Always safe since we only enter this path when str_embed_capa(str) < capacity + termlen. --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/string.c b/string.c index 6b8cdf240d4192..0fd3ef17b40e00 100644 --- a/string.c +++ b/string.c @@ -164,7 +164,7 @@ VALUE rb_cSymbol; if (str_embed_capa(str) < capacity + termlen) {\ char *const tmp = ALLOC_N(char, (size_t)(capacity) + (termlen));\ const long tlen = RSTRING_LEN(str);\ - memcpy(tmp, RSTRING_PTR(str), tlen);\ + memcpy(tmp, RSTRING_PTR(str), str_embed_capa(str));\ RSTRING(str)->as.heap.ptr = tmp;\ RSTRING(str)->len = tlen;\ STR_SET_NOEMBED(str);\ From e6f73fcf49179472a532ab2ca26d8a0903be5b21 Mon Sep 17 00:00:00 2001 From: Matt Valentine-House Date: Wed, 18 Feb 2026 12:42:15 +0000 Subject: [PATCH 08/22] Remove HEAP_PAGE_OBJ_LIMIT This was useful when there was only a single size pool to have an easy way of referencing the average number of objects a page could hold (this would vary by a few in real terms because of page alignment). But with multiple heaps, each heap contains pages with different numbers of objects because slot sizes are different. So when we use HEAP_PAGE_OBJ_LIMIT to do any kind of calculations: such as calculating freeable pages), then we're significantly underestimating the number of freeable pages in the larger size pools, which will cause us to hold on to pages unnecessarily. This commit replaces uses of HEAP_PAGE_OBJ_LIMIT with a more accurate approximation for the actual heap being manipulated. It also removes HEAP_PAGE_OBJ_LIMIT from GC::INTERNAL_CONSTANTS --- gc/default/default.c | 15 ++++++++++----- test/ruby/test_gc.rb | 1 - 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gc/default/default.c b/gc/default/default.c index 9771af004eccc3..57d3f5b0da247c 100644 --- a/gc/default/default.c +++ b/gc/default/default.c @@ -472,7 +472,7 @@ typedef struct rb_heap_struct { uintptr_t compact_cursor_index; struct heap_page *pooled_pages; size_t total_pages; /* total page count in a heap */ - size_t total_slots; /* total slot count (about total_pages * HEAP_PAGE_OBJ_LIMIT) */ + size_t total_slots; /* total slot count */ } rb_heap_t; @@ -592,6 +592,7 @@ typedef struct rb_objspace { double gc_sweep_start_time; size_t total_allocated_objects_at_gc_start; size_t heap_used_at_gc_start; + size_t heap_total_slots_at_gc_start; /* basic statistics */ size_t count; @@ -700,7 +701,6 @@ enum { HEAP_PAGE_ALIGN = (1UL << HEAP_PAGE_ALIGN_LOG), HEAP_PAGE_ALIGN_MASK = (~(~0UL << HEAP_PAGE_ALIGN_LOG)), HEAP_PAGE_SIZE = HEAP_PAGE_ALIGN, - HEAP_PAGE_OBJ_LIMIT = (unsigned int)((HEAP_PAGE_SIZE - sizeof(struct heap_page_header)) / BASE_SLOT_SIZE), HEAP_PAGE_BITMAP_LIMIT = CEILDIV(CEILDIV(HEAP_PAGE_SIZE, BASE_SLOT_SIZE), BITS_BITLENGTH), HEAP_PAGE_BITMAP_SIZE = (BITS_SIZE * HEAP_PAGE_BITMAP_LIMIT), }; @@ -5454,8 +5454,13 @@ gc_marks_finish(rb_objspace_t *objspace) max_free_slots = total_init_slots; } + /* Approximate freeable pages using the average slots-per-pages across all heaps */ if (sweep_slots > max_free_slots) { - heap_pages_freeable_pages = (sweep_slots - max_free_slots) / HEAP_PAGE_OBJ_LIMIT; + size_t excess_slots = sweep_slots - max_free_slots; + size_t total_heap_pages = heap_eden_total_pages(objspace); + heap_pages_freeable_pages = total_heap_pages > 0 + ? excess_slots * total_heap_pages / total_slots + : 0; } else { heap_pages_freeable_pages = 0; @@ -6500,6 +6505,7 @@ gc_start(rb_objspace_t *objspace, unsigned int reason) objspace->profile.latest_gc_info = reason; objspace->profile.total_allocated_objects_at_gc_start = total_allocated_objects(objspace); objspace->profile.heap_used_at_gc_start = rb_darray_size(objspace->heap_pages.sorted); + objspace->profile.heap_total_slots_at_gc_start = objspace_available_slots(objspace); objspace->profile.weak_references_count = 0; gc_prof_setup_new_record(objspace, reason); gc_reset_malloc_info(objspace, do_full_mark); @@ -8655,7 +8661,7 @@ gc_prof_set_heap_info(rb_objspace_t *objspace) if (gc_prof_enabled(objspace)) { gc_profile_record *record = gc_prof_record(objspace); size_t live = objspace->profile.total_allocated_objects_at_gc_start - total_freed_objects(objspace); - size_t total = objspace->profile.heap_used_at_gc_start * HEAP_PAGE_OBJ_LIMIT; + size_t total = objspace->profile.heap_total_slots_at_gc_start; #if GC_PROFILE_MORE_DETAIL record->heap_use_pages = objspace->profile.heap_used_at_gc_start; @@ -9551,7 +9557,6 @@ rb_gc_impl_init(void) rb_hash_aset(gc_constants, ID2SYM(rb_intern("BASE_SLOT_SIZE")), SIZET2NUM(BASE_SLOT_SIZE - RVALUE_OVERHEAD)); rb_hash_aset(gc_constants, ID2SYM(rb_intern("RBASIC_SIZE")), SIZET2NUM(sizeof(struct RBasic))); rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVALUE_OVERHEAD")), SIZET2NUM(RVALUE_OVERHEAD)); - rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_OBJ_LIMIT")), SIZET2NUM(HEAP_PAGE_OBJ_LIMIT)); rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_BITMAP_SIZE")), SIZET2NUM(HEAP_PAGE_BITMAP_SIZE)); rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_SIZE")), SIZET2NUM(HEAP_PAGE_SIZE)); rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_COUNT")), LONG2FIX(HEAP_COUNT)); diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 09199c34b1c3cc..09bface652d50b 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -694,7 +694,6 @@ def allocate_large_object = Array.new(10) end def test_gc_internals - assert_not_nil GC::INTERNAL_CONSTANTS[:HEAP_PAGE_OBJ_LIMIT] assert_not_nil GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] end From c0c97c0f1253120741bc53eaea395c38909b2b8f Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Thu, 19 Feb 2026 15:59:40 -0500 Subject: [PATCH 09/22] ZJIT: Simplify po_from to take a single BlockId --- zjit/src/hir.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index 5b09c8dcfb1282..8604300f0e984a 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -5009,12 +5009,12 @@ impl Function { /// Return a traversal of the `Function`'s `BlockId`s in reverse post-order. pub fn rpo(&self) -> Vec { - let mut result = self.po_from(vec![self.entries_block]); + let mut result = self.po_from(self.entries_block); result.reverse(); result } - fn po_from(&self, starts: Vec) -> Vec { + fn po_from(&self, start: BlockId) -> Vec { #[derive(PartialEq)] enum Action { VisitEdges, @@ -5022,7 +5022,7 @@ impl Function { } let mut result = vec![]; let mut seen = BlockSet::with_capacity(self.blocks.len()); - let mut stack: Vec<_> = starts.iter().map(|&start| (start, Action::VisitEdges)).collect(); + let mut stack = vec![(start, Action::VisitEdges)]; while let Some((block, action)) = stack.pop() { if action == Action::VisitSelf { result.push(block); From 06c8b1abfa45cabb1974411f519975dde59dacc9 Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Thu, 19 Feb 2026 16:04:44 -0500 Subject: [PATCH 10/22] ZJIT: Remove find() from po_from --- zjit/src/hir.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index 8604300f0e984a..1fb526e569f46d 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -1083,6 +1083,14 @@ impl Insn { } } + /// Return true if the instruction is a jump (has successor blocks in the CFG). + pub fn is_jump(&self) -> bool { + match self { + Insn::IfTrue { .. } | Insn::IfFalse { .. } | Insn::Jump(_) | Insn::Entries { .. } => true, + _ => false, + } + } + pub fn print<'a>(&self, ptr_map: &'a PtrPrintMap, iseq: Option) -> InsnPrinter<'a> { InsnPrinter { inner: self.clone(), ptr_map, iseq } } @@ -5031,17 +5039,20 @@ impl Function { if !seen.insert(block) { continue; } stack.push((block, Action::VisitSelf)); for insn_id in &self.blocks[block.0].insns { - let insn = self.find(*insn_id); - match insn { + // Instructions without output, including branch instructions, can't be targets of + // make_equal_to, so we don't need find() here. + match &self.insns[insn_id.0] { Insn::IfTrue { target, .. } | Insn::IfFalse { target, .. } | Insn::Jump(target) => { stack.push((target.target, Action::VisitEdges)); } - Insn::Entries { ref targets } => { + Insn::Entries { targets } => { for target in targets { stack.push((*target, Action::VisitEdges)); } } - _ => {} + _ => { + debug_assert!(!self.find(*insn_id).is_jump(), "Instruction {:?} should not be in union-find; it has no output", insn_id); + } } } } From 126b657bd103a1abf4b572ade557ffdc7ae99982 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 19 Feb 2026 15:09:42 -0800 Subject: [PATCH 11/22] Use rb_ensure instead of guard objects for Dir.pwd This replaces GC-based buffer guards (rb_imemo_tmpbuf, TypedData_Wrap_Struct) with rb_ensure to clean up malloc/xmalloc memory when an exception occurs. --- dir.c | 32 +++++++++++++++++++------------- util.c | 36 +++++++++++++++++------------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/dir.c b/dir.c index 9498d67da9235a..d67de8cf06c830 100644 --- a/dir.c +++ b/dir.c @@ -1586,23 +1586,29 @@ dir_chdir(VALUE dir) } #ifndef _WIN32 -VALUE -rb_dir_getwd_ospath(void) +static VALUE +getcwd_to_str(VALUE arg) { - char *path; - VALUE cwd; - VALUE path_guard; - - path_guard = rb_imemo_tmpbuf_new(); - path = ruby_getcwd(); - rb_imemo_tmpbuf_set_ptr(path_guard, path); + const char *path = (const char *)arg; #ifdef __APPLE__ - cwd = rb_str_normalize_ospath(path, strlen(path)); + return rb_str_normalize_ospath(path, strlen(path)); #else - cwd = rb_str_new2(path); + return rb_str_new2(path); #endif - rb_free_tmp_buffer(&path_guard); - return cwd; +} + +static VALUE +getcwd_xfree(VALUE arg) +{ + xfree((void *)arg); + return Qnil; +} + +VALUE +rb_dir_getwd_ospath(void) +{ + char *path = ruby_getcwd(); + return rb_ensure(getcwd_to_str, (VALUE)path, getcwd_xfree, (VALUE)path); } #endif diff --git a/util.c b/util.c index 4caa324849af31..3315eb575e1a28 100644 --- a/util.c +++ b/util.c @@ -529,45 +529,43 @@ ruby_strdup(const char *str) char * ruby_getcwd(void) { - VALUE guard = rb_imemo_tmpbuf_new(); int size = 200; char *buf = xmalloc(size); while (!getcwd(buf, size)) { int e = errno; if (e != ERANGE) { - rb_free_tmp_buffer(&guard); + xfree(buf); rb_syserr_fail(e, "getcwd"); } size *= 2; - rb_imemo_tmpbuf_set_ptr(guard, buf); - buf = xrealloc(buf, size); + xfree(buf); + buf = xmalloc(size); } - rb_imemo_tmpbuf_set_ptr(guard, NULL); return buf; } # else -static const rb_data_type_t getcwd_buffer_guard_type = { - .wrap_struct_name = "ruby_getcwd_guard", - .function = { - .dfree = free // not xfree. - }, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED -}; +static VALUE +getcwd_strdup(VALUE arg) +{ + return (VALUE)ruby_strdup((const char *)arg); +} + +static VALUE +getcwd_free(VALUE arg) +{ + free((void *)arg); + return Qnil; +} char * ruby_getcwd(void) { - VALUE guard = TypedData_Wrap_Struct((VALUE)0, &getcwd_buffer_guard_type, NULL); - char *buf, *cwd = getcwd(NULL, 0); - RTYPEDDATA_DATA(guard) = cwd; + char *cwd = getcwd(NULL, 0); if (!cwd) rb_sys_fail("getcwd"); - buf = ruby_strdup(cwd); /* allocate by xmalloc */ - free(cwd); - RTYPEDDATA_DATA(RB_GC_GUARD(guard)) = NULL; - return buf; + return (char *)rb_ensure(getcwd_strdup, (VALUE)cwd, getcwd_free, (VALUE)cwd); } # endif From b5ccab2093c9bb19ae8564a935e6fd72ec7354cc Mon Sep 17 00:00:00 2001 From: Kasumi Hanazuki Date: Fri, 20 Feb 2026 10:56:50 +0900 Subject: [PATCH 12/22] IO::Buffer#locked: Release lock even when the block raises (#16180) IO::Buffer#locked: Release lock even when the block raises/breaks Previously, `IO::Buffer#locked` leaks the lock when the block raises an exception, or breaks. Fixes: [Bug #21882] --- io_buffer.c | 17 ++++++++++++----- test/ruby/test_io_buffer.rb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/io_buffer.c b/io_buffer.c index 4bb4685e744d99..cb35141f47a883 100644 --- a/io_buffer.c +++ b/io_buffer.c @@ -1424,6 +1424,17 @@ rb_io_buffer_try_unlock(VALUE self) return 0; } +static VALUE +rb_io_buffer_locked_ensure(VALUE self) +{ + struct rb_io_buffer *buffer = NULL; + TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer); + + buffer->flags &= ~RB_IO_BUFFER_LOCKED; + + return Qnil; +} + /* * call-seq: locked { ... } * @@ -1466,11 +1477,7 @@ rb_io_buffer_locked(VALUE self) buffer->flags |= RB_IO_BUFFER_LOCKED; - VALUE result = rb_yield(self); - - buffer->flags &= ~RB_IO_BUFFER_LOCKED; - - return result; + return rb_ensure(rb_yield, self, rb_io_buffer_locked_ensure, self); } /* diff --git a/test/ruby/test_io_buffer.rb b/test/ruby/test_io_buffer.rb index 706ce16c42a547..e272b8a71c7112 100644 --- a/test/ruby/test_io_buffer.rb +++ b/test/ruby/test_io_buffer.rb @@ -930,4 +930,34 @@ def test_integer_endianness_swapping assert_equal value, round_trip_value, "#{le_type}/#{be_type}: double-swap should restore original value" end end + + class Bug21882 < RuntimeError; end + def test_locked_exception + buf = IO::Buffer.new(10) + assert_raise(Bug21882, '#locked should propagate exception') do + buf.locked { raise Bug21882 } + end + + # should be unlocked now and can be locked again + refute_predicate buf, :locked? + buf.locked { } + end + + def test_locked_break + buf = IO::Buffer.new(10) + assert_equal :ok, (buf.locked { break :ok }) + + # should be unlocked now and can be locked again + refute_predicate buf, :locked? + buf.locked { } + end + + def test_locked_throw + buf = IO::Buffer.new(10) + assert_equal :ok, (catch(:bug21882) { buf.locked { throw :bug21882, :ok } }) + + # should be unlocked now and can be locked again + refute_predicate buf, :locked? + buf.locked { } + end end From 6ea68a58418e9706f96c871e519d186384c5b694 Mon Sep 17 00:00:00 2001 From: Edouard CHIN Date: Tue, 10 Feb 2026 13:48:59 +0100 Subject: [PATCH 13/22] [ruby/rubygems] Don't check whether a plugin needs to be installed: - ### Problem When Bundler installs gems, it checks whether a gem plugin needs to be installed. This check (`Dir.glob`) is expensive and is hotspot when profiling Bundler. ### Details Bundler makes a check to see if a gemspec stub exists for the gem being installed. If a gemspec stub already exists and its version is the same as the gem being installed, then Bundler assumes that the gem plugin was already generated in the past and there is no need to generate it again. This check was added for performance purpose but it's counter productive and has the opposite effect. The vast majority of gems don't have a plugin and we are incurring the cost of doing a `Dir.glob` for *every* gems to account for the small percentage of gems that may have a plugin to install. So it's actually much faster to always reinstall plugins for the few gems that have ones, than to make a check for all gems. Another advantage with this change is that if someone accidentaly bust the `plugins` folder but don't bust the `specifications` one, then Bundler will correctly regenerate plugins (where as before it wouldn't). I tried running this patch on a Gemfile containing 400 gems and this patch shoves around a second. ### Solution Always install plugins, no matter if one of the same version already exist. https://github.com/ruby/rubygems/commit/d8d21c7a40 --- lib/bundler/rubygems_gem_installer.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/bundler/rubygems_gem_installer.rb b/lib/bundler/rubygems_gem_installer.rb index 64ce6193d3d1f5..12405869787360 100644 --- a/lib/bundler/rubygems_gem_installer.rb +++ b/lib/bundler/rubygems_gem_installer.rb @@ -71,9 +71,6 @@ def ensure_writable_dir(dir) def generate_plugins return unless Gem::Installer.method_defined?(:generate_plugins, false) - latest = Gem::Specification.stubs_for(spec.name).first - return if latest && latest.version > spec.version - ensure_writable_dir @plugins_dir if spec.plugins.empty? From b093886df039ec67ec36173b590435fe39731264 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 19 Feb 2026 20:48:19 +0100 Subject: [PATCH 14/22] [DOC] Fix range docs intro It's code but not formatted as such --- range.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/range.c b/range.c index 36afdfa7619005..c3b3813cb1eef7 100644 --- a/range.c +++ b/range.c @@ -2611,12 +2611,12 @@ range_overlap(VALUE range, VALUE other) * * - Method Range.new: * - * # Ranges that by default include the given end value. - * Range.new(1, 4).to_a # => [1, 2, 3, 4] - * Range.new('a', 'd').to_a # => ["a", "b", "c", "d"] - * # Ranges that use third argument +exclude_end+ to exclude the given end value. - * Range.new(1, 4, true).to_a # => [1, 2, 3] - * Range.new('a', 'd', true).to_a # => ["a", "b", "c"] + * # Ranges that by default include the given end value. + * Range.new(1, 4).to_a # => [1, 2, 3, 4] + * Range.new('a', 'd').to_a # => ["a", "b", "c", "d"] + * # Ranges that use third argument +exclude_end+ to exclude the given end value. + * Range.new(1, 4, true).to_a # => [1, 2, 3] + * Range.new('a', 'd', true).to_a # => ["a", "b", "c"] * * == Beginless Ranges * From f01f66ca249405ec125ba864e48e51944cc51c6f Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Tue, 17 Feb 2026 21:23:35 +0100 Subject: [PATCH 15/22] Move win32-registry from default to bundled gems Because win32-registry needs fiddle and fiddle is a bundled gem. [Bug #21855] --- ext/win32/lib/win32/registry.rb | 943 ------------------------------- ext/win32/lib/win32/resolv.rb | 1 + ext/win32/win32-registry.gemspec | 29 - gems/bundled_gems | 1 + test/win32/test_registry.rb | 256 --------- tool/sync_default_gems.rb | 5 - 6 files changed, 2 insertions(+), 1233 deletions(-) delete mode 100644 ext/win32/lib/win32/registry.rb delete mode 100644 ext/win32/win32-registry.gemspec delete mode 100644 test/win32/test_registry.rb diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb deleted file mode 100644 index 5f8099baa2c160..00000000000000 --- a/ext/win32/lib/win32/registry.rb +++ /dev/null @@ -1,943 +0,0 @@ -# frozen_string_literal: true -require 'fiddle/import' - -# Generic namespace for Windows platform-specific features. -module Win32 - # :stopdoc: - WCHAR = Encoding::UTF_16LE - WCHAR_NUL = "\0".encode(WCHAR).freeze - WCHAR_CR = "\r".encode(WCHAR).freeze - WCHAR_SIZE = WCHAR_NUL.bytesize - LOCALE = Encoding::UTF_8 - - # :startdoc: - - # win32/registry is registry accessor library for Win32 platform. - # It uses importer to call Win32 Registry APIs. - # - # == example - # Win32::Registry::HKEY_CURRENT_USER.open('SOFTWARE\foo') do |reg| - # value = reg['foo'] # read a value - # value = reg['foo', Win32::Registry::REG_SZ] # read a value with type - # type, value = reg.read('foo') # read a value - # reg['foo'] = 'bar' # write a value - # reg['foo', Win32::Registry::REG_SZ] = 'bar' # write a value with type - # reg.write('foo', Win32::Registry::REG_SZ, 'bar') # write a value - # - # reg.each_value { |name, type, data| ... } # Enumerate values - # reg.each_key { |key, wtime| ... } # Enumerate subkeys - # - # reg.delete_value(name) # Delete a value - # reg.delete_key(name) # Delete a subkey - # reg.delete_key(name, true) # Delete a subkey recursively - # end - # - # == Predefined keys - # - # * +HKEY_CLASSES_ROOT+ - # * +HKEY_CURRENT_USER+ - # * +HKEY_LOCAL_MACHINE+ - # * +HKEY_PERFORMANCE_DATA+ - # * +HKEY_CURRENT_CONFIG+ - # * +HKEY_DYN_DATA+ - # - # Win32::Registry object whose key is predefined key. - # For detail, see the article[https://learn.microsoft.com/en-us/windows/win32/sysinfo/predefined-keys]. - # - # == Value types - # - # * +REG_NONE+ - # * +REG_SZ+ - # * +REG_EXPAND_SZ+ - # * +REG_BINARY+ - # * +REG_DWORD+ - # * +REG_DWORD_BIG_ENDIAN+ - # * +REG_LINK+ - # * +REG_MULTI_SZ+ - # * +REG_RESOURCE_LIST+ - # * +REG_FULL_RESOURCE_DESCRIPTOR+ - # * +REG_RESOURCE_REQUIREMENTS_LIST+ - # * +REG_QWORD+ - # - # For detail, see the article[https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-value-types]. - # - class Registry - - # :stopdoc: - - # - # For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/registry.asp]. - # - # --- HKEY_* - # - # Predefined key *handle*. - # These are Integer, not Win32::Registry. - # - # --- REG_* - # - # Registry value type. - # - # --- KEY_* - # - # Security access mask. - # - # --- KEY_OPTIONS_* - # - # Key options. - # - # --- REG_CREATED_NEW_KEY - # - # --- REG_OPENED_EXISTING_KEY - # - # If the key is created newly or opened existing key. - # See also Registry#disposition method. - module Constants - # :stopdoc: - HKEY_CLASSES_ROOT = 0x80000000 - HKEY_CURRENT_USER = 0x80000001 - HKEY_LOCAL_MACHINE = 0x80000002 - HKEY_USERS = 0x80000003 - HKEY_PERFORMANCE_DATA = 0x80000004 - HKEY_PERFORMANCE_TEXT = 0x80000050 - HKEY_PERFORMANCE_NLSTEXT = 0x80000060 - HKEY_CURRENT_CONFIG = 0x80000005 - HKEY_DYN_DATA = 0x80000006 - - REG_NONE = 0 - REG_SZ = 1 - REG_EXPAND_SZ = 2 - REG_BINARY = 3 - REG_DWORD = 4 - REG_DWORD_BIG_ENDIAN = 5 - REG_LINK = 6 - REG_MULTI_SZ = 7 - REG_RESOURCE_LIST = 8 - REG_FULL_RESOURCE_DESCRIPTOR = 9 - REG_RESOURCE_REQUIREMENTS_LIST = 10 - REG_QWORD = 11 - REG_QWORD_LITTLE_ENDIAN = 11 - - STANDARD_RIGHTS_READ = 0x00020000 - STANDARD_RIGHTS_WRITE = 0x00020000 - KEY_QUERY_VALUE = 0x0001 - KEY_SET_VALUE = 0x0002 - KEY_CREATE_SUB_KEY = 0x0004 - KEY_ENUMERATE_SUB_KEYS = 0x0008 - KEY_NOTIFY = 0x0010 - KEY_CREATE_LINK = 0x0020 - KEY_READ = STANDARD_RIGHTS_READ | - KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY - KEY_WRITE = STANDARD_RIGHTS_WRITE | - KEY_SET_VALUE | KEY_CREATE_SUB_KEY - KEY_EXECUTE = KEY_READ - KEY_ALL_ACCESS = KEY_READ | KEY_WRITE | KEY_CREATE_LINK - - REG_OPTION_RESERVED = 0x0000 - REG_OPTION_NON_VOLATILE = 0x0000 - REG_OPTION_VOLATILE = 0x0001 - REG_OPTION_CREATE_LINK = 0x0002 - REG_OPTION_BACKUP_RESTORE = 0x0004 - REG_OPTION_OPEN_LINK = 0x0008 - REG_LEGAL_OPTION = REG_OPTION_RESERVED | - REG_OPTION_NON_VOLATILE | REG_OPTION_CREATE_LINK | - REG_OPTION_BACKUP_RESTORE | REG_OPTION_OPEN_LINK - - REG_CREATED_NEW_KEY = 1 - REG_OPENED_EXISTING_KEY = 2 - - REG_WHOLE_HIVE_VOLATILE = 0x0001 - REG_REFRESH_HIVE = 0x0002 - REG_NO_LAZY_FLUSH = 0x0004 - REG_FORCE_RESTORE = 0x0008 - - MAX_KEY_LENGTH = 514 - MAX_VALUE_LENGTH = 32768 - end - include Constants - include Enumerable - # :startdoc: - - # - # Error - # - class Error < ::StandardError - # :stopdoc: - module Kernel32 - extend Fiddle::Importer - dlload "kernel32.dll" - end - FormatMessageW = Kernel32.extern "int FormatMessageW(int, void *, int, int, void *, int, void *)", :stdcall - # :startdoc: - - # new(code) -> error object - # - # Initializes the message for Win32 API error +code+. - def initialize(code) - @code = code - buff = WCHAR_NUL * 1024 - lang = 0 - begin - len = FormatMessageW.call(0x1200, nil, code, lang, buff, 1024, nil) - msg = buff.byteslice(0, len * WCHAR_SIZE) - msg.delete!(WCHAR_CR) - msg.chomp! - msg.encode!(LOCALE) - rescue EncodingError - raise unless lang == 0 - lang = 0x0409 # en_US - retry - end - super msg - end - - # Win32 API error code. - attr_reader :code - end - - # - # Predefined Keys - # - class PredefinedKey < Registry - # :stopdoc: - def initialize(hkey, keyname) - @hkey = Fiddle::Pointer.new(hkey) - @parent = nil - @keyname = keyname - @disposition = REG_OPENED_EXISTING_KEY - end - - # Predefined keys cannot be closed - def close - raise Error.new(5) ## ERROR_ACCESS_DENIED - end - - # Fake #class method for Registry#open, Registry#create - def class - Registry - end - - # Make all - Constants.constants.grep(/^HKEY_/) do |c| - Registry.const_set c, new(Constants.const_get(c), c.to_s) - end - end - - # - # Win32 APIs - # - module API - # :stopdoc: - include Constants - extend Fiddle::Importer - dlload "advapi32.dll" - [ - "long RegOpenKeyExW(void *, void *, long, long, void *)", - "long RegCreateKeyExW(void *, void *, long, long, long, long, void *, void *, void *)", - "long RegEnumValueW(void *, long, void *, void *, void *, void *, void *, void *)", - "long RegEnumKeyExW(void *, long, void *, void *, void *, void *, void *, void *)", - "long RegQueryValueExW(void *, void *, void *, void *, void *, void *)", - "long RegSetValueExW(void *, void *, long, long, void *, long)", - "long RegDeleteValueW(void *, void *)", - "long RegDeleteKeyW(void *, void *)", - "long RegFlushKey(void *)", - "long RegCloseKey(void *)", - "long RegQueryInfoKeyW(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *)", - ].each do |fn| - cfunc = extern fn, :stdcall - const_set cfunc.name.intern, cfunc - end - - module_function - - def check(result) - raise Error, result, caller(1) if result != 0 - end - - def win64? - /^(?:x64|x86_64)/ =~ RUBY_PLATFORM - end - - TEMPLATE_HANDLE = 'J<' - - def packhandle(h) - [h].pack(TEMPLATE_HANDLE) - end - - def unpackhandle(h) - (h + [0].pack(TEMPLATE_HANDLE)).unpack1(TEMPLATE_HANDLE) - end - - TEMPLATE_DWORD = 'V' - - def packdw(dw) - [dw].pack(TEMPLATE_DWORD) - end - - def unpackdw(dw) - (dw + [0].pack(TEMPLATE_DWORD)).unpack1(TEMPLATE_DWORD) - end - - TEMPLATE_QWORD = 'Q<' - - def packqw(qw) - [qw].pack(TEMPLATE_QWORD) - end - - def unpackqw(qw) - (qw + [0].pack(TEMPLATE_QWORD)).unpack1(TEMPLATE_QWORD) - end - - def make_wstr(str) - (str+"\0").encode(WCHAR) - end - - def OpenKey(hkey, name, opt, desired) - result = packhandle(0) - check RegOpenKeyExW.call(hkey, make_wstr(name), opt, desired, result) - unpackhandle(result) - end - - def CreateKey(hkey, name, opt, desired) - result = packhandle(0) - disp = packdw(0) - check RegCreateKeyExW.call(hkey, make_wstr(name), 0, 0, opt, desired, - nil, result, disp) - [ unpackhandle(result), unpackdw(disp) ] - end - - def EnumValue(hkey, index) - name = WCHAR_NUL * Constants::MAX_KEY_LENGTH - size = packdw(Constants::MAX_KEY_LENGTH) - check RegEnumValueW.call(hkey, index, name, size, nil, nil, nil, nil) - name.byteslice(0, unpackdw(size) * WCHAR_SIZE) - end - - def EnumKey(hkey, index) - name = WCHAR_NUL * Constants::MAX_KEY_LENGTH - size = packdw(Constants::MAX_KEY_LENGTH) - wtime = ' ' * 8 - check RegEnumKeyExW.call(hkey, index, name, size, nil, nil, nil, wtime) - [ name.byteslice(0, unpackdw(size) * WCHAR_SIZE), unpackqw(wtime) ] - end - - def QueryValue(hkey, name) - type = packdw(0) - size = packdw(0) - name = make_wstr(name) - check RegQueryValueExW.call(hkey, name, nil, type, nil, size) - data = "\0".b * unpackdw(size) - check RegQueryValueExW.call(hkey, name, nil, type, data, size) - [ unpackdw(type), data[0, unpackdw(size)] ] - end - - def SetValue(hkey, name, type, data, size) - case type - when REG_SZ, REG_EXPAND_SZ, REG_MULTI_SZ - data = data.encode(WCHAR) - size ||= data.bytesize + WCHAR_SIZE - end - check RegSetValueExW.call(hkey, make_wstr(name), 0, type, data, size) - end - - def DeleteValue(hkey, name) - check RegDeleteValueW.call(hkey, make_wstr(name)) - end - - def DeleteKey(hkey, name) - check RegDeleteKeyW.call(hkey, make_wstr(name)) - end - - def FlushKey(hkey) - check RegFlushKey.call(hkey) - end - - def CloseKey(hkey) - check RegCloseKey.call(hkey) - end - - def QueryInfoKey(hkey) - subkeys = packdw(0) - maxsubkeylen = packdw(0) - values = packdw(0) - maxvaluenamelen = packdw(0) - maxvaluelen = packdw(0) - secdescs = packdw(0) - wtime = ' ' * 8 - check RegQueryInfoKeyW.call(hkey, 0, 0, 0, subkeys, maxsubkeylen, 0, - values, maxvaluenamelen, maxvaluelen, secdescs, wtime) - [ unpackdw(subkeys), unpackdw(maxsubkeylen), unpackdw(values), - unpackdw(maxvaluenamelen), unpackdw(maxvaluelen), - unpackdw(secdescs), unpackqw(wtime) ] - end - end - # :startdoc: - - # - # Replace %-enclosed substrings in +str+ into the - # environment value of what is contained between the %s. - # This method is used for REG_EXPAND_SZ. - # - # For detail, see ExpandEnvironmentStrings[https://learn.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-expandenvironmentstringsw] \Win32 \API. - # - def self.expand_environ(str) - str.gsub(Regexp.compile("%([^%]+)%".encode(str.encoding))) { - v = $1.encode(LOCALE) - (ENV[v] || ENV[v.upcase])&.encode(str.encoding) || $& - } - end - - @@type2name = %w[ - REG_NONE REG_SZ REG_EXPAND_SZ REG_BINARY REG_DWORD - REG_DWORD_BIG_ENDIAN REG_LINK REG_MULTI_SZ - REG_RESOURCE_LIST REG_FULL_RESOURCE_DESCRIPTOR - REG_RESOURCE_REQUIREMENTS_LIST REG_QWORD - ].inject([]) do |ary, type| - ary[Constants.const_get(type)] = type - ary - end.freeze - - # - # Convert registry type value +type+ to readable string. - # - def self.type2name(type) - @@type2name[type] || type.to_s - end - - # - # Convert 64-bit FILETIME integer +wtime+ into Time object. - # - def self.wtime2time(wtime) - Time.at((wtime - 116444736000000000) / 10000000) - end - - # - # Convert Time object or Integer object +time+ into 64-bit FILETIME. - # - def self.time2wtime(time) - time.to_i * 10000000 + 116444736000000000 - end - - # - # constructor - # - private_class_method :new - - # - # call-seq: - # open(key, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) - # open(key, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) { |reg| ... } - # - # Open the registry key +subkey+ under +key+. - # +key+ is Win32::Registry object of parent key. - # You can use {predefined key}[rdoc-ref:Win32::Registry@Predefined+keys] +HKEY_+*. - # +desired+ and +opt+ is access mask and key option. - # - # For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/regopenkeyex.asp]. - # - # If block is given, the key +reg+ is yielded and closed - # automatically after the block exists. - def self.open(hkey, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) - subkey = subkey.chomp('\\') - newkey = API.OpenKey(hkey.instance_variable_get(:@hkey), subkey, opt, desired) - obj = new(newkey, hkey, subkey, REG_OPENED_EXISTING_KEY) - if block_given? - begin - yield obj - ensure - obj.close - end - else - obj - end - end - - # - # call-seq: - # create(key, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED) - # create(key, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED) { |reg| ... } - # - # Create or open the registry key +subkey+ under +key+. - # You can use {predefined key}[rdoc-ref:Win32::Registry@Predefined+keys] +HKEY_+*. - # +desired+ and +opt+ is access mask and key option. - # - # If +subkey+ is already exists, key is opened and Registry#created? - # method will return false. - # - # If block is given, the key +reg+ is yielded and closed - # automatically after the block exists. - # - def self.create(hkey, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED) - newkey, disp = API.CreateKey(hkey.instance_variable_get(:@hkey), subkey, opt, desired) - obj = new(newkey, hkey, subkey, disp) - if block_given? - begin - yield obj - ensure - obj.close - end - else - obj - end - end - - # - # finalizer - # - @@final = proc { |hkey| proc { API.CloseKey(hkey[0]) if hkey[0] } } - - # - # :nodoc: - # - # Use self.open, self.create, #open and #create. - # - def initialize(hkey, parent, keyname, disposition) - @hkey = Fiddle::Pointer.new(hkey) - @parent = parent - @keyname = keyname - @disposition = disposition - @hkeyfinal = [ hkey ] - ObjectSpace.define_finalizer self, @@final.call(@hkeyfinal) - end - - # Win32::Registry object of parent key, or nil if predefined key. - attr_reader :parent - # Same as subkey value of Registry.open or - # Registry.create method. - attr_reader :keyname - # Disposition value (REG_CREATED_NEW_KEY or REG_OPENED_EXISTING_KEY). - attr_reader :disposition - - # Returns key handle value. - def hkey - @hkey.to_i - end - - # - # Returns +true+ if key is created *newly*. - # (see Registry.create) -- basically you call create - # then when you call created? on the instance returned - # it will tell if it was successful or not - # - def created? - @disposition == REG_CREATED_NEW_KEY - end - - # - # Returns if key is not closed. - # - def open? - !@hkey.nil? - end - - # - # Full path of key such as 'HKEY_CURRENT_USER\SOFTWARE\foo\bar'. - # - def name - parent = self - name = @keyname - while parent = parent.parent - name = parent.keyname + '\\' + name - end - name - end - - # - # Retruns inspected string - # - def inspect - "\#" - end - - # - # marshalling is not allowed - # - def _dump(depth) - raise TypeError, "can't dump Win32::Registry" - end - - # - # Same as Win32::Registry.open(self, subkey, desired, opt) - # - def open(subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED, &blk) - self.class.open(self, subkey, desired, opt, &blk) - end - - # - # Same as Win32::Registry.create(self, subkey, desired, opt) - # - def create(subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED, &blk) - self.class.create(self, subkey, desired, opt, &blk) - end - - # - # Close key. - # - # After close, most method raise an error. - # - def close - API.CloseKey(@hkey) - @hkey = @parent = @keyname = nil - @hkeyfinal[0] = nil - end - - # - # Enumerate all values in this registry path. - # - # For each value it yields key, type and data. - # - # key is a String which contains name of key. - # type is a type constant kind of +Win32::Registry::REG_+* - # data is the value of this key. - # - def each_value - return enum_for(:each_value) unless block_given? - index = 0 - while true - begin - subkey = API.EnumValue(@hkey, index) - rescue Error - break - end - subkey = export_string(subkey) - begin - type, data = read(subkey) - rescue Error - else - yield subkey, type, data - end - index += 1 - end - index - end - alias each each_value - - # - # return values as an array - # - def values - vals_ary = [] - each_value { |*, val| vals_ary << val } - vals_ary - end - - # - # Enumerate all subkeys. - # - # For each subkey it yields subkey and wtime. - # - # subkey is String which contains name of subkey. - # wtime is last write time as FILETIME (64-bit integer). - # (see Registry.wtime2time) - # - def each_key - return enum_for(:each_key) unless block_given? - index = 0 - while true - begin - subkey, wtime = API.EnumKey(@hkey, index) - rescue Error - break - end - subkey = export_string(subkey) - yield subkey, wtime - index += 1 - end - index - end - - # - # return keys as an array - # - def keys - keys_ary = [] - each_key { |key,| keys_ary << key } - keys_ary - end - - # Read a registry value named name and return array of - # [ type, data ]. - # When name is +nil+, the `default' value is read. - # - # +type+ is {value type}[rdoc-ref:Win32::Registry@Value+types]. - # - # +data+ is value data, its class is: - # REG_SZ, REG_EXPAND_SZ:: - # String - # REG_MULTI_SZ:: - # Array of String - # REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD:: - # Integer - # REG_BINARY, REG_NONE:: - # String (contains binary data) - # - # When _rtype_ is specified, the value type must be included by - # _rtype_ array, or +TypeError+ is raised. - def read(name, *rtype) - type, data = API.QueryValue(@hkey, name) - unless rtype.empty? or rtype.include?(type) - raise TypeError, "Type mismatch (expect [#{ - rtype.map{|t|Registry.type2name(t)}.join(', ')}] but #{ - Registry.type2name(type)} present)" - end - case type - when REG_SZ, REG_EXPAND_SZ - [ type, data.encode(name.encoding, WCHAR).chop ] - when REG_MULTI_SZ - [ type, data.encode(name.encoding, WCHAR).split(/\0/) ] - when REG_BINARY, REG_NONE - [ type, data ] - when REG_DWORD - [ type, API.unpackdw(data) ] - when REG_DWORD_BIG_ENDIAN - [ type, data.unpack1('N') ] - when REG_QWORD - [ type, API.unpackqw(data) ] - else - raise TypeError, "Type #{Registry.type2name(type)} is not supported." - end - end - - # - # Read a registry value named name and return its value data. - # The class of the value is the same as the #read method returns. - # - # If the value type is REG_EXPAND_SZ, returns value data whose environment - # variables are replaced. - # If the value type is neither REG_SZ, REG_MULTI_SZ, REG_DWORD, - # REG_DWORD_BIG_ENDIAN, nor REG_QWORD, +TypeError+ is raised. - # - # The meaning of _rtype_ is the same as for the #read method. - # - def [](name, *rtype) - type, data = read(name, *rtype) - case type - when REG_SZ, REG_DWORD, REG_QWORD, REG_MULTI_SZ - data - when REG_EXPAND_SZ - Registry.expand_environ(data) - else - raise TypeError, "Type #{Registry.type2name(type)} is not supported." - end - end - - # Read a REG_SZ(read_s), REG_DWORD(read_i), or REG_BINARY(read_bin) - # registry value named name. - # - # If the values type does not match, +TypeError+ is raised. - def read_s(name) - read(name, REG_SZ)[1] - end - - # - # Read a REG_SZ or REG_EXPAND_SZ registry value named name. - # - # If the value type is REG_EXPAND_SZ, environment variables are replaced. - # Unless the value type is REG_SZ or REG_EXPAND_SZ, +TypeError+ is raised. - # - def read_s_expand(name) - type, data = read(name, REG_SZ, REG_EXPAND_SZ) - if type == REG_EXPAND_SZ - Registry.expand_environ(data) - else - data - end - end - - # - # Read a REG_SZ(read_s), REG_DWORD(read_i), or REG_BINARY(read_bin) - # registry value named name. - # - # If the values type does not match, +TypeError+ is raised. - # - def read_i(name) - read(name, REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD)[1] - end - - # - # Read a REG_SZ(read_s), REG_DWORD(read_i), or REG_BINARY(read_bin) - # registry value named name. - # - # If the values type does not match, +TypeError+ is raised. - # - def read_bin(name) - read(name, REG_BINARY)[1] - end - - # - # Write data to a registry value named name. - # When name is nil, write to the `default' value. - # - # +type+ is {value type}[rdoc-ref:Win32::Registry@Value+types]. - # Class of data must be same as which #read - # method returns. - # - def write(name, type, data) - case type - when REG_SZ, REG_EXPAND_SZ - data = data.encode(WCHAR) << WCHAR_NUL - when REG_MULTI_SZ - data = data.to_a.map {|s| s.encode(WCHAR)}.join(WCHAR_NUL) << WCHAR_NUL - when REG_BINARY, REG_NONE - data = data.to_s - when REG_DWORD - data = API.packdw(data.to_i) - when REG_DWORD_BIG_ENDIAN - data = [data.to_i].pack('N') - when REG_QWORD - data = API.packqw(data.to_i) - else - raise TypeError, "Unsupported type #{Registry.type2name(type)}" - end - API.SetValue(@hkey, name, type, data, data.bytesize) - end - - # - # Write value to a registry value named name. - # - # If wtype is specified, the value type is it. - # Otherwise, the value type is depend on class of value: - # - # Integer:: - # REG_DWORD - # String:: - # REG_SZ - # Array:: - # REG_MULTI_SZ - # - def []=(name, rtype, value = nil) - if value - write name, rtype, value - else - case value = rtype - when Integer - write name, REG_DWORD, value - when String - write name, REG_SZ, value - when Array - write name, REG_MULTI_SZ, value - else - raise TypeError, "Unexpected type #{value.class}" - end - end - value - end - - # - # Write value to a registry value named name. - # - # The value type is REG_SZ(write_s), REG_DWORD(write_i), or - # REG_BINARY(write_bin). - # - def write_s(name, value) - write name, REG_SZ, value.to_s - end - - # - # Write value to a registry value named name. - # - # The value type is REG_SZ(write_s), REG_DWORD(write_i), or - # REG_BINARY(write_bin). - # - def write_i(name, value) - write name, REG_DWORD, value.to_i - end - - # - # Write value to a registry value named name. - # - # The value type is REG_SZ(write_s), REG_DWORD(write_i), or - # REG_BINARY(write_bin). - # - def write_bin(name, value) - write name, REG_BINARY, value.to_s - end - - # - # Delete a registry value named name. - # We can not delete the `default' value. - # - def delete_value(name) - API.DeleteValue(@hkey, name) - end - alias delete delete_value - - # - # Delete a subkey named name and all its values. - # - # If recursive is false, the subkey must not have subkeys. - # Otherwise, this method deletes all subkeys and values recursively. - # - def delete_key(name, recursive = false) - if recursive - open(name, KEY_ALL_ACCESS) do |reg| - reg.keys.each do |key| - begin - reg.delete_key(key, true) - rescue Error - # - end - end - end - API.DeleteKey(@hkey, name) - else - begin - API.EnumKey @hkey, 0 - rescue Error - return API.DeleteKey(@hkey, name) - end - raise Error.new(5) ## ERROR_ACCESS_DENIED - end - end - - # - # Write all the attributes into the registry file. - # - def flush - API.FlushKey @hkey - end - - # - # Returns key information as Array of: - # num_keys:: - # The number of subkeys. - # max_key_length:: - # Maximum length of name of subkeys. - # num_values:: - # The number of values. - # max_value_name_length:: - # Maximum length of name of values. - # max_value_length:: - # Maximum length of value of values. - # descriptor_length:: - # Length of security descriptor. - # wtime:: - # Last write time as FILETIME(64-bit integer) - # - # For detail, see RegQueryInfoKey[http://msdn.microsoft.com/library/en-us/sysinfo/base/regqueryinfokey.asp] Win32 API. - # - def info - API.QueryInfoKey(@hkey) - end - - # - # Returns an item of key information. - # - %w[ - num_keys max_key_length - num_values max_value_name_length max_value_length - descriptor_length wtime - ].each_with_index do |s, i| - eval <<-__END__ - def #{s} - info[#{i}] - end - __END__ - end - - private - - def export_string(str, enc = Encoding.default_internal || LOCALE) # :nodoc: - str.encode(enc) - end - end -end diff --git a/ext/win32/lib/win32/resolv.rb b/ext/win32/lib/win32/resolv.rb index 01e1bda351f990..08fed085634c9b 100644 --- a/ext/win32/lib/win32/resolv.rb +++ b/ext/win32/lib/win32/resolv.rb @@ -6,6 +6,7 @@ require 'win32/resolv.so' +# Generic namespace for Windows platform-specific features. module Win32 module Resolv # :nodoc: # Error at Win32 API diff --git a/ext/win32/win32-registry.gemspec b/ext/win32/win32-registry.gemspec deleted file mode 100644 index 9bd57bd7d1368f..00000000000000 --- a/ext/win32/win32-registry.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -Gem::Specification.new do |spec| - spec.name = "win32-registry" - spec.version = "0.1.2" - spec.authors = ["U.Nakamura"] - spec.email = ["usa@garbagecollect.jp"] - - spec.summary = %q{Provides an interface to the Windows Registry in Ruby} - spec.description = spec.summary - spec.homepage = "https://github.com/ruby/win32-registry" - spec.required_ruby_version = ">= 2.6.0" - - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = spec.homepage - - # Specify which files should be added to the gem when it is released. - # The `git ls-files -z` loads the files in the RubyGem that have been added into git. - excludes = %w[ - bin/ test/ spec/ features/ rakelib/ - .git* .mailmap appveyor Rakefile Gemfile - ] - git_files = %w[git ls-files -z --] + excludes.map {|x| ":^/#{x}"} - spec.files = IO.popen(git_files, chdir: __dir__, &:read).split("\x0") - spec.bindir = "exe" - spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } - spec.require_paths = ["lib"] - - spec.add_dependency "fiddle", "~> 1.0" -end diff --git a/gems/bundled_gems b/gems/bundled_gems index 6f0ac6c5e53d70..84fdc5c648abc5 100644 --- a/gems/bundled_gems +++ b/gems/bundled_gems @@ -44,3 +44,4 @@ reline 0.6.3 https://github.com/ruby/reline readline 0.0.4 https://github.com/ruby/readline fiddle 1.1.8 https://github.com/ruby/fiddle tsort 0.2.0 https://github.com/ruby/tsort +win32-registry 0.1.2 https://github.com/ruby/win32-registry diff --git a/test/win32/test_registry.rb b/test/win32/test_registry.rb deleted file mode 100644 index 9a38d0d314cff9..00000000000000 --- a/test/win32/test_registry.rb +++ /dev/null @@ -1,256 +0,0 @@ -# frozen_string_literal: true - -require "rbconfig" - -if /mswin|mingw|cygwin/ =~ RbConfig::CONFIG['host_os'] - begin - require 'win32/registry' - rescue LoadError - else - require 'test/unit' - end -end - -if defined?(Win32::Registry) - class TestWin32Registry < Test::Unit::TestCase - COMPUTERNAME = 'SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ComputerName' - TEST_REGISTRY_PATH = 'Volatile Environment' - TEST_REGISTRY_KEY = 'ruby-win32-registry-test-' - - # Create a new registry key per test in an atomic way, which is deleted on teardown. - # - # Fills the following instance variables: - # - # @test_registry_key - A registry path which is not yet created, - # but can be created without collisions even when running - # multiple test processes. - # @test_registry_rnd - The part of the registry path with a random number. - # @createopts - Required parameters (desired, opt) for create method in - # the volatile environment of the registry. - def setup - @createopts = [Win32::Registry::KEY_ALL_ACCESS, Win32::Registry::REG_OPTION_VOLATILE] - 100.times do |i| - k = TEST_REGISTRY_KEY.gsub("", i.to_s) - next unless Win32::Registry::HKEY_CURRENT_USER.create( - TEST_REGISTRY_PATH + "\\" + k, - *@createopts - ).created? - @test_registry_key = TEST_REGISTRY_PATH + "\\" + k + "\\" + "test\\" - @test_registry_rnd = k - break - end - omit "Unused registry subkey not found in #{TEST_REGISTRY_KEY}" unless @test_registry_key - end - - def teardown - Win32::Registry::HKEY_CURRENT_USER.open(TEST_REGISTRY_PATH) do |reg| - reg.delete_key @test_registry_rnd, true - end - end - - def test_predefined - assert_predefined_key Win32::Registry::HKEY_CLASSES_ROOT - assert_predefined_key Win32::Registry::HKEY_CURRENT_USER - assert_predefined_key Win32::Registry::HKEY_LOCAL_MACHINE - assert_predefined_key Win32::Registry::HKEY_USERS - assert_predefined_key Win32::Registry::HKEY_PERFORMANCE_DATA - assert_predefined_key Win32::Registry::HKEY_PERFORMANCE_TEXT - assert_predefined_key Win32::Registry::HKEY_PERFORMANCE_NLSTEXT - assert_predefined_key Win32::Registry::HKEY_CURRENT_CONFIG - assert_predefined_key Win32::Registry::HKEY_DYN_DATA - end - - def test_open_no_block - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts).close - - reg = Win32::Registry::HKEY_CURRENT_USER.open(@test_registry_key, Win32::Registry::KEY_ALL_ACCESS) - assert_kind_of Win32::Registry, reg - assert_equal true, reg.open? - assert_equal false, reg.created? - reg["test"] = "abc" - reg.close - assert_raise(Win32::Registry::Error) do - reg["test"] = "abc" - end - end - - def test_open_with_block - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts).close - - regs = [] - Win32::Registry::HKEY_CURRENT_USER.open(@test_registry_key, Win32::Registry::KEY_ALL_ACCESS) do |reg| - regs << reg - assert_equal true, reg.open? - assert_equal false, reg.created? - reg["test"] = "abc" - end - - assert_equal 1, regs.size - assert_kind_of Win32::Registry, regs[0] - assert_raise(Win32::Registry::Error) do - regs[0]["test"] = "abc" - end - end - - def test_class_open - name1, keys1 = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, "SYSTEM") do |reg| - assert_predicate reg, :open? - [reg.name, reg.keys] - end - name2, keys2 = Win32::Registry::HKEY_LOCAL_MACHINE.open("SYSTEM") do |reg| - assert_predicate reg, :open? - [reg.name, reg.keys] - end - assert_equal name1, name2 - assert_equal keys1, keys2 - end - - def test_read - computername = ENV['COMPUTERNAME'] - Win32::Registry::HKEY_LOCAL_MACHINE.open(COMPUTERNAME) do |reg| - assert_equal computername, reg['ComputerName'] - assert_equal [Win32::Registry::REG_SZ, computername], reg.read('ComputerName') - assert_raise(TypeError) {reg.read('ComputerName', Win32::Registry::REG_DWORD)} - end - end - - def test_create_no_block - reg = Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) - assert_kind_of Win32::Registry, reg - assert_equal true, reg.open? - assert_equal true, reg.created? - reg["test"] = "abc" - reg.close - assert_equal false, reg.open? - assert_raise(Win32::Registry::Error) do - reg["test"] = "abc" - end - end - - def test_create_with_block - regs = [] - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - regs << reg - reg["test"] = "abc" - assert_equal true, reg.open? - assert_equal true, reg.created? - end - - assert_equal 1, regs.size - assert_kind_of Win32::Registry, regs[0] - assert_equal false, regs[0].open? - assert_raise(Win32::Registry::Error) do - regs[0]["test"] = "abc" - end - end - - def test_write - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - reg.write_s("key1", "data") - assert_equal [Win32::Registry::REG_SZ, "data"], reg.read("key1") - reg.write_i("key2", 0x5fe79027) - assert_equal [Win32::Registry::REG_DWORD, 0x5fe79027], reg.read("key2") - end - end - - def test_accessors - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - assert_kind_of Integer, reg.hkey - assert_kind_of Win32::Registry, reg.parent - assert_equal "HKEY_CURRENT_USER", reg.parent.name - assert_equal "Volatile Environment\\#{@test_registry_rnd}\\test\\", reg.keyname - assert_equal Win32::Registry::REG_CREATED_NEW_KEY, reg.disposition - end - end - - def test_name - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - assert_equal "HKEY_CURRENT_USER\\Volatile Environment\\#{@test_registry_rnd}\\test\\", reg.name - end - end - - def test_keys - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - reg.create("key1", *@createopts) - assert_equal ["key1"], reg.keys - end - end - - def test_each_key - keys = [] - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - reg.create("key1", *@createopts) - reg.each_key { |*a| keys << a } - end - assert_equal [2], keys.map(&:size) - assert_equal ["key1"], keys.map(&:first) - assert_in_delta Win32::Registry.time2wtime(Time.now), keys[0][1], 10_000_000_000, "wtime should roughly match Time.now" - end - - def test_each_key_enum - keys = nil - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - reg.create("key1", *@createopts) - reg.create("key2", *@createopts) - reg.create("key3", *@createopts) - reg["value1"] = "abcd" - keys = reg.each_key.to_a - end - assert_equal 3, keys.size - assert_equal [2, 2, 2], keys.map(&:size) - assert_equal ["key1", "key2", "key3"], keys.map(&:first) - end - - def test_values - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - reg.create("key1", *@createopts) - reg["value1"] = "abcd" - assert_equal ["abcd"], reg.values - end - end - - def test_each_value - vals = [] - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - reg.create("key1", *@createopts) - reg["value1"] = "abcd" - reg.each_value { |*a| vals << a } - end - assert_equal [["value1", Win32::Registry::REG_SZ, "abcd"]], vals - end - - def test_each_value_enum - vals = nil - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - reg.create("key1", *@createopts) - reg["value1"] = "abcd" - reg["value2"] = 42 - vals = reg.each_value.to_a - end - assert_equal [["value1", Win32::Registry::REG_SZ, "abcd"], - ["value2", Win32::Registry::REG_DWORD, 42]], vals - end - - def test_utf8_encoding - keys = [] - Win32::Registry::HKEY_CURRENT_USER.create(@test_registry_key, *@createopts) do |reg| - reg.create("abc EUR", *@createopts) - reg.create("abc €", *@createopts) - reg.each_key do |subkey| - keys << subkey - end - end - - assert_equal [Encoding::UTF_8] * 2, keys.map(&:encoding) - assert_equal ["abc EUR", "abc €"], keys - end - - private - - def assert_predefined_key(key) - assert_kind_of Win32::Registry, key - assert_predicate key, :open? - refute_predicate key, :created? - end - end -end diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 477cc755462d2c..e0a896c915c6d1 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -107,11 +107,6 @@ def lib((upstream, branch), gemspec_in_subdir: false) ["net-protocol.gemspec", "lib/net/net-protocol.gemspec"], ]), "open-uri": lib("ruby/open-uri"), - "win32-registry": repo("ruby/win32-registry", [ - ["lib/win32/registry.rb", "ext/win32/lib/win32/registry.rb"], - ["test/win32/test_registry.rb", "test/win32/test_registry.rb"], - ["win32-registry.gemspec", "ext/win32/win32-registry.gemspec"], - ]), English: lib("ruby/English"), cgi: repo("ruby/cgi", [ ["ext/cgi", "ext/cgi"], From 28de927b37681492eeeee1795f4549168fcdf190 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 20 Feb 2026 13:25:59 +0900 Subject: [PATCH 16/22] Add win32-registry entries to doc --- doc/maintainers.md | 6 ++++++ doc/standard_library.md | 2 ++ 2 files changed, 8 insertions(+) diff --git a/doc/maintainers.md b/doc/maintainers.md index 11c7e9ab087bcb..6b820a516a32d4 100644 --- a/doc/maintainers.md +++ b/doc/maintainers.md @@ -616,6 +616,12 @@ It may needs to make consensus on ruby-core/ruby-dev before making major changes * https://github.com/ruby/tsort * https://rubygems.org/gems/tsort +#### win32-registry + +* Nakamura Usaku ([unak]) +* https://github.com/ruby/win32-registry +* https://rubygems.org/gems/win32-registry + ## Platform Maintainers ### mswin64 (Microsoft Windows) diff --git a/doc/standard_library.md b/doc/standard_library.md index 91a50af0c3923f..782db10c37f583 100644 --- a/doc/standard_library.md +++ b/doc/standard_library.md @@ -124,6 +124,7 @@ of each. - [readline]: Wrapper for the Readline extension and Reline - [fiddle]: A libffi wrapper for Ruby - [tsort]: Topological sorting using Tarjan's algorithm +- [win32-registry]: Registry accessor library for the Windows platform. ## Tools @@ -208,6 +209,7 @@ of each. [uri]: https://github.com/ruby/uri [weakref]: https://github.com/ruby/weakref [win32ole]: https://github.com/ruby/win32ole +[win32-registry]: https://github.com/ruby/win32-registry [yaml]: https://github.com/ruby/yaml [zlib]: https://github.com/ruby/zlib From 3417f8025d1914c4307d19d9a56db62d54494c88 Mon Sep 17 00:00:00 2001 From: git Date: Fri, 20 Feb 2026 07:08:05 +0000 Subject: [PATCH 17/22] Update bundled gems list as of 2026-02-20 --- NEWS.md | 4 +++- gems/bundled_gems | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 80e1afcdef8f1c..90119c910b2b6e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -47,9 +47,10 @@ Other changes are listed in the following sections. We also listed release history from the previous bundled version that is Ruby 3.4.0 if it has GitHub releases. -### The following bundled gem is promoted from default gems. +### The following bundled gems are promoted from default gems. * tsort 0.2.0 +* win32-registry 0.1.2 ### The following default gem is added. @@ -80,6 +81,7 @@ releases. * repl_type_completor 0.1.13 * pstore 0.2.1 * rdoc 7.2.0 +* win32ole 1.9.3 * irb 1.17.0 ### RubyGems and Bundler diff --git a/gems/bundled_gems b/gems/bundled_gems index 84fdc5c648abc5..d27f29682153b0 100644 --- a/gems/bundled_gems +++ b/gems/bundled_gems @@ -38,7 +38,7 @@ pstore 0.2.1 https://github.com/ruby/pstore benchmark 0.5.0 https://github.com/ruby/benchmark logger 1.7.0 https://github.com/ruby/logger rdoc 7.2.0 https://github.com/ruby/rdoc -win32ole 1.9.2 https://github.com/ruby/win32ole +win32ole 1.9.3 https://github.com/ruby/win32ole irb 1.17.0 https://github.com/ruby/irb reline 0.6.3 https://github.com/ruby/reline readline 0.0.4 https://github.com/ruby/readline From 3dc80a098c147ac84f66460ee84e6c7ea9e8f1ff Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 20 Feb 2026 12:41:13 +0900 Subject: [PATCH 18/22] Removed unnecessary setup for make bundled_gems_spec-run --- spec/bundled_gems_spec.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/bundled_gems_spec.rb b/spec/bundled_gems_spec.rb index c6a5be406afc0f..0c9b45a4ad66dd 100644 --- a/spec/bundled_gems_spec.rb +++ b/spec/bundled_gems_spec.rb @@ -22,7 +22,6 @@ def self.ruby=(ruby) Gem.ruby = ENV["RUBY"] if ENV["RUBY"] require_relative "bundler/support/rubygems_ext" - Spec::Rubygems.test_setup Spec::Helpers.install_dev_bundler FileUtils.mkdir_p Spec::Path.gem_path end From 2d2afa8c170703730a58201ad9cf14ff934c453c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 20 Feb 2026 10:33:08 +0900 Subject: [PATCH 19/22] Group rubyspec_capiext --- common.mk | 5 ++++- defs/gmake.mk | 7 +++---- win32/Makefile.sub | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/common.mk b/common.mk index dfe884267da471..1127e798063239 100644 --- a/common.mk +++ b/common.mk @@ -800,7 +800,10 @@ RUBYSPEC_CAPIEXT_SRCDIR = $(srcdir)/$(RUBYSPEC_CAPIEXT) RUBYSPEC_CAPIEXT_DEPS = $(RUBYSPEC_CAPIEXT_SRCDIR)/rubyspec.h $(RUBY_H_INCLUDES) {$(VPATH)}internal/abi.h $(LIBRUBY) RUBYSPEC_CAPIEXT_BUILD = $(enable_shared:yes=rubyspec-capiext) -rubyspec-capiext: build-ext $(DOT_WAIT) +yes-rubyspec-capiext: build-ext + $(ACTIONS_GROUP) +rubyspec-capiext: build-ext $(DOT_WAIT) yes-rubyspec-capiext $(DOT_WAIT) + $(ACTIONS_ENDGROUP) # make-dependent rules should be included after this and built after build-ext. clean-spec: PHONY diff --git a/defs/gmake.mk b/defs/gmake.mk index f4b3d799902379..475ad61602d4aa 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -516,7 +516,7 @@ fix-depends check-depends: all hello # order-only-prerequisites doesn't work for $(RUBYSPEC_CAPIEXT) # because the same named directory exists in the source tree. $(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(RUBYSPEC_CAPIEXT_DEPS) \ - | build-ext + | build-ext yes-rubyspec-capiext $(no_silence:no=$(ECHO) building $@) $(Q) $(MAKEDIRS) $(@D) $(Q) $(DLDSHARED) -L. $(XDLDFLAGS) $(XLDFLAGS) $(LDFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBYARG) @@ -525,9 +525,8 @@ ifneq ($(POSTLINK),) endif $(Q) $(RMALL) $@.* -RUBYSPEC_CAPIEXT_SO := $(patsubst %.c,$(RUBYSPEC_CAPIEXT)/%.$(DLEXT),$(notdir $(wildcard $(srcdir)/$(RUBYSPEC_CAPIEXT)/*.c))) -rubyspec-capiext: $(RUBYSPEC_CAPIEXT_SO) - @ $(NULLCMD) +RUBYSPEC_CAPIEXT_EXTS := $(patsubst %.c,$(RUBYSPEC_CAPIEXT)/%.$(DLEXT),$(notdir $(wildcard $(srcdir)/$(RUBYSPEC_CAPIEXT)/*.c))) +rubyspec-capiext: $(RUBYSPEC_CAPIEXT_EXTS) spec/%/ spec/%_spec.rb: programs exts $(RUBYSPEC_CAPIEXT_BUILD) PHONY +$(RUNRUBY) -r./$(arch)-fake $(srcdir)/spec/mspec/bin/mspec-run -B $(srcdir)/spec/default.mspec $(SPECOPTS) $(patsubst %,$(srcdir)/%,$@) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 80f8f5c2bf88a4..1115dd60c0d99f 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1416,7 +1416,6 @@ RUBYSPEC_CAPIEXT_EXTS = $(RUBYSPEC_CAPIEXT_EXTS): $(RUBYSPEC_CAPIEXT_DEPS) rubyspec-capiext: $(RUBYSPEC_CAPIEXT_EXTS) - @ $(NULLCMD) {$(RUBYSPEC_CAPIEXT_SRCDIR)}.c{$(RUBYSPEC_CAPIEXT)}.so: $(ECHO) building $(@F) From 986aa6943f3496da6f3414fb418f580333245b05 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 20 Feb 2026 19:44:00 +0900 Subject: [PATCH 20/22] Suppress an uninitialized variable warning --- tool/lib/_tmpdir.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/lib/_tmpdir.rb b/tool/lib/_tmpdir.rb index 1518d46ee585cf..a3b0739d85415c 100644 --- a/tool/lib/_tmpdir.rb +++ b/tool/lib/_tmpdir.rb @@ -28,7 +28,7 @@ Dir.rmdir(tmpdir) rescue Errno::ENOENT rescue Errno::ENOTEMPTY - unless $no_report_tmpdir + unless $no_report_tmpdir ||= nil require_relative "colorize" colorize = Colorize.new ls = Struct.new(:colorize) do From f3d52cb80d931f91f6d598935d669b7ec468b8a8 Mon Sep 17 00:00:00 2001 From: Andrii Furmanets Date: Fri, 20 Feb 2026 09:05:24 +0200 Subject: [PATCH 21/22] [ruby/rubygems] Document concurrent_downloads in environment command https://github.com/ruby/rubygems/commit/927f1e3a0f --- lib/rubygems/commands/environment_command.rb | 1 + test/rubygems/test_gem_commands_environment_command.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/rubygems/commands/environment_command.rb b/lib/rubygems/commands/environment_command.rb index aea8c0d7deadd8..a5eb521a532419 100644 --- a/lib/rubygems/commands/environment_command.rb +++ b/lib/rubygems/commands/environment_command.rb @@ -38,6 +38,7 @@ def description # :nodoc: :verbose: Verbosity of the gem command. false, true, and :really are the levels :update_sources: Enable/disable automatic updating of repository metadata + :concurrent_downloads: The number of gem downloads to perform concurrently :backtrace: Print backtrace when RubyGems encounters an error :gempath: The paths in which to look for gems :disable_default_gem_server: Force specification of gem server host on push diff --git a/test/rubygems/test_gem_commands_environment_command.rb b/test/rubygems/test_gem_commands_environment_command.rb index 48252d84d4e49b..e27de544c6f596 100644 --- a/test/rubygems/test_gem_commands_environment_command.rb +++ b/test/rubygems/test_gem_commands_environment_command.rb @@ -164,4 +164,8 @@ def test_execute_platform assert_equal "#{Gem.platforms.join File::PATH_SEPARATOR}\n", @ui.output assert_equal "", @ui.error end + + def test_description_mentions_concurrent_downloads + assert_match(/:concurrent_downloads:/, @cmd.description) + end end From ee2d90295c59fce739c5850cf8fe3983db14c199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Barri=C3=A9?= Date: Fri, 20 Feb 2026 11:58:01 +0100 Subject: [PATCH 22/22] [ruby/json] Use single quotes for allow_invalid_escape doc Instead of using %{} which works like double-quoted string and allows escape sequences and in which "other escaped characters (a backslash followed by a character) are interpreted as the character", change the examples for `allow_invalid_escape` to use single-quotes strings, in which "any other character following a backslash [except ' and \] is interpreted as is: a backslash and the character itself." This makes it clearer the JSON document only includes a single backslash. https://github.com/ruby/json/commit/a888d6d57b --- ext/json/lib/json.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/json/lib/json.rb b/ext/json/lib/json.rb index 39e414beb8f353..f28be7f7731d75 100644 --- a/ext/json/lib/json.rb +++ b/ext/json/lib/json.rb @@ -201,10 +201,10 @@ # defaults to +false+. # # With the default, +false+: -# JSON.parse(%{"Hell\\o"}) # invalid escape character in string (JSON::ParserError) +# JSON.parse('"Hell\o"') # invalid escape character in string (JSON::ParserError) # # When enabled: -# JSON.parse(%{"Hell\\o"}, allow_invalid_escape: true) # => "Hello" +# JSON.parse('"Hell\o"', allow_invalid_escape: true) # => "Hello" # # ====== Output Options #
bb4(v26:BasicObject, v27:Falsy) 
PatchPoint NoTracePoint 
v31:Fixnum[4] = Const Value(4) 
PatchPoint NoTracePoint