I found that the issue with Dart indexer is related to flushing
partially resolved ASTs from the cache, which we don't handle correctly.
Instead of trying to fix the issue, we can just increase the cache
size and make indexer work for now. Eventually we should migrate to
AnalysisDriver, which does not have this problem.
R=brianwilkerson@google.com, jwren@google.com
Bug:
Change-Id: I7515fd132245c361e030ddf1bfa7e06f11b6f3a4
Reviewed-on: https://dart-review.googlesource.com/18422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
In the long run, pkg/front_end/src/base is intended to contain code
that is useful to many components of the front end.
In this initial implementation, it contains:
- Source and the classes it references
- ErrorCode, ErrorSeverity, and ErrorType
- SyntacticEntity
Note that AnalysisTarget is included (even though strictly speaking it
is part of the analyzer task model) because it was too hard to
disentangle from Source.
Note that Token classes remain in pkg/front_end/src/scanner for now; I
plan to reorganize them at the time the parser is moved into the front
end.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2486923007 .
When attempting to resynthesize a library containing parts from a
summary, ResynthesizerResultProvider needs to check whether an
analysis target comes from a summary by looking at the analysis
target's library source--this is different from AnalysisTarget.source
in the case of parts.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2093033003 .
Adds a new block of status that reports the last 10 performed tasks.
For example:
<p>Recent Tasks</p>
GatherUsedLocalElementsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
GatherUsedImportedElementsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
GenerateHintsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
GenerateLintsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
VerifyUnitTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
LibraryUnitErrorsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
DartErrorsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
LibraryErrorsReadyTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
GetContentTask for source /Users/pquitslund/src/git/clones/analyzer_cli/.analysis_options
GenerateOptionsErrorsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/.analysis_options
R=brianwilkerson@google.com, keertip@google.com
Review URL: https://codereview.chromium.org/1420783004 .
This reduces number of LibrarySpecificUnit instances from 10,000,000 to about 6,000.
Also this slightly improves the code of corresponding 'buildInputs' methods.
This saves some memory, but unfortunately does not win any performance.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1422793002 .
I'm not quite happy that internal classes get into the extension point declaration.
But I guess that because of the nature of the work WorkManager(s) are doing, we have to have significant exposure to internals.
Also, onAnalysisOptionsChanged() and onSourceFactoryChanged()... these probably are better to implement as streams in InternalAnalysisContext.
Thoughts?
R=brianwilkerson@google.com, paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//1311773005 .
Tasks may now override the getter "handlesDependencyCycles" to return
true to indicate that they can deal with circular dependencies. Most
tasks will not have to do this, since outside of constant evaluation
circular dependencies among tasks should only be possible due to an
analyzer bug.
Any task that handles dependency cycles can detect that a cycle has
occurred by consulting AnalysisTask.dependencyCycle inside its
internalPerform() method. The ComputeConstantValueTask uses this to
determine which constants are involved in the cycle.
This required modifying the TaskInputBuilder classes so that if the
current input can't be evaluated due to a circularity, they can
continue on to evaluate other inputs. This allows the circularity to
be reported on the whole strongly connected component, rather than
just the firs cycle that was noticed (which would be
nondeterministic).
R=brianwilkerson@google.com, scheglov@google.com
Review URL: https://codereview.chromium.org//1147853002