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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart

Issue 102833009: Redo "Dummy receiver optimization" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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
Index: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index 9b18a379801e74a635db5b6ebfc89936eac1f3ca..484fa2276b5a4822dd7ea8c6710c3a5d02887b9c 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -1181,6 +1181,10 @@ class ConstantNamingVisitor implements ConstantVisitor {
addRoot(constant.dispatchedType.element.name);
add('methods');
}
+
+ visitDummyReceiver(DummyReceiverConstant constant) {
+ add('dummy_receiver');
+ }
}
/**
@@ -1258,6 +1262,11 @@ class ConstantCanonicalHasher implements ConstantVisitor<int> {
return _hashString(5, typeName);
}
+ visitDummyReceiver(DummyReceiverConstant constant) {
+ compiler.internalError(
+ 'DummyReceiverConstant should never be named and never be subconstant');
+ }
+
int _hashString(int hash, String s) {
int length = s.length;
hash = _combine(hash, length);

Powered by Google App Engine
This is Rietveld 408576698