Konstantin Shcheglov
4ec1f2bfb9
Cache library closure hashes and absolute URIs.
...
Remove the concrete CacheStorage implementation (will add it to
analyzer_cli later).
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1818823005 .
2016-03-21 14:03:56 -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
pq
9c3378d56a
Conditional AST timing.
...
Only time AST visitors if `enableTiming` is set.
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1820473002 .
2016-03-18 12:58:51 -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
6eb900838b
Prepare for turning on SDK summaries in Analysis Server.
...
1. Move plugins registering before SDK creation so that when SDK
creates AnalysisContext and initializes EnginePlugin, all tasks are
already registered.
2. Provide additional results which are used by the strong mode.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1814723002 .
2016-03-17 08:37:53 -07:00
Brian Wilkerson
74c609c265
Fix and mark a class as deprecated
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1814663002 .
2016-03-16 17:09:31 -07:00
Brian Wilkerson
807fb53162
Improve debugging message (issue 26008)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1805413004 .
2016-03-16 13:32:12 -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
Brian Wilkerson
9b0fcd3a39
Remove more calls to safelyVisit methods
...
checkpoint
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1814453002 .
2016-03-16 11:25:38 -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
9f938ea923
Replace '_safelyVisitChild' with 'target?.accept()' in AST visiting.
...
In hot VM this makes analysis about 5% faster.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1808803003 .
2016-03-16 10:33:49 -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
Brian Wilkerson
e8a79c4f91
Remove bad URI (issue 25596)
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1806843003 .
2016-03-16 08:56:02 -07:00
Bob Nystrom
1c6d6fbb7a
Get rid of Coercion and Cast.
...
Now that there is only one kind of cast, a downcast, the extra types
are no longer needed. This will require a few tweaks in DDC when it
upgrades to this version of analyzer, but I think they're minor.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1804273003 .
2016-03-15 16:19:17 -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
Konstantin Shcheglov
599cdb6279
Check whether we have a result instead of throwing an exception in NodeLocator.
...
This makes analysis about 10% faster. Probably more for strong mode,
which searches for VariableElement declaration nodes more often.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1805123002 .
2016-03-15 12:47:20 -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
99517a162c
Make ElementLocationImpl.hashCode SMI, improve performance.
...
This makes Analyzer + Analysis Server analysis 6% faster.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1805613002 .
2016-03-15 11:52:49 -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
8c9cbdcae1
Improve error messages containing named function types and clean up some duplicated code (issue 25988)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1795233002 .
2016-03-13 11:38:54 -07:00
Brian Wilkerson
a4552ca501
Mark some unused code as being deprecated
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1788303002 .
2016-03-13 09:20:45 -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
Brian Wilkerson
93aa6f1ecf
Deprecate the generated element library and clean up imports
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1789233002 .
2016-03-12 09:13:44 -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
Brian Wilkerson
4f4eb824d4
Add more debugging code
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1787623005 .
2016-03-11 11:05:04 -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