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

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

Issue 10692087: Reapply change to update dart2js operator equals semantics to follow (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Whoops, fix eqB to use === true Created 8 years, 5 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/optimize.dart
diff --git a/lib/compiler/implementation/ssa/optimize.dart b/lib/compiler/implementation/ssa/optimize.dart
index 3d67053bbedc0dd1db47536eff3eb6c13ad5f2c9..664b62bd63cdcce93493fbe7bad40f8518d6e4bf 100644
--- a/lib/compiler/implementation/ssa/optimize.dart
+++ b/lib/compiler/implementation/ssa/optimize.dart
@@ -460,28 +460,6 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
if (right.isConstantNull()) {
if (left.propagatedType.isPrimitive()) {
return graph.addConstantBool(false);
- } else {
- // TODO(floitsch): cache interceptors.
- Interceptors interceptors = backend.builder.interceptors;
- Element equalsElement = interceptors.getEqualsInterceptor();
- // If we have a different element than [equalsElement], we
- // don't need to optimize this instruction to use another
- // element: we know the element is either eqNull or eqNullB.
- if (node.element === equalsElement) {
- Element targetElement = interceptors.getEqualsNullInterceptor();
- bool onlyUsedInBoolify = allUsersAreBoolifies(node);
- if (onlyUsedInBoolify) {
- targetElement = interceptors.getBoolifiedVersionOf(targetElement);
- }
- HStatic target = new HStatic(targetElement);
- node.block.addBefore(node, target);
- HEquals result = new HEquals(target, node.left, node.right);
- if (onlyUsedInBoolify) {
- result.usesBoolifiedInterceptor = true;
- result.propagatedType = HType.BOOLEAN;
- }
- return result;
- }
}
}

Powered by Google App Engine
This is Rietveld 408576698