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

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

Issue 10947024: Made dart2js constructor lookup logic "private"-aware, fixed 4740 bug. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed normalizedConstructorName from Selector. Created 8 years, 2 months 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('../leg.dart'); 9 #import('../leg.dart');
10 #import('../scanner/scannerlib.dart'); 10 #import('../scanner/scannerlib.dart');
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 : this(SelectorKind.CALL, name, library, arity, named); 180 : this(SelectorKind.CALL, name, library, arity, named);
181 181
182 Selector.callClosure(int arity, [List<SourceString> named = const []]) 182 Selector.callClosure(int arity, [List<SourceString> named = const []])
183 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null, 183 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null,
184 arity, named); 184 arity, named);
185 185
186 Selector.callClosureFrom(Selector selector) 186 Selector.callClosureFrom(Selector selector)
187 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null, 187 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null,
188 selector.argumentCount, selector.namedArguments); 188 selector.argumentCount, selector.namedArguments);
189 189
190 Selector.callConstructor(SourceString constructorName,
191 LibraryElement library)
192 : this(SelectorKind.CALL,
193 constructorName,
194 library,
195 0,
196 const []);
197
198 Selector.callDefaultConstructor(SourceString name,
kasperl 2012/10/09 13:56:02 What's the name in this case? Shouldn't it always
aam-me 2012/10/10 00:22:40 Good point, thanks. I also have been using callDef
199 LibraryElement library)
200 : this(SelectorKind.CALL, name, library, 0, const []);
201
190 // TODO(kasperl): This belongs somewhere else. 202 // TODO(kasperl): This belongs somewhere else.
191 Selector.noSuchMethod() 203 Selector.noSuchMethod()
192 : this(SelectorKind.CALL, Compiler.NO_SUCH_METHOD, null, 2); 204 : this(SelectorKind.CALL, Compiler.NO_SUCH_METHOD, null, 2);
193 205
194 bool isGetter() => kind === SelectorKind.GETTER; 206 bool isGetter() => kind === SelectorKind.GETTER;
195 bool isSetter() => kind === SelectorKind.SETTER; 207 bool isSetter() => kind === SelectorKind.SETTER;
196 bool isCall() => kind === SelectorKind.CALL; 208 bool isCall() => kind === SelectorKind.CALL;
197 209
198 bool isIndex() => kind === SelectorKind.INDEX && argumentCount == 1; 210 bool isIndex() => kind === SelectorKind.INDEX && argumentCount == 1;
199 bool isIndexSet() => kind === SelectorKind.INDEX && argumentCount == 2; 211 bool isIndexSet() => kind === SelectorKind.INDEX && argumentCount == 2;
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 537
526 if (!self.isInterface() && self.isSubclassOf(other)) { 538 if (!self.isInterface() && self.isSubclassOf(other)) {
527 // Resolve an invocation of [element.name] on [self]. If it 539 // Resolve an invocation of [element.name] on [self]. If it
528 // is found, this selector is a candidate. 540 // is found, this selector is a candidate.
529 return hasElementIn(self, element) && appliesUntyped(element, compiler); 541 return hasElementIn(self, element) && appliesUntyped(element, compiler);
530 } 542 }
531 543
532 return false; 544 return false;
533 } 545 }
534 } 546 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698