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

Unified Diff: runtime/vm/flow_graph_range_analysis.cc

Issue 656443003: BoundsCheckGeneralizer::Simplify should ignore unsupported binary ops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | no next file » | 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..8b597d734af6e46e1ac27b908a4386186c3c0245 100644
--- a/runtime/vm/flow_graph_range_analysis.cc
+++ b/runtime/vm/flow_graph_range_analysis.cc
@@ -1294,7 +1294,6 @@ class BoundsCheckGeneralizer {
c = 0;
}
}
-
} else if (binary_op->op_kind() == Token::kSUB) {
intptr_t left_const = 0;
intptr_t right_const = 0;
@@ -1334,11 +1333,13 @@ class BoundsCheckGeneralizer {
c = 0;
}
}
-
- } else {
+ } else if (binary_op->op_kind() == Token::kMUL) {
if (!Simplify(&left, NULL) || !Simplify(&right, NULL)) {
return false;
}
+ } else {
+ // Don't attempt to simplify any other binary operation.
+ return true;
}
ASSERT(left != NULL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698