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

Unified Diff: pkg/compiler/lib/src/js_emitter/model.dart

Issue 1071133002: dart2js: create a 'types' table for each deferred unit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased and updated comment. Created 5 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: pkg/compiler/lib/src/js_emitter/model.dart
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index 5a49cf12eeafc589c44493199f7a30e516a51753..f5c9a6b833b213276d15f21155722ea8f5d6bbf9 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -55,17 +55,19 @@ class Program {
/// data.
List<String> get metadata => _metadataCollector.globalMetadata;
- /// A list of pretty-printed JavaScript expressions.
+ /// A map with lists of pretty-printed JavaScript expressions.
///
- /// This list must be emitted in the `TYPES` embedded global.
- /// The list references constants and must hence be emitted after constants
- /// have been initialized.
+ /// There is one list for each output unit. The list belonging to the main
+ /// unit must be emitted in the `TYPES` embedded global. The list references
+ /// constants and must hence be emitted after constants have been initialized.
///
/// Note: the metadata is derived from the task's `metadataCollector`. The
/// list must not be emitted before all operations on it are done. For
/// example, the old emitter generates metadata when emitting reflection
/// data.
- List<String> get metadataTypes => _metadataCollector.types;
+ Map<OutputUnit, List<String>> get metadataTypes
+ => _metadataCollector.types;
+
bool get isSplit => fragments.length > 1;
Iterable<Fragment> get deferredFragments => fragments.skip(1);

Powered by Google App Engine
This is Rietveld 408576698