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

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

Issue 2132383002: Renamed isParameter to isRegularParameter. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Review response Created 4 years, 5 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
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 void tryMakeLocalPlaceholder(Element element, Identifier node) { 270 void tryMakeLocalPlaceholder(Element element, Identifier node) {
271 bool isNamedOptionalParameter() { 271 bool isNamedOptionalParameter() {
272 FunctionTypedElement function = element.enclosingElement; 272 FunctionTypedElement function = element.enclosingElement;
273 FunctionSignature signature = function.functionSignature; 273 FunctionSignature signature = function.functionSignature;
274 if (!signature.optionalParametersAreNamed) return false; 274 if (!signature.optionalParametersAreNamed) return false;
275 for (Element parameter in signature.optionalParameters) { 275 for (Element parameter in signature.optionalParameters) {
276 if (identical(parameter, element)) return true; 276 if (identical(parameter, element)) return true;
277 } 277 }
278 return false; 278 return false;
279 } 279 }
280 if (element.isParameter && 280 if (element.isRegularParameter &&
281 !isTypedefParameter(element) && 281 !isTypedefParameter(element) &&
282 isNamedOptionalParameter()) { 282 isNamedOptionalParameter()) {
283 currentFunctionScope.registerParameter(node); 283 currentFunctionScope.registerParameter(node);
284 } else if (Elements.isLocal(element) && !isTypedefParameter(element)) { 284 } else if (Elements.isLocal(element) && !isTypedefParameter(element)) {
285 makeLocalPlaceholder(node); 285 makeLocalPlaceholder(node);
286 } 286 }
287 } 287 }
288 288
289 void tryMakeMemberPlaceholder(Identifier node) { 289 void tryMakeMemberPlaceholder(Identifier node) {
290 assert(node != null); 290 assert(node != null);
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 715
716 visitBlock(Block node) { 716 visitBlock(Block node) {
717 for (Node statement in node.statements.nodes) { 717 for (Node statement in node.statements.nodes) {
718 if (statement is VariableDefinitions) { 718 if (statement is VariableDefinitions) {
719 makeVarDeclarationTypePlaceholder(statement); 719 makeVarDeclarationTypePlaceholder(statement);
720 } 720 }
721 } 721 }
722 node.visitChildren(this); 722 node.visitChildren(this);
723 } 723 }
724 } 724 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698