| 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; | 5 library universe; |
| 6 | 6 |
| 7 import '../closure.dart'; | 7 import '../closure.dart'; |
| 8 import '../elements/elements.dart'; | 8 import '../elements/elements.dart'; |
| 9 import '../dart2jslib.dart'; | 9 import '../dart2jslib.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 * getter and only registers an invoked getter. | 43 * getter and only registers an invoked getter. |
| 44 */ | 44 */ |
| 45 final Set<Element> fieldGetters; | 45 final Set<Element> fieldGetters; |
| 46 | 46 |
| 47 /** | 47 /** |
| 48 * Fields set. See comment in [fieldGetters]. | 48 * Fields set. See comment in [fieldGetters]. |
| 49 */ | 49 */ |
| 50 final Set<Element> fieldSetters; | 50 final Set<Element> fieldSetters; |
| 51 final Set<DartType> isChecks; | 51 final Set<DartType> isChecks; |
| 52 | 52 |
| 53 /** |
| 54 * Set of [:call:] methods in instantiated classes that use type variables |
| 55 * in their signature. |
| 56 */ |
| 57 final Set<Element> genericCallMethods; |
| 58 |
| 59 /** |
| 60 * Set of methods in instantiated classes that use type variables in their |
| 61 * signature and have potentially been closurized. |
| 62 */ |
| 63 final Set<Element> closurizedGenericMembers; |
| 64 |
| 53 bool usingFactoryWithTypeArguments = false; | 65 bool usingFactoryWithTypeArguments = false; |
| 54 | 66 |
| 55 Universe() : instantiatedClasses = new Set<ClassElement>(), | 67 Universe() : instantiatedClasses = new Set<ClassElement>(), |
| 56 instantiatedTypes = new Set<DartType>(), | 68 instantiatedTypes = new Set<DartType>(), |
| 57 staticFunctionsNeedingGetter = new Set<FunctionElement>(), | 69 staticFunctionsNeedingGetter = new Set<FunctionElement>(), |
| 58 invokedNames = new Map<SourceString, Set<Selector>>(), | 70 invokedNames = new Map<SourceString, Set<Selector>>(), |
| 59 invokedGetters = new Map<SourceString, Set<Selector>>(), | 71 invokedGetters = new Map<SourceString, Set<Selector>>(), |
| 60 invokedSetters = new Map<SourceString, Set<Selector>>(), | 72 invokedSetters = new Map<SourceString, Set<Selector>>(), |
| 61 fieldGetters = new Set<Element>(), | 73 fieldGetters = new Set<Element>(), |
| 62 fieldSetters = new Set<Element>(), | 74 fieldSetters = new Set<Element>(), |
| 63 isChecks = new Set<DartType>(); | 75 isChecks = new Set<DartType>(), |
| 76 genericCallMethods = new Set<Element>(), |
| 77 closurizedGenericMembers = new Set<Element>(); |
| 64 | 78 |
| 65 bool hasMatchingSelector(Set<Selector> selectors, | 79 bool hasMatchingSelector(Set<Selector> selectors, |
| 66 Element member, | 80 Element member, |
| 67 Compiler compiler) { | 81 Compiler compiler) { |
| 68 if (selectors == null) return false; | 82 if (selectors == null) return false; |
| 69 for (Selector selector in selectors) { | 83 for (Selector selector in selectors) { |
| 70 if (selector.appliesUnnamed(member, compiler)) return true; | 84 if (selector.appliesUnnamed(member, compiler)) return true; |
| 71 } | 85 } |
| 72 return false; | 86 return false; |
| 73 } | 87 } |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 // bar() => foo(); // The call to 'foo' is a typed selector. | 461 // bar() => foo(); // The call to 'foo' is a typed selector. |
| 448 // } | 462 // } |
| 449 if (element.getEnclosingClass().isClosure()) { | 463 if (element.getEnclosingClass().isClosure()) { |
| 450 return appliesUntyped(element, compiler); | 464 return appliesUntyped(element, compiler); |
| 451 } | 465 } |
| 452 | 466 |
| 453 if (!mask.canHit(element, this, compiler)) return false; | 467 if (!mask.canHit(element, this, compiler)) return false; |
| 454 return appliesUntyped(element, compiler); | 468 return appliesUntyped(element, compiler); |
| 455 } | 469 } |
| 456 } | 470 } |
| OLD | NEW |