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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart

Issue 2912083002: Add compile_from_dill test (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/world.dart » ('j') | pkg/compiler/lib/src/world.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index 3a3a0db071f34e5a9bb39c5fa78c6741fd71c101..ce7bfc08318f459c084cb6f2d533cfdc8fa20d33 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -1026,7 +1026,7 @@ class Emitter extends js_emitter.EmitterBase {
String libraryName = (!compiler.options.enableMinification ||
backend.mirrorsData.mustRetainLibraryNames)
// TODO(johnniwinther): Support library names for entities.
- ? library is LibraryElement ? library.libraryName : library.name
+ ? library is LibraryElement ? library.libraryName : ''
: "";
jsAst.Fun metadata =
@@ -1903,7 +1903,12 @@ class Emitter extends js_emitter.EmitterBase {
jsAst.Comment buildGeneratedBy() {
List<String> options = [];
- if (compiler.commonElements.mirrorsLibrary != null) options.add('mirrors');
+ if (compiler.commonElements.mirrorsLibrary != null &&
+ !compiler.options.loadFromDill) {
+ // TODO(johnniwinther): Add `isMirrorsUsed` to [BackendData] instead
Siggi Cherem (dart-lang) 2017/05/30 22:34:42 +1 - to take this a step further, should we have a
Johnni Winther 2017/05/31 09:08:40 Acknowledged.
+ // of checking `mirrorsLibrary`.
+ options.add('mirrors');
+ }
if (compiler.options.useContentSecurityPolicy) options.add("CSP");
return new jsAst.Comment(generatedBy(compiler, flavor: options.join(", ")));
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/world.dart » ('j') | pkg/compiler/lib/src/world.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698