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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart

Issue 16104002: Detect (null type == null type), and change it to true. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (revision 23214)
+++ sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (working copy)
@@ -488,6 +488,10 @@
return graph.addConstantBool(false, constantSystem);
}
+ if (left.isNull() && right.isNull()) {
+ return graph.addConstantBool(true, constantSystem);
+ }
+
if (left.isConstantBoolean() && right.isBoolean()) {
HConstant constant = left;
if (constant.constant.isTrue()) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | tests/compiler/dart2js/dead_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698