Chromium Code Reviews| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 * information. The resolver is too conservative when seeing a | 42 * information. The resolver is too conservative when seeing a |
| 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 final Set<Element> callMethods; | |
|
ngeoffray
2013/03/13 09:30:46
Please add comments on callMethods and closurizedM
Johnni Winther
2013/03/22 07:30:24
Done.
| |
| 53 final Set<Element> closurizedMembers; | |
| 52 | 54 |
| 53 Universe() : instantiatedClasses = new Set<ClassElement>(), | 55 Universe() : instantiatedClasses = new Set<ClassElement>(), |
| 54 instantiatedTypes = new Set<DartType>(), | 56 instantiatedTypes = new Set<DartType>(), |
| 55 staticFunctionsNeedingGetter = new Set<FunctionElement>(), | 57 staticFunctionsNeedingGetter = new Set<FunctionElement>(), |
| 56 invokedNames = new Map<SourceString, Set<Selector>>(), | 58 invokedNames = new Map<SourceString, Set<Selector>>(), |
| 57 invokedGetters = new Map<SourceString, Set<Selector>>(), | 59 invokedGetters = new Map<SourceString, Set<Selector>>(), |
| 58 invokedSetters = new Map<SourceString, Set<Selector>>(), | 60 invokedSetters = new Map<SourceString, Set<Selector>>(), |
| 59 fieldGetters = new Set<Element>(), | 61 fieldGetters = new Set<Element>(), |
| 60 fieldSetters = new Set<Element>(), | 62 fieldSetters = new Set<Element>(), |
| 61 isChecks = new Set<DartType>(); | 63 isChecks = new Set<DartType>(), |
| 64 callMethods = new Set<Element>(), | |
| 65 closurizedMembers = new Set<Element>(); | |
| 62 | 66 |
| 63 bool hasMatchingSelector(Set<Selector> selectors, | 67 bool hasMatchingSelector(Set<Selector> selectors, |
| 64 Element member, | 68 Element member, |
| 65 Compiler compiler) { | 69 Compiler compiler) { |
| 66 if (selectors == null) return false; | 70 if (selectors == null) return false; |
| 67 for (Selector selector in selectors) { | 71 for (Selector selector in selectors) { |
| 68 if (selector.appliesUnnamed(member, compiler)) return true; | 72 if (selector.appliesUnnamed(member, compiler)) return true; |
| 69 } | 73 } |
| 70 return false; | 74 return false; |
| 71 } | 75 } |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 542 ClassElement cls = self; | 546 ClassElement cls = self; |
| 543 if (cls.isSubclassOf(other)) { | 547 if (cls.isSubclassOf(other)) { |
| 544 // Resolve an invocation of [element.name] on [self]. If it | 548 // Resolve an invocation of [element.name] on [self]. If it |
| 545 // is found, this selector is a candidate. | 549 // is found, this selector is a candidate. |
| 546 return hasElementIn(cls, element) && appliesUntyped(element, compiler); | 550 return hasElementIn(cls, element) && appliesUntyped(element, compiler); |
| 547 } | 551 } |
| 548 } | 552 } |
| 549 return false; | 553 return false; |
| 550 } | 554 } |
| 551 } | 555 } |
| OLD | NEW |