| 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 '../elements/elements.dart' show MemberElement; | 8 import '../elements/elements.dart' show MemberElement; |
| 9 import '../elements/entities.dart'; | 9 import '../elements/entities.dart'; |
| 10 import '../types/types.dart'; | 10 import '../types/types.dart'; |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 @override | 291 @override |
| 292 TypeMask computeMask(ClosedWorld closedWorld) { | 292 TypeMask computeMask(ClosedWorld closedWorld) { |
| 293 assert(closedWorld | 293 assert(closedWorld |
| 294 .hasAnyStrictSubclass(closedWorld.commonElements.objectClass)); | 294 .hasAnyStrictSubclass(closedWorld.commonElements.objectClass)); |
| 295 if (_mask != null) return _mask; | 295 if (_mask != null) return _mask; |
| 296 return _mask = new TypeMask.unionOf( | 296 return _mask = new TypeMask.unionOf( |
| 297 functions.expand((MemberElement element) { | 297 functions.expand((MemberElement element) { |
| 298 ClassEntity cls = element.enclosingClass; | 298 ClassEntity cls = element.enclosingClass; |
| 299 return [cls]..addAll(closedWorld.mixinUsesOf(cls)); | 299 return [cls]..addAll(closedWorld.mixinUsesOf(cls)); |
| 300 }).map((cls) { | 300 }).map((cls) { |
| 301 if (closedWorld.backendClasses.nullImplementation == cls) { | 301 if (closedWorld.backendClasses.nullClass == cls) { |
| 302 return const TypeMask.empty(); | 302 return const TypeMask.empty(); |
| 303 } else if (closedWorld.isInstantiated(cls)) { | 303 } else if (closedWorld.isInstantiated(cls)) { |
| 304 return new TypeMask.nonNullSubclass(cls, closedWorld); | 304 return new TypeMask.nonNullSubclass(cls, closedWorld); |
| 305 } else { | 305 } else { |
| 306 // TODO(johnniwinther): Avoid the need for this case. | 306 // TODO(johnniwinther): Avoid the need for this case. |
| 307 return const TypeMask.empty(); | 307 return const TypeMask.empty(); |
| 308 } | 308 } |
| 309 }), | 309 }), |
| 310 closedWorld); | 310 closedWorld); |
| 311 } | 311 } |
| 312 } | 312 } |
| OLD | NEW |