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

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: Use intermediate constants. Created 6 years, 8 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 7a33d97692815cf9fa685560c7dac7eac3a63bf4..277a411ea2b24186dcac0ec3d6c5ebebdfdfd919 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -1190,6 +1190,10 @@ class ConstantNamingVisitor implements ConstantVisitor {
visitDummy(DummyConstant constant) {
add('dummy_receiver');
}
+
+ visitDeferred(DeferredConstant constant) {
+ addRoot('Deferred');
+ }
}
/**
@@ -1272,6 +1276,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