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 '../runtime_types.dart'; | 10 import '../runtime_types.dart'; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 constructorName, | 191 constructorName, |
192 library, | 192 library, |
193 0, | 193 0, |
194 const []); | 194 const []); |
195 | 195 |
196 Selector.callDefaultConstructor(LibraryElement library) | 196 Selector.callDefaultConstructor(LibraryElement library) |
197 : this(SelectorKind.CALL, const SourceString(""), library, 0, const []); | 197 : this(SelectorKind.CALL, const SourceString(""), library, 0, const []); |
198 | 198 |
199 // TODO(kasperl): This belongs somewhere else. | 199 // TODO(kasperl): This belongs somewhere else. |
200 Selector.noSuchMethod() | 200 Selector.noSuchMethod() |
201 : this(SelectorKind.CALL, Compiler.NO_SUCH_METHOD, null, | 201 : this(SelectorKind.CALL, Compiler.NO_SUCH_METHOD, null, 2); |
202 Compiler.NO_SUCH_METHOD_ARG_COUNT); | |
203 | 202 |
204 bool isGetter() => identical(kind, SelectorKind.GETTER); | 203 bool isGetter() => identical(kind, SelectorKind.GETTER); |
205 bool isSetter() => identical(kind, SelectorKind.SETTER); | 204 bool isSetter() => identical(kind, SelectorKind.SETTER); |
206 bool isCall() => identical(kind, SelectorKind.CALL); | 205 bool isCall() => identical(kind, SelectorKind.CALL); |
207 | 206 |
208 bool isIndex() => identical(kind, SelectorKind.INDEX) && argumentCount == 1; | 207 bool isIndex() => identical(kind, SelectorKind.INDEX) && argumentCount == 1; |
209 bool isIndexSet() => identical(kind, SelectorKind.INDEX) && argumentCount == 2
; | 208 bool isIndexSet() => identical(kind, SelectorKind.INDEX) && argumentCount == 2
; |
210 | 209 |
211 bool isOperator() => identical(kind, SelectorKind.OPERATOR); | 210 bool isOperator() => identical(kind, SelectorKind.OPERATOR); |
212 bool isUnaryOperator() => isOperator() && argumentCount == 0; | 211 bool isUnaryOperator() => isOperator() && argumentCount == 0; |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 426 |
428 if (!self.isInterface() && self.isSubclassOf(other)) { | 427 if (!self.isInterface() && self.isSubclassOf(other)) { |
429 // Resolve an invocation of [element.name] on [self]. If it | 428 // Resolve an invocation of [element.name] on [self]. If it |
430 // is found, this selector is a candidate. | 429 // is found, this selector is a candidate. |
431 return hasElementIn(self, element) && appliesUntyped(element, compiler); | 430 return hasElementIn(self, element) && appliesUntyped(element, compiler); |
432 } | 431 } |
433 | 432 |
434 return false; | 433 return false; |
435 } | 434 } |
436 } | 435 } |
OLD | NEW |