Konstantin Shcheglov
b8fc38e8a8
Issue 26167. Test for indexing a unit which is not attached to a library.
...
We had the corresponding check wider than tests.
So, the problem in the issue does not happen now.
But it's still good to have a test.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26167
Review URL: https://codereview.chromium.org/1854683003 .
2016-04-01 09:47:08 -07:00
Paul Berry
5268afc378
Add more type inference uses cases to AST-based summaries.
...
With this CL, we support type inference of fields and property
accessors (when generics are not involved) based on inheritance.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1853433006 .
2016-04-01 09:44:02 -07:00
Brian Wilkerson
6dae827b70
More strong mode fixes for analyzer
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1842363004 .
2016-04-01 09:35:22 -07:00
Konstantin Shcheglov
8dcba124cf
Increment version before publishing a new version of analyzer.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1847853005 .
2016-04-01 09:08:03 -07:00
Paul Berry
a829226945
Add support for method parameter type inference to AST summaries.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1849843003 .
2016-04-01 08:59:00 -07:00
Johnni Winther
46beb25f43
Add *IndexSetIfNull methods to SemanticSendVisitor.
...
R=sigurdm@google.com
Review URL: https://codereview.chromium.org/1842033004 .
2016-04-01 09:46:42 +02:00
Paul Berry
2706796239
Begin implementing type inference for AST summaries.
...
As much as possible, we re-use the logic of InstanceMemberInferrer.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1845403003 .
2016-03-31 15:12:51 -07:00
Konstantin Shcheglov
fd4e357413
Issue 26147. Don't attempt to set the type of the parameter for setters without parameters.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26147
Review URL: https://codereview.chromium.org/1850623005 .
2016-03-31 13:46:41 -07:00
Brian Wilkerson
cbcb689184
Fix the way generated code is made strong mode clean
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1849973002 .
2016-03-31 13:43:07 -07:00
Konstantin Shcheglov
054be34e6c
Issue 26148. Don't use a current token if it does not match - create a new synthetic.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26148
Review URL: https://codereview.chromium.org/1851623002 .
2016-03-31 13:40:17 -07:00
Brian Wilkerson
e531f01e73
Fix more strong mode errors in analyzer
...
R=rnystrom@google.com
Review URL: https://codereview.chromium.org/1847633002 .
2016-03-31 13:30:04 -07:00
Brian Wilkerson
ca100e0be2
Merge pull request #26153 from pylaligand/lints
...
Added option to dartanalyzer to treat lints as errors.
2016-03-31 13:28:20 -07:00
Konstantin Shcheglov
498c77ef51
Issue dartdoc#1124. Get used elements from directive comments.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/dartdoc/issues/1124
Review URL: https://codereview.chromium.org/1850813002 .
2016-03-31 12:42:51 -07:00
P.Y. Laligand
f2a8ee1ebc
Added option to dartanalyzer to treat lints as errors.
...
Fixes #25977
2016-03-31 11:24:51 -07:00
Brian Wilkerson
301a6a4725
Fix generated server code to be strong mode compliant
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1852473002 .
2016-03-31 10:44:42 -07:00
Konstantin Shcheglov
05df65f7db
Issue 26146. Get next token after '{' or '}' while skipping interpolations.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26146
Review URL: https://codereview.chromium.org/1847093002 .
2016-03-31 10:40:43 -07:00
Konstantin Shcheglov
559bc17535
Rework computing simple strings difference.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26140
Review URL: https://codereview.chromium.org/1849843002 .
2016-03-31 10:18:06 -07:00
Dan Rubel
3b18b656c3
tests to assert completion suggestion replacementLength includes entire URI
...
https://github.com/dart-lang/sdk/issues/26083
R=jwren@google.com
Review URL: https://codereview.chromium.org/1843513003 .
2016-03-31 12:38:38 -04:00
Brian Wilkerson
0d743fbacf
Start making server strong mode clean
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1842063003 .
2016-03-31 08:27:05 -07:00
Johnni Winther
27b2c36ec1
Serialize ResolutionImpact instead of WorldImpact.
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1839243003 .
2016-03-31 09:55:03 +02:00
Konstantin Shcheglov
582c038940
Fix for sorting directives with documentation comments.
...
Stop trying to keep non-documentation directive comments after sorting.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1843763002 .
2016-03-30 17:21:30 -07:00
Konstantin Shcheglov
868a5c582c
Publish 0.27.3-alpha.6 with the infinite recursion fix.
...
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1837383003 .
2016-03-30 13:06:41 -07:00
Paul Berry
c8fb5078d0
Use standard TypeImpl classes during linking.
...
The `...TypeForLink` classes weren't contributing any useful
functionality, and removing them will make it easier to re-use code from
the rest of the analyzer.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1842183002 .
2016-03-30 13:01:59 -07:00
Konstantin Shcheglov
a202419882
Fix InSummarySourceTest on Windows.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1848583002 .
2016-03-30 13:00:07 -07:00
Konstantin Shcheglov
01c7e120dd
Fix for infinite resursion while finding a concrete method.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1846703002 .
2016-03-30 12:35:43 -07:00
Konstantin Shcheglov
6347b4cca7
Support --persistent_worker flag in --build-mode.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1848543002 .
2016-03-30 12:31:09 -07:00
Paul Berry
b873dab79c
Mark summarize_ast_strong_test as slow on dart2js
...
TBR=scheglov@google.com
Review URL: https://codereview.chromium.org/1844043002 .
2016-03-30 12:19:30 -07:00
Paul Berry
fa7f49546b
Make a test of summarizing ASTs in strong mode.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1840263002 .
2016-03-30 10:34:30 -07:00
Leaf Petersen
ce861a7c9c
Closures shouldn't have fuzzy arrow type.
...
Fixes https://github.com/dart-lang/sdk/issues/26118 .
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1838383002 .
2016-03-29 22:48:14 -07:00
Paul Berry
a88e4f2cf3
Mark a test in summarize_ast_test.dart as newly passing.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1843013002 .
2016-03-29 16:42:56 -07:00
Leaf Petersen
4e5bc83285
Better strong mode least upper bound for interface types. Adds some
...
checks to handle common cases of least upper-bound computations
on type parameters and interface types in a more reasonable way
than the spec lub.
BUG=
R=rnystrom@google.com
Review URL: https://codereview.chromium.org/1843453002 .
2016-03-29 16:36:38 -07:00
Paul Berry
f9fea19384
Clean up trivial cycle detection logic.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1839863005 .
2016-03-29 16:31:44 -07:00
Konstantin Shcheglov
0361013c12
Issue 26106. Don't attempt to incrementally resolve sources without contents.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26106
Review URL: https://codereview.chromium.org/1844683002 .
2016-03-29 16:21:19 -07:00
Paul Berry
cfbe56db31
When building summaries from ASTs, handle circularities involving .length.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1841283002 .
2016-03-29 16:19:55 -07:00
Paul Berry
fd09ad2813
Fix summary detection of cycles via redirect/super arguments.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1841853002 .
2016-03-29 16:08:38 -07:00
Konstantin Shcheglov
2895d7501e
Fix for analyzer_cli/test/package_prefix_test on Windows.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1844613002 .
2016-03-29 12:18:50 -07:00
Konstantin Shcheglov
2d3a202987
Prepare for publishing analyzer 0.27.3-alpha.5
...
R=jmesserly@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1843703003 .
2016-03-29 12:15:02 -07:00
Brian Wilkerson
8c22a5f807
Format code in analysis_server
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1838933003 .
2016-03-29 08:27:14 -07:00
Johnni Winther
4b4718a53c
Support per-library serialization.
...
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1811173003 .
2016-03-29 11:27:44 +02:00
Johnni Winther
ff31372564
Fix exit_code_test after refactoring.
...
The test was broken by https://codereview.chromium.org/1819053002
Review URL: https://codereview.chromium.org/1836033003 .
2016-03-29 11:18:01 +02:00
Johnni Winther
b4b67c3d2a
Don't serialize unnamed mixin applications.
...
This change is needed to allow for per-library serialization.
These elements should not be part of the element model, anyway.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1815693002 .
2016-03-29 10:26:27 +02:00
Paul Berry
b116b97a0b
Handle redirected constructors when generating summaries from ASTs.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1840843003 .
2016-03-28 19:50:15 -07:00
Konstantin Shcheglov
ce0fbc63cd
Serialize references to type parameters in final fields.
...
When we generate SDK summary using AST (just for testing) we find code
like this:
class _SimpleCallbackSink<T> extends ChunkedConversionSink<T> {
final _ChunkedConversionCallback<List<T>> _callback;
final List<T> _accumulated = <T>[];
_SimpleCallbackSink(this._callback);
void add(T chunk) { _accumulated.add(chunk); }
void close() { _callback(_accumulated); }
}
It is not a valid constant, but we don't know this on AST level.
We could probably detect this, but I guess we would need to serialize
a wider set of expressions for type propagatation / inference anyway,
so it is better to serialize than to fail in this case.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1841603003 .
2016-03-28 19:45:45 -07:00
Konstantin Shcheglov
ffd62c6a18
Resynthesize any type reference in constant expressions.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1837063002 .
2016-03-28 18:59:06 -07:00
Paul Berry
8835741088
Fix a corner case of constant evaluation cycle detection.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1841523003 .
2016-03-28 18:50:14 -07:00
Paul Berry
af334712d0
Fix up generated code after sorting analyzer source files.
...
TBR=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1842623002 .
2016-03-28 18:49:07 -07:00
Brian Wilkerson
338c95be8c
Sort the files in analysis_server
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1834423002 .
2016-03-28 18:25:29 -07:00
Brian Wilkerson
deae702994
Format everything in analyzer
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1842563003 .
2016-03-28 18:16:43 -07:00
Brian Wilkerson
513433d514
Sort analyzer sources
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1843473002 .
2016-03-28 17:41:52 -07:00
Stephen Adams
4b44331aaf
Fix test status to use the correct directory :-)
...
TBR=sigmund@google.com
Review URL: https://codereview.chromium.org/1840903002 .
2016-03-28 17:25:26 -07:00