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

Side by Side Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 382953002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/lib/src/generated/parser.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) 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine; 8 library engine;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 5583 matching lines...) Expand 10 before | Expand all | Expand 10 after
5594 LibraryElementImpl libraryElement = sourceEntry.getValue(DartEntry.ELEMENT ) as LibraryElementImpl; 5594 LibraryElementImpl libraryElement = sourceEntry.getValue(DartEntry.ELEMENT ) as LibraryElementImpl;
5595 if (libraryElement != null) { 5595 if (libraryElement != null) {
5596 library.libraryElement = libraryElement; 5596 library.libraryElement = libraryElement;
5597 } 5597 }
5598 } 5598 }
5599 _libraryMap[librarySource] = library; 5599 _libraryMap[librarySource] = library;
5600 return library; 5600 return library;
5601 } 5601 }
5602 5602
5603 /** 5603 /**
5604 * Ensure that the given library has an element model built for it. If another task needs to be
5605 * executed first in order to build the element model, that task is placed in [taskData].
5606 *
5607 * @param library the library which needs an element model.
5608 */
5609 void _ensureElementModel(ResolvableLibrary library) {
5610 Source librarySource = library.librarySource;
5611 DartEntry libraryEntry = AnalysisContextImpl_this._getReadableDartEntry(libr arySource);
5612 if (libraryEntry != null && libraryEntry.getState(DartEntry.PARSED_UNIT) != CacheState.ERROR) {
5613 AnalysisContextImpl_this._workManager.addFirst(librarySource, SourcePriori ty.LIBRARY);
5614 if (_taskData == null) {
5615 _taskData = AnalysisContextImpl_this._createResolveDartLibraryTask(libra rySource, libraryEntry);
5616 }
5617 }
5618 }
5619
5620 /**
5604 * Ensure that all of the libraries that are exported by the given library (bu t are not 5621 * Ensure that all of the libraries that are exported by the given library (bu t are not
5605 * themselves in the cycle) have element models built for them. 5622 * themselves in the cycle) have element models built for them. If another tas k needs to be
5623 * executed first in order to build the element model, that task is placed in [taskData].
5606 * 5624 *
5607 * @param library the library being tested 5625 * @param library the library being tested
5608 */ 5626 */
5609 void _ensureExports(ResolvableLibrary library, HashSet<Source> visitedLibrarie s) { 5627 void _ensureExports(ResolvableLibrary library, HashSet<Source> visitedLibrarie s) {
5610 List<ResolvableLibrary> dependencies = library.exports; 5628 List<ResolvableLibrary> dependencies = library.exports;
5611 int dependencyCount = dependencies.length; 5629 int dependencyCount = dependencies.length;
5612 for (int i = 0; i < dependencyCount; i++) { 5630 for (int i = 0; i < dependencyCount; i++) {
5613 ResolvableLibrary dependency = dependencies[i]; 5631 ResolvableLibrary dependency = dependencies[i];
5614 if (!_librariesInCycle.contains(dependency) && visitedLibraries.add(depend ency.librarySource)) { 5632 if (!_librariesInCycle.contains(dependency) && visitedLibraries.add(depend ency.librarySource)) {
5615 if (dependency.libraryElement == null) { 5633 if (dependency.libraryElement == null) {
5616 Source dependencySource = dependency.librarySource; 5634 _ensureElementModel(dependency);
5617 AnalysisContextImpl_this._workManager.addFirst(dependencySource, Sourc ePriority.LIBRARY);
5618 if (_taskData == null) {
5619 _taskData = AnalysisContextImpl_this._createResolveDartLibraryTask(d ependencySource, AnalysisContextImpl_this._getReadableDartEntry(dependencySource ));
5620 return;
5621 }
5622 } else { 5635 } else {
5623 _ensureExports(dependency, visitedLibraries); 5636 _ensureExports(dependency, visitedLibraries);
5624 if (_taskData != null) { 5637 }
5625 return; 5638 if (_taskData != null) {
5626 } 5639 return;
5627 } 5640 }
5628 } 5641 }
5629 } 5642 }
5630 } 5643 }
5631 5644
5632 /** 5645 /**
5633 * Ensure that all of the libraries that are exported by the given library (bu t are not 5646 * Ensure that all of the libraries that are exported by the given library (bu t are not
5634 * themselves in the cycle) have element models built for them. 5647 * themselves in the cycle) have element models built for them. If another tas k needs to be
5648 * executed first in order to build the element model, that task is placed in [taskData].
5635 * 5649 *
5636 * @param library the library being tested 5650 * @param library the library being tested
5637 * @throws MissingDataException if there is at least one library being depende d on that does not
5638 * have an element model built for it
5639 */ 5651 */
5640 void _ensureImports(ResolvableLibrary library) { 5652 void _ensureImports(ResolvableLibrary library) {
5641 List<ResolvableLibrary> dependencies = library.imports; 5653 List<ResolvableLibrary> dependencies = library.imports;
5642 int dependencyCount = dependencies.length; 5654 int dependencyCount = dependencies.length;
5643 for (int i = 0; i < dependencyCount; i++) { 5655 for (int i = 0; i < dependencyCount; i++) {
5644 ResolvableLibrary dependency = dependencies[i]; 5656 ResolvableLibrary dependency = dependencies[i];
5645 if (!_librariesInCycle.contains(dependency) && dependency.libraryElement = = null) { 5657 if (!_librariesInCycle.contains(dependency) && dependency.libraryElement = = null) {
5646 Source dependencySource = dependency.librarySource; 5658 _ensureElementModel(dependency);
5647 AnalysisContextImpl_this._workManager.addFirst(dependencySource, SourceP riority.LIBRARY); 5659 if (_taskData != null) {
5648 if (_taskData == null) {
5649 _taskData = AnalysisContextImpl_this._createResolveDartLibraryTask(dep endencySource, AnalysisContextImpl_this._getReadableDartEntry(dependencySource)) ;
5650 return; 5660 return;
5651 } 5661 }
5652 } 5662 }
5653 } 5663 }
5654 } 5664 }
5655 5665
5656 /** 5666 /**
5657 * Ensure that all of the libraries that are either imported or exported by li braries in the 5667 * Ensure that all of the libraries that are either imported or exported by li braries in the
5658 * cycle (but are not themselves in the cycle) have element models built for t hem. 5668 * cycle (but are not themselves in the cycle) have element models built for t hem.
5659 */ 5669 */
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
6354 * The maximum number of sources for which data should be kept in the cache. 6364 * The maximum number of sources for which data should be kept in the cache.
6355 */ 6365 */
6356 static int DEFAULT_CACHE_SIZE = 64; 6366 static int DEFAULT_CACHE_SIZE = 64;
6357 6367
6358 /** 6368 /**
6359 * The default value for enabling deferred loading. 6369 * The default value for enabling deferred loading.
6360 */ 6370 */
6361 static bool DEFAULT_ENABLE_DEFERRED_LOADING = true; 6371 static bool DEFAULT_ENABLE_DEFERRED_LOADING = true;
6362 6372
6363 /** 6373 /**
6374 * The default value for enabling async support.
6375 */
6376 static bool DEFAULT_ENABLE_ASYNC = false;
6377
6378 /**
6364 * A flag indicating whether analysis is to analyze Angular. 6379 * A flag indicating whether analysis is to analyze Angular.
6365 */ 6380 */
6366 bool analyzeAngular = true; 6381 bool analyzeAngular = true;
6367 6382
6368 /** 6383 /**
6369 * A flag indicating whether analysis is to parse and analyze function bodies. 6384 * A flag indicating whether analysis is to parse and analyze function bodies.
6370 */ 6385 */
6371 bool analyzeFunctionBodies = true; 6386 bool analyzeFunctionBodies = true;
6372 6387
6373 /** 6388 /**
(...skipping 9300 matching lines...) Expand 10 before | Expand all | Expand 10 after
15674 _index++; 15689 _index++;
15675 if (_index >= WorkManager_this._workQueues[_queueIndex].length) { 15690 if (_index >= WorkManager_this._workQueues[_queueIndex].length) {
15676 _index = 0; 15691 _index = 0;
15677 _queueIndex++; 15692 _queueIndex++;
15678 while (_queueIndex < WorkManager_this._workQueues.length && WorkManager_th is._workQueues[_queueIndex].isEmpty) { 15693 while (_queueIndex < WorkManager_this._workQueues.length && WorkManager_th is._workQueues[_queueIndex].isEmpty) {
15679 _queueIndex++; 15694 _queueIndex++;
15680 } 15695 }
15681 } 15696 }
15682 } 15697 }
15683 } 15698 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698