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

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: Incorporated Peter's comments and feedback. 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
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
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
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 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698