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

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

Issue 12042003: Move relational operators to the new interceptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/codegen.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (revision 17334)
+++ sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (working copy)
@@ -1263,16 +1263,7 @@
push(new js.Binary(op, jsLeft, pop()), node);
}
- visitRelational(HRelational node, String op) {
- if (node.isBuiltin(types)) {
- use(node.left);
- js.Expression jsLeft = pop();
- use(node.right);
- push(new js.Binary(op, jsLeft, pop()), node);
- } else {
- visitInvokeStatic(node);
- }
- }
+ visitRelational(HRelational node, String op) => visitInvokeBinary(node, op);
// We want the outcome of bit-operations to be positive. We use the unsigned
// shift operator to achieve this.
@@ -1320,16 +1311,7 @@
}
}
- visitEquals(HEquals node) {
- if (node.isBuiltin(types)) {
- emitIdentityComparison(node.left, node.right);
- } else {
- visitInvokeStatic(node);
- }
- }
-
visitIdentity(HIdentity node) {
- assert(node.isBuiltin(types));
emitIdentityComparison(node.left, node.right);
}
@@ -1855,7 +1837,6 @@
attachLocationToLast(node);
}
-
void generateNot(HInstruction input) {
bool canGenerateOptimizedComparison(HInstruction instruction) {
if (instruction is !HRelational) return false;
@@ -1864,8 +1845,7 @@
HInstruction right = relational.right;
// This optimization doesn't work for NaN, so we only do it if the
// type is known to be an integer.
- return relational.isBuiltin(types)
- && types[left].isUseful() && left.isInteger(types)
+ return types[left].isUseful() && left.isInteger(types)
&& types[right].isUseful() && right.isInteger(types);
}

Powered by Google App Engine
This is Rietveld 408576698