@@ -18117,17 +18117,17 @@ mod hir_opt_tests {
1811718117 }
1811818118
1811918119 #[test]
18120- #[ignore = "started failing after profiling bucket was changed from 4 to 8"]
1812118120 fn test_specialize_inlined_megamorphic_receiver() {
18122- set_call_threshold(6);
18121+ assert_eq!(crate::profile::DISTRIBUTION_SIZE, 8, "If you change distribution size, update the number of classes used");
18122+ set_call_threshold((crate::profile::DISTRIBUTION_SIZE + 2).try_into().unwrap());
1812318123 eval("
1812418124 def klass_eq(klass) = klass == Integer
1812518125
1812618126 def test = klass_eq(String)
1812718127
18128- # 5 distinct receiver classes at the == site: one more than the profile's
18129- # 4 buckets, so the distribution is megamorphic.
18130- klass_eq(Integer); klass_eq(Array); klass_eq(Hash); klass_eq(Symbol); klass_eq(Float)
18128+ # 9 distinct receiver classes at the == site: one more than the profile's
18129+ # 8 buckets, so the distribution is megamorphic.
18130+ klass_eq(Integer); klass_eq(Array); klass_eq(Hash); klass_eq(Symbol); klass_eq(Float); klass_eq(NilClass); klass_eq(TrueClass); klass_eq(FalseClass); klass_eq(String)
1813118131 6.times { test }
1813218132 ");
1813318133 assert_snapshot!(hir_string("test"), @"
@@ -18149,11 +18149,11 @@ mod hir_opt_tests {
1814918149 PatchPoint StableConstantNames(0x1068, Integer)
1815018150 v31:ClassSubclass[Integer@0x1070] = Const Value(VALUE(0x1070))
1815118151 PatchPoint MethodRedefined(Class@0x1078, ==@0x1080, cme:0x1088)
18152- v45 :CBool = IsBitEqual v12, v31
18153- v46 :BoolExact = BoxBool v45
18152+ v82 :CBool = IsBitEqual v12, v31
18153+ v83 :BoolExact = BoxBool v82
1815418154 CheckInterrupts
1815518155 PopInlineFrame
18156- Return v46
18156+ Return v83
1815718157 ");
1815818158 }
1815918159
0 commit comments