scheglov@google.com
3c49c97afc
Task: Build Enum Member Elements.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1009693002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44494 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-15 19:19:50 +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
scheglov@google.com
9d05d623ec
Use AnalysisDriver to run task tests.
...
It's much more concise now.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1007993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44482 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 21:58:14 +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
4dac0013c0
Fix hints
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1008583002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44447 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 21:58:22 +00:00
scheglov@google.com
adc6b6c4fa
Rename ListToX inputs.
...
Also harder the GenerateTaskInputs interface.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1000203004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44446 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 21:57:30 +00:00
scheglov@google.com
9e69ee59f5
Use Map.addAll() where possible in the resolver.
...
I accidentally bumped into it and found out that Map.addAll() was added since the (first?) translation.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//996053003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44442 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 21:38:21 +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
scheglov@google.com
2679bf65d5
Add MapBasedTaskInput.
...
I found out that I'm blocked by its absence.
To resolve directives (actually to report errors) I need to know source kinds.
And the only way to get the SourceKind of a Source is to request a Map-based input.
If you have already implemented it yourself, feel free to upload your CL instead.
I'm not too much attached to this implementation :-)
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//997383002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44429 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 15:11:42 +00:00
brianwilkerson@google.com
a839a34199
Deprecate utility method
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1000873002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44428 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 14:39:54 +00:00
brianwilkerson@google.com
b75e60037c
Comment clean-up in sdk model
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1004543003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44420 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 03:44:02 +00:00
brianwilkerson@google.com
9ee8b81bf1
Another pass over scanner comments
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//999913002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44414 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 21:18:42 +00:00
scheglov@google.com
40dea00f27
Task: Build Public Namespace.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//998053002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44413 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 21:02:55 +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
scheglov@google.com
fb848271cd
Add FunctionElement.isEntryPoint getter.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//997203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44407 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 17:21:12 +00:00
scheglov@google.com
e834e4194f
Task: Build Library Element Model
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//994293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44406 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 16:57:13 +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
paulberry@google.com
f8a99cde53
Don't suppress error/warning output for package being analyzed.
...
BUG=dartbug.com/22761
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//987413003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44385 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 21:48:49 +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
brianwilkerson@google.com
c729e56d66
Clean up parser comments
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//995003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44374 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 15:33:45 +00:00
jwren@google.com
dbcce3568e
Fix for dartbug.com/22656- analysis.flushedResults implementation.
...
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//987143002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44373 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 14:54:00 +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
a75e87a430
Fix introduced bug
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//979193004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44341 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 20:22:10 +00:00
brianwilkerson@google.com
3d9ce7e534
Fix for issue 22709
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//993633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44338 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 19:18:00 +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
brianwilkerson@google.com
2bff66aa0f
Clean up comments in error support
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//990793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44321 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 14:48:29 +00:00
brianwilkerson@google.com
e2cc65949f
Clean up doc comments
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//989883002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44312 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-08 15:25:20 +00:00
scheglov@google.com
24c14e7f2e
Test for GetContentTask.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//988993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44310 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-07 17:25:18 +00:00
scheglov@google.com
5b19f0a625
Add CacheEntry.setErrorState().
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//988883004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44309 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-07 17:01:26 +00:00
brianwilkerson@google.com
fafa5d79c7
Convert content cache to use file paths
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//983183003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44300 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 19:22:44 +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
dc30f2b718
Fix location of error (issue 22383)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//987553003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44273 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 23:00:48 +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
brianwilkerson@google.com
d1ac25879b
First cut at analysis driver
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//913483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44199 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 21:24:25 +00:00
paulberry@google.com
32d7905797
Fully parse SDK files when analyzing in batch mode.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//973683004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44196 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 19:47:08 +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
scheglov@google.com
420a079f3e
Discard previous overlay content on _sourceChanged() notification.
...
This fixes the following scenario:
1. Edit a file.
Server adds overlay.
2. Save a file.
Editor save the file buffer to disk.
Editor asks to remove the overlay.
Server remove the overlay.
Engine checks that the previous overlay content is the same as the file content and remembers this content in the LRU cache.
3. Server receives a file system modification event.
Engine starts processing the change and ignores it in _sourceChanged() because the previous overlay content is the save.
But it keeps this content in the cache!
4. User switches to another branche, so the file is change.
Server receives a file system modification event.
Engine sees that the content of the file is not the same as the content in the previous overlay and performs full analysis.
5. User switches back to the original branch.
Server receives a file system modification event.
Engine in _sourceChanged() ignore the change, because it is the same as it was before!
So, we need to clear the previous overlay cache once we use it.
Therefore we can just put it into the SourceEntry itself.
This also simplifies the cache management - we don't need another way to remove elements on change, or a file removal.
The only situation when we might keep content longer than required is in the following scenario:
1. User makes a change, adds an overlay.
2. User makes a change that restores initial content.
3. Editor asks the server to remove the overlay.
Practially however Editor keep the file dirty in this case.
So, user will save the file eventully and we will remove the cached previous content from the entry.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//968533003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44116 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-01 18:47:25 +00:00
scheglov@google.com
90d58d1b50
Use node accessors to check for const/final/etc.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//960093004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44114 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-28 06:28:19 +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