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

Unified Diff: runtime/vm/flow_graph_range_analysis.cc

Issue 630043002: Fix assertion failure in range analysis. (Closed) Base URL: http://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 | tests/language/vm/regress_21245_test.dart » ('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
===================================================================
--- runtime/vm/flow_graph_range_analysis.cc (revision 40918)
+++ runtime/vm/flow_graph_range_analysis.cc (working copy)
@@ -441,7 +441,7 @@
// if we can perform narrowing: use newly computed minimum to improve precision
// of the computed range. We do it only if current minimum was widened and is
// equal to MinSmi.
-// Newly computed minimum is expected to be greater of equal then old one as
+// Newly computed minimum is expected to be greater or equal than old one as
// we are running after widening phase.
static RangeBoundary NarrowMin(const Range* range,
const Range* new_range,
@@ -460,7 +460,7 @@
// if we can perform narrowing: use newly computed maximum to improve precision
// of the computed range. We do it only if current maximum was widened and is
// equal to MaxSmi.
-// Newly computed minimum is expected to be greater of equal then old one as
+// Newly computed maximum is expected to be less or equal than old one as
// we are running after widening phase.
static RangeBoundary NarrowMax(const Range* range,
const Range* new_range,
@@ -1202,7 +1202,6 @@
const int64_t offset = range->max().offset() + a->offset();
-
*a = CanonicalizeBoundary(
RangeBoundary::FromDefinition(range->max().symbol(), offset),
RangeBoundary::PositiveInfinity());
@@ -1241,14 +1240,9 @@
return false;
}
- if (DependOnSameSymbol(*a, *b)) {
- return true;
- }
+ RangeBoundary canonical_a = *a;
+ RangeBoundary canonical_b = *b;
-
- RangeBoundary canonical_a = CanonicalizeBoundary(*a, overflow);
- RangeBoundary canonical_b = CanonicalizeBoundary(*b, overflow);
-
do {
if (DependOnSameSymbol(canonical_a, canonical_b)) {
*a = canonical_a;
« no previous file with comments | « no previous file | tests/language/vm/regress_21245_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698