Konstantin Shcheglov
832f10e589
Don't re-read files when compute their analysis results.
...
We don't really need this.
The client must notify us that the file was changed.
Then we will re-read it.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2686843003 .
2017-02-08 19:21:12 -08:00
Konstantin Shcheglov
c97317cee9
Ensure that returned cached source have the same actual URI.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2683043002 .
2017-02-08 13:45:50 -08:00
Konstantin Shcheglov
fa03f80b22
Compute pending errors for @Required named parameters.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2685043002 .
2017-02-08 11:53:44 -08:00
Konstantin Shcheglov
b6f6738b77
Extract hints generation into a separte method and make is optional.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2680373002 .
2017-02-08 11:44:20 -08:00
Konstantin Shcheglov
a980fc4790
Parse using FileState, so use all analysis options.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2681143002 .
2017-02-08 10:06:15 -08:00
Konstantin Shcheglov
09556fa1f4
Resolve import/export directives in analyzer itself, report non-libraries.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2684793003 .
2017-02-08 09:33:45 -08:00
Konstantin Shcheglov
ab108234af
Filter out ignored errors without tasks.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2682013003 .
2017-02-08 08:44:38 -08:00
Konstantin Shcheglov
8bc597f04b
Compute also constant dependencies reference in method bodies.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2679373003 .
2017-02-08 08:38:23 -08:00
Konstantin Shcheglov
fe3286ad4b
Resolve Library/Part/PartOf/Directive(s) in AST without tasks.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2680883004 .
2017-02-07 18:20:39 -08:00
Konstantin Shcheglov
e5776b3311
Always add the target library to the store.
...
So, we can remove the workaround in analyzer.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2682783002 .
2017-02-07 11:24:35 -08:00
Konstantin Shcheglov
be37e10b72
Make fields private, add DeclaredVariables, put library into a field.
...
progress
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2679243002 .
2017-02-07 11:18:18 -08:00
Paul Berry
4530e970f8
Prevent null reference when SDK lacks FutureOr<T>.
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2683683002 .
2017-02-07 11:11:58 -08:00
Konstantin Shcheglov
30c300c25e
We don't need to build enums.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2680843003 .
2017-02-07 11:00:56 -08:00
Konstantin Shcheglov
b474d42e30
Compute constants in non-task analyzer.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2679073003 .
2017-02-07 09:09:48 -08:00
Konstantin Shcheglov
236321245d
Not task based analysis.
...
Work in progress.
Constants are not evaluated.
Operations, like URI resolution, type resolution, etc are not optimized.
I'd like to land some initial state and then start iterating.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2678193002 .
2017-02-06 16:12:08 -08:00
Konstantin Shcheglov
780d053c54
Rename _FileBasedSummaryResynthesizer to StoreBasedSummaryResynthesizer.
...
We will consume it separately from ResultProvider, in not task based analisys.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2681573002 .
2017-02-06 13:23:31 -08:00
Leaf Petersen
a3b4366f11
Infer Null for return type of functions with empty returns.
...
This allows inference to infer Null as the return type of functions
which have no return statements, or which return with no value.
Also allows inference to propagate Null.
Fixes https://github.com/dart-lang/sdk/issues/28602
Fixes https://github.com/dart-lang/sdk/issues/28630
BUG=
R=brianwilkerson@google.com , jmesserly@google.com
Review-Url: https://codereview.chromium.org/2667343005 .
2017-02-06 12:24:39 -08:00
Konstantin Shcheglov
0c19c418c2
Add EvictingFileByteStore and make FileByteStore non-evicting.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2676363003 .
2017-02-06 10:10:41 -08:00
Konstantin Shcheglov
6e422fd0a7
Don't search for 'declaration' of elements, just name is usually enough.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2677833002 .
2017-02-05 12:21:17 -08:00
Leaf Petersen
15527f136f
Temporarily restore ad hoc Future.then inference
...
BUG=
R=brianwilkerson@google.com , jmesserly@google.com
Review-Url: https://codereview.chromium.org/2676633005 .
2017-02-03 13:52:20 -08:00
Jennifer Messerly
ac85576979
fix #28630 , instance method tear-offs are treated as strict arrows
...
R=leafp@google.com
Review-Url: https://codereview.chromium.org/2675963004 .
2017-02-03 13:21:20 -08:00
Konstantin Shcheglov
7d2447d795
Replace computeNode() with AstProvider in search.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2672973002 .
2017-02-03 10:40:44 -08:00
Konstantin Shcheglov
f600f5f9de
Stop using Element.computeNode() in refactorings and fixes.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2669353002 .
2017-02-02 17:24:31 -08:00
Konstantin Shcheglov
2ca71e29ea
Fix for 'The getter 'isDynamic' was called on null' because of dartbug.com/28515
...
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/28515
Review-Url: https://codereview.chromium.org/2676713002 .
2017-02-02 16:01:52 -08:00
Paul Berry
b95f37612a
Split core file tracking functionality from AnalysisDriver.
...
This file tracking functionality will be re-used for incremental
compilation.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2673683003 .
2017-02-02 15:03:37 -08:00
Konstantin Shcheglov
69f9f781cc
Implement Search.classMembers() using getFilesDefiningClassMemberName().
...
This fixes the performance problem you saw on class renames.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2674493004 .
2017-02-02 10:48:19 -08:00
Konstantin Shcheglov
8d4b82dfe9
Add AnalysisDriver.getFilesDefiningClassMemberName().
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2673653003 .
2017-02-02 10:25:52 -08:00
Konstantin Shcheglov
8326ae9640
Record defined top-level/class-mebber names with unlinked bundles.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2670843004 .
2017-02-02 09:51:16 -08:00
Konstantin Shcheglov
dc5258e4cc
Fix for resynthesizing with multiply defined names.
...
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2668423003 .
2017-02-02 07:10:56 -08:00
Konstantin Shcheglov
6b9f9b7164
Handle invalid URIs in summaries.
...
We record all URIs, including invalid, into unlinked summaries.
We still record even invalid URIs as dependencies.
But handle invalid URIs as empty units and libraries.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2669863003 .
2017-02-01 13:34:56 -08:00
Konstantin Shcheglov
0e670f1df1
Revert "Encode URIs stored in unlinked summaries to make them Uri.parse() safe."
...
This reverts commit 023648ec5e .
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2671513002 .
2017-02-01 10:58:11 -08:00
Leaf Petersen
3fa3964a70
Suppress NO_DEFAULT_BOUND errors.
...
This suppresses the emission of NO_DEFAULT_BOUND errors, and makes the
default instantation for recursive bounds backwards (and possibly
forwards) compatible. Also adds a couple of currently failing tests
for cases that should be made erroneous regardless of whether we
choose to support malbounded type constructor applications.
BUG=
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2662973005 .
2017-02-01 10:18:05 -08:00
Konstantin Shcheglov
082f386e83
Small tweaks for AnalysisDriver and FileState.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2665393002 .
2017-02-01 09:49:34 -08:00
Konstantin Shcheglov
023648ec5e
Encode URIs stored in unlinked summaries to make them Uri.parse() safe.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2665213003 .
2017-02-01 09:36:46 -08:00
Brian Wilkerson
921f866496
First step toward resolving generic function types
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2667073004 .
2017-02-01 09:33:46 -08:00
Paul Berry
6f0f50dc1e
Streamline AnalysisDriver status tracking.
...
- Removed AnalysisDriver.status stream. Outside of tests, we weren't
using it. Inside of tests, it was easy to switch to
AnalysisDriverScheduler.status.
- Moved waitForIdle from AnalysisDriver to AnalysisDriverScheduler.
- Added a mechanism to ensure that AnalysisDriverScheduler.waitForIdle
really waits for idle, even if AnalysisDriverScheduler.status hasn't
been notified that we are analyzing yet. This mechanism does the
right thing even if we later discover that there is no analysis to
be done (and so no event is ever sent to
AnalysisDriverScheduler.status).
- Removed an unnecessary check from the loop in
AnalysisDriverScheduler._run().
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2665263002 .
2017-02-01 09:22:53 -08:00
Brian Wilkerson
799a7a4e94
Fix bot breakage (TBR)
...
Review-Url: https://codereview.chromium.org/2669603004 .
2017-02-01 09:04:01 -08:00
Brian Wilkerson
efd28ece97
Fix errors and warnings
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2661263002 .
2017-02-01 08:06:30 -08:00
Peter von der Ahé
0401b89795
Fix hints and warnings.
...
R=johnniwinther@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2659403002 .
2017-02-01 13:04:40 +01:00
Konstantin Shcheglov
54c8496a38
Fix for resynthesizing invalid elements as type arguments of declared types.
...
Reproduced using Brian's stress test.
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2662983005 .
2017-01-31 14:28:31 -08:00
Konstantin Shcheglov
17077ff2e0
Catch Uri.parse() FormatException and skip the URI.
...
You saw it, and the stress test reproduced it too.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2664313002 .
2017-01-31 13:55:48 -08:00
Brian Wilkerson
aad0e850a2
Revert "First step toward resolving generic function types" (TBR)
...
Review-Url: https://codereview.chromium.org/2660403005 .
2017-01-31 13:10:12 -08:00
Konstantin Shcheglov
8835fe34fd
The file is a library, if it has a 'library' directive.
...
With these changes analyzer_cli with the new analysis driver can pass
the same shared tests as the AnalysisContext based analyzer_cli.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2662363002 .
2017-01-31 13:06:55 -08:00
Paul Berry
acf5b16a5f
Isolate the part of AnalysisDriver that manages the AnalysisContext.
...
I re-used the existing class _LibraryContext, but moved it to its own
file and gave it a public API so that the rest of the AnalysisDriver
doesn't have to deal with the AnalysisContext directly.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2661023005 .
2017-01-31 12:33:45 -08:00
Konstantin Shcheglov
c55185d9d7
Fix for PartDirective annotations while applying resynthesized element model.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2662173004 .
2017-01-31 11:45:03 -08:00
Konstantin Shcheglov
c74771b43d
Don't resolve FieldFormalParameter field if not in constructor.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2663063004 .
2017-01-31 11:16:16 -08:00
Brian Wilkerson
0737b3d2be
First step toward resolving generic function types
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2654653003 .
2017-01-31 09:56:28 -08:00
Konstantin Shcheglov
b8aca22c6a
Issue 28550. Fix for resynthesizing invalid elements as declared types.
...
R=paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/28550
Review-Url: https://codereview.chromium.org/2665013002 .
2017-01-31 09:26:31 -08:00
Konstantin Shcheglov
2a10f4bbb7
Don't resynthesize field types during class members resynthesis.
...
Invalid code might cause recursion and stack overflow.
And actually we might not need this type at all.
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2661123002 .
2017-01-31 08:28:43 -08:00
Konstantin Shcheglov
6595c05864
Actually limit number of stored exception contexts.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2666003002 .
2017-01-31 07:10:39 -08:00