OLD | NEW |
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 universe.function_set; | 5 library universe.function_set; |
6 | 6 |
7 import '../common/names.dart' show | 7 import '../common/names.dart' show |
8 Identifiers, | 8 Identifiers, |
9 Selectors; | 9 Selectors; |
10 import '../compiler.dart' show | 10 import '../compiler.dart' show |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 assert(classWorld.hasAnyStrictSubclass(classWorld.objectClass)); | 291 assert(classWorld.hasAnyStrictSubclass(classWorld.objectClass)); |
292 if (_mask != null) return _mask; | 292 if (_mask != null) return _mask; |
293 return _mask = new TypeMask.unionOf(functions | 293 return _mask = new TypeMask.unionOf(functions |
294 .expand((element) { | 294 .expand((element) { |
295 ClassElement cls = element.enclosingClass; | 295 ClassElement cls = element.enclosingClass; |
296 return [cls]..addAll(classWorld.mixinUsesOf(cls)); | 296 return [cls]..addAll(classWorld.mixinUsesOf(cls)); |
297 }) | 297 }) |
298 .map((cls) { | 298 .map((cls) { |
299 if (classWorld.backend.isNullImplementation(cls)) { | 299 if (classWorld.backend.isNullImplementation(cls)) { |
300 return const TypeMask.empty(); | 300 return const TypeMask.empty(); |
| 301 } else if (classWorld.isInstantiated(cls.declaration)) { |
| 302 return new TypeMask.nonNullSubclass(cls.declaration, classWorld); |
301 } else { | 303 } else { |
302 return new TypeMask.nonNullSubclass(cls.declaration, classWorld); | 304 // TODO(johnniwinther): Avoid the need for this case. |
| 305 return const TypeMask.empty(); |
303 } | 306 } |
304 }), | 307 }), |
305 classWorld); | 308 classWorld); |
306 } | 309 } |
307 } | 310 } |
OLD | NEW |