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

Side by Side Diff: pkg/compiler/lib/src/dart_backend/placeholder_collector.dart

Issue 1146943002: Change Link to List in FunctionSignature. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/elements.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 dart_backend; 5 part of dart_backend;
6 6
7 class LocalPlaceholder { 7 class LocalPlaceholder {
8 final String identifier; 8 final String identifier;
9 final Set<Node> nodes; 9 final Set<Node> nodes;
10 LocalPlaceholder(this.identifier) : nodes = new Set<Node>(); 10 LocalPlaceholder(this.identifier) : nodes = new Set<Node>();
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 if (!Elements.isErroneous(constructor)) { 496 if (!Elements.isErroneous(constructor)) {
497 tryMakeConstructorPlaceholder(node.send.selector, constructor); 497 tryMakeConstructorPlaceholder(node.send.selector, constructor);
498 // TODO(smok): Should this be in visitNamedArgument? 498 // TODO(smok): Should this be in visitNamedArgument?
499 // Field names can be exposed as names of optional arguments, e.g. 499 // Field names can be exposed as names of optional arguments, e.g.
500 // class C { 500 // class C {
501 // final field; 501 // final field;
502 // C([this.field]); 502 // C([this.field]);
503 // } 503 // }
504 // Do not forget to rename them as well. 504 // Do not forget to rename them as well.
505 FunctionElement constructorFunction = constructor; 505 FunctionElement constructorFunction = constructor;
506 Link<Element> optionalParameters = 506 List<Element> optionalParameters =
507 constructorFunction.functionSignature.optionalParameters; 507 constructorFunction.functionSignature.optionalParameters;
508 for (final argument in send.argumentsNode) { 508 for (final argument in send.argumentsNode) {
509 NamedArgument named = argument.asNamedArgument(); 509 NamedArgument named = argument.asNamedArgument();
510 if (named == null) continue; 510 if (named == null) continue;
511 Identifier name = named.name; 511 Identifier name = named.name;
512 String nameAsString = name.source; 512 String nameAsString = name.source;
513 for (final parameter in optionalParameters) { 513 for (final parameter in optionalParameters) {
514 if (parameter.isInitializingFormal) { 514 if (parameter.isInitializingFormal) {
515 if (parameter.name == nameAsString) { 515 if (parameter.name == nameAsString) {
516 tryMakeMemberPlaceholder(name); 516 tryMakeMemberPlaceholder(name);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 718
719 visitBlock(Block node) { 719 visitBlock(Block node) {
720 for (Node statement in node.statements.nodes) { 720 for (Node statement in node.statements.nodes) {
721 if (statement is VariableDefinitions) { 721 if (statement is VariableDefinitions) {
722 makeVarDeclarationTypePlaceholder(statement); 722 makeVarDeclarationTypePlaceholder(statement);
723 } 723 }
724 } 724 }
725 node.visitChildren(this); 725 node.visitChildren(this);
726 } 726 }
727 } 727 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698