| 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, CodeBuffer> generatedCode; | 6 Map<Element, CodeBuffer> generatedCode; |
| 7 Map<Element, CodeBuffer> generatedBailoutCode; | 7 Map<Element, CodeBuffer> 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 if (namedArguments.isEmpty()) return namedArguments; | 278 if (namedArguments.isEmpty()) return namedArguments; |
| 279 if (!orderedNamedArguments.isEmpty()) return orderedNamedArguments; | 279 if (!orderedNamedArguments.isEmpty()) return orderedNamedArguments; |
| 280 | 280 |
| 281 orderedNamedArguments.addAll(namedArguments); | 281 orderedNamedArguments.addAll(namedArguments); |
| 282 orderedNamedArguments.sort((SourceString first, SourceString second) { | 282 orderedNamedArguments.sort((SourceString first, SourceString second) { |
| 283 return first.slowToString().compareTo(second.slowToString()); | 283 return first.slowToString().compareTo(second.slowToString()); |
| 284 }); | 284 }); |
| 285 return orderedNamedArguments; | 285 return orderedNamedArguments; |
| 286 } | 286 } |
| 287 | 287 |
| 288 toString() => '$kind $argumentCount'; | 288 toString() => 'Selector($kind, $argumentCount)'; |
| 289 } | 289 } |
| 290 | 290 |
| 291 class TypedSelector extends Selector { | 291 class TypedSelector extends Selector { |
| 292 /** | 292 /** |
| 293 * The type of the receiver. Any subtype of that type can be the | 293 * The type of the receiver. Any subtype of that type can be the |
| 294 * target of the invocation. | 294 * target of the invocation. |
| 295 */ | 295 */ |
| 296 final Type receiverType; | 296 final Type receiverType; |
| 297 | 297 |
| 298 TypedSelector(this.receiverType, Selector selector) | 298 TypedSelector(this.receiverType, Selector selector) |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 } | 342 } |
| 343 | 343 |
| 344 if (!self.isInterface() && self.isSubclassOf(other)) { | 344 if (!self.isInterface() && self.isSubclassOf(other)) { |
| 345 // Resolve an invocation of [element.name] on [self]. If it | 345 // Resolve an invocation of [element.name] on [self]. If it |
| 346 // is found, this selector is a candidate. | 346 // is found, this selector is a candidate. |
| 347 return hasElementIn(self, element) && super.applies(element, compiler); | 347 return hasElementIn(self, element) && super.applies(element, compiler); |
| 348 } | 348 } |
| 349 | 349 |
| 350 return false; | 350 return false; |
| 351 } | 351 } |
| 352 |
| 353 toString() => 'TypedSelector($kind, $receiverType, $argumentCount)'; |
| 352 } | 354 } |
| OLD | NEW |