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

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

Issue 2595493002: Merge CoreTypes and CoreClasses into CommonElements. (Closed)
Patch Set: Updated cf. comment Created 3 years, 12 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 library dart2js.resolution.compute_members; 5 library dart2js.resolution.compute_members;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart' show Identifiers, Names; 8 import '../common/names.dart' show Identifiers, Names;
9 import '../common/resolution.dart' show Resolution; 9 import '../common/resolution.dart' show Resolution;
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } 303 }
304 // TODO(johnniwinther): If [cls] is not abstract, check that for all 304 // TODO(johnniwinther): If [cls] is not abstract, check that for all
305 // interface members, there is a class member whose type is a subtype of 305 // interface members, there is a class member whose type is a subtype of
306 // the interface member. 306 // the interface member.
307 } 307 }
308 308
309 /// Checks that [cls], if it implements Function, has defined call(). 309 /// Checks that [cls], if it implements Function, has defined call().
310 void checkImplementsFunctionWithCall() { 310 void checkImplementsFunctionWithCall() {
311 assert(!cls.isAbstract); 311 assert(!cls.isAbstract);
312 312
313 ClassElement functionClass = resolution.coreClasses.functionClass; 313 ClassElement functionClass = resolution.commonElements.functionClass;
314 functionClass.ensureResolved(resolution); 314 functionClass.ensureResolved(resolution);
315 if (cls.asInstanceOf(functionClass) == null) return; 315 if (cls.asInstanceOf(functionClass) == null) return;
316 if (cls.lookupMember(Identifiers.call) != null) return; 316 if (cls.lookupMember(Identifiers.call) != null) return;
317 // TODO(johnniwinther): Make separate methods for backend exceptions. 317 // TODO(johnniwinther): Make separate methods for backend exceptions.
318 // Avoid warnings on backend implementation classes for closures. 318 // Avoid warnings on backend implementation classes for closures.
319 if (resolution.target.isTargetSpecificLibrary(cls.library)) return; 319 if (resolution.target.isTargetSpecificLibrary(cls.library)) return;
320 320
321 reportMessage(functionClass, MessageKind.UNIMPLEMENTED_METHOD, () { 321 reportMessage(functionClass, MessageKind.UNIMPLEMENTED_METHOD, () {
322 reporter.reportWarningMessage(cls, MessageKind.UNIMPLEMENTED_METHOD_ONE, { 322 reporter.reportWarningMessage(cls, MessageKind.UNIMPLEMENTED_METHOD_ONE, {
323 'class': cls.name, 323 'class': cls.name,
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 message: "Members have not been fully computed for $this.")); 956 message: "Members have not been fully computed for $this."));
957 if (interfaceMembersAreClassMembers) { 957 if (interfaceMembersAreClassMembers) {
958 classMembers.forEach((_, member) { 958 classMembers.forEach((_, member) {
959 if (!member.isStatic) f(member); 959 if (!member.isStatic) f(member);
960 }); 960 });
961 } else { 961 } else {
962 interfaceMembers.forEach((_, member) => f(member)); 962 interfaceMembers.forEach((_, member) => f(member));
963 } 963 }
964 } 964 }
965 } 965 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_hierarchy.dart ('k') | pkg/compiler/lib/src/resolution/enum_creator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698