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

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

Issue 2630743002: Remove use of FunctionSignature et al from call_structure.dart (Closed)
Patch Set: 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.constructors; 5 library dart2js.resolution.constructors;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show Resolution; 8 import '../common/resolution.dart' show Resolution;
9 import '../constants/constructors.dart' 9 import '../constants/constructors.dart'
10 show 10 show
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 result = reportAndCreateErroneousConstructor(node, constructorName, kind, 268 result = reportAndCreateErroneousConstructor(node, constructorName, kind,
269 {'constructorName': fullConstructorName}); 269 {'constructorName': fullConstructorName});
270 } else if (!lookedupConstructor.isGenerativeConstructor) { 270 } else if (!lookedupConstructor.isGenerativeConstructor) {
271 MessageKind kind = isThisCall 271 MessageKind kind = isThisCall
272 ? MessageKind.THIS_CALL_TO_FACTORY 272 ? MessageKind.THIS_CALL_TO_FACTORY
273 : MessageKind.SUPER_CALL_TO_FACTORY; 273 : MessageKind.SUPER_CALL_TO_FACTORY;
274 result = 274 result =
275 reportAndCreateErroneousConstructor(node, constructorName, kind, {}); 275 reportAndCreateErroneousConstructor(node, constructorName, kind, {});
276 } else { 276 } else {
277 lookedupConstructor.computeType(visitor.resolution); 277 lookedupConstructor.computeType(visitor.resolution);
278 if (!callStructure 278 if (!callStructure.signatureApplies(lookedupConstructor.type)) {
279 .signatureApplies(lookedupConstructor.functionSignature)) {
280 MessageKind kind = isImplicitSuperCall 279 MessageKind kind = isImplicitSuperCall
281 ? MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT 280 ? MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT
282 : MessageKind.NO_MATCHING_CONSTRUCTOR; 281 : MessageKind.NO_MATCHING_CONSTRUCTOR;
283 result = reportAndCreateErroneousConstructor( 282 result = reportAndCreateErroneousConstructor(
284 node, constructorName, kind, {}); 283 node, constructorName, kind, {});
285 } else if (constructor.isConst && !lookedupConstructor.isConst) { 284 } else if (constructor.isConst && !lookedupConstructor.isConst) {
286 MessageKind kind = isImplicitSuperCall 285 MessageKind kind = isImplicitSuperCall
287 ? MessageKind.CONST_CALLS_NON_CONST_FOR_IMPLICIT 286 ? MessageKind.CONST_CALLS_NON_CONST_FOR_IMPLICIT
288 : MessageKind.CONST_CALLS_NON_CONST; 287 : MessageKind.CONST_CALLS_NON_CONST;
289 result = reportAndCreateErroneousConstructor( 288 result = reportAndCreateErroneousConstructor(
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 // constructors. 884 // constructors.
886 return null; 885 return null;
887 } 886 }
888 // TODO(johnniwinther): Use [Name] for lookup. 887 // TODO(johnniwinther): Use [Name] for lookup.
889 ConstructorElement constructor = cls.lookupConstructor(constructorName); 888 ConstructorElement constructor = cls.lookupConstructor(constructorName);
890 if (constructor != null) { 889 if (constructor != null) {
891 constructor = constructor.declaration; 890 constructor = constructor.declaration;
892 } 891 }
893 return constructor; 892 return constructor;
894 } 893 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698