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

Unified Diff: pkg/compiler/lib/src/enqueue.dart

Issue 2045223002: Compute and cache element NativeBehavior during resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Temporarily skip compilation subtest Created 4 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
Index: pkg/compiler/lib/src/enqueue.dart
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index 29ae8ea4bf6c57ea145bff92b1a3d85aba559c2a..bcaec4a326a1c4807244dc6b1e2b4b002859029b 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -199,25 +199,12 @@ abstract class Enqueuer {
// classes, which may not be the case when a native class is subclassed.
if (compiler.backend.isNative(cls)) {
compiler.world.registerUsedElement(member);
- nativeEnqueuer.handleFieldAnnotations(member);
if (universe.hasInvokedGetter(member, compiler.world) ||
universe.hasInvocation(member, compiler.world)) {
- nativeEnqueuer.registerFieldLoad(member);
- // In handleUnseenSelector we can't tell if the field is loaded or
- // stored. We need the basic algorithm to be Church-Rosser, since the
- // resolution 'reduction' order is different to the codegen order. So
- // register that the field is also stored. In other words: if we
- // don't register the store here during resolution, the store could be
- // registered during codegen on the handleUnseenSelector path, and
- // cause the set of codegen elements to include unresolved elements.
- nativeEnqueuer.registerFieldStore(member);
addToWorkList(member);
return;
}
if (universe.hasInvokedSetter(member, compiler.world)) {
- nativeEnqueuer.registerFieldStore(member);
- // See comment after registerFieldLoad above.
- nativeEnqueuer.registerFieldLoad(member);
addToWorkList(member);
return;
}
@@ -549,25 +536,6 @@ abstract class Enqueuer {
if (member.isFunction && selector.isGetter) {
registerClosurizedMember(member);
}
- if (member.isField &&
- compiler.backend.isNative(member.enclosingClass)) {
- if (selector.isGetter || selector.isCall) {
- nativeEnqueuer.registerFieldLoad(member);
- // We have to also handle storing to the field because we only get
- // one look at each member and there might be a store we have not
- // seen yet.
- // TODO(sra): Process fields for storing separately.
- nativeEnqueuer.registerFieldStore(member);
- } else {
- assert(selector.isSetter);
- nativeEnqueuer.registerFieldStore(member);
- // We have to also handle loading from the field because we only get
- // one look at each member and there might be a load we have not
- // seen yet.
- // TODO(sra): Process fields for storing separately.
- nativeEnqueuer.registerFieldLoad(member);
- }
- }
addToWorkList(member);
return true;
}
@@ -810,7 +778,6 @@ class ResolutionEnqueuer extends Enqueuer {
compiler.enabledFunctionApply = true;
}
- nativeEnqueuer.registerElement(element);
return true;
}
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698