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

Side by Side Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10911062: Codegen support for the argument definition test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 interface Visitor<R> { 5 interface Visitor<R> {
6 R visitBlock(Block node); 6 R visitBlock(Block node);
7 R visitBreakStatement(BreakStatement node); 7 R visitBreakStatement(BreakStatement node);
8 R visitCascade(Cascade node); 8 R visitCascade(Cascade node);
9 R visitCascadeReceiver(CascadeReceiver node); 9 R visitCascadeReceiver(CascadeReceiver node);
10 R visitCaseMatch(CaseMatch node); 10 R visitCaseMatch(CaseMatch node);
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 bool get isFunctionObjectInvocation => selector === null; 275 bool get isFunctionObjectInvocation => selector === null;
276 bool get isPrefix => argumentsNode is Prefix; 276 bool get isPrefix => argumentsNode is Prefix;
277 bool get isPostfix => argumentsNode is Postfix; 277 bool get isPostfix => argumentsNode is Postfix;
278 bool get isCall => !isOperator && !isPropertyAccess; 278 bool get isCall => !isOperator && !isPropertyAccess;
279 bool get isIndex => 279 bool get isIndex =>
280 isOperator && selector.asOperator().source.stringValue === '[]'; 280 isOperator && selector.asOperator().source.stringValue === '[]';
281 bool get isLogicalAnd => 281 bool get isLogicalAnd =>
282 isOperator && selector.asOperator().source.stringValue === '&&'; 282 isOperator && selector.asOperator().source.stringValue === '&&';
283 bool get isLogicalOr => 283 bool get isLogicalOr =>
284 isOperator && selector.asOperator().source.stringValue === '||'; 284 isOperator && selector.asOperator().source.stringValue === '||';
285 bool get isParameterCheck =>
286 isOperator && selector.asOperator().source.stringValue === '?';
285 287
286 Token getBeginToken() { 288 Token getBeginToken() {
287 if (isPrefix && !isIndex) return selector.getBeginToken(); 289 if (isPrefix && !isIndex) return selector.getBeginToken();
288 return firstBeginToken(receiver, selector); 290 return firstBeginToken(receiver, selector);
289 } 291 }
290 292
291 Token getEndToken() { 293 Token getEndToken() {
292 if (isPrefix) { 294 if (isPrefix) {
293 if (receiver !== null) return receiver.getEndToken(); 295 if (receiver !== null) return receiver.getEndToken();
294 if (selector !== null) return selector.getEndToken(); 296 if (selector !== null) return selector.getEndToken();
(...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 * argument). 1769 * argument).
1768 * 1770 *
1769 * TODO(ahe): This method is controversial, the team needs to discuss 1771 * TODO(ahe): This method is controversial, the team needs to discuss
1770 * if top-level methods are acceptable and what naming conventions to 1772 * if top-level methods are acceptable and what naming conventions to
1771 * use. 1773 * use.
1772 */ 1774 */
1773 initializerDo(Node node, f(Node node)) { 1775 initializerDo(Node node, f(Node node)) {
1774 SendSet send = node.asSendSet(); 1776 SendSet send = node.asSendSet();
1775 if (send !== null) return f(send.arguments.head); 1777 if (send !== null) return f(send.arguments.head);
1776 } 1778 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/nodes.dart ('k') | tests/language/argument_definition2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698