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