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

Unified Diff: lib/compiler/implementation/universe.dart

Issue 10908068: Better tracking of provided types at call sites (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase again Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | tests/compiler/dart2js/backend_htype_list_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/universe.dart
diff --git a/lib/compiler/implementation/universe.dart b/lib/compiler/implementation/universe.dart
index a03a61c7295d92f44e19ced9a4a85f67449360d7..c42ecd22b1f19ebf63846b050375d36b20ff176d 100644
--- a/lib/compiler/implementation/universe.dart
+++ b/lib/compiler/implementation/universe.dart
@@ -322,7 +322,26 @@ class Selector implements Hashable {
return orderedNamedArguments;
}
- toString() => 'Selector($kind, $name, $argumentCount)';
+ String namedArgumentsToString() {
+ if (namedArgumentCount > 0) {
+ StringBuffer result = new StringBuffer();
+ for (int i = 0; i < namedArgumentCount; i++) {
+ if (i != 0) result.add(', ');
+ result.add(namedArguments[i].slowToString());
+ }
+ return "[$result]";
+ }
+ return '';
+ }
+
+ String toString() {
+ String named = '';
+ String type = '';
+ if (namedArgumentCount > 0) named = ', named=${namedArgumentsToString()}';
+ if (receiverType != null) type = ', type=$receiverType';
+ return 'Selector($kind, ${name.slowToString()}, '
+ 'arity=$argumentCount$named$type)';
+ }
}
class TypedSelector extends Selector {
@@ -387,9 +406,4 @@ class TypedSelector extends Selector {
return false;
}
-
- toString() {
- return 'Selector($kind, "${name.slowToString()}", '
- '$argumentCount, type=$receiverType)';
- }
}
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | tests/compiler/dart2js/backend_htype_list_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698