rnystrom@google.com
aea99bdfa1
Remove the old formatter from analyzer.
...
BUG=https://code.google.com/p/dart/issues/detail?id=22401
R=brianwilkerson@google.com , pquitslund@google.com
Review URL: https://codereview.chromium.org//1001403002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44522 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-16 20:03:33 +00:00
scheglov@google.com
ef2a41217d
Add NOT_INITIALIZED_FIELDS property for FINAL_NOT_INITIALIZED_CONSTRUCTOR_X.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1004793003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44511 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-16 17:49:19 +00:00
scheglov@google.com
384b8ce7f1
Compute TYPE_PROVIDER using BuildTypeProviderTask.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1009033002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44492 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-14 03:10:48 +00:00
brianwilkerson@google.com
2fe598c6ea
Fix line info for multi-line strings (issue 22794)
...
R=pquitslund@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//1000913004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44481 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 21:54:16 +00:00
brianwilkerson@google.com
01dadf8285
Provide value for values field in enums (issue 22722)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1007013003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44479 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 21:47:37 +00:00
brianwilkerson@google.com
3b922a53ac
Correctly compute whether a class subclasses Function (issue 22805)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1001063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44439 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 19:01:16 +00:00
scheglov@google.com
11f6cd218c
Task: Build Directive Elements.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1008433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44436 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 18:27:46 +00:00
brianwilkerson@google.com
0a35aec78f
Fix type promotion (issue 22732)
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//991033002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44410 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 18:01:25 +00:00
paulberry@google.com
29c0fb7cd6
Add an analyzer option to properly check ".call" methods.
...
Enabling this option fixes issue 21938. For now the option is
disabled by default, since there is a lot of code in the dart SDK (and
in third_party) that isn't warning clean with this option enabled.
Once the SDK and third_party code have been cleaned up, we should be
able to turn this option on permanently.
BUG=dartbug.com/21938
R=scheglov@google.com
Review URL: https://codereview.chromium.org//994253002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44390 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 00:35:31 +00:00
scheglov@google.com
9f3ff6a1a7
Fix for matching field formal parameters.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//995853002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44381 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 17:36:56 +00:00
paulberry@google.com
cf991d72b6
Add missing overrides to AnalysisContext-derived classes.
...
TBR=jwren@google.com
Review URL: https://codereview.chromium.org//980073007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44378 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 16:30:31 +00:00
scheglov@google.com
d81d792c14
Implement 'node' for ClassElement and FieldElement for enums.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//987263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44356 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 03:07:05 +00:00
brianwilkerson@google.com
d954183441
Change all sources associated with changed files (issue 22680)
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//981283003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44335 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 18:28:21 +00:00
scheglov@google.com
cf2f5bc3f5
Disable incremental resolution of comments outside function bodies.
...
It causes disappearing of semantic highlighting and navigation for the first
node after a just added comment.
Unfortunately there is no easy way to add/remove comment tokens.
We can replace tokens, but we need also to replace tokens in nodes.
Given that we are in a cherry picking season, let's implement the simplest correct solution.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22644
Review URL: https://codereview.chromium.org//982243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44295 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 16:53:24 +00:00
brianwilkerson@google.com
ab1d3ad17c
Better recovery (issue 22693)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//987633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44290 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 14:11:24 +00:00
brianwilkerson@google.com
9004e91fec
No errors in third-party packages (issue 22170)
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//983733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44270 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 20:17:24 +00:00
scheglov@google.com
7d95442c32
Expose 'typeProvider' from AnalysisContext.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//965393004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44245 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-04 19:09:27 +00:00
scheglov@google.com
2ee5ca1091
Issue 22644. Fix for removing non-Dartdoc comments before a declaration.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22644
Review URL: https://codereview.chromium.org//980513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44237 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-04 14:42:23 +00:00
paulberry@google.com
c867649e4a
Don't define parameters when visiting a function-typed formal parameter.
...
BUG=dartbug.com/13179
R=scheglov@google.com
Review URL: https://codereview.chromium.org//978633003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44212 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-04 00:39:14 +00:00
scheglov@google.com
cbfec08aa9
Replace using unconditional _recordPropagatedType() with a conditional _recordPropagatedTypeIfBetter().
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//974033002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44204 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 22:06:00 +00:00
scheglov@google.com
2112b929ca
Don't set a propagate type if the variable has already the same static type.
...
This fixes displaying both "Static type" and "Propagated type" sections in UI.
Maybe also some performance improvement because of avoiding resolving propagated elements.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//971193003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44184 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 17:39:02 +00:00
brianwilkerson@google.com
98b7382071
Reformat
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//975453004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44149 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 21:34:46 +00:00
paulberry@google.com
7f13f31ab0
Avoid unnecessary parsing/resolution when running command line analyzer.
...
By default, the command-line analyzer doesn't show errors, warnings,
or hints for the SDK or for files imported via "package:" URI's.
Accordingly, it shouldn't be necessary to parse or resolve function
bodies in those files.
This can save a substantial amount of time when analyzing files that
are part of large applications. For example, analysis time of
pkg/analyzer/bin/anaylzer.dart goes down from ~6.5 seconds to ~3.5
seconds.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//967703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44143 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 19:38:44 +00:00
brianwilkerson@google.com
268cd8bab2
API clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//970913002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44134 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 17:28:37 +00:00
brianwilkerson@google.com
05b314197e
Fix for issue 22594
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//965093003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44113 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-28 04:31:48 +00:00
scheglov@google.com
1a7ac64ae2
Don't remove indexing operations on potential source changes.
...
This covers the following scenario:
1. User performs an undo operation in a save editor.
2. Editor updates the file buffer, so sends 'add overlay'.
Server performs an incremental analysis and schedules an 'analyze' operation.
3. The 'analyze' operation runs and schedules 'index' operation.
4. Editor saves the file buffer.
Editor sends 'remove overlay command'.
Server removes all the scheduled notification and index operations for the file.
Server notices that there is no real change for the file, so the is nothing to do.
But it still reschedules notifications, because the client might have lost some information.
5. Notifications are resent, but indexing is not performed.
So, the solution is to reschedule indexing operation.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//958373003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44111 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-28 01:34:56 +00:00
paulberry@google.com
c2640607ca
Fix "unimplemented method" warnings introduced by r44071.
...
TBR=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//966513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44081 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 23:19:24 +00:00
brianwilkerson@google.com
54bf758021
Fix issue 22525
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//950613003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43960 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 16:16:49 +00:00
sigmund@google.com
f2ccdbd73d
Minor changes in analyzer to make it easier to extend
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//924943010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43934 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 22:23:27 +00:00
paulberry@google.com
c845e7cd9a
Change equality comparison for FileBasedSource to use URI.
...
Previously, we considered two FileBasedSources to be equal if they
referred to the same file. As a result, if a given file was
accessible via multiple URI's, only one cache entry would be created
for the file and we would only resolve it once; the elements created
by resolution would be nondeterministic, they would refer to the file
via whatever source happened to be used to analyze it first. Worse
yet, incremental analysis might cause some of the elements in the file
to later be replaced by elements that would refer to the file via a
different source, resulting in confusing errors.
BUG=dartbug.com/22030
R=scheglov@google.com
Review URL: https://codereview.chromium.org//944493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43888 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 19:15:50 +00:00
scheglov@google.com
4e7ecb1103
Issue 22409. Restore recognizing string concatenation in const expressions.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22409
https://code.google.com/p/dart/issues/detail?id=21000
Review URL: https://codereview.chromium.org//940853002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43879 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 15:35:54 +00:00
brianwilkerson@google.com
0e73ada9c2
Use package: URIs for files in lib
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//914373004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43827 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 22:47:34 +00:00
scheglov@google.com
d305f5225d
Constant top-level variables should not have setters.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//930703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43793 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 05:36:13 +00:00
zra@google.com
74245deeac
Adds a repeatable --url_mapping flag to dartanalyzer
...
If a Dart file does an import that is 'strange', this flag
allows the imported URI to be understood by the analyzer
so long as an explicit mapping of the URI to an absolute
path to a .dart file is supplied with this flag.
For example, a custom embedding of the Dart VM may refer
to non-SDK libraries through its own URI scheme, e.g.
import 'strange:things';
With the flag and Uri resolver added in this CL, the
analyzer can find the Dart source for 'strange:things':
dartanalyzer ... --url_mapping 'strange:things,/path/to/strange/things.dart'
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//897593005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43788 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-14 07:19:15 +00:00
brianwilkerson@google.com
d7a69a2912
Flush entries for unreferenced sources
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//924563002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43730 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 17:50:40 +00:00
scheglov@google.com
303d94e89d
Add SourceEntry.CONTENT_ERRORS data descriptor.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//914283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43698 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 21:04:18 +00:00
scheglov@google.com
84655a3ad3
Report an error on Dart Source reading exception.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//909373003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43694 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 18:22:27 +00:00
scheglov@google.com
9aaa9a6a99
Use ExitDetector.exists(node).
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//912023002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43668 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 20:46:47 +00:00
paulberry@google.com
acaed71dba
Clean up analyzer and analysis server hints.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//908283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43667 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 20:40:26 +00:00
paulberry@google.com
6a869d5e34
Fix inference of the static type of an async function literal.
...
This implements the spec change currently under review here:
https://codereview.chromium.org/902703003
R=scheglov@google.com
Review URL: https://codereview.chromium.org//905293003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43613 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 21:21:36 +00:00
scheglov@google.com
d7a2309a92
Fix for incremental resolution in case of inserting a new token into elegant comments.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//913573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43607 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 19:12:04 +00:00
brianwilkerson@google.com
d682527d1e
Fix a stack overflow
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//908603002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43559 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 18:00:16 +00:00
paulberry@google.com
cb0f691bb6
Fix analyzer type checking of "await" expressions.
...
This requires implementing the "flatten()" rule defined in the spec;
this rule also needs to be applied to static type checking of return
types in async functions.
BUG=dartbug.com/22291, dartbug.com/22293
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//904743003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43537 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 03:32:57 +00:00
scheglov@google.com
3713a9eed7
Invalidate hints instead of computing them in the incremental resolver.
...
So, we don't need to prepare all the library parts before incremental resolution.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//901713004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43526 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 22:06:48 +00:00
scheglov@google.com
ae2e608ff9
Send notificatinos after no-op changes.
...
This should solve the problem when client remove some part of the code,
so removes also error markers for it, and then quickly restores it,
so for the server it looks as an empty/no-op change. But information is
lost, and the server should resend it to the client.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//899753004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43521 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 20:42:17 +00:00
brianwilkerson@google.com
c7cb9dd4e8
Fix for issue 22110
...
R=jwren@google.com
Review URL: https://codereview.chromium.org//885283007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43453 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 01:16:57 +00:00
paulberry@google.com
d0b87e247c
Implement new "yield*" type checking rules in analyzer.
...
This updates analyzer to reflect the new static type checking rules
for yield each added in r43420.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//888943004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43446 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 23:13:09 +00:00
jwren@google.com
032115ecf3
NPE fix in ExitDetector visitor- in analyzer pkg
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//894453003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43440 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 22:15:18 +00:00
paulberry@google.com
3c315ba0bb
Implement new return type checking rules in analyzer.
...
This updates the analyzer to reflect the new static type checking
rules for return types added in r43420.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//897673003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43427 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 21:25:12 +00:00
paulberry@google.com
2cd86b7e29
Add static type checking of "yield*" statements to analyzer.
...
This does not include the new static typing rules that were introduced
in revision 43420. I will address those in a later CL.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//895673005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43424 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 20:32:14 +00:00