| Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| index ceef60f7d0d55da3cad40e76ef36fc4c2a421c3e..05a43c7f4cfc16f787d42ee38130b012b63ab732 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| @@ -287,7 +287,7 @@ class _TransformingVisitor extends RecursiveVisitor {
|
| * const-ness as well as reachability, both of which are used in the subsequent
|
| * transformation pass.
|
| */
|
| -class _TypePropagationVisitor<T> extends Visitor {
|
| +class _TypePropagationVisitor<T> implements Visitor {
|
| // The node worklist stores nodes that are both reachable and need to be
|
| // processed, but have not been processed yet. Using a worklist avoids deep
|
| // recursion.
|
| @@ -411,26 +411,35 @@ class _TypePropagationVisitor<T> extends Visitor {
|
| }
|
|
|
| // -------------------------- Visitor overrides ------------------------------
|
| + void visit(Node node) { node.accept(this); }
|
|
|
| - void visitNode(Node node) {
|
| - internalError(NO_LOCATION_SPANNABLE,
|
| - "_TypePropagationVisitor is stale,"
|
| - " add missing visit overrides ($node)");
|
| + void visitFieldDefinition(FieldDefinition node) {
|
| + if (node.hasInitializer) {
|
| + setReachable(node.body);
|
| + }
|
| }
|
|
|
| - void visitRunnableBody(RunnableBody node) {
|
| + void visitFunctionDefinition(FunctionDefinition node) {
|
| + node.parameters.forEach(visit);
|
| setReachable(node.body);
|
| }
|
|
|
| - void visitFunctionDefinition(FunctionDefinition node) {
|
| + void visitConstructorDefinition(ConstructorDefinition node) {
|
| node.parameters.forEach(visit);
|
| + node.initializers.forEach(visit);
|
| setReachable(node.body);
|
| }
|
|
|
| - void visitFieldDefinition(FieldDefinition node) {
|
| - if (node.hasInitializer) {
|
| - setReachable(node.body);
|
| - }
|
| + void visitRunnableBody(RunnableBody node) {
|
| + setReachable(node.body);
|
| + }
|
| +
|
| + void visitFieldInitializer(FieldInitializer node) {
|
| + setReachable(node.body);
|
| + }
|
| +
|
| + void visitSuperInitializer(SuperInitializer node) {
|
| + node.arguments.forEach(setReachable);
|
| }
|
|
|
| // Expressions.
|
|
|