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

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

Issue 2868813003: Move ResolutionEnqueuer.hasBeenResolved to Resolver (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 | « pkg/compiler/lib/src/enqueue.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/resolution.dart
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index 94c8adc6bd06ffc90069f9951c09729b72d79aed..cc0a560349152c0a6f62be32906db31d880720c7 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -291,10 +291,17 @@ class ResolverTask extends CompilerTask {
});
}
+ /// Returns `true` if [element] has been processed by the resolution enqueuer.
+ bool _hasBeenProcessed(MemberElement element) {
+ assert(invariant(element, element == element.analyzableElement.declaration,
+ message: "Unexpected element $element"));
+ return enqueuer.processedEntities.contains(element);
+ }
+
WorldImpact resolveMethodElement(FunctionElementX element) {
assert(invariant(element, element.isDeclaration));
return reporter.withCurrentElement(element, () {
- if (enqueuer.hasBeenProcessed(element)) {
+ if (_hasBeenProcessed(element)) {
// TODO(karlklose): Remove the check for [isConstructor]. [elememts]
// should never be non-null, not even for constructors.
assert(invariant(element, element.isConstructor,
@@ -769,7 +776,7 @@ class ResolverTask extends CompilerTask {
// mixin application has been performed.
// TODO(johnniwinther): Obtain the [TreeElements] for [member]
// differently.
- if (resolution.enqueuer.hasBeenProcessed(member)) {
+ if (_hasBeenProcessed(member)) {
if (member.resolvedAst.kind == ResolvedAstKind.PARSED) {
checkMixinSuperUses(
member.resolvedAst.elements, mixinApplication, mixin);
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698