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

Unified Diff: pkg/compiler/lib/src/cps_ir/type_propagation.dart

Issue 1070293004: Use UnaryOperator and BinaryOperator in ConstantSystem. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup Created 5 years, 8 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
Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index c890623024e1e45ad795a905543f6b3b1a470fba..bd510873fa9c003b2446ab6dbab8c82c9d2452b2 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -522,7 +522,8 @@ class _TypePropagationVisitor<T> implements Visitor {
if (opname == "unary-") {
opname = "-";
}
- UnaryOperation operation = constantSystem.lookupUnary(opname);
+ UnaryOperation operation = constantSystem.lookupUnary(
+ UnaryOperator.parse(opname));
if (operation != null) {
result = operation.fold(lhs.constant);
}
@@ -535,7 +536,8 @@ class _TypePropagationVisitor<T> implements Visitor {
return;
}
- BinaryOperation operation = constantSystem.lookupBinary(opname);
+ BinaryOperation operation = constantSystem.lookupBinary(
+ BinaryOperator.parse(opname));
if (operation != null) {
result = operation.fold(lhs.constant, rhs.constant);
}

Powered by Google App Engine
This is Rietveld 408576698