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

Unified Diff: frog/leg/ssa/optimize.dart

Issue 9126001: Fix Leg test failures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove accidental edit. Created 8 years, 12 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 | « frog/leg/ssa/nodes.dart ('k') | tests/language/language-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/ssa/optimize.dart
diff --git a/frog/leg/ssa/optimize.dart b/frog/leg/ssa/optimize.dart
index e6fb69f4f69c940fdbf6dddc59ad90da52dac8b4..1648d58aff7042042a815d4c21564d0b96bbe22a 100644
--- a/frog/leg/ssa/optimize.dart
+++ b/frog/leg/ssa/optimize.dart
@@ -99,7 +99,13 @@ class SsaConstantFolder extends HBaseVisitor {
if (node.left is HLiteral && node.right is HLiteral) {
HLiteral op1 = node.left;
HLiteral op2 = node.right;
- return new HLiteral(op1.value == op2.value, HType.BOOLEAN);
+ if (op1.isLiteralString()) {
+ if (op2.isLiteralString() && op1.value.definitlyEquals(op2.value)) {
+ return new HLiteral(true, HType.BOOLEAN);
+ }
+ } else {
+ return new HLiteral(op1.value == op2.value, HType.BOOLEAN);
+ }
}
return node;
}
« no previous file with comments | « frog/leg/ssa/nodes.dart ('k') | tests/language/language-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698