Dan Rubel
3c447ab35d
add fasta.scanner support for lazy assignment operators
...
R=paulberry@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2895803002 .
2017-05-20 23:02:47 -04:00
Brian Wilkerson
80fd95bb70
Fix parser bug found while trying to reproduce a different bug
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2895743002 .
2017-05-19 13:07:59 -07:00
Peter von der Ahé
f19e46e946
Update Listener implementations.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2892173002 .
2017-05-19 13:32:23 +02:00
Peter von der Ahé
547b2cdcce
Implement generalized function types.
...
Fixes https://github.com/dart-lang/sdk/issues/6972
Fixes https://github.com/dart-lang/sdk/issues/26581
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2876813002 .
2017-05-19 11:03:24 +02:00
David Morgan
32c4094d04
Analyzer: add ignore_for_file comment that ignores a type of problem for the whole file; add tests.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2888953002 .
2017-05-19 10:01:53 +02:00
Brian Wilkerson
091752f158
Register files with new drivers (issue 29641)
...
Review-Url: https://codereview.chromium.org/2886343002 .
2017-05-18 07:43:47 -07:00
Asger Feldthaus
876db33bf4
Add import/export declaration AST node boilerplate to kernel.
...
Previously only deferred imports were represented. They have been
merged with the general form.
BUG=
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2852373002 .
2017-05-18 14:38:08 +02:00
Paul Berry
6866291fb3
Fix declaration of GenericTypeAliasElementForLink.
...
This class needs to implement FunctionTypeAliasElementForLink so that
it can be stored in CompilationUnitElementForLink._functionTypeAliases
(and returned by CompilationUnitElementForLink.functionTypeAliases)
without incurring checked mode errors.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2888653005 .
2017-05-17 14:03:46 -07:00
Brian Wilkerson
cb258a952c
Remove unused contentHash from results
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2885203002 .
2017-05-16 14:08:11 -07:00
Dan Rubel
278c7bfbeb
merge fasta.Token into analyzer.Token
...
This eliminates much of the duplication between the two token hierarchies
by merging much of the fasta.Token hierarchy into the analyzer.Token.
* merge token hierarchies
* cleanup fasta.Token.copy()
* set preceedingComments field via constructor
* replace isBuiltInIdentifier --> type.isBuiltIn
* change all fasta.Token references to analyzer.Token
* move fasta.Token.value() implementation into analyzer.SimpleToken
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2890523002 .
2017-05-16 11:50:14 -04:00
Dan Rubel
d566906167
cleanup unused incremental resolution
...
* remove unused analyzer incremental resolution
* remove unused Token.applyDelta method
Patch Set 1 is the original CL that was landed and reverted
https://codereview.chromium.org/2876993005
Patsh Set 2 contains additional fixes and test changes
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2884853002 .
2017-05-16 07:53:17 -04:00
Dan Rubel
d644be82ab
Revert "cleanup unused incremental resolution"
...
This reverts commit 77b383e6b8 .
Review-Url: https://codereview.chromium.org/2887443002 .
2017-05-15 11:01:57 -04:00
Dan Rubel
77b383e6b8
cleanup unused incremental resolution
...
* remove unused analyzer incremental resolution
* remove unused Token.applyDelta method
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2876993005 .
2017-05-15 09:09:25 -04:00
Konstantin Shcheglov
dd62ad5d77
Store Typedef(s) in kernel when parsing with Fasta, deserilize in DillLibraryBuilder.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2882893002 .
2017-05-14 17:51:55 -07:00
Konstantin Shcheglov
a4fd5d814f
Extract PerformanceLogger from AnalysisDriver.
...
I also added the runAsync().
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2883633002 .
2017-05-12 14:27:50 -07:00
Konstantin Shcheglov
02cb71685e
Move flat_buffer and api_signature into front_end.
...
I will need to use these in front_end to store precomputed information
and computing combined signatures.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2875373002 .
2017-05-12 10:48:28 -07:00
Brian Wilkerson
bef53e72e4
Remove unintentional dependency on analysis_server
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2875323002 .
2017-05-12 10:07:37 -07:00
Erik Ernst
6cb0966401
Allowing e of any type in void f(...) => e in the analyzer.
...
Re-land, now including adjustment of two tests in pkg/analyzer/test.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2870363003 .
2017-05-11 10:10:03 +02:00
Erik Ernst
7adb470835
Revert "Allowing e of any type in void f(...) => e in the analyzer."
...
This reverts commit 025b83fb89 .
Review-Url: https://codereview.chromium.org/2871163002 .
2017-05-10 12:54:24 +02:00
Erik Ernst
025b83fb89
Allowing e of any type in void f(...) => e in the analyzer.
...
Addresses https://github.com/dart-lang/sdk/issues/28940 .
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2870063002 .
2017-05-10 11:36:43 +02:00
Konstantin Shcheglov
bd1ee32543
Move [file_]byte_store.dart into pkg/front_end/test/src/incremental/.
...
We are going to reuse ByteStore in front_end, also for incremental
compilation.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2869803004 .
2017-05-09 09:12:15 -07:00
Dan Rubel
81d25f4c71
more work aligning fasta.Token with analyzer.Token
...
* move isPseudo getter out of Token into TokenType
* move special case charCount logic out of fasta.Token into fasta.ErrorToken
* move more accessors from fasta.Token into analyzer.Token
* add @overrides to denote which methods have been declared in analyzer.Token
* make fasta LazySubstring and its subclasses private
* rename fasta.previousToken to previous to match analyzer.Token
* flatten fasta.Token.preceedingCommentTokens into preceedingComments
* normalize fasta.Token.next and analyzer.Token.next
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2872433005 .
2017-05-09 00:09:56 -04:00
Dan Rubel
3347169016
cleanup TokenType var names
...
* rename TokenType info --> type
* rename fasta Token.info --> Token.type
R=paulberry@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2872453004 .
2017-05-08 12:43:08 -04:00
Konstantin Shcheglov
cc91d04514
Use FileSystem to read files in SourceLoader and TranslateUri.
...
This is a prerequisite for writing fast unit tests, as I would like
to do while working on the incremental kernel driver.
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2865843002 .
2017-05-06 13:09:28 -07:00
Leaf Petersen
006c22d0a2
Re-remove ad hoc Future.then inference.
...
Ad hoc inference for Future.then (and overrides) was kept in place for
an extra release cycle to allow code that implemented the Future
interface to work both before and after the transition to using
FutureOr for the callback return type. This CL removes support for
this ad hoc inference.
BUG=
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/2859703004 .
2017-05-04 10:45:21 -07:00
Brian Wilkerson
84ca84b1a7
Implement more of the behavior of a plugin; refactor some API
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2857233002 .
2017-05-03 12:48:39 -07:00
Asger Feldthaus
3a162d4241
Add flag to track if a constructor is the synthetic default constructor.
...
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2856123002 .
2017-05-03 12:48:11 +02:00
Konstantin Shcheglov
37092ed677
New tests and improvements for generics in comments parsing.
...
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2856463004 .
2017-05-01 12:52:09 -07:00
Alexandre Ardhuin
4cba15b081
allow to set enableAssertInitializer with DriverOptions ( #29506 )
2017-05-01 06:13:35 -07:00
Erik Corry
aa6353b6da
Dart SDK Spelling b, c, and d.
...
R=kmillikin@google.com
BUG=
Review-Url: https://codereview.chromium.org/2850783002 .
2017-05-01 08:28:10 +02:00
Konstantin Shcheglov
f2f1c60904
Add 'scanGenericMethodComments' parameter to constructors and scan() functions.
...
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2850853004 .
2017-04-28 14:47:29 -07:00
Konstantin Shcheglov
f0e1add542
Set 'enclosingElement' for FunctionElementImpl_forLUB.
...
This makes almost all <unknown> library names to go away in front_end
inference tests.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2849893002 .
2017-04-28 09:30:07 -07:00
Konstantin Shcheglov
0fe8546217
Rollback instrumentation during analysis and validate resolved ASTs instead.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2846883005 .
2017-04-27 10:30:19 -07:00
Brian Wilkerson
511a06ee00
Fix some issues with options handling
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2844663003 .
2017-04-27 10:22:37 -07:00
Devon Carew
66ac96c4a6
Use the dart:io Platform.resolvedExecutable API to locate the Dart SDK.
...
BUG=
R=brianwilkerson@google.com , danrubel@google.com , pquitslund@google.com
Review-Url: https://codereview.chromium.org/2844883005 .
2017-04-27 09:29:08 -07:00
Konstantin Shcheglov
cf013c6469
Instrument analyzer's type analysis and run front_end inference tests.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2846463003 .
2017-04-26 13:31:10 -07:00
Dan Rubel
3b790e5311
new TokenType and Keyword API
...
This adds two new methods and adapts most of the old references
to use these new API. Once all call sites have been updated,
the old API can be removed.
This is part one of https://codereview.chromium.org/2842643004/
* replace type == TokenType.KEYWORD with type.isKeyword
* change Keyword.syntax --> Keyword.lexeme
R=paulberry@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2842213003 .
2017-04-26 15:53:58 -04:00
Sigmund Cherem
06189b271a
loader, target, diet_listener moved
...
from front_end/lib/src/fasta/analyzer/
to analyzer/lib/src/fasta/
analyzer_compile and compile_platform_dartk moved
from front_end/lib/src/fasta/analyzer/
to front_end/tool/_fasta/
front_end/src/fasta/testing/* continues to have some shared testing logic,
- logic to compute the patched sdk is moved up one level
- TestContext, Run, and suite.dart (which depend on analyzer) moved to pkg/front_end/test/fasta/testing/
- only a copy of TestContext is duplicated under pkg/kernel/test/closure/.
R=ahe@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2828583003 .
2017-04-25 13:16:14 -07:00
Dan Rubel
684065855f
merge PrecedenceInfo into TokenType and update all refs
...
* replace PrecedenceInfo *_INFO with TokenType.*
* remove outdated PrecedenceInfo tests
* delete unused precedence_info.dart
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2832403002 .
2017-04-25 08:51:52 -04:00
Jennifer Messerly
613881a433
fix #29426 , class type alias was missing checks
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2837173002 .
2017-04-24 15:02:29 -07:00
Brian Wilkerson
c8b5768331
Fix stack overflow (issue 29406)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2837963003 .
2017-04-24 14:27:21 -07:00
Konstantin Shcheglov
7b4a575b4e
Allow 'extract index' in top-level inference.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2842573002 .
2017-04-24 13:38:16 -07:00
Konstantin Shcheglov
04ae172d33
Fix for indirect recursion in resynthesizing function type aliases.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2837963002 .
2017-04-24 13:13:02 -07:00
Konstantin Shcheglov
ebf0bb6ee0
Issue 29388. Resynthesize non-generic types for ReferenceInfo lazily.
...
This helps with preventing infinite recursion in getReferenceInfo(),
which does cache ReferenceInfo instances, but we were doing too much
work in the ReferenceInfo constructor.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29388
Review-Url: https://codereview.chromium.org/2835903003 .
2017-04-24 11:45:09 -07:00
Konstantin Shcheglov
93f4f5eab7
Add AnalysisDriver.getLibraryByUri().
...
We need this for DDC, and it actually uses it only for SDK - both in
cases when DDC compiles SDK (so it needs to analyze SDK libraries),
and in when DDC compiles something other than SDK (so it resynthesizes
SDK classes from the provided external summary store). In all cases
DDC needs these SDK libraries to build TypeProvider and do some HTML
magic.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2835123004 .
2017-04-24 11:40:56 -07:00
Brian Wilkerson
70e0d725ea
Fix exception when parsing broken code
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2837033003 .
2017-04-24 10:22:59 -07:00
Konstantin Shcheglov
04b40ad15d
Issue 29432. Instantiate the redirect constructor with the in-scope type arguments.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29432
Review-Url: https://codereview.chromium.org/2837743002 .
2017-04-24 08:54:54 -07:00
Brian Wilkerson
5cdfe4d8b0
Fix exception parsing generic function type syntax
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2836983002 .
2017-04-24 08:49:42 -07:00
Erik Corry
2fb5d08102
Spelling a
...
R=ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2841543002 .
2017-04-24 14:53:51 +02:00
Erik Corry
6617737ff5
Replace 'the the' with 'the'
...
R=kmillikin@google.com
BUG=
Review-Url: https://codereview.chromium.org/2830353002 .
2017-04-24 08:50:37 +02:00