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('../leg.dart'); | 9 #import('../leg.dart'); |
10 #import('../scanner/scannerlib.dart'); | 10 #import('../scanner/scannerlib.dart'); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 static const SelectorKind GETTER = const SelectorKind('getter'); | 113 static const SelectorKind GETTER = const SelectorKind('getter'); |
114 static const SelectorKind SETTER = const SelectorKind('setter'); | 114 static const SelectorKind SETTER = const SelectorKind('setter'); |
115 static const SelectorKind CALL = const SelectorKind('call'); | 115 static const SelectorKind CALL = const SelectorKind('call'); |
116 static const SelectorKind OPERATOR = const SelectorKind('operator'); | 116 static const SelectorKind OPERATOR = const SelectorKind('operator'); |
117 static const SelectorKind INDEX = const SelectorKind('index'); | 117 static const SelectorKind INDEX = const SelectorKind('index'); |
118 | 118 |
119 toString() => name; | 119 toString() => name; |
120 } | 120 } |
121 | 121 |
122 class Selector implements Hashable { | 122 class Selector { |
123 final SelectorKind kind; | 123 final SelectorKind kind; |
124 final SourceString name; | 124 final SourceString name; |
125 final LibraryElement library; // Library is null for non-private selectors. | 125 final LibraryElement library; // Library is null for non-private selectors. |
126 | 126 |
127 // The numbers of arguments of the selector. Includes named arguments. | 127 // The numbers of arguments of the selector. Includes named arguments. |
128 final int argumentCount; | 128 final int argumentCount; |
129 final List<SourceString> namedArguments; | 129 final List<SourceString> namedArguments; |
130 final List<SourceString> orderedNamedArguments; | 130 final List<SourceString> orderedNamedArguments; |
131 | 131 |
132 Selector( | 132 Selector( |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 if (!self.isInterface() && self.isSubclassOf(other)) { | 526 if (!self.isInterface() && self.isSubclassOf(other)) { |
527 // Resolve an invocation of [element.name] on [self]. If it | 527 // Resolve an invocation of [element.name] on [self]. If it |
528 // is found, this selector is a candidate. | 528 // is found, this selector is a candidate. |
529 return hasElementIn(self, element) && appliesUntyped(element, compiler); | 529 return hasElementIn(self, element) && appliesUntyped(element, compiler); |
530 } | 530 } |
531 | 531 |
532 return false; | 532 return false; |
533 } | 533 } |
534 } | 534 } |
OLD | NEW |