| Index: pkg/front_end/lib/src/dependency_walker.dart
|
| diff --git a/pkg/front_end/lib/src/dependency_walker.dart b/pkg/front_end/lib/src/dependency_walker.dart
|
| index 7a27acb7b7f5d372c770f0443cada115e92d500e..e00066ffc690ae3dc64c71008db33e79e4cc9fc5 100644
|
| --- a/pkg/front_end/lib/src/dependency_walker.dart
|
| +++ b/pkg/front_end/lib/src/dependency_walker.dart
|
| @@ -26,11 +26,6 @@ abstract class Node<NodeType> {
|
| List<NodeType> _dependencies;
|
|
|
| /**
|
| - * Retrieve the dependencies of this node.
|
| - */
|
| - List<NodeType> get dependencies => _dependencies ??= computeDependencies();
|
| -
|
| - /**
|
| * Indicates whether this node has been evaluated yet.
|
| */
|
| bool get isEvaluated;
|
| @@ -39,6 +34,13 @@ abstract class Node<NodeType> {
|
| * Compute the dependencies of this node.
|
| */
|
| List<NodeType> computeDependencies();
|
| +
|
| + /**
|
| + * Gets the dependencies of the given node, computing them if necessary.
|
| + */
|
| + static List<NodeType> getDependencies<NodeType>(Node<NodeType> node) {
|
| + return node._dependencies ??= node.computeDependencies();
|
| + }
|
| }
|
|
|
| /**
|
| @@ -97,7 +99,7 @@ abstract class DependencyWalker<NodeType extends Node<NodeType>> {
|
| stack.add(node);
|
|
|
| // Consider the node's dependencies one at a time.
|
| - for (NodeType dependency in node.dependencies) {
|
| + for (NodeType dependency in Node.getDependencies(node)) {
|
| // If the dependency has already been evaluated, it can't be
|
| // part of this node's strongly connected component, so we can
|
| // skip it.
|
|
|