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

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

Issue 11861007: Move indexSet and unary operators to the new interceptor mechanism. (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 17016)
+++ sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (working copy)
@@ -1279,19 +1279,15 @@
}
visitInvokeUnary(HInvokeUnary node, String op) {
- if (node.isBuiltin(types)) {
- use(node.operand);
- push(new js.Prefix(op, pop()), node);
- } else {
- visitInvokeStatic(node);
- }
+ use(node.operand);
+ push(new js.Prefix(op, pop()), node);
}
// We want the outcome of bit-operations to be positive. We use the unsigned
// shift operator to achieve this.
visitBitInvokeUnary(HInvokeUnary node, String op) {
visitInvokeUnary(node, op);
- if (node.isBuiltin(types) && requiresUintConversion(node)) {
+ if (requiresUintConversion(node)) {
push(new js.Binary(">>>", pop(), new js.LiteralNumber("0")), node);
}
}
@@ -2143,17 +2139,13 @@
}
void visitIndexAssign(HIndexAssign node) {
- if (node.isBuiltin(types)) {
- use(node.inputs[1]);
- js.Expression receiver = pop();
- use(node.inputs[2]);
- js.Expression index = pop();
- use(node.inputs[3]);
- push(new js.Assignment(new js.PropertyAccess(receiver, index), pop()),
- node);
- } else {
- visitInvokeStatic(node);
- }
+ use(node.receiver);
+ js.Expression receiver = pop();
+ use(node.index);
+ js.Expression index = pop();
+ use(node.value);
+ push(new js.Assignment(new js.PropertyAccess(receiver, index), pop()),
+ node);
}
void checkInt(HInstruction input, String cmp) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698