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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 1744633002: Expose LibraryElementImpl.libraryCycle through LibraryElement. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library analyzer.src.dart.element.element; 5 library analyzer.src.dart.element.element;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' show min; 8 import 'dart:math' show min;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 3227 matching lines...) Expand 10 before | Expand all | Expand 10 after
3238 } 3238 }
3239 return false; 3239 return false;
3240 } 3240 }
3241 3241
3242 @override 3242 @override
3243 ElementKind get kind => ElementKind.LIBRARY; 3243 ElementKind get kind => ElementKind.LIBRARY;
3244 3244
3245 @override 3245 @override
3246 LibraryElement get library => this; 3246 LibraryElement get library => this;
3247 3247
3248 @override
3248 List<LibraryElement> get libraryCycle { 3249 List<LibraryElement> get libraryCycle {
3249 if (_libraryCycle != null) { 3250 if (_libraryCycle != null) {
3250 return _libraryCycle; 3251 return _libraryCycle;
3251 } 3252 }
3252 3253
3253 // Global counter for this run of the algorithm 3254 // Global counter for this run of the algorithm
3254 int counter = 0; 3255 int counter = 0;
3255 // The discovery times of each library 3256 // The discovery times of each library
3256 Map<LibraryElementImpl, int> indices = {}; 3257 Map<LibraryElementImpl, int> indices = {};
3257 // The set of scc candidates 3258 // The set of scc candidates
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
4816 4817
4817 @override 4818 @override
4818 void visitElement(Element element) { 4819 void visitElement(Element element) {
4819 int offset = element.nameOffset; 4820 int offset = element.nameOffset;
4820 if (offset != -1) { 4821 if (offset != -1) {
4821 map[offset] = element; 4822 map[offset] = element;
4822 } 4823 }
4823 super.visitElement(element); 4824 super.visitElement(element);
4824 } 4825 }
4825 } 4826 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698