Commit Graph

4276 Commits

Author SHA1 Message Date
Konstantin Shcheglov bc34583661 Issue 29960. Both CommandLineOptions and AnalysisOptions must be equal to reuse the context.
Unfortunately this makes running shared tests about 30% slower, because we have to perform I/O while trying to find analysis_options.yaml files corresponding to the files to be analyzed.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29960

Review-Url: https://codereview.chromium.org/2956093002 .
2017-06-27 09:33:00 -07:00
Brian Wilkerson d129b0261c Fix recovery to prevent generating a parameter with no name and no type (issue 30020)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2955063004 .
2017-06-27 09:19:25 -07:00
Konstantin Shcheglov dab293af60 Compute subtyped names.
This is a step to optimizing implemented classes / members feature.

The idea is that we don't need to know elements to make this feature
work. We just need to know whether at least one exists. So, use these
subtyped names to pre-filter files, then read resolved units for special
type of index (to be implemented) with resolved subtyped classes with
overridden class members, then recurse. I think this would be much
faster than to actually resynthesize elements.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2961773002 .
2017-06-27 09:18:42 -07:00
Konstantin Shcheglov 020241b021 Fix for crash because of missing type of default generic function typed parameters.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2956923003 .
2017-06-26 17:43:37 -07:00
Brian Wilkerson 5946ce552f Add AnalysisSession to analyzer
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2954153002 .
2017-06-26 09:16:11 -07:00
Peter von der Ahé a1ad4e4feb Remove peeking from parseTypedef and parseClassOrNamedMixinApplication.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2948383002 .
2017-06-26 13:15:47 +02:00
Erik Corry 029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Brian Wilkerson 4fab4a1f52 Clean up type parameters in comments
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2948393002 .
2017-06-23 12:53:11 -07:00
Brian Wilkerson e28064f405 Restore partial analysis of analysis options files
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2946313003 .
2017-06-22 08:00:50 -07:00
danrubel ebdc0eda11 add Parser.withoutFasta constructor
This renames an existing private Parser constructor as a short term fix
so that the angular plugin can extend the Parser.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2952113002 .
2017-06-22 09:41:46 -04:00
Paul Berry b2c4b0ac0a Implement override-based type inference for instance methods.
Also, fix a rare infinite loop bug in analyzer exposed by one of the
tests.

R=brianwilkerson@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2946273002 .
2017-06-21 13:56:04 -07:00
Dan Rubel d0910ce078 translate fasta parser error to analyzer error
* translate fasta parser BuiltInIdentifierAsType error to analyzer error
* remove unused error listener field

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2944383002 .
2017-06-20 13:18:48 -04:00
Dan Rubel 966d1a4701 integrating fasta parser
* start integrating fasta parser into analyzer
* extract new Scanner.fasta factory

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2948473002 .
2017-06-20 12:24:13 -04:00
Paul Berry e8131d6f1a Fix ParameterElementImpl.hasImplicitType for function-typed parameters.
UnlinkedParam.type serves a dual role: for ordinary parameters it is
the declared type; for function-typed parameters it is the declared
return type.  So to determine whether a parameter has an implicit type
it is not sufficient to check whether UnlinkedParam.type is `null`.
We also need to check whether the parameter is function-typed.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2947703002 .
2017-06-19 13:13:53 -07:00
Konstantin Shcheglov bf5ea8f593 Using identical(xxx, typeProvider.yyy) is not compatible with Analysis Driver.
This fixes 8 out of 22 failing tests for DDC using Analysis Driver.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2947443002 .
2017-06-16 13:38:33 -07:00
Jens Johansen 68bb955b7f Fix bot failure because of missed update of AssertStatement
BUG=

Review-Url: https://codereview.chromium.org/2943103002 .
2017-06-16 13:28:49 +02:00
Dan Rubel 305f358fa4 update statement completion for fasta scanner
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2936143002 .
2017-06-14 11:15:50 -04:00
Paul Berry 92a878f276 Fix argument names for handleIndexedExpression.
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2935833002 .
2017-06-14 06:05:53 -07:00
Peter von der Ahé 6302a5b31b Implement metadata on classes and additional semantic checks.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2938793002 .
2017-06-14 14:59:53 +02:00
Peter von der Ahé 3c17c44d52 Implement metadata on methods and fields.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2935993002 .
2017-06-14 08:25:17 +02:00
Brian Wilkerson 62d0376231 Run the sorter to reduce code churn
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2933753002 .
2017-06-12 07:37:14 -07:00
Konstantin Shcheglov 90f12aa802 Fix for resynthesizing generic functions during linking.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2931123002 .
2017-06-09 14:21:02 -07:00
Florian Loitsch 377093841f Report an error when a part-of refers to an unnamed library.
Fixes #28522
BUG= http://dartbug.com/28522
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2931893004 .
2017-06-09 21:08:26 +02:00
Brian Wilkerson 1a0fa7f211 Copy type information for generic function types
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2928173002 .
2017-06-09 10:33:24 -07:00
Alexandre Ardhuin 617d0f53b6 add hint for @required (#29828) 2017-06-09 06:36:50 -07:00
Dan Rubel 56402976cd more fixes for fasta analyzer integration
* fix scanner adapter setSourceStart
* fix fasta token copy() methods
* replace "is TokenWithComment" with "?.preceedingComments != null"
* update scanner test

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2928773003 .
2017-06-08 18:02:09 -04:00
Konstantin Shcheglov 5fe793ec4e Use ClassHierarchy.applyChanges() in MixinFullResolution.
So, we let the hierarchy to decide how to react to the changes, and
instance of which class hierarchy to create.

This makes initial compilation with Kernel Driver about 5% faster.

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2924333002 .
2017-06-08 14:00:51 -07:00
Peter von der Ahé 001ac97389 Implement initializer asserts.
Closes https://github.com/dart-lang/sdk/issues/29762

R=kasperl@google.com

Review-Url: https://codereview.chromium.org/2930673002 .
2017-06-08 13:46:26 +02:00
Dan Rubel b0374f214c update analyzer parser tests for fasta scanner
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2930453002 .
2017-06-07 11:05:44 -04:00
Peter von der Ahé 7df768af0d Restore invariant that stack is empty in parseFunctionBody.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2914373002 .
2017-06-06 16:58:31 +02:00
Konstantin Shcheglov 0a194c2f40 Named parameters of generic functions should have names.
I stumbled upon this problem accidentally while editing a file.
It caused an exception in summarizer.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2918373002 .
2017-06-05 13:35:35 -07:00
Konstantin Shcheglov c61167ab1d Support for implicitFunctionTypeIndices in CompilationUnitElementForLink.resolveTypeRef().
https://github.com/dart-lang/sdk/issues/29759
https://github.com/dart-lang/sdk/issues/29533

R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2925663002 .
2017-06-05 13:28:55 -07:00
Brian Wilkerson e8a5e404c3 Move LocalDeclarationVisitor for use by contributors that will be moved to analyzer_plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2918343002 .
2017-06-05 10:24:54 -07:00
Devon Carew 0b79e4d20d update the analyzer and analysis server perf tags
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2917183003 .
2017-06-03 19:51:27 -07:00
Kevin Moore fea5ef723f pkg/analyzer: Deprecate JavaSystemIO
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2916303003 .
2017-06-02 12:39:19 -07:00
Dmitry Stefantsov 1e2f06f8da Reapply "Use backend targets to run Kernel transformations in Fasta"
This reverts commit 0b424ca5d2

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2919003003 .
2017-06-02 16:10:28 +02:00
Jennifer Messerly 88510c1860 fix #29146, downgrade import error to warning in strong mode
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2916223002 .
2017-06-01 15:44:30 -07:00
Konstantin Shcheglov 3803374d32 Don't recreate CoreTypes in transformers. Pass it in.
The same will be done later for ClassHierarchy. So, it would be up to
the client to decide which flavour to create, and whether the same
instance can be reused.

R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2904203003 .
2017-05-31 09:54:27 -07:00
Devon Carew c817241ad6 Update the analysis server diagnostic page - re-enable code completion and overlay pages,
and refactor the css and navigation.

BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2911313002 .
2017-05-30 18:46:33 -07:00
danrubel 427c06c2fe fix fasta scanner adapter lineStarts
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2913043002 .
2017-05-30 16:54:05 -04:00
Devon Carew 1e7ff6bccf Add the analysis options path to the diagnostics page.
BUG=
R=brianwilkerson@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2913493002 .
2017-05-30 13:29:25 -07:00
Brian Wilkerson 265ef252ae Write type parameters when writing members (issue 29714)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2909943004 .
2017-05-30 12:19:15 -07:00
Brian Wilkerson 852edf38d9 Fix an exception caused by incomplete input (issue 29687)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2912843004 .
2017-05-30 10:38:59 -07:00
Paul Berry 9a64339646 Change dependency walker's Node.dependencies to a static getter.
This prevents it from being accidentally overridden in a derived class.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2907023003 .
2017-05-27 21:27:21 -07:00
Dan Rubel 8928329339 improve fasta interpolation recovery
* improve fasta interpolation recovery by adding closing brace
    for unterminated string
* update analyzer scanner test because fasta does not support
    does not support \r line endings

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2910583002 .
2017-05-26 08:43:48 -04:00
Brian Wilkerson 50d0857f82 Add result interfaces used by AnalysisSession
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2908543002 .
2017-05-25 12:50:08 -07:00
Dan Rubel 54d6e3a1c5 cleanup fasta token classes
* replace fasta.SymbolToken --> analyzer.Token
* replace fasta.BeginGroupToken --> analyzer.BeginToken
* replace fasta.SymbolToken.eof --> analyzer.Token.eof

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2899043006 .
2017-05-25 07:26:50 -04:00
Dan Rubel 136698a734 remove fasta <--> analyzer token translation
R=ahe@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2902813005 .
2017-05-24 17:34:08 -04:00
Dan Rubel 6e981d0cbf enable analyzer scanner adapter generic method support
This turns on generic method support in the scanner adapter layer
and updates the token.offset when the analyzer scanner
is being used to parse generic method comments.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2900963009 .
2017-05-24 13:37:52 -04:00
Peter von der Ahé 61d855bb47 Prepare for development branch by updating externally-used API.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2898183002 .
2017-05-24 14:32:45 +02:00