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

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: Reinsert from bad merge 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 8c8668ef3e175d1c825919d372acb48eb18aa793..1d1a7f2eb8a25b4b8b6b6f0a08c01f810d4b1982 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);
}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/optimizers.dart ('k') | pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698