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

Side by Side Diff: pkg/compiler/lib/src/resolution/signatures.dart

Issue 2644533002: Mostly use entities in use.dart (Closed)
Patch Set: Fixes Created 3 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
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 library dart2js.resolution.signatures; 5 library dart2js.resolution.signatures;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart'; 8 import '../common/resolution.dart';
9 import '../elements/resolution_types.dart'; 9 import '../elements/resolution_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 if (node.modifiers.isStatic) { 89 if (node.modifiers.isStatic) {
90 reporter.reportErrorMessage(node, MessageKind.FORMAL_DECLARED_STATIC); 90 reporter.reportErrorMessage(node, MessageKind.FORMAL_DECLARED_STATIC);
91 } 91 }
92 92
93 if (currentDefinitions != null) { 93 if (currentDefinitions != null) {
94 reporter.internalError(node, 'function type parameters not supported'); 94 reporter.internalError(node, 'function type parameters not supported');
95 } 95 }
96 currentDefinitions = node; 96 currentDefinitions = node;
97 FormalElementX element = definition == null 97 FormalElementX element = definition == null
98 ? createUnnamedParameter() // This happens in function types. 98 ? createUnnamedParameter() // This happens in function types.
99 : definition.accept(this); 99 : definition.accept(this);
100 if (currentDefinitions.metadata != null) { 100 if (currentDefinitions.metadata != null) {
101 element.metadataInternal = 101 element.metadataInternal =
102 resolution.resolver.resolveMetadata(element, node); 102 resolution.resolver.resolveMetadata(element, node);
103 } 103 }
104 currentDefinitions = null; 104 currentDefinitions = null;
105 return element; 105 return element;
106 } 106 }
107 107
108 void validateName(Identifier node) { 108 void validateName(Identifier node) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 ElementKind.PARAMETER, enclosingElement, currentDefinitions, name); 199 ElementKind.PARAMETER, enclosingElement, currentDefinitions, name);
200 } 200 }
201 computeParameterType(parameter); 201 computeParameterType(parameter);
202 return parameter; 202 return parameter;
203 } 203 }
204 204
205 FormalElementX createUnnamedParameter() { 205 FormalElementX createUnnamedParameter() {
206 FormalElementX parameter; 206 FormalElementX parameter;
207 assert(!createRealParameters); 207 assert(!createRealParameters);
208 parameter = new FormalElementX.unnamed( 208 parameter = new FormalElementX.unnamed(
209 ElementKind.PARAMETER, enclosingElement, currentDefinitions); 209 ElementKind.PARAMETER, enclosingElement, currentDefinitions);
210 computeParameterType(parameter); 210 computeParameterType(parameter);
211 return parameter; 211 return parameter;
212 } 212 }
213 213
214 InitializingFormalElementX createFieldParameter( 214 InitializingFormalElementX createFieldParameter(
215 Send node, Expression initializer) { 215 Send node, Expression initializer) {
216 InitializingFormalElementX element; 216 InitializingFormalElementX element;
217 Identifier receiver = node.receiver.asIdentifier(); 217 Identifier receiver = node.receiver.asIdentifier();
218 if (receiver == null || !receiver.isThis()) { 218 if (receiver == null || !receiver.isThis()) {
219 reporter.reportErrorMessage(node, MessageKind.INVALID_PARAMETER); 219 reporter.reportErrorMessage(node, MessageKind.INVALID_PARAMETER);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 /// variables of the function signature itself when its signature is analyzed. 498 /// variables of the function signature itself when its signature is analyzed.
499 class FunctionSignatureBuildingScope extends TypeVariablesScope { 499 class FunctionSignatureBuildingScope extends TypeVariablesScope {
500 @override 500 @override
501 final List<ResolutionDartType> typeVariables; 501 final List<ResolutionDartType> typeVariables;
502 502
503 FunctionSignatureBuildingScope(Scope parent, this.typeVariables) 503 FunctionSignatureBuildingScope(Scope parent, this.typeVariables)
504 : super(parent); 504 : super(parent);
505 505
506 String toString() => 'FunctionSignatureBuildingScope($typeVariables)'; 506 String toString() => 'FunctionSignatureBuildingScope($typeVariables)';
507 } 507 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698