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

Unified Diff: pkg/compiler/lib/src/ssa/builder.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
« no previous file with comments | « pkg/compiler/lib/src/resolution/operators.dart ('k') | pkg/compiler/lib/src/ssa/ssa.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 368b6ef27e7155784e1ea5345453784bf479ae7a..a3d3a60b42b5366fcb6017895d90bf4117a723bc 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -3149,7 +3149,8 @@ class SsaBuilder extends NewResolvedVisitor {
// See if we can constant-fold right away. This avoids rewrites later on.
if (operand is HConstant) {
- UnaryOperation operation = constantSystem.lookupUnary(op.source);
+ UnaryOperation operation = constantSystem.lookupUnary(
+ UnaryOperator.parse(op.source));
HConstant constant = operand;
ConstantValue folded = operation.fold(constant.constant);
if (folded != null) {
« no previous file with comments | « pkg/compiler/lib/src/resolution/operators.dart ('k') | pkg/compiler/lib/src/ssa/ssa.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698