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

Unified Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 10140027: Avoid "=== true" inside code by calling a function that does this for us. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert change to tracer. Created 8 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: lib/compiler/implementation/ssa/nodes.dart
diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
index 19f794894f0250e7588c7940155c9b81fbd85197..b822fb0e276454faf32e05efdd1a067a75c0d0dc 100644
--- a/lib/compiler/implementation/ssa/nodes.dart
+++ b/lib/compiler/implementation/ssa/nodes.dart
@@ -1899,6 +1899,7 @@ class HPhi extends HInstruction {
}
class HRelational extends HInvokeBinary {
+ bool usesBoolifiedInterceptor = false;
HRelational(HStatic target, HInstruction left, HInstruction right)
: super(target, left, right);
@@ -1915,7 +1916,7 @@ class HRelational extends HInvokeBinary {
}
HType computeTypeFromInputTypes() {
- if (left.isNumber()) return HType.BOOLEAN;
+ if (left.isNumber() || usesBoolifiedInterceptor) return HType.BOOLEAN;
return HType.UNKNOWN;
}
@@ -1949,7 +1950,7 @@ class HEquals extends HRelational {
}
HType computeTypeFromInputTypes() {
- if (builtin) return HType.BOOLEAN;
+ if (builtin || usesBoolifiedInterceptor) return HType.BOOLEAN;
return HType.UNKNOWN;
}

Powered by Google App Engine
This is Rietveld 408576698