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

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

Issue 2847343002: Add support for profile-based startup optimizations. (Closed)
Patch Set: Fix forgotten cleanup. Created 3 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 e0a8fda68e242fc7a187b34cbe0375f2b2bb86f1..3df86b844422fbf37d09cf3f9aec5ffc0b6b9d5d 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -16,6 +16,7 @@ class Program {
final bool outputContainsConstantList;
final bool needsNativeSupport;
final bool hasIsolateSupport;
+ final bool hasSoftDeferredClasses;
/// A map from load id to the list of fragments that need to be loaded.
final Map<String, List<Fragment>> loadMap;
@@ -38,7 +39,8 @@ class Program {
this.typeToInterceptorMap, this._metadataCollector, this.finalizers,
{this.needsNativeSupport,
this.outputContainsConstantList,
- this.hasIsolateSupport}) {
+ this.hasIsolateSupport,
+ this.hasSoftDeferredClasses}) {
assert(needsNativeSupport != null);
assert(outputContainsConstantList != null);
assert(hasIsolateSupport != null);
@@ -232,6 +234,11 @@ class Class implements FieldContainer {
final bool isNative;
final bool isClosureBaseClass; // Common base class for closures.
+ /// Whether this class should be soft deferred.
+ ///
+ /// A soft-deferred class is only fully initialized at first instantiation.
+ final bool isSoftDeferred;
+
// If the class implements a function type, and the type is encoded in the
// metatada table, then this field contains the index into that field.
final js.Expression functionTypeIndex;
@@ -264,7 +271,8 @@ class Class implements FieldContainer {
this.onlyForRti,
this.isDirectlyInstantiated,
this.isNative,
- this.isClosureBaseClass}) {
+ this.isClosureBaseClass,
+ this.isSoftDeferred = false}) {
assert(onlyForRti != null);
assert(isDirectlyInstantiated != null);
assert(isNative != null);

Powered by Google App Engine
This is Rietveld 408576698