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

Unified Diff: runtime/vm/flow_graph_range_analysis.cc

Issue 794613002: Improve bitwise OR, AND ranges by using the same approximation we use for XOR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 0233d55abf1a335771fa45c4f55017888a3eee7b..e90a67ae7e166109ef44c1c8bc0685ea91c75e7d 100644
--- a/runtime/vm/flow_graph_range_analysis.cc
+++ b/runtime/vm/flow_graph_range_analysis.cc
@@ -2423,8 +2423,7 @@ void Range::And(const Range* left_range,
return;
}
- *result_min = RangeBoundary::MinConstant(RangeBoundary::kRangeBoundaryInt64);
- *result_max = RangeBoundary::MaxConstant(RangeBoundary::kRangeBoundaryInt64);
+ Xor(left_range, right_range, result_min, result_max);
Florian Schneider 2014/12/10 15:55:14 Maybe this should be renamed to BitOp because the
}
@@ -2631,8 +2630,8 @@ void Range::BinaryOp(const Token::Kind op,
break;
case Token::kBIT_OR:
- *result = Range::Full(RangeBoundary::kRangeBoundaryInt64);
- return;
+ Range::Xor(left_range, right_range, &min, &max);
+ break;
default:
*result = Range(RangeBoundary::NegativeInfinity(),
« 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