Paul Berry
a07b997e63
Downplay the distinction between linked and prelinked summaries.
...
Following a discussion on Tuesday, we've decided to only deal with the
distinction between linked and unlinked information in the summary
definition for now. This should allow fully-linked information (such as
constant evaluation, propagated types, and inferred types) to be added
to summaries without much trouble.
The distinction is preserved in the prelinker (which can't currently
handle fully-linked information), and to some degree it will be
preserved in unit tests (to minimize future churn).
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1584313005 .
2016-01-14 16:58:03 -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
Konstantin Shcheglov
ca5bf28fa5
Chain SummaryResynthesizer(s).
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1585093003 .
2016-01-14 14:43:29 -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
danrubel
ebd1736c58
Add EmbedderSdk to EmbedderUriResolver
...
R=brianwilkerson@google.com , johnmccutchan@google.com , pquitslund@google.com
Review URL: https://codereview.chromium.org/1584663006 .
2016-01-14 14:51:43 -05:00
Paul Berry
ba31abe429
Use constructor args in favor of summary "encode" functions.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1585973004 .
2016-01-14 09:30:04 -08: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
Paul Berry
834263789f
Include the export namespace in the prelinked summary.
...
This prevents having to traverse the transitive closure of exports
when resynthesizing a library from its summary.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1589573003 .
2016-01-13 13:16:23 -08: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
0d8a31e0a6
Create LibraryElement.loadLibrary during resynth.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1583613002 .
2016-01-13 09:35:37 -08:00
John Messerly
3aa98fa335
fixes #24711 , allow factory constructors to be downcast
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1578863004 .
2016-01-13 09:04:21 -08:00
Paul Berry
c1642e9d9f
Make summary builder classes implement summary interfaces.
...
This allows for easier unit testing, since we can use a builder class
directly rather than having to serialize and deserialize it.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1581993002 .
2016-01-13 08:54:48 -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
Konstantin Shcheglov
c474538e77
Resynth LibraryElement.deferred.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1580173002 .
2016-01-13 08:18:57 -08:00
Konstantin Shcheglov
9f6612d68c
Resynth importElement.prefixOffset.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1581803002 .
2016-01-13 08:14:49 -08:00
Konstantin Shcheglov
f4c4b27d3f
Resynth the 'final' property of top-level variables.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1575323003 .
2016-01-13 07:52:35 -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
Paul Berry
85a7affb7c
Record information about parts of dependent libraries in summaries.
...
This information will be necessary in order to determine whether a
summary needs to be re-linked, since a change to a part of library A may
affect any other library that depends on library A, even if the defining
compilation unit of library A is unaffected.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1574113002 .
2016-01-12 12:02:47 -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
Konstantin Shcheglov
b9ff7c4860
Compute exportNamespace during resynthesizing.
...
Also use it to find the entry point.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1576213002 .
2016-01-11 16:37:43 -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
Paul Berry
4e0546ef44
Move NameFilter to its own file so it can be conveniently reused.
...
This avoids some duplication of logic in summarize_elements.dart.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1574053002 .
2016-01-11 15:47:22 -08:00
Konstantin Shcheglov
11d1147df8
Compute public namespace during resynthesizing.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1573203003 .
2016-01-11 15:05:40 -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
Paul Berry
927744e318
Handle setters properly in NameFilter.
...
According to the language spec (which we are trying to follow as closely
as possible in the implementation of summaries), a setter for `x` has a
name `x=`, hence a combinator like `show x` should show both the name
`x` and `x=`.
This has no immediate effect beyond the unit test for NameFilter (since
at the moment the only names which are affected by the behavior of
NameFilter are the names of classes, and they never end in `=`). But in
a future CL I plan to use NameFilter to help build public and export
namespaces, and once that lands I will need NameFilter to handle setters
properly.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1576173002 .
2016-01-11 14:28:44 -08:00
Konstantin Shcheglov
e299e4f68d
Fix referencing prefixed types from parts.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1575143002 .
2016-01-11 13:44:00 -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
Konstantin Shcheglov
236237724b
Fix for resynthesizing implicit top-level variables.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1577033002 .
2016-01-11 11:13:31 -08:00
Konstantin Shcheglov
65f1aa1ef0
Cache values of fields and lists in summary implementations.
...
This significantly improves analysis time of a trivial HTML app.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1579663002 .
2016-01-11 09:29:23 -08:00
Paul Berry
0b7c10e2b1
Create a prelinker for summaries.
...
The prelinker is capable of rebuilding the "Prelinked" summary
information based on the "Unlinked" information. We will need to do
this in order to make efficient use of summaries when some files are
changed but not others, or when a pub package is upgraded but another
package that depends on it is left alone.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1576743002 .
2016-01-11 07:58:21 -08:00
Konstantin Shcheglov
5e326a505c
Remove BuilderContext from summary builders.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1577663002 .
2016-01-10 14:03:41 -08:00
Paul Berry
8a29a99286
Properly set UnlinkedReference.prefixReference in summaries.
...
This information will be necessary when a change to a file forces
summaries to be relinked.
Note that the way we determine the prefix is a bit kludgy: we look at
the export namespaces of the imported libraries and arbitrarily choose
a prefix that points to the given element. This will give subtly
incorrect results if a name is reachable via multiple prefixes,
however this is unlikely to pose a problem in non-contrived use cases.
See the test
`fail_type_reference_to_type_visible_via_multiple_import_prefixes` for
a more detailed explanation of what might go wrong.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1574763002 .
2016-01-09 15:25:40 -08:00
Konstantin Shcheglov
7b21739c27
Use addBool() and BoolReader in summaries.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1570383002 .
2016-01-09 14:57:17 -08:00
Konstantin Shcheglov
68bf8244f8
Use FlatBuffers for summaries.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1576663002 .
2016-01-09 10:55:00 -08:00
Konstantin Shcheglov
10adc73dab
Include addBool/BoolReader into FlatBuffers.
...
This should simplify the code generated for summary builders/readers.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1574683002 .
2016-01-09 10:26:32 -08:00
Konstantin Shcheglov
49bc0f4b1d
Remove Int64 support from FlatBuffers.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1570193004 .
2016-01-09 10:20:30 -08:00
Paul Berry
52aa46b3be
Add support for Element.docRange to the summary.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1564343004 .
2016-01-09 07:05:18 -08:00
Paul Berry
c0bd3091b1
Implement support for Element.documentationComment in summaries.
...
Support for Element.docRange will be added in a future CL.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1573633002 .
2016-01-08 14:35:26 -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
Konstantin Shcheglov
8a15c052b5
Share VTable(s) in FlatBuffers.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1568943003 .
2016-01-08 10:43:01 -08:00
Konstantin Shcheglov
26c6fc36e4
Support for writing Int32 lists.
...
We have one List<int> in the summaries model, so we need to be able
to write these lists in FlatBuffers.
We could probably make it more general by adding the Writer interface
and use it for writing any lists, as well as replace specialized
methods like addInt32() or addInt8() with a general addScalarField().
But this will make clients code a little bigger. Thoughts?
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1568343002 .
2016-01-08 10:40:58 -08:00
Konstantin Shcheglov
48a4c3d72e
Support for Int64 and fix for the root reference.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1571593002 .
2016-01-08 10:39:31 -08:00