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

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

Issue 10698079: Revert all the changes to equals operator. Causing buildbot trouble. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/codegen.dart
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
index c5db189ba064fee8815acab54e21ba4825b7f141..df545511e8a36f4336fa1ce8e3f9e2d999ecbce3 100644
--- a/lib/compiler/implementation/ssa/codegen.dart
+++ b/lib/compiler/implementation/ssa/codegen.dart
@@ -241,6 +241,11 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
breakAction = new Map<Element, ElementAction>(),
continueAction = new Map<Element, ElementAction>(),
unsignedShiftPrecedences = JSPrecedence.binary['>>>'] {
+
+ Interceptors interceptors = backend.builder.interceptors;
+ equalsNullElement = interceptors.getEqualsNullInterceptor();
+ boolifiedEqualsNullElement =
+ interceptors.getBoolifiedVersionOf(equalsNullElement);
}
abstract visitTypeGuard(HTypeGuard node);
@@ -1260,6 +1265,14 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
visitEquals(HEquals node) {
if (node.builtin) {
emitIdentityComparison(node.left, node.right);
+ } else if (node.element === equalsNullElement ||
+ node.element === boolifiedEqualsNullElement) {
+ beginExpression(JSPrecedence.CALL_PRECEDENCE);
+ use(node.target, JSPrecedence.CALL_PRECEDENCE);
+ buffer.add('(');
+ use(node.left, JSPrecedence.ASSIGNMENT_PRECEDENCE);
+ buffer.add(')');
+ endExpression(JSPrecedence.CALL_PRECEDENCE);
} else {
visitInvokeStatic(node);
}
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698