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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/optimization/logical_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: 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 /// Rewrites logical expressions to be more compact in the Tree IR. 7 /// Rewrites logical expressions to be more compact in the Tree IR.
8 /// 8 ///
9 /// In this class an expression is said to occur in "boolean context" if 9 /// In this class an expression is said to occur in "boolean context" if
10 /// its result is immediately applied to boolean conversion. 10 /// its result is immediately applied to boolean conversion.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 _rewriteList(node.arguments); 186 _rewriteList(node.arguments);
187 return node; 187 return node;
188 } 188 }
189 189
190 Expression visitInvokeMethod(InvokeMethod node) { 190 Expression visitInvokeMethod(InvokeMethod node) {
191 node.receiver = visitExpression(node.receiver); 191 node.receiver = visitExpression(node.receiver);
192 _rewriteList(node.arguments); 192 _rewriteList(node.arguments);
193 return node; 193 return node;
194 } 194 }
195 195
196 Expression visitInvokeSuperMethod(InvokeSuperMethod node) { 196 Expression visitInvokeMethodDirectly(InvokeMethodDirectly node) {
197 node.receiver = visitExpression(node.receiver);
197 _rewriteList(node.arguments); 198 _rewriteList(node.arguments);
198 return node; 199 return node;
199 } 200 }
200 201
201 Expression visitInvokeConstructor(InvokeConstructor node) { 202 Expression visitInvokeConstructor(InvokeConstructor node) {
202 _rewriteList(node.arguments); 203 _rewriteList(node.arguments);
203 return node; 204 return node;
204 } 205 }
205 206
206 Expression visitConcatenateStrings(ConcatenateStrings node) { 207 Expression visitConcatenateStrings(ConcatenateStrings node) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 } 483 }
483 484
484 /// Destructively updates each entry of [l] with the result of visiting it. 485 /// Destructively updates each entry of [l] with the result of visiting it.
485 void _rewriteList(List<Expression> l) { 486 void _rewriteList(List<Expression> l) {
486 for (int i = 0; i < l.length; i++) { 487 for (int i = 0; i < l.length; i++) {
487 l[i] = visitExpression(l[i]); 488 l[i] = visitExpression(l[i]);
488 } 489 }
489 } 490 }
490 } 491 }
491 492
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698