| 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 class Universe { | 5 class Universe { |
| 6 Map<Element, String> generatedCode; | 6 Map<Element, String> generatedCode; |
| 7 Map<Element, String> generatedBailoutCode; | 7 Map<Element, String> generatedBailoutCode; |
| 8 final Set<ClassElement> instantiatedClasses; | 8 final Set<ClassElement> instantiatedClasses; |
| 9 final Set<SourceString> instantiatedClassInstanceFields; | 9 final Set<SourceString> instantiatedClassInstanceFields; |
| 10 final Set<FunctionElement> staticFunctionsNeedingGetter; | 10 final Set<FunctionElement> staticFunctionsNeedingGetter; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 | 53 |
| 54 bool hasGetter(Element member, Compiler compiler) { | 54 bool hasGetter(Element member, Compiler compiler) { |
| 55 return hasMatchingSelector( | 55 return hasMatchingSelector( |
| 56 compiler.universe.invokedGetters[member.name], member, compiler); | 56 compiler.universe.invokedGetters[member.name], member, compiler); |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool hasSetter(Element member, Compiler compiler) { | 59 bool hasSetter(Element member, Compiler compiler) { |
| 60 return hasMatchingSelector( | 60 return hasMatchingSelector( |
| 61 compiler.universe.invokedSetters[member.name], member, compiler); | 61 compiler.universe.invokedSetters[member.name], member, compiler); |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 class SelectorKind { | 65 class SelectorKind { |
| 66 final String name; | 66 final String name; |
| 67 const SelectorKind(this.name); | 67 const SelectorKind(this.name); |
| 68 | 68 |
| 69 static final SelectorKind GETTER = const SelectorKind('getter'); | 69 static final SelectorKind GETTER = const SelectorKind('getter'); |
| 70 static final SelectorKind SETTER = const SelectorKind('setter'); | 70 static final SelectorKind SETTER = const SelectorKind('setter'); |
| 71 static final SelectorKind INVOCATION = const SelectorKind('invocation'); | 71 static final SelectorKind INVOCATION = const SelectorKind('invocation'); |
| 72 static final SelectorKind OPERATOR = const SelectorKind('operator'); | 72 static final SelectorKind OPERATOR = const SelectorKind('operator'); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 338 |
| 339 return false; | 339 return false; |
| 340 } | 340 } |
| 341 | 341 |
| 342 bool operator ==(other) { | 342 bool operator ==(other) { |
| 343 if (other is !TypedSelector) return false; | 343 if (other is !TypedSelector) return false; |
| 344 if (other.receiverType !== receiverType) return false; | 344 if (other.receiverType !== receiverType) return false; |
| 345 return super == other; | 345 return super == other; |
| 346 } | 346 } |
| 347 } | 347 } |
| OLD | NEW |