| 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 part of universe; | 5 part of universe; |
| 6 | 6 |
| 7 // TODO(kasperl): This actually holds getters and setters just fine | 7 // TODO(kasperl): This actually holds getters and setters just fine |
| 8 // too and stricly they aren't functions. Maybe this needs a better | 8 // too and stricly they aren't functions. Maybe this needs a better |
| 9 // name -- something like ElementSet seems a bit too generic. | 9 // name -- something like ElementSet seems a bit too generic. |
| 10 class FunctionSet { | 10 class FunctionSet { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 TypeMask computeMask(Compiler compiler) { | 213 TypeMask computeMask(Compiler compiler) { |
| 214 if (_mask != null) return _mask; | 214 if (_mask != null) return _mask; |
| 215 return _mask = new TypeMask.unionOf(functions | 215 return _mask = new TypeMask.unionOf(functions |
| 216 .expand((element) { | 216 .expand((element) { |
| 217 ClassElement cls = element.getEnclosingClass(); | 217 ClassElement cls = element.getEnclosingClass(); |
| 218 return compiler.world.isUsedAsMixin(cls) | 218 return compiler.world.isUsedAsMixin(cls) |
| 219 ? ([cls]..addAll(compiler.world.mixinUses[cls])) | 219 ? ([cls]..addAll(compiler.world.mixinUses[cls])) |
| 220 : [cls]; | 220 : [cls]; |
| 221 }) | 221 }) |
| 222 .map((cls) { | 222 .map((cls) { |
| 223 if (compiler.backend.isNullImplementation(cls)) { |
| 224 return const TypeMask.empty(); |
| 225 } |
| 223 return compiler.world.hasSubclasses(cls) | 226 return compiler.world.hasSubclasses(cls) |
| 224 ? new TypeMask.nonNullSubclass(cls.rawType) | 227 ? new TypeMask.nonNullSubclass(cls.rawType) |
| 225 : new TypeMask.nonNullExact(cls.rawType); | 228 : new TypeMask.nonNullExact(cls.rawType); |
| 226 }), | 229 }), |
| 227 compiler); | 230 compiler); |
| 228 } | 231 } |
| 229 | 232 |
| 230 FullFunctionSetQuery(functions) : super(functions); | 233 FullFunctionSetQuery(functions) : super(functions); |
| 231 } | 234 } |
| OLD | NEW |