| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /// Tracks the shape of the import/export graph and dependencies between files. | 5 /// Tracks the shape of the import/export graph and dependencies between files. |
| 6 library dev_compiler.src.dependency_graph; | |
| 7 | 6 |
| 8 import 'dart:collection' show HashSet, HashMap; | 7 import 'dart:collection' show HashSet, HashMap; |
| 9 | 8 |
| 10 import 'package:analyzer/analyzer.dart' show parseDirectives; | 9 import 'package:analyzer/analyzer.dart' show parseDirectives; |
| 11 import 'package:analyzer/src/generated/ast.dart' | 10 import 'package:analyzer/src/generated/ast.dart' |
| 12 show | 11 show |
| 13 AstNode, | 12 AstNode, |
| 14 CompilationUnit, | 13 CompilationUnit, |
| 15 ExportDirective, | 14 ExportDirective, |
| 16 Identifier, | 15 Identifier, |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 var deps = includeParts ? node.allDeps : node.depsWithoutParts; | 518 var deps = includeParts ? node.allDeps : node.depsWithoutParts; |
| 520 deps.forEach(helper); | 519 deps.forEach(helper); |
| 521 action(node); | 520 action(node); |
| 522 } | 521 } |
| 523 helper(start); | 522 helper(start); |
| 524 } | 523 } |
| 525 | 524 |
| 526 bool _same(Set a, Set b) => a.length == b.length && a.containsAll(b); | 525 bool _same(Set a, Set b) => a.length == b.length && a.containsAll(b); |
| 527 | 526 |
| 528 final _log = new Logger('dev_compiler.dependency_graph'); | 527 final _log = new Logger('dev_compiler.dependency_graph'); |
| OLD | NEW |