Brian Slesinsky
ccf3870ffc
final fields shouldn't be dependencies of const variables
...
(They are only dependencies of const constructors.)
This was causing bogus error messages to appear
when a const expression mistakenly references
a final field.
BUG=https://github.com/dart-lang/sdk/issues/25526
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1620963003 .
2016-01-25 15:53:41 -08:00
Brian Wilkerson
032aa11711
Add minimal yaml support to the engine
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1622313003 .
2016-01-25 09:00:56 -08:00
Florian Loitsch
5cb3da473b
Update messages, and fix typing in test.
...
Review URL: https://codereview.chromium.org/1625213003 .
2016-01-25 13:41:03 +01:00
Florian Loitsch
c849a62744
Generate dart2js and analyzer files for shared messages.
...
R=brianwilkerson@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/1582903003 .
2016-01-25 13:08:40 +01:00
Konstantin Shcheglov
205a2a9c28
Don't add sources to DartSdk contexts.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1625273003 .
2016-01-24 15:49:18 -08:00
Paul Berry
201e980fd2
Rework recent changes to LineInfo to be backward compatible.
...
Commit 1ecd06d39c introduced a new getter
to the LineInfo class, breaking clients such as linter that use
LineInfo in an `implements` clause.
This CL reworks the change to be backward compatible. It may be
reverted once we are ready to roll to a new major version of analyzer.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1625783002 .
2016-01-23 17:33:20 -05:00
Konstantin Shcheglov
0025a8383e
Copy 'ConstructorName.staticElement' in ConstantAstCloner.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1625473004 .
2016-01-22 15:19:06 -08:00
Brian Wilkerson
1ecd06d39c
Add a count of total lines to status performance page
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1622713002 .
2016-01-22 14:37:29 -08:00
John Messerly
9a4b1c36ce
fixes #25482 , flatten futures in strong mode so Future.then works
...
Also fixes https://github.com/dart-lang/dev_compiler/issues/228
A few tweaks were made to the propagatedType inference for Future.then:
* only record type if better than static type
* only go down this path when strong mode is off
also renames tests: test_pseudoGeneric to test_genericMethod.
R=brianwilkerson@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1609093003 .
2016-01-22 13:29:58 -08:00
Konstantin Shcheglov
068b886543
Disable incremental resolution for constructor parameter names changes.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1620453002 .
2016-01-21 14:33:42 -08:00
Konstantin Shcheglov
b78decfa8f
Issue 25522. Insert a synthetic '>' for incomplete type arguments.
...
If we don't do this and insert 'f' instead, later when we attempt to
search 'f' by its offset we find the type instead of the identifier 'f'.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25522
Review URL: https://codereview.chromium.org/1615963003 .
2016-01-21 13:03:24 -08:00
Konstantin Shcheglov
0a495243c6
Validate that int values that we write to summaries are >= 0.
...
Also make tweaks for TestTypeProvider to ensure that this is true.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1605763007 .
2016-01-20 13:38:10 -08:00
Konstantin Shcheglov
203e16919a
Issue 25515. Don't incrementally resolve if a constructor initializer is changed.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25515
Review URL: https://codereview.chromium.org/1606103003 .
2016-01-20 08:49:29 -08:00
Konstantin Shcheglov
23e9fbcf30
Issue 25514. Harden parents validation in incremental resolver.
...
R=brianwilkerson@google.com , skybrian@google.com
BUG= https://github.com/dart-lang/sdk/issues/25514
Review URL: https://codereview.chromium.org/1605263002 .
2016-01-20 08:02:07 -08:00
John Messerly
8aa3df862b
remove unused method in ElementResolver
...
I forgot to delete this in a previous CL
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1606043003 .
2016-01-19 15:54:53 -08:00
Konstantin Shcheglov
07f8831bc2
Serialize constant initializers.
...
No implementation for element references in this CL.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1602203004 .
2016-01-19 13:42:51 -08:00
Brian Wilkerson
21ecb14548
Clean-up imports
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1602803002 .
2016-01-18 15:42:16 -08:00
Brian Wilkerson
539f0dff4a
Move AST implementation out of generated
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1595243003 .
2016-01-18 13:02:12 -08:00
Brian Wilkerson
6f56368747
Create a public interface for AST nodes and rename the implementation classes
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1594313002 .
2016-01-18 09:53:40 -08:00
Konstantin Shcheglov
37c2eca20d
Prepare for chaining resynthesizers from AC to SDK AC.
...
AboutToComputeResultHelper for each AnalysisContext should be set
externally, because analysis engine does not know where summaries are
stored.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1591483002 .
2016-01-17 09:25:24 -08:00
Brian Wilkerson
d116322f7d
Do not produce hint on constructor when class is deprectated (issue 25503)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1598773004 .
2016-01-16 15:09:56 -08:00
Brian Slesinsky
648e62243c
fix a nondeterministic error messsage by sorting the field names
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1590533003 .
2016-01-15 14:46:57 -08:00
Konstantin Shcheglov
6b56451788
Issue 25504. Fix for ignoring expression bodies in incremental resolver.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25504
Review URL: https://codereview.chromium.org/1584653007 .
2016-01-15 12:20:49 -08:00
John Messerly
9da8970cdf
fix #25486 , promote from dynamic in strong mode
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1585323003 .
2016-01-14 16:19:27 -08:00
Brian Slesinsky
4d3d65b806
forward incremental resolver exceptions to analysis engine log
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1585213005 .
2016-01-14 15:20:08 -08:00
John Messerly
9098ae50ae
fix #25425 , more inference of generic methods
...
this adds support for function expr invocation, as well as other element types besides executable elements
R=brianwilkerson@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1586813002 .
2016-01-14 13:27:34 -08:00
John Messerly
724492ca82
fixes #25340 , propagatedType now finds the instantiated generic method's return type
...
R=brianwilkerson@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1582863003 .
2016-01-14 13:20:13 -08:00
John Messerly
154959c762
fixes #25407 , generic list and map literal type comments
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1589663002 .
2016-01-14 13:18:59 -08:00
danrubel
559fb01244
assert isAsynchronous and isGenerator false if parseAsync is false
...
and fix ASYNC_NOT_SUPPORTED error code
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1584823003 .
2016-01-14 14:52:23 -05:00
Konstantin Shcheglov
9484bfe1c9
Issue 25064. Incrementally resolve comments only if both are documentation.
...
R=brianwilkerson@google.com , skybrian@google.com
BUG= https://github.com/dart-lang/sdk/issues/25064
Review URL: https://codereview.chromium.org/1581293002 .
2016-01-14 08:38:37 -08:00
Lasse R.H. Nielsen
2d44ed69e9
Implement (partially) ?? being compile-time constant in analyzer.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1577293002 .
2016-01-14 16:17:52 +01:00
John Messerly
f114dc1073
fix #25409 , error if a generic method argument did not have a corresponding parameter
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1579503005 .
2016-01-13 11:20:13 -08:00
John Messerly
5947a2047f
associate a staticInvokeType with loadLibrary
...
I missed this early-exit code path. This was caught by DDC's tests.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1577143002 .
2016-01-13 10:40:03 -08:00
Konstantin Shcheglov
2f57161e74
Patch together getters/setters in different parts.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1577413002 .
2016-01-13 08:26:29 -08:00
John Messerly
351ccc586f
fix generic function expressions, part of #25175
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1579303002 .
2016-01-12 16:04:57 -08:00
John Messerly
0549def77d
checking and inference of null coalescing operator, fixes #24564 and fixes #25387
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1575173005 .
2016-01-12 15:50:18 -08:00
Konstantin Shcheglov
b24cb84e8f
Cache DirectoryBasedDartSdk sources.
...
This reduces analysis time from of a trivial Dart app from 822 ms
to 762 ms. With SDK summaries.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1577363002 .
2016-01-12 12:31:59 -08:00
Konstantin Shcheglov
925458da82
Add a new 'summary' performance tag.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1573283003 .
2016-01-11 17:46:21 -08:00
Brian Slesinsky
5cc87405aa
Don't log stack trace for a bad package URL in a source file.
...
BUG=https://github.com/dart-lang/sdk/issues/25367
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1572073003 .
2016-01-11 15:53:49 -08:00
John Messerly
bc7843b025
fix #25280 , treat setters as returning void in strong mode
...
this gives better checking for an incorrect "return" in a setter
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1531313002 .
2016-01-11 14:42:48 -08:00
John Messerly
8c1e862a90
support generic methods in FunctionExpressionInvocation node
...
fixes part of #25175
R=brianwilkerson@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1561233003 .
2016-01-11 12:56:07 -08:00
danrubel
b852ddc41a
add parser parseAsync flag
...
add new ASYNC_NOT_SUPPORTED error code
update ParseTask to support enableAsync
add AnalysisOptions.enableAsync flag
partially addresses https://github.com/dart-lang/sdk/issues/25373
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1570183002 .
2016-01-08 15:50:38 -05:00
Paul Berry
306625d1bb
Fix computation of documentationComment for class type aliases.
...
R=brianwilkerson@google.com , pquitslund@google.com
Review URL: https://codereview.chromium.org/1567243002 .
2016-01-08 10:37:13 -08:00
John Messerly
4ab45e1415
guard against null staticInvokeType
...
this can happen if we don't have a static element
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1567223002 .
2016-01-07 15:52:56 -08:00
John Messerly
924f2f97b7
clean up generic methods in resolution
...
Introduces MethodInvocation.staticInvokeType to track the type of this invocation. This provides a natural place to store the instantiated generic function type. We then use this type when we are computing corresponding parameters or return types. As a result we do not need FunctionMember, and some of the code around generics becomes simpler/more uniform.
This approach should be a straightforward way to add support for generics in FunctionExpressionInvocation, in a follow up (see issue #25175 ).
Also renames "boundTypeParameters" to "typeFormals". "formals" and "actuals" is a pretty common way to describe these, I'm not sure why I didn't think of that better name originally. :)
Also removes broken ParameterMember.== that I had added in a previous CL. And the broken FunctionTypeImpl.originalFunction/instantiatedTypeArguments getters.
Finally, this fixes #23252 in the process of adding this. The return type of a "call" method was not being statically analyzed if the target was a VariableElement.
R=brianwilkerson@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1568643002 .
2016-01-07 14:51:36 -08:00
Leaf Petersen
d11800e8f5
Fix type parameter element resolution for generics
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1567733002 .
2016-01-06 14:15:48 -08:00
John Messerly
e2fa77776c
fix hints from analyzer in analyzer
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1559923006 .
2016-01-05 15:19:04 -08:00
Konstantin Shcheglov
3d3b875661
Parse generic function declarations with/without type.
...
Currently we parse only 'void' generic function declarations.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1560663004 .
2016-01-05 14:52:41 -08:00
Konstantin Shcheglov
22b044ca20
Use SummarySdkAnalysisContext if the SDK has the analysis_summary file.
...
This file does not exist yet, so it should be safe to have incomplete
implementation for now.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1555093005 .
2016-01-05 12:31:49 -08:00
John Messerly
fcc84d1a03
fix #25305 , DeclarationResolver.visitTypeParameter now handles generic methods
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1555213002 .
2016-01-04 15:22:48 -08:00