Index: runtime/vm/flow_graph_range_analysis.cc |
diff --git a/runtime/vm/flow_graph_range_analysis.cc b/runtime/vm/flow_graph_range_analysis.cc |
index d4f192a4c80c6ebaa645177f944f2f926a8ae6a7..98d3da533bd641e973103cfcf61bf0062bfb5e7a 100644 |
--- a/runtime/vm/flow_graph_range_analysis.cc |
+++ b/runtime/vm/flow_graph_range_analysis.cc |
@@ -2903,6 +2903,22 @@ void LoadIndexedInstr::InferRange(RangeAnalysis* analysis, Range* range) { |
} |
+void LoadCodeUnitsInstr::InferRange(RangeAnalysis* analysis, Range* range) { |
+ ASSERT(class_id() == kOneByteStringCid || |
+ class_id() == kTwoByteStringCid); |
+ switch (class_id()) { |
+ case kOneByteStringCid: |
+ case kTwoByteStringCid: |
+ *range = Range(RangeBoundary::FromConstant(0), |
+ RangeBoundary::FromConstant(kMaxUint32)); |
+ break; |
+ default: |
+ UNREACHABLE(); |
+ break; |
+ } |
+} |
+ |
+ |
void IfThenElseInstr::InferRange(RangeAnalysis* analysis, Range* range) { |
const intptr_t min = Utils::Minimum(if_true_, if_false_); |
const intptr_t max = Utils::Maximum(if_true_, if_false_); |