Leaf Petersen
77ee054678
Allow values to be returned from implicitly typed function bodied setters.
...
BUG=
R=rnystrom@google.com
Review URL: https://codereview.chromium.org/1827243003 .
2016-03-25 09:55:56 -07:00
Konstantin Shcheglov
d3dcf5b40c
Add tests for summarizing / resynthesizing using only AST.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1833823002 .
2016-03-24 22:45:56 -07:00
Konstantin Shcheglov
01b80afb83
Use AbstractSingleUnitTest, so MockSdk in resynthesize tests.
...
When we prelink AST based summaries we need to be able to read
referenced sources. So, mock SDK element model is not enough. Plus it
was quite a lot of work in the past to fix this mock element model to
provide all the data we expect from it during summarizing.
One of the negative effects is increasing analysis time from 26 to 34
seconds. We can try to implement sharing SDK between tests later.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1827293002 .
2016-03-24 16:59:35 -07:00
Paul Berry
ea189bd6dc
Add a fallback mode for building summaries.
...
When summaries are built in fallback mode, the only information stored
in the package bundle is (a) which libraries appear in the bundle, and
(b) where the source files can be found on disk. This is enough
information so that DDC will still be able to tell how libraries are
grouped into build units, but otherwise summary functionality is
disabled.
This is intended to be availadle as a temporary workaround so that if
a bug is found in the summary infrastructure, it won't prevent DDC
compilation from working (it will just make it slower).
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1826353002 .
2016-03-24 13:47:37 -07:00
Konstantin Shcheglov
c1f3689736
Resynthesize _DeferredClassElement instead of actual ClassElementImpl.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1833743002 .
2016-03-24 12:56:46 -07:00
John Messerly
09f6f7d7fc
expose InSummarySource with its summaryPath
...
This mechanism is to let DDC in "build mode" easily know which imports come from summaries and which summary file it came from.
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1831563002 .
2016-03-23 17:34:22 -07:00
Konstantin Shcheglov
d097a6e1cd
Allow Analysis Server crawl up the folders to search .analysis_options file.
...
R=brianwilkerson@google.com , jwren@google.com , pquitslund@google.com
BUG=
Review URL: https://codereview.chromium.org/1832643002 .
2016-03-23 17:09:48 -07:00
Bob Nystrom
c55e9ef20b
Use GLB for function parameters when doing LUB in strong mode.
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1807213005 .
2016-03-23 13:50:49 -07:00
Konstantin Shcheglov
c675ba270f
Pass AnalysisOptions into SdkCreator, disable changing afterwards.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1830703002 .
2016-03-23 13:11:49 -07:00
Konstantin Shcheglov
df5ca73f45
Fix for searching LocalVariableElement of DeclaredIdentifier.
...
This fixes rename refactoring of such local variables.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1828793002 .
2016-03-23 12:14:31 -07:00
Konstantin Shcheglov
5e4218b754
Issue 26063. Index declarations in even partically analyzed units.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26063
Review URL: https://codereview.chromium.org/1829463002 .
2016-03-22 17:24:17 -07:00
Bob Nystrom
bf4765009a
Better casting of for-in loops.
...
Generate a cast for each element, so that code like this can be
handled correctly:
for (String s in <dynamic>["a", "b", "c"]) { ... }
Fixes #25916 .
R=vsm@google.com
Review URL: https://codereview.chromium.org/1823793002 .
2016-03-21 16:37:29 -07:00
Konstantin Shcheglov
5e9a068c57
Return complete closure bundles from IncrementalCache.
...
Resynthesizer requires to be ready to provide information about any
library in the closure, so we need to get all or nothing from the
cache.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1815393002 .
2016-03-21 10:28:43 -07:00
Konstantin Shcheglov
0f64fcdd6f
Issue 26051. Fix for MethodDeclartion.beginToken for external.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26051
Review URL: https://codereview.chromium.org/1820743002 .
2016-03-20 15:21:03 -07:00
Konstantin Shcheglov
97759f471c
Issue 26044. Cache and use LibraryElementImpl.exportNamespace.
...
This makes Flutter analysis 20% faster.
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/26044
Review URL: https://codereview.chromium.org/1821543002 .
2016-03-20 15:16:58 -07:00
Brian Wilkerson
5a310a1684
Move constant implementation out of generated
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1816923002 .
2016-03-20 15:07:49 -07:00
Konstantin Shcheglov
fb5c63d00c
Extract CacheStorage and renames.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1816693002 .
2016-03-18 13:41:01 -07:00
Konstantin Shcheglov
8f265d90f0
Add source kind to the incremental cache.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1814013004 .
2016-03-18 12:41:39 -07:00
Brian Wilkerson
05a72c6df1
Fix another unguarded cast to an impl class (issue 26034, case 2)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1815253002 .
2016-03-18 09:55:19 -07:00
Brian Wilkerson
e0a3c4e847
Fix unguarded cast to an impl class (issue 26035)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1810393002 .
2016-03-18 09:06:55 -07:00
Konstantin Shcheglov
11cb887fe2
Issue 26034#3. Fix for indexing references to synthetic fields.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26034
Review URL: https://codereview.chromium.org/1816583002 .
2016-03-18 08:58:21 -07:00
Brian Wilkerson
5309d86424
First batch of changes to make analyzer package strong mode error free
...
Review URL: https://codereview.chromium.org/1808123005 .
2016-03-18 07:47:58 -07:00
Brian Wilkerson
50c9131702
Move DartObject into the public API
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1809013003 .
2016-03-18 07:41:58 -07:00
Konstantin Shcheglov
132a13977b
Initial LibraryBundleCache implementation.
...
For now the cache is very conservative and considers and change of any
source in the closure as a reason to invalidate the bundle. I don't
know whether caching Pub packages information would require less
conservative implementation or not.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1807673006 .
2016-03-17 20:10:18 -07:00
Bob Nystrom
a602585097
Don't upgrade the severity of *everything* to an error in strong mode.
...
Oops!
Fixes #26026 .
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1813973002 .
2016-03-17 12:58:18 -07:00
Konstantin Shcheglov
561f6f5bed
Add File.renameSync() to virtual file system.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1808213004 .
2016-03-17 12:50:21 -07:00
Konstantin Shcheglov
4ad0bac4c7
Don't index library identifiers.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1809823002 .
2016-03-16 12:15:29 -07:00
Konstantin Shcheglov
45711829f6
Add File.readAsBytesSync/writeAsBytesSync() methods.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1811643002 .
2016-03-16 11:21:59 -07:00
Konstantin Shcheglov
2a4dbe248c
AnalysisDriver.createWorkOrderForResult() should check AnalysisContext.aboutToComputeResult() first.
...
So, if there is a result provider, it will be asked for root results,
such as DART_ERRORS or LIBRARY_ELEMENT too.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1806563003 .
2016-03-16 09:20:43 -07:00
pq
9a042501c9
Timing hooks to profile linters ( #24548 ).
...
Adds a `TimedAstVisitor` that wraps and times base visitors. The perf hit for collecting timing was neglible so I opted to NOT surface a way to not collect the data. We can add that if needed.
Once this is published in a new analyzer, I can bake client support into (for example) the linter.
More context and a client mock here: https://github.com/dart-lang/sdk/issues/24548
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1807723002 .
2016-03-15 16:10:35 -07:00
Bob Nystrom
2ef00b0c3d
Don't report redundant type errors in strong mode.
...
Currently, "sideways casts" -- type errors where one type is assigned
to an unrelated type -- are reported by both ErrorVerifier and strong
mode's Checker. This leads to duplicate errors that the user can see.
ErrorVerifier's errors are generally better: they give the user more
contextual information and are easier to read. So this CL eliminates
Checker's reporting of these errors and only uses ErrorVerifier's.
However, in strong mode, type errors like this are fatal: DDC can't
generate correct code. So this also automatically upgrades all static
type warnings to errors when strong mode is enabled.
R=brianwilkerson@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1780783002 .
2016-03-15 12:14:11 -07:00
Konstantin Shcheglov
e66dfae975
Don't attempt to record DynamicElementImpl references.
...
This has a very slight index performance improvement (about 1%) because
now we don't have to throw StateError when we cannot find the enclosing
CompilationUnitElement for 'dynamic'. Depends on the code base of course.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1797343002 .
2016-03-15 11:01:40 -07:00
Konstantin Shcheglov
8398960fb1
Fix visible range of local variables in 'for' loops.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1798223002 .
2016-03-14 14:43:15 -07:00
Brian Wilkerson
ee44fb782b
Guard against parameters with no types (issue 25692)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1801903002 .
2016-03-14 13:30:57 -07:00
Brian Wilkerson
04386592a7
Added tests; improved test output; code clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1798993003 .
2016-03-14 10:34:11 -07:00
Brian Wilkerson
004f45eba7
Warn about deprecated fields (issue 22963)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1797583003 .
2016-03-13 16:51:00 -07:00
Brian Wilkerson
d779eee74c
Stop reporting use of deprecated members from within deprecated members (issue 25966)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1797593003 .
2016-03-13 13:57:36 -07:00
Brian Wilkerson
4978bd6ac9
Move ResolutionCopier out of generated
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1791953002 .
2016-03-12 10:52:42 -08:00
Konstantin Shcheglov
936722402d
Fix for indexing synthetic enum fields.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1791493003 .
2016-03-12 08:54:22 -08:00
Brian Wilkerson
7d72c6e1f5
Deprecate the generated AST library and clean up imports
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1788223002 .
2016-03-12 08:50:48 -08:00
Konstantin Shcheglov
222a11c290
Index unqualified unresolved used names.
...
This fixes one of the previously disabled tests.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1788673004 .
2016-03-11 15:10:43 -08:00
pq
549b20db7b
Option support for enableStrictCallChecks ( #25983 )
...
https://github.com/dart-lang/sdk/issues/25983
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1789633004 .
2016-03-11 14:48:29 -08:00
Konstantin Shcheglov
c4c92c1f8d
Use specialized _FbUint8List and Uint8ListReader.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1792523002 .
2016-03-11 14:44:27 -08:00
Konstantin Shcheglov
80ba458598
Fix for indexing synthetic getter/setter references.
...
Also a copy/paste mistake :-(
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1786023005 .
2016-03-11 11:25:06 -08:00
Konstantin Shcheglov
1040188769
Index synthetic top-level variable and 'loadLibrary' references.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1789663003 .
2016-03-11 10:43:53 -08:00
Konstantin Shcheglov
30c49a0eab
Improve used name relations and fields indexing.
...
I'm in the process of switching Analysis Server to the new index and
found that we need these changes to make search tests pass.
Refactorings don't need to know whether names are read or written,
but users might (or might not) want to know this.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1787803003 .
2016-03-11 10:42:01 -08:00
Konstantin Shcheglov
4e8e1e2e04
Improve search for constructors and import elements.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1778363003 .
2016-03-10 14:57:42 -08:00
Konstantin Shcheglov
5271cd3259
Fix for indexing synthetic elements.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1779233002 .
2016-03-10 10:57:08 -08:00
Brian Wilkerson
1a455bcb9d
Move element handles out of generated
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1780883002 .
2016-03-10 07:40:33 -08:00
danrubel
d26d023ce7
update tests for execution on windows
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1774623006 .
2016-03-09 22:33:35 -05:00