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

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

Issue 256453004: Avoid inlining constants that are used via a deferred import. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 6 years, 7 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
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 a652c7c8efbe26fccf433f230d99170c82a45521..db55415182e84b9ad8f634441a81c8e36507756f 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -1163,6 +1163,10 @@ class ConstantNamingVisitor implements ConstantVisitor {
visitDummy(DummyConstant constant) {
add('dummy_receiver');
}
+
+ visitDeferred(DeferredConstant constant) {
+ addRoot('Deferred');
+ }
}
/**
@@ -1245,6 +1249,11 @@ class ConstantCanonicalHasher implements ConstantVisitor<int> {
'DummyReceiverConstant should never be named and never be subconstant');
}
+ visitDeferred(DeferredConstant constant) {
+ int hash = constant.prefix.hashCode;
+ return _combine(hash, constant.referenced.accept(this));
+ }
+
int _hashString(int hash, String s) {
int length = s.length;
hash = _combine(hash, length);

Powered by Google App Engine
This is Rietveld 408576698