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

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

Issue 18203002: Copy compiled constants from metadataHandler to constantHandler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | « no previous file | dart/tests/lib/mirrors/metadata_constructed_constant_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 46abf0a923fb8f55543f97b7b95b2dcc45521abb..c8fd503630bb7be0186d4cab905d93266460ecdf 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -1403,6 +1403,13 @@ class JavaScriptBackend extends Backend {
bool retainName(SourceString name) => mustPreserveNames;
bool retainMetadataOf(Element element) {
+ if (mustRetainMetadata) {
+ // TODO(ahe): This is a little hacky, but I'll have to rewrite this when
+ // implementing @MirrorsUsed anyways.
+ compiler.constantHandler.compiledConstants.addAll(
+ compiler.metadataHandler.compiledConstants);
+ compiler.metadataHandler.compiledConstants.clear();
+ }
if (mustRetainMetadata) hasRetainedMetadata = true;
return mustRetainMetadata;
}
« no previous file with comments | « no previous file | dart/tests/lib/mirrors/metadata_constructed_constant_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698