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

Unified Diff: pkg/compiler/lib/src/js_backend/backend_usage.dart

Issue 2693163002: Split backend implementation of EnqueuerListener (Closed)
Patch Set: Update comments. Created 3 years, 10 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 | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/enqueuer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend_usage.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend_usage.dart b/pkg/compiler/lib/src/js_backend/backend_usage.dart
index b99358bd026a5f8f857dc2db517cb1377bf1f123..7cabd5b4e74d0814d8d9fb9a68fd758d3898cd87 100644
--- a/pkg/compiler/lib/src/js_backend/backend_usage.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_usage.dart
@@ -20,6 +20,21 @@ abstract class BackendUsage {
bool get needToInitializeDispatchProperty;
bool usedByBackend(Element element);
Iterable<Element> get globalDependencies;
+
+ /// True if a core-library function requires the preamble file to function.
+ bool get requiresPreamble;
+
+ /// `true` if access to [BackendHelpers.invokeOnMethod] is supported.
+ bool get hasInvokeOnSupport;
Siggi Cherem (dart-lang) 2017/02/17 23:05:08 Let's rename a lot of these properties. Reading t
Johnni Winther 2017/02/20 11:37:42 Done.
+
+ /// `true` of `Object.runtimeType` is supported.
+ bool get hasRuntimeTypeSupport;
+
+ /// `true` of use of the `dart:isolate` library is supported.
+ bool get hasIsolateSupport;
+
+ /// `true` of `Function.apply` is supported.
+ bool get hasFunctionApplySupport;
}
abstract class BackendUsageBuilder {
@@ -35,6 +50,14 @@ abstract class BackendUsageBuilder {
{bool isGlobal: false});
WorldImpact createImpactFor(BackendImpact impact);
void registerUsedMember(MemberElement member);
+
+ bool hasRuntimeTypeSupport;
+
+ /// `true` of use of the `dart:isolate` library is supported.
+ bool hasIsolateSupport;
+
+ /// `true` of `Function.apply` is supported.
+ bool hasFunctionApplySupport;
}
class BackendUsageImpl implements BackendUsage, BackendUsageBuilder {
@@ -50,6 +73,21 @@ class BackendUsageImpl implements BackendUsage, BackendUsageBuilder {
bool _needToInitializeIsolateAffinityTag = false;
bool _needToInitializeDispatchProperty = false;
+ /// True if a core-library function requires the preamble file to function.
+ bool requiresPreamble = false;
+
+ /// `true` if access to [BackendHelpers.invokeOnMethod] is supported.
+ bool hasInvokeOnSupport = false;
+
+ /// `true` of `Object.runtimeType` is supported.
+ bool hasRuntimeTypeSupport = false;
+
+ /// `true` of use of the `dart:isolate` library is supported.
+ bool hasIsolateSupport = false;
+
+ /// `true` of `Function.apply` is supported.
+ bool hasFunctionApplySupport = false;
+
BackendUsageImpl(this._commonElements, this._helpers, this._resolution);
bool get needToInitializeIsolateAffinityTag =>
@@ -196,6 +234,12 @@ class BackendUsageImpl implements BackendUsage, BackendUsageBuilder {
void registerUsedMember(MemberElement member) {
if (member == _helpers.getIsolateAffinityTagMarker) {
_needToInitializeIsolateAffinityTag = true;
+ } else if (member == _helpers.requiresPreambleMarker) {
+ requiresPreamble = true;
+ } else if (member == _helpers.invokeOnMethod) {
+ hasInvokeOnSupport = true;
+ } else if (_commonElements.isFunctionApplyMethod(member)) {
+ hasFunctionApplySupport = true;
}
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/enqueuer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698