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

Side by Side Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 2907023003: Change dependency walker's Node.dependencies to a static getter. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/src/dependency_walker.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /** 5 /**
6 * This library is capable of producing linked summaries from unlinked 6 * This library is capable of producing linked summaries from unlinked
7 * ones (or prelinked ones). It functions by building a miniature 7 * ones (or prelinked ones). It functions by building a miniature
8 * element model to represent the contents of the summaries, and then 8 * element model to represent the contents of the summaries, and then
9 * scanning the element model to gather linked information and adding 9 * scanning the element model to gather linked information and adding
10 * it to the summary data structures. 10 * it to the summary data structures.
(...skipping 3404 matching lines...) Expand 10 before | Expand all | Expand 10 after
3415 * Specialization of [DependencyWalker] for computing library cycles. 3415 * Specialization of [DependencyWalker] for computing library cycles.
3416 */ 3416 */
3417 class LibraryDependencyWalker extends DependencyWalker<LibraryNode> { 3417 class LibraryDependencyWalker extends DependencyWalker<LibraryNode> {
3418 @override 3418 @override
3419 void evaluate(LibraryNode v) => evaluateScc(<LibraryNode>[v]); 3419 void evaluate(LibraryNode v) => evaluateScc(<LibraryNode>[v]);
3420 3420
3421 @override 3421 @override
3422 void evaluateScc(List<LibraryNode> scc) { 3422 void evaluateScc(List<LibraryNode> scc) {
3423 Set<LibraryCycleForLink> dependentCycles = new Set<LibraryCycleForLink>(); 3423 Set<LibraryCycleForLink> dependentCycles = new Set<LibraryCycleForLink>();
3424 for (LibraryNode node in scc) { 3424 for (LibraryNode node in scc) {
3425 for (LibraryNode dependency in node.dependencies) { 3425 for (LibraryNode dependency in Node.getDependencies(node)) {
3426 if (dependency.isEvaluated) { 3426 if (dependency.isEvaluated) {
3427 dependentCycles.add(dependency._libraryCycle); 3427 dependentCycles.add(dependency._libraryCycle);
3428 } 3428 }
3429 } 3429 }
3430 } 3430 }
3431 LibraryCycleForLink cycle = new LibraryCycleForLink( 3431 LibraryCycleForLink cycle = new LibraryCycleForLink(
3432 scc.map((LibraryNode n) => n.library).toList(), 3432 scc.map((LibraryNode n) => n.library).toList(),
3433 dependentCycles.toList()); 3433 dependentCycles.toList());
3434 for (LibraryNode node in scc) { 3434 for (LibraryNode node in scc) {
3435 node._libraryCycle = cycle; 3435 node._libraryCycle = cycle;
(...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after
5310 } 5310 }
5311 5311
5312 /** 5312 /**
5313 * This exception is thrown when [ExprTypeComputer] cannot inference the type. 5313 * This exception is thrown when [ExprTypeComputer] cannot inference the type.
5314 */ 5314 */
5315 class _InferenceFailedError { 5315 class _InferenceFailedError {
5316 final String message; 5316 final String message;
5317 5317
5318 _InferenceFailedError(this.message); 5318 _InferenceFailedError(this.message);
5319 } 5319 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/dependency_walker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698