| OLD | NEW |
| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'dart:typed_data'; | 7 import 'dart:typed_data'; |
| 8 | 8 |
| 9 import 'package:analyzer/context/declared_variables.dart'; | 9 import 'package:analyzer/context/declared_variables.dart'; |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 * results are "eventually consistent" with the file system by simply calling | 63 * results are "eventually consistent" with the file system by simply calling |
| 64 * [changeFile] any time the contents of a file on the file system have changed. | 64 * [changeFile] any time the contents of a file on the file system have changed. |
| 65 * | 65 * |
| 66 * | 66 * |
| 67 * TODO(scheglov) Clean up the list of implicitly analyzed files. | 67 * TODO(scheglov) Clean up the list of implicitly analyzed files. |
| 68 */ | 68 */ |
| 69 class AnalysisDriver { | 69 class AnalysisDriver { |
| 70 /** | 70 /** |
| 71 * The version of data format, should be incremented on every format change. | 71 * The version of data format, should be incremented on every format change. |
| 72 */ | 72 */ |
| 73 static const int DATA_VERSION = 16; | 73 static const int DATA_VERSION = 17; |
| 74 | 74 |
| 75 /** | 75 /** |
| 76 * The number of exception contexts allowed to write. Once this field is | 76 * The number of exception contexts allowed to write. Once this field is |
| 77 * zero, we stop writing any new exception contexts in this process. | 77 * zero, we stop writing any new exception contexts in this process. |
| 78 */ | 78 */ |
| 79 static int allowedNumberOfContextsToWrite = 10; | 79 static int allowedNumberOfContextsToWrite = 10; |
| 80 | 80 |
| 81 /** | 81 /** |
| 82 * The name of the driver, e.g. the name of the folder. | 82 * The name of the driver, e.g. the name of the folder. |
| 83 */ | 83 */ |
| (...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 final exception; | 1588 final exception; |
| 1589 final StackTrace stackTrace; | 1589 final StackTrace stackTrace; |
| 1590 | 1590 |
| 1591 /** | 1591 /** |
| 1592 * The key under which the context of the exception was stored, or `null` | 1592 * The key under which the context of the exception was stored, or `null` |
| 1593 * if unknown, the maximum number of context to store was reached, etc. | 1593 * if unknown, the maximum number of context to store was reached, etc. |
| 1594 */ | 1594 */ |
| 1595 final String contextKey; | 1595 final String contextKey; |
| 1596 | 1596 |
| 1597 _ExceptionState(this.exception, this.stackTrace, this.contextKey); | 1597 _ExceptionState(this.exception, this.stackTrace, this.contextKey); |
| 1598 |
| 1599 @override |
| 1600 String toString() => '$exception\n$stackTrace'; |
| 1598 } | 1601 } |
| 1599 | 1602 |
| 1600 /** | 1603 /** |
| 1601 * Task that computes the list of files that were added to the driver and | 1604 * Task that computes the list of files that were added to the driver and |
| 1602 * have at least one reference to an identifier [name] defined outside of the | 1605 * have at least one reference to an identifier [name] defined outside of the |
| 1603 * file. | 1606 * file. |
| 1604 */ | 1607 */ |
| 1605 class _FilesReferencingNameTask { | 1608 class _FilesReferencingNameTask { |
| 1606 static const int _MS_WORK_INTERVAL = 5; | 1609 static const int _MS_WORK_INTERVAL = 5; |
| 1607 | 1610 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1707 libraryDeclarations.add(new TopLevelDeclarationInSource( | 1710 libraryDeclarations.add(new TopLevelDeclarationInSource( |
| 1708 file.source, declaration, isExported)); | 1711 file.source, declaration, isExported)); |
| 1709 } | 1712 } |
| 1710 } | 1713 } |
| 1711 } | 1714 } |
| 1712 | 1715 |
| 1713 // We're not done yet. | 1716 // We're not done yet. |
| 1714 return false; | 1717 return false; |
| 1715 } | 1718 } |
| 1716 } | 1719 } |
| OLD | NEW |