| 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, 2); | 201 : this(SelectorKind.CALL, Compiler.NO_SUCH_METHOD, null, |
| 202 Compiler.NO_SUCH_METHOD_ARG_COUNT); |
| 202 | 203 |
| 203 bool isGetter() => identical(kind, SelectorKind.GETTER); | 204 bool isGetter() => identical(kind, SelectorKind.GETTER); |
| 204 bool isSetter() => identical(kind, SelectorKind.SETTER); | 205 bool isSetter() => identical(kind, SelectorKind.SETTER); |
| 205 bool isCall() => identical(kind, SelectorKind.CALL); | 206 bool isCall() => identical(kind, SelectorKind.CALL); |
| 206 | 207 |
| 207 bool isIndex() => identical(kind, SelectorKind.INDEX) && argumentCount == 1; | 208 bool isIndex() => identical(kind, SelectorKind.INDEX) && argumentCount == 1; |
| 208 bool isIndexSet() => identical(kind, SelectorKind.INDEX) && argumentCount == 2
; | 209 bool isIndexSet() => identical(kind, SelectorKind.INDEX) && argumentCount == 2
; |
| 209 | 210 |
| 210 bool isOperator() => identical(kind, SelectorKind.OPERATOR); | 211 bool isOperator() => identical(kind, SelectorKind.OPERATOR); |
| 211 bool isUnaryOperator() => isOperator() && argumentCount == 0; | 212 bool isUnaryOperator() => isOperator() && argumentCount == 0; |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 | 432 |
| 432 if (!self.isInterface() && self.isSubclassOf(other)) { | 433 if (!self.isInterface() && self.isSubclassOf(other)) { |
| 433 // Resolve an invocation of [element.name] on [self]. If it | 434 // Resolve an invocation of [element.name] on [self]. If it |
| 434 // is found, this selector is a candidate. | 435 // is found, this selector is a candidate. |
| 435 return hasElementIn(self, element) && appliesUntyped(element, compiler); | 436 return hasElementIn(self, element) && appliesUntyped(element, compiler); |
| 436 } | 437 } |
| 437 | 438 |
| 438 return false; | 439 return false; |
| 439 } | 440 } |
| 440 } | 441 } |
| OLD | NEW |