Index: pkg/compiler/lib/src/common/codegen.dart |
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart |
index 478085c7de66dbe75fb9e0f8d2b9f83f8bebd316..6f22d66136c224fa67a15470776e3bde3c5c458b 100644 |
--- a/pkg/compiler/lib/src/common/codegen.dart |
+++ b/pkg/compiler/lib/src/common/codegen.dart |
@@ -4,23 +4,15 @@ |
library dart2js.common.codegen; |
-import '../common.dart'; |
import '../elements/elements.dart' |
- show |
- AsyncMarker, |
- ClassElement, |
- LocalFunctionElement, |
- MemberElement, |
- ResolvedAst; |
+ show AsyncMarker, ClassElement, LocalFunctionElement, MemberElement; |
import '../elements/entities.dart'; |
import '../elements/types.dart' show DartType, InterfaceType; |
-import '../js_backend/backend.dart' show JavaScriptBackend; |
import '../universe/use.dart' show ConstantUse, DynamicUse, StaticUse, TypeUse; |
import '../universe/world_impact.dart' |
show WorldImpact, WorldImpactBuilderImpl, WorldImpactVisitor; |
import '../util/enumset.dart'; |
import '../util/util.dart' show Pair, Setlet; |
-import '../world.dart' show ClosedWorld; |
import 'work.dart' show WorkItem; |
class CodegenImpact extends WorldImpact { |
@@ -181,32 +173,6 @@ class CodegenRegistry { |
} |
/// [WorkItem] used exclusively by the [CodegenEnqueuer]. |
-class CodegenWorkItem extends WorkItem { |
- CodegenRegistry registry; |
- final ResolvedAst resolvedAst; |
- final JavaScriptBackend _backend; |
- final ClosedWorld _closedWorld; |
- |
- factory CodegenWorkItem(JavaScriptBackend backend, ClosedWorld closedWorld, |
- MemberElement element) { |
- // If this assertion fails, the resolution callbacks of the backend may be |
- // missing call of form registry.registerXXX. Alternatively, the code |
- // generation could spuriously be adding dependencies on things we know we |
- // don't need. |
- assert(invariant(element, element.hasResolvedAst, |
- message: "$element has no resolved ast.")); |
- ResolvedAst resolvedAst = element.resolvedAst; |
- return new CodegenWorkItem.internal(resolvedAst, backend, closedWorld); |
- } |
- |
- CodegenWorkItem.internal(this.resolvedAst, this._backend, this._closedWorld); |
- |
- MemberElement get element => resolvedAst.element; |
- |
- WorldImpact run() { |
- registry = new CodegenRegistry(element); |
- return _backend.codegen(this, _closedWorld); |
- } |
- |
- String toString() => 'CodegenWorkItem(${resolvedAst.element})'; |
+abstract class CodegenWorkItem extends WorkItem { |
+ CodegenRegistry get registry; |
} |