Chromium Code Reviews| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 : this(SelectorKind.CALL, name, library, arity, named); | 179 : this(SelectorKind.CALL, name, library, arity, named); |
| 180 | 180 |
| 181 Selector.callClosure(int arity, [List<SourceString> named = const []]) | 181 Selector.callClosure(int arity, [List<SourceString> named = const []]) |
| 182 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null, | 182 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null, |
| 183 arity, named); | 183 arity, named); |
| 184 | 184 |
| 185 Selector.callClosureFrom(Selector selector) | 185 Selector.callClosureFrom(Selector selector) |
| 186 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null, | 186 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null, |
| 187 selector.argumentCount, selector.namedArguments); | 187 selector.argumentCount, selector.namedArguments); |
| 188 | 188 |
| 189 Selector.callConstructor(SourceString constructorName, | |
| 190 LibraryElement library) | |
| 191 : this(SelectorKind.CALL, | |
| 192 constructorName, | |
| 193 library, | |
| 194 0, | |
| 195 const []); | |
| 196 | |
| 197 Selector.callDefaultConstructor(LibraryElement library) | |
|
kasperl
2012/10/10 08:20:01
Very nice!
| |
| 198 : this(SelectorKind.CALL, const SourceString(""), library, 0, const []); | |
| 199 | |
| 189 // TODO(kasperl): This belongs somewhere else. | 200 // TODO(kasperl): This belongs somewhere else. |
| 190 Selector.noSuchMethod() | 201 Selector.noSuchMethod() |
| 191 : this(SelectorKind.CALL, Compiler.NO_SUCH_METHOD, null, 2); | 202 : this(SelectorKind.CALL, Compiler.NO_SUCH_METHOD, null, 2); |
| 192 | 203 |
| 193 bool isGetter() => kind === SelectorKind.GETTER; | 204 bool isGetter() => kind === SelectorKind.GETTER; |
| 194 bool isSetter() => kind === SelectorKind.SETTER; | 205 bool isSetter() => kind === SelectorKind.SETTER; |
| 195 bool isCall() => kind === SelectorKind.CALL; | 206 bool isCall() => kind === SelectorKind.CALL; |
| 196 | 207 |
| 197 bool isIndex() => kind === SelectorKind.INDEX && argumentCount == 1; | 208 bool isIndex() => kind === SelectorKind.INDEX && argumentCount == 1; |
| 198 bool isIndexSet() => kind === SelectorKind.INDEX && argumentCount == 2; | 209 bool isIndexSet() => kind === SelectorKind.INDEX && argumentCount == 2; |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 524 | 535 |
| 525 if (!self.isInterface() && self.isSubclassOf(other)) { | 536 if (!self.isInterface() && self.isSubclassOf(other)) { |
| 526 // Resolve an invocation of [element.name] on [self]. If it | 537 // Resolve an invocation of [element.name] on [self]. If it |
| 527 // is found, this selector is a candidate. | 538 // is found, this selector is a candidate. |
| 528 return hasElementIn(self, element) && appliesUntyped(element, compiler); | 539 return hasElementIn(self, element) && appliesUntyped(element, compiler); |
| 529 } | 540 } |
| 530 | 541 |
| 531 return false; | 542 return false; |
| 532 } | 543 } |
| 533 } | 544 } |
| OLD | NEW |