Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: lib/compiler/implementation/universe/universe.dart

Issue 11231074: Change signature of noSuchMethod to take an InvocationMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix dart2js, update tests, expectations. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 530
530 if (!self.isInterface() && self.isSubclassOf(other)) { 531 if (!self.isInterface() && self.isSubclassOf(other)) {
531 // Resolve an invocation of [element.name] on [self]. If it 532 // Resolve an invocation of [element.name] on [self]. If it
532 // is found, this selector is a candidate. 533 // is found, this selector is a candidate.
533 return hasElementIn(self, element) && appliesUntyped(element, compiler); 534 return hasElementIn(self, element) && appliesUntyped(element, compiler);
534 } 535 }
535 536
536 return false; 537 return false;
537 } 538 }
538 } 539 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698