Brian Wilkerson
bdd0d637fe
We need to perform analysis differently based on some option settings (such as strong mode), but there is currently a single SDK that is shared across all contexts no matter which option values are being used. This causes us to inconsistently analyze different portions of the SDK depending on which outer context was the first to request the analysis.
...
This is at least a first step toward solving this problem by allowing multiple SDKs to be created, one for each unique set of options.
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1686613002 .
2016-02-09 11:05:34 -08:00
pq
fa08150ca6
Support for embedder dependency changes ( #25606 ).
...
Adds logic to detect when a library embedder is added as a dependency and reconfigures the `SourceFactory` appropriately.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1653733002 .
2016-02-09 09:39:59 -08:00
Paul Berry
c43622e897
Use ElementAnnotation as the ConstantEvaluationTarget for annotations.
...
Previously, we had a special class,
ConstantEvaluationTarget_Annotation, for this purpose. It held on to
a the AST node for the annotation. This was bad because it meant that
the presence of any ConstantEvaluationTarget_Annotation referring to a
given compilation unit would keep the entire compilation unit's AST in
memory.
Now we copy just the portions of the AST we need into
ElementAnnotation, just as we do for all other constant evaluation
targets. In addition to saving memory, this paves the way for
supporting annotations in summaries, by making it possible to compute
the constant value of an annotation without having to consult the full
AST.
Fixes #25285 .
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1665353002 .
2016-02-04 15:22:40 -08:00
pq
9bec38cca9
Enumerate resolvers on context status page.
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1665343002 .
2016-02-04 14:29:31 -08:00
Konstantin Shcheglov
960b9c3409
Issue 25650. Generate unique parameter names when create a method or function.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25650
Review URL: https://codereview.chromium.org/1664423002 .
2016-02-04 13:59:27 -08:00
Konstantin Shcheglov
fb520065b8
Issue 25686. Add 'var' for untyped unimplemented fields.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25686
Review URL: https://codereview.chromium.org/1668273002 .
2016-02-04 13:32:49 -08:00
pq
37767eff86
Hooks for injecting embedder resolver providers.
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1666573006 .
2016-02-04 11:03:43 -08:00
Konstantin Shcheglov
4239eadd74
WEB-20151. Include type arguments into type proposals.
...
R=brianwilkerson@google.com
BUG= https://youtrack.jetbrains.com/issue/WEB-20151
Review URL: https://codereview.chromium.org/1661763002 .
2016-02-02 18:36:11 -08:00
Konstantin Shcheglov
b0c06a5827
Issue 25616. Support for extracting methods with function-typed parameters.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25616
Review URL: https://codereview.chromium.org/1655353002 .
2016-02-02 14:32:02 -08:00
Brian Wilkerson
3ef79232ad
Add indication of resolver provider to the status page
...
R=jwren@google.com
Review URL: https://codereview.chromium.org/1653093002 .
2016-02-01 11:36:07 -08:00
Konstantin Shcheglov
86106d7a6d
Issue 25623. When adding the 'async' modifier, change the return type.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25623
Review URL: https://codereview.chromium.org/1652963003 .
2016-02-01 10:35:47 -08:00
Konstantin Shcheglov
bb73ff38bc
Fix build: _addFix_addAsync_asyncFor() does not return.
...
TBR
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1656693003 .
2016-02-01 08:49:25 -08:00
Brian Wilkerson
5b95009a6b
Move ResolverProvider to analyzer so that it can be shared
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1658663002 .
2016-02-01 08:12:29 -08:00
Konstantin Shcheglov
3f7a21bc0e
Issue 25622. Quick fix for 'async-for'.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25622
Review URL: https://codereview.chromium.org/1650853002 .
2016-02-01 08:03:55 -08:00
Konstantin Shcheglov
e7e52ae2c0
Issue 25542. If an element does not have its own documentation, use the documentation from the overridden superclass member or an implemented interface.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25542
Review URL: https://codereview.chromium.org/1632033002 .
2016-01-25 17:09:48 -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
fe7a48d6c7
Isse 25404. When remove a method during inlining, remove also leading empty lines.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25404
Review URL: https://codereview.chromium.org/1628623002 .
2016-01-22 19:40:38 -08:00
Konstantin Shcheglov
5237561075
Issue 25404. 'Inline Method' should update implicit 'this' and class references.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25404
Review URL: https://codereview.chromium.org/1629533003 .
2016-01-22 17:21:57 -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
Konstantin Shcheglov
9f451cb0dc
Issue 25538. Fix for type hierarchy and private class members.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25538
Review URL: https://codereview.chromium.org/1615093002 .
2016-01-21 10:56:05 -08:00
Konstantin Shcheglov
cba8d0d7c3
Issue 25538. Fix for 'analysis.implemented' notification and private members.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25538
Review URL: https://codereview.chromium.org/1615023002 .
2016-01-21 09:49:18 -08:00
Konstantin Shcheglov
5dc34340a1
Issue 25538. Fix for notification and private methods.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25538
Review URL: https://codereview.chromium.org/1610773003 .
2016-01-21 08:01:51 -08:00
Konstantin Shcheglov
53b2815ad8
Ignore 'expr is' outside of a statement.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1609883002 .
2016-01-19 13:20:38 -08:00
Brian Wilkerson
d8df717622
Add list length information to the status pages
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1588083003 .
2016-01-14 13:53:53 -08:00
Brian Slesinsky
730d962729
add an option to send the incremental resolver log to stderr
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1585563002 .
2016-01-13 12:55:13 -08:00
pq
6ead1c4359
HttpServer start async fix ( #25394 ).
...
Background: https://github.com/dart-lang/sdk/issues/25394 .
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1573343003 .
2016-01-12 10:22:49 -08:00
danrubel
2ae3026c43
add enableAsync to analysis option file flags
...
integrate enableAsync into analysis server
include enableAsync on context status page
update api spec to indicate that enableAsync is no longer deprecated
relys on landing https://codereview.chromium.org/1570183002/
fixes #25373
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1574523002 .
2016-01-08 20:48:07 -05:00
danrubel
465bae9b8c
null namespace check - fixes #25331
...
Review URL: https://codereview.chromium.org/1554153002 .
2016-01-08 15:54:16 -05:00
Konstantin Shcheglov
e1c6faceb5
Issue 25316. Quick Fix for removing 'final' keyword.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25316
Review URL: https://codereview.chromium.org/1545323002 .
2015-12-27 13:19:41 -08:00
Konstantin Shcheglov
78ae012d2d
Issue 25313. Skip constructor names and named expressions.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25313
Review URL: https://codereview.chromium.org/1547113002 .
2015-12-27 12:05:05 -08:00
Dan Rubel
e5bbeddf4d
completion performance measurement for local status page
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1536083002 .
2015-12-19 11:12:45 -05:00
Dan Rubel
43ee7b5bc9
move OpType into dart folder
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1523243006 .
2015-12-19 11:11:04 -05:00
Dan Rubel
99c3be6331
remove old completion API
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1536073002 .
2015-12-19 11:09:48 -05:00
Dan Rubel
48725225d3
stop caching state between completion requests
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1539943002 .
2015-12-18 10:53:16 -05:00
Dan Rubel
39d5abb662
remove internal streaming of results, remove obsolete test, cleanup unused code
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1538883003 .
2015-12-18 10:52:21 -05:00
Dan Rubel
1adabf4abc
remove extraneous classes and cleanup code
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1535643004 .
2015-12-18 08:53:39 -05:00
pq
1f8eddcc21
Cache element docs (and add to completions) [ #23694 ].
...
This does away with the expensive call to `computeDocumentationComment` in favor of cached comments. Notably this makes adding doc content to code completion proposals performant (and so is done here). It should also make `dartdoc` *much* faster for doc generation since there are no more trips to disk to fetch comments for elements (still needed for source though).
For more on the desire for docs in completions see here: https://github.com/dart-lang/sdk/issues/23694
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1534043002 .
2015-12-17 21:07:42 -08:00
Dan Rubel
fbaba56375
move DartCompletionSorter to dart specific contributor
...
consolidate common test code
remove duplicate test
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1539693002 .
2015-12-17 17:54:29 -05:00
Konstantin Shcheglov
e1455ce920
Stop using RESOLVED_UNIT_x for other libraries.
...
This makes analysis of a command line Hello World application about 20% faster.
Even before summaries :-)
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1531393002 .
2015-12-17 13:57:20 -08:00
Dan Rubel
4ee5173f42
move ReplacementRange into dart specific contributor
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1531383002 .
2015-12-17 16:24:49 -05:00
Dan Rubel
baf03ebdfe
merge completion suggestions based upon relevance
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1536823002 .
2015-12-17 16:22:40 -05:00
Dan Rubel
b3fa2629bf
remove CompletionCache and obsolete tests, and cleanup imports
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1533973002 .
2015-12-17 16:00:34 -05:00
Dan Rubel
661cd4e9b9
report invalid param if offset is out of bounds
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1531353002 .
2015-12-17 14:58:14 -05:00
Dan Rubel
5a8187987a
remove unused suggestion builder
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1537713002 .
2015-12-17 11:50:03 -05:00
Dan Rubel
5e128e2544
suggest IDENTIFIER not INVOCATION for dartdoc refs
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1530393004 .
2015-12-17 11:00:15 -05:00
Dan Rubel
6d5efd3175
remove unused DartCompletionCache
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1536683003 .
2015-12-17 10:58:49 -05:00
Dan Rubel
0c6fb170dc
Do not suggest loop variable when completing expression in ForEachStatement
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1534793002 .
2015-12-17 10:57:51 -05:00
Dan Rubel
0de484bb8b
convert ImportedReferenceContributor to new API
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1526303003 .
2015-12-16 21:17:27 -05:00
pq
0a32c6b290
Status page diagnostics for elements and docs.
...
Related to profiling the cost of storing element docs but the element counts themselves are generally interesting.
Background: https://github.com/dart-lang/sdk/issues/23694
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1537503002 .
2015-12-16 15:47:51 -08:00
Dan Rubel
3bf298760f
extract InheritedReferenceContributor from imported reference contributor
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1533613004 .
2015-12-16 16:20:53 -05:00