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

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

Issue 10824234: Reapply "Collect call site information and use that for estimating parameter types" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 class Universe { 5 class Universe {
6 Map<Element, CodeBuffer> generatedCode; 6 Map<Element, CodeBuffer> generatedCode;
7 Map<Element, CodeBuffer> generatedBailoutCode; 7 Map<Element, CodeBuffer> generatedBailoutCode;
8 final Set<ClassElement> instantiatedClasses; 8 final Set<ClassElement> instantiatedClasses;
9 final Set<SourceString> instantiatedClassInstanceFields; 9 final Set<SourceString> instantiatedClassInstanceFields;
10 final Set<FunctionElement> staticFunctionsNeedingGetter; 10 final Set<FunctionElement> staticFunctionsNeedingGetter;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 if (namedArguments.isEmpty()) return namedArguments; 278 if (namedArguments.isEmpty()) return namedArguments;
279 if (!orderedNamedArguments.isEmpty()) return orderedNamedArguments; 279 if (!orderedNamedArguments.isEmpty()) return orderedNamedArguments;
280 280
281 orderedNamedArguments.addAll(namedArguments); 281 orderedNamedArguments.addAll(namedArguments);
282 orderedNamedArguments.sort((SourceString first, SourceString second) { 282 orderedNamedArguments.sort((SourceString first, SourceString second) {
283 return first.slowToString().compareTo(second.slowToString()); 283 return first.slowToString().compareTo(second.slowToString());
284 }); 284 });
285 return orderedNamedArguments; 285 return orderedNamedArguments;
286 } 286 }
287 287
288 toString() => '$kind $argumentCount'; 288 toString() => 'Selector($kind, $argumentCount)';
289 } 289 }
290 290
291 class TypedSelector extends Selector { 291 class TypedSelector extends Selector {
292 /** 292 /**
293 * The type of the receiver. Any subtype of that type can be the 293 * The type of the receiver. Any subtype of that type can be the
294 * target of the invocation. 294 * target of the invocation.
295 */ 295 */
296 final Type receiverType; 296 final Type receiverType;
297 297
298 TypedSelector(this.receiverType, Selector selector) 298 TypedSelector(this.receiverType, Selector selector)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } 342 }
343 343
344 if (!self.isInterface() && self.isSubclassOf(other)) { 344 if (!self.isInterface() && self.isSubclassOf(other)) {
345 // Resolve an invocation of [element.name] on [self]. If it 345 // Resolve an invocation of [element.name] on [self]. If it
346 // is found, this selector is a candidate. 346 // is found, this selector is a candidate.
347 return hasElementIn(self, element) && super.applies(element, compiler); 347 return hasElementIn(self, element) && super.applies(element, compiler);
348 } 348 }
349 349
350 return false; 350 return false;
351 } 351 }
352
353 toString() => 'TypedSelector($kind, $receiverType, $argumentCount)';
352 } 354 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | tests/compiler/dart2js/call_site_type_inferer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698