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 Identifiers, Selectors; | 7 import '../common/names.dart' show Identifiers, Selectors; |
8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
10 import '../types/types.dart'; | 10 import '../types/types.dart'; |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 @override | 280 @override |
281 TypeMask computeMask(ClosedWorld closedWorld) { | 281 TypeMask computeMask(ClosedWorld closedWorld) { |
282 assert( | 282 assert( |
283 closedWorld.hasAnyStrictSubclass(closedWorld.coreClasses.objectClass)); | 283 closedWorld.hasAnyStrictSubclass(closedWorld.coreClasses.objectClass)); |
284 if (_mask != null) return _mask; | 284 if (_mask != null) return _mask; |
285 return _mask = new TypeMask.unionOf( | 285 return _mask = new TypeMask.unionOf( |
286 functions.expand((element) { | 286 functions.expand((element) { |
287 ClassElement cls = element.enclosingClass; | 287 ClassElement cls = element.enclosingClass; |
288 return [cls]..addAll(closedWorld.mixinUsesOf(cls)); | 288 return [cls]..addAll(closedWorld.mixinUsesOf(cls)); |
289 }).map((cls) { | 289 }).map((cls) { |
290 if (closedWorld.backend.isNullImplementation(cls)) { | 290 if (closedWorld.backendClasses.nullImplementation == cls) { |
291 return const TypeMask.empty(); | 291 return const TypeMask.empty(); |
292 } else if (closedWorld.isInstantiated(cls.declaration)) { | 292 } else if (closedWorld.isInstantiated(cls.declaration)) { |
293 return new TypeMask.nonNullSubclass(cls.declaration, closedWorld); | 293 return new TypeMask.nonNullSubclass(cls.declaration, closedWorld); |
294 } else { | 294 } else { |
295 // TODO(johnniwinther): Avoid the need for this case. | 295 // TODO(johnniwinther): Avoid the need for this case. |
296 return const TypeMask.empty(); | 296 return const TypeMask.empty(); |
297 } | 297 } |
298 }), | 298 }), |
299 closedWorld); | 299 closedWorld); |
300 } | 300 } |
301 } | 301 } |
OLD | NEW |