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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart

Issue 861713002: Handle super-method invocations in CPS->JS backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of tree_ir.optimization; 5 part of tree_ir.optimization;
6 6
7 /** 7 /**
8 * Performs the following transformations on the tree: 8 * Performs the following transformations on the tree:
9 * - Assignment propagation 9 * - Assignment propagation
10 * - If-to-conditional conversion 10 * - If-to-conditional conversion
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 186
187 Expression visitInvokeMethod(InvokeMethod node) { 187 Expression visitInvokeMethod(InvokeMethod node) {
188 for (int i = node.arguments.length - 1; i >= 0; --i) { 188 for (int i = node.arguments.length - 1; i >= 0; --i) {
189 node.arguments[i] = visitExpression(node.arguments[i]); 189 node.arguments[i] = visitExpression(node.arguments[i]);
190 } 190 }
191 node.receiver = visitExpression(node.receiver); 191 node.receiver = visitExpression(node.receiver);
192 return node; 192 return node;
193 } 193 }
194 194
195 Expression visitInvokeSuperMethod(InvokeSuperMethod node) { 195 Expression visitInvokeMethodDirectly(InvokeMethodDirectly node) {
196 for (int i = node.arguments.length - 1; i >= 0; --i) { 196 for (int i = node.arguments.length - 1; i >= 0; --i) {
197 node.arguments[i] = visitExpression(node.arguments[i]); 197 node.arguments[i] = visitExpression(node.arguments[i]);
198 } 198 }
199 node.receiver = visitExpression(node.receiver);
199 return node; 200 return node;
200 } 201 }
201 202
202 Expression visitInvokeConstructor(InvokeConstructor node) { 203 Expression visitInvokeConstructor(InvokeConstructor node) {
203 for (int i = node.arguments.length - 1; i >= 0; --i) { 204 for (int i = node.arguments.length - 1; i >= 0; --i) {
204 node.arguments[i] = visitExpression(node.arguments[i]); 205 node.arguments[i] = visitExpression(node.arguments[i]);
205 } 206 }
206 return node; 207 return node;
207 } 208 }
208 209
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } 590 }
590 591
591 Expression makeCondition(Expression e, bool polarity) { 592 Expression makeCondition(Expression e, bool polarity) {
592 return polarity ? e : new Not(e); 593 return polarity ? e : new Not(e);
593 } 594 }
594 595
595 Statement getBranch(If node, bool polarity) { 596 Statement getBranch(If node, bool polarity) {
596 return polarity ? node.thenStatement : node.elseStatement; 597 return polarity ? node.thenStatement : node.elseStatement;
597 } 598 }
598 } 599 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698