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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 12543033: Revert "Support optional function expression parameters in dart2js." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/tree_validator.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element get currentElement; 8 Element get currentElement;
9 Set<Node> get superUses; 9 Set<Node> get superUses;
10 10
(...skipping 3560 matching lines...) Expand 10 before | Expand all | Expand 10 after
3571 ElementKind.VARIABLE_LIST, enclosingElement); 3571 ElementKind.VARIABLE_LIST, enclosingElement);
3572 element = new FieldParameterElementX(name, fieldElement, variables, node); 3572 element = new FieldParameterElementX(name, fieldElement, variables, node);
3573 } 3573 }
3574 return element; 3574 return element;
3575 } 3575 }
3576 3576
3577 Element visitSendSet(SendSet node) { 3577 Element visitSendSet(SendSet node) {
3578 Element element; 3578 Element element;
3579 if (node.receiver != null) { 3579 if (node.receiver != null) {
3580 element = visitSend(node); 3580 element = visitSend(node);
3581 } else if (node.selector.asIdentifier() != null || 3581 } else if (node.selector.asIdentifier() != null) {
3582 node.selector.asFunctionExpression() != null) {
3583 Element variables = new VariableListElementX.node(currentDefinitions, 3582 Element variables = new VariableListElementX.node(currentDefinitions,
3584 ElementKind.VARIABLE_LIST, enclosingElement); 3583 ElementKind.VARIABLE_LIST, enclosingElement);
3585 SourceString source = node.selector.asIdentifier() != null ? 3584 element = new VariableElementX(node.selector.asIdentifier().source,
3586 node.selector.asIdentifier().source : 3585 variables, ElementKind.PARAMETER, node);
3587 node.selector.asFunctionExpression().name.asIdentifier().source;
3588 element = new VariableElementX(source, variables,
3589 ElementKind.PARAMETER, node);
3590 } 3586 }
3591 // Visit the value. The compile time constant handler will 3587 // Visit the value. The compile time constant handler will
3592 // make sure it's a compile time constant. 3588 // make sure it's a compile time constant.
3593 resolveExpression(node.arguments.head); 3589 resolveExpression(node.arguments.head);
3594 return element; 3590 return element;
3595 } 3591 }
3596 3592
3597 Element visitFunctionExpression(FunctionExpression node) { 3593 Element visitFunctionExpression(FunctionExpression node) {
3598 // This is a function typed parameter. 3594 // This is a function typed parameter.
3599 // TODO(ahe): Resolve the function type. 3595 // TODO(ahe): Resolve the function type.
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
3846 return e; 3842 return e;
3847 } 3843 }
3848 3844
3849 /// Assumed to be called by [resolveRedirectingFactory]. 3845 /// Assumed to be called by [resolveRedirectingFactory].
3850 Element visitReturn(Return node) { 3846 Element visitReturn(Return node) {
3851 Node expression = node.expression; 3847 Node expression = node.expression;
3852 return finishConstructorReference(visit(expression), 3848 return finishConstructorReference(visit(expression),
3853 expression, expression); 3849 expression, expression);
3854 } 3850 }
3855 } 3851 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/tree_validator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698