Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Unified Diff: runtime/vm/flow_graph_range_analysis.cc

Issue 539153002: Port and integrate the irregexp engine from V8 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed Ivan's comments. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ed335dab73c5c99d3f5d62f2eb6dc8ea2aab8bdf..61d45289e34b7f74121f5ce3349f95744ebf6dd4 100644
--- a/runtime/vm/flow_graph_range_analysis.cc
+++ b/runtime/vm/flow_graph_range_analysis.cc
@@ -2826,6 +2826,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_);
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698