Brian Wilkerson
ebe2ce681e
Fix ClassElement.allSupertypes to include interfaces of mixins (issue 29767)
...
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/3000183002 .
2017-08-18 07:30:05 -07:00
Dan Rubel
dd10e9ff06
update AstBuilder to support part of <uri>
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/3001003002 .
2017-08-17 08:52:10 -04:00
Jennifer Messerly
ed5ced82b1
Re-land "fix #30423 , covariant parameter tearoff type should be Object"
...
This is the original CL plus status file fixes.
Disables auto-generated function_type tests that are not working for the Dart 2 runtime behavior, and filed #30462 to track. Also removes the separate status that was skipping these tests in DDC when $checked was unset. $checked is not a thing for Dart 2, and DDC test status should never depend on it.
This reverts commit 1b0b1a4913 .
R=leafp@google.com
Review-Url: https://codereview.chromium.org/3001053002 .
2017-08-16 23:23:36 -07:00
Dan Rubel
6a958b3edb
refactor AstBuilder
...
Refactor the AstBuilder to use scriptTag, directives, and declarations
fields rather than pushing top level nodes on a generic stack
and later popping and sorting objects from the that generic stack.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2995963002 .
2017-08-16 09:47:27 -04:00
Dan Rubel
aefd73b8d3
new handleInvalidTopLevelDeclaration event in fasta parser
...
This adds a new event for better fasta parser recovery
when the parser detects an invalid character at the top level.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2985703002 .
2017-08-16 09:36:24 -04:00
Brian Wilkerson
1b0b1a4913
Gardening: Revert "fix #30423 , covariant parameter tearoff type should be Object" (TBR)
...
Review-Url: https://codereview.chromium.org/2995973002 .
2017-08-15 17:02:49 -07:00
Jennifer Messerly
d09868c02f
fix #30423 , covariant parameter tearoff type should be Object
...
some tests needed to be updated to reflect the informal spec semantics.
R=leafp@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2995813002 .
2017-08-15 14:27:06 -07:00
Dan Rubel
edc043a83b
move endMetadataStar
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2998933002 .
2017-08-15 13:48:59 -04:00
Peter von der Ahé
07cf2557ed
Implement type variables on local function declarations and expressions.
...
Closes https://github.com/dart-lang/sdk/issues/29798
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2994973002 .
2017-08-15 11:21:01 +02:00
Konstantin Shcheglov
befe86b6a3
Fix for inheriting covariance from a resynthesyzed parameter.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/30424
Review-Url: https://codereview.chromium.org/2994913002 .
2017-08-11 20:25:13 -07:00
Jennifer Messerly
1ac2725a1b
fix #30427 , casting tearoffs to the wrong type
...
apparently these aren't used much, since the previous cast could never succeed.
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2998873002 .
2017-08-11 15:47:38 -07:00
Konstantin Shcheglov
2923edc4c0
Check for null constructor field initializer expression.
...
When the initializer expression is null, this means that we detected that it was not actually a constant expression.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/3000743002 .
2017-08-11 12:35:19 -07:00
Kevin Millikin
bae72c382a
Fix the script analyzer/tool/generate_files
...
* The script had stopped working due to a pair of changes in Dart.
First, building Dart no longer produces a packages directory to use
as a package-root.
Second, generated Dart files are now formatted and the formatting
code relies on invoking Dart from the Dart SDK in order to find
dartfmt. (Specifically: invoking Dart from the build directory does
not work because there is no dartfmt there, and invoking Dart via
sdk/bin/dart from the SDK repository does not work because it is a
shell script that invokes Dart from the build directory.)
* Enable the test that the generated summary code has not changed.
* Regenerate the generated summary code.
BUG=
R=paulberry@google.com , whesse@google.com
Review-Url: https://codereview.chromium.org/2997703002 .
2017-08-11 12:05:47 +02:00
Konstantin Shcheglov
5b29ae48ad
Don't record dependencies in SummaryDataStore.
...
It was added for DDC, but DDC does not use it anymore. At the same time,
URIs operations are expensive, and this code is showing in Observatory.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2996783002 .
2017-08-09 17:45:13 -07:00
Devon Carew
69afd51bbe
Add a hint to rename .analysis_options files.
...
BUG=
R=brianwilkerson@google.com , danrubel@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2993323002 .
2017-08-09 11:48:37 -07:00
Konstantin Shcheglov
1bd19697fc
Don't schedule timer if knownFilesSetChanges stream is not requested.
...
I think this will helps up work the leak around.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2993303002 .
2017-08-08 14:40:14 -07:00
Brian Wilkerson
1abf749b77
Fix more uses of generic method comments and increment the data version (TBR)
...
Review-Url: https://codereview.chromium.org/2996653002 .
2017-08-08 11:27:02 -07:00
Brian Wilkerson
01b024c006
Replace comment style generic method syntax with real syntax
...
Review-Url: https://codereview.chromium.org/2997593002 .
2017-08-08 10:34:09 -07:00
Brian Wilkerson
471b7fd568
Emit a hint when using generic method comment syntax (issue 30356)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2990383002 .
2017-08-08 09:12:26 -07:00
Paul Berry
89c910b9c1
Move byte_store.dart and file_byte_store.dart to their own subdirectory.
...
This allows us to use the subpackage relationships test to verify that
they don't import any other parts of front_end, which paves the way
for the possibility of moving them to their own package in the future.
R=scheglov@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2990323002 .
2017-08-07 11:04:48 -07:00
Paul Berry
ae4cbb50af
Use "bool" as the downward inference context for assert conditions.
...
This addresses the type inference part of #30326 .
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2997513002 .
2017-08-07 10:36:51 -07:00
Paul Berry
e2f77056a5
Eliminate dependencies on pkg/front_end.
...
The API for pkg/front_end is still in flux so we want to avoid having
any packages depend directly on it (other than analyzer and
back-ends).
This CL re-exports some of the critical pieces of front_end needed by
analyzer clients so that those clients can access them via analyzer,
without having to directly depend on front_end. It also updates
pkg/analyzer_plugin to make use of those re-exports.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2993123002 .
2017-08-07 09:46:30 -07:00
Peter von der Ahé
98422979ac
Parse type variables of local functions before return type.
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2985673002 .
2017-08-07 13:46:47 +02:00
Jacob MacDonald
41fd862217
Call StringToken.canonicalizer.clear() in AnalysisEngine#clearCaches() ( #30325 )
2017-08-04 14:48:12 -07:00
Konstantin Shcheglov
4ef7fd14c1
Record Typedef reference into Kernel FunctionType and resynthesyze typedefs in Analyzer.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2986393002 .
2017-08-04 12:02:26 -07:00
Brian Wilkerson
07e45530d7
Fix hints by removing deprecation from used methods
...
R=pquitslund@google.com
Review-Url: https://codereview.chromium.org/2997463002 .
2017-08-04 08:51:59 -07:00
Brian Wilkerson
defb2990d2
Add a test to ensure that error codes are not being missed and add missed error codes
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2992243002 .
2017-08-04 07:45:46 -07:00
pq
1c5101e4a6
Deprecate unintended APIs.
...
R=brianwilkerson@google.com
See: https://github.com/dart-lang/linter/issues/769
Review-Url: https://codereview.chromium.org/2989363002 .
2017-08-03 10:53:43 -07:00
Konstantin Shcheglov
60a576108c
Store parts in Kernel Library, resynthesize parts in Analyzer.
...
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2988373002 .
2017-08-03 10:36:29 -07:00
Brian Wilkerson
4c635b7b85
Initial support for an explicit plugin list
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2988343002 .
2017-08-02 11:30:57 -07:00
Konstantin Shcheglov
4ea75e9f8e
Resynthesize values of final fields of classes with const constructors.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2989243003 .
2017-08-02 10:26:32 -07:00
Konstantin Shcheglov
1ab12931e4
A couple of tweaks.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2988253002 .
2017-08-01 15:24:08 -07:00
Konstantin Shcheglov
92ae0e84a8
Fix for truncated unlinked summaries in ByteStore.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2987303002 .
2017-08-01 11:35:15 -07:00
Konstantin Shcheglov
d632e82cd3
Resynthesize type literals from Kernel.
...
Most tests still fail, because in Kernel typedef(s) are stored as
explicit FunctionType(s), i.e. we lose their names. I'm going to
amend this in the next CL.
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2992143002 .
2017-08-01 11:29:03 -07:00
Konstantin Shcheglov
f9424908a5
Issue 30034. Parse annotations for typedef(s) and resynthesize from Kernel in analyzer.
...
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG= https://github.com/dart-lang/sdk/issues/30034
Review-Url: https://codereview.chromium.org/2987983004 .
2017-08-01 10:08:34 -07:00
Brian Wilkerson
02cdd6a59b
Prevent an exception (issue 30307)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2989193002 .
2017-08-01 09:47:06 -07:00
Konstantin Shcheglov
7951e0d8d2
Resynthesize typedefs from Kernel.
...
An alternative approach - use names of positional arguments recorded
for Kernel FunctionType(s).
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2992083002 .
2017-08-01 09:32:22 -07:00
Konstantin Shcheglov
66663f7fd6
Add optional FunctionType.positionalParameterNames and use them to resynthesize function-type formal parameters in Analyzer.
...
This will be also used as an alternative approach to support of
typedefs in Analyzer. The previous one was reverted in
e431e93e87 , because it caused problems
during storing parameters of generic Function(s).
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2985293002 .
2017-07-31 14:09:21 -07:00
Konstantin Shcheglov
e64115f93f
Add Class.isEnum to Kernel and use it to resynthesize enums in Analyzer.
...
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2988113002 .
2017-07-31 10:35:03 -07:00
Konstantin Shcheglov
28d774a792
Resynthesize combinators for import/export directives from Kernel.
...
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2992053002 .
2017-07-31 10:02:55 -07:00
Florian Loitsch
ee46026671
Don't use LinkedList in the core libraries anymore.
...
R=lrn@google.com
Committed: https://github.com/dart-lang/sdk/commit/fe17b5b2bc24454dd2f596d8ce6e2e7661e87f10
Reverted: https://github.com/dart-lang/sdk/commit/5d4a786f4466ebcb06c36ed44f262c9e120a7273
Review-Url: https://codereview.chromium.org/2975443002 .
2017-07-28 21:14:11 +02:00
Konstantin Shcheglov
ea876bd780
Reapply 47ecf72 after it was reverted in e431e93e87.
...
There was a conflict with the problematic afc392b , so it was reverted
too. But 47ecf72 per se does not cause dartk failures. This runs
without failures.
python tools/test.py -m release -c dartk --builder-tag no_ipv6 language/
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2991993002 .
2017-07-28 09:48:51 -07:00
Brian Wilkerson
de0b7a2f40
Add sourceFactory getter to AnalysisSession
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2989883002 .
2017-07-28 06:18:53 -07:00
Erik Corry
e431e93e87
Revert two Kernel changes that were causing test failures.
...
Example failure:
python tools/test.py -m release -c dartk --builder-tag no_ipv6 \
language/function_type/function_type63_test
Revert "Serialize typedef parameters (including function typed ones) to Kernel and use it to resynthesize typedefs from Kernel."
This reverts commit afc392b66d .
Reverts https://codereview.chromium.org/2990783002
Revert "Add Member.documentationComment and use it to resynthesize documentation from Kernel."
This reverts commit 47ecf72272 .
Reverts https://codereview.chromium.org/2990873002
Also reverts some attempts to fix test files:
302b410364
https://codereview.chromium.org/2984343002
05ccf27015
https://codereview.chromium.org/2992683002
f71dcd7834
https://codereview.chromium.org/2984363003
Also had to revert some test changes that were committed on top of a red buildbot, in order to try to get back to a place where bots were green:
23952fdf56
https://codereview.chromium.org/2990773002
557cab2a3e
https://codereview.chromium.org/2985173002
R=johnniwinther@google.com , karlklose@google.com
BUG=
Review-Url: https://codereview.chromium.org/2986093002 .
2017-07-28 14:08:23 +02:00
Konstantin Shcheglov
47ecf72272
Add Member.documentationComment and use it to resynthesize documentation from Kernel.
...
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2990873002 .
2017-07-27 15:22:48 -07:00
Leaf Petersen
bbb0ed27ad
Avoid issuing incorrect errors when super mixins are enabled
...
BUG=
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/2986063002 .
2017-07-27 14:38:57 -07:00
Konstantin Shcheglov
afc392b66d
Serialize typedef parameters (including function typed ones) to Kernel and use it to resynthesize typedefs from Kernel.
...
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2990783002 .
2017-07-27 11:53:15 -07:00
Konstantin Shcheglov
7d8d0b51c4
Resynthesize metadata from Kernel, when already supported.
...
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2986983002 .
2017-07-27 11:32:44 -07:00
Erik Ernst
9336e199fd
Re-land of CL 2990703002, adding fixes to analyzer_test and error_test.
...
This CL is identical to the reverted CL 2990703002 which implements
syntactic support for generalized void in the analyzer, plus two bug
fixes in pkg/analyzer/test/generated/parser_test.dart and
pkg/analyzer_cli/test/error_test.dart. In the former, a test on parsing
`void,` was changed to expect an error: _isTypeIdentifier on a lone
`void` will no longer return true, which is necessary because `void`
can now be used as a type annotation alone. Another test on `void x`
was added, which produces the behavior previously seen for `void,`.
In error_test, the error which is used throughout was changed from
`void foo;` to `var int foo;` (because the former is no longer an
error).
Review-Url: https://codereview.chromium.org/2992623002 .
2017-07-27 12:39:19 +02:00
Konstantin Shcheglov
8a08dbd08e
Add export dependencies to Kernel libraries and use them to resynthesize ExportElement(s) in Analyzer.
...
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2991753002 .
2017-07-26 12:33:19 -07:00