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

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

Issue 2865953003: Move ResolutionWorkItem to resolution_strategy.dart (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_strategy.dart
diff --git a/pkg/compiler/lib/src/resolution/resolution_strategy.dart b/pkg/compiler/lib/src/resolution/resolution_strategy.dart
index 7c87d62d8076d69865289ac71fd1be40c3dddcbb..7662e8130d08520b06262f58b5cf21b632713845 100644
--- a/pkg/compiler/lib/src/resolution/resolution_strategy.dart
+++ b/pkg/compiler/lib/src/resolution/resolution_strategy.dart
@@ -10,6 +10,7 @@ import '../common/backend_api.dart';
import '../common/names.dart';
import '../common/resolution.dart';
import '../common/tasks.dart';
+import '../common/work.dart';
import '../compiler.dart';
import '../constants/values.dart';
import '../elements/elements.dart';
@@ -642,3 +643,21 @@ class _ElementAnnotationProcessor implements AnnotationProcessor {
.forEach(processJsInteropAnnotationsInLibrary);
}
}
+
+/// Builder that creates work item necessary for the resolution of a
+/// [MemberElement].
+class ResolutionWorkItemBuilder extends WorkItemBuilder {
+ final Resolution _resolution;
+
+ ResolutionWorkItemBuilder(this._resolution);
+
+ @override
+ WorkItem createWorkItem(MemberElement element) {
+ assert(invariant(element, element.isDeclaration));
+ if (element.isMalformed) return null;
+
+ assert(invariant(element, element is AnalyzableElement,
+ message: 'Element $element is not analyzable.'));
+ return _resolution.createWorkItem(element);
+ }
+}
« 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