brianwilkerson@google.com
03ca35e01e
Fix for issue 22178
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//900683002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43422 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 19:30:30 +00:00
paulberry@google.com
a3e5ed3347
Add static type checking of "yield" statements to analyzer.
...
Also fix inference of the return type of generator function expressions.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//895113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43418 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 18:51:27 +00:00
brianwilkerson@google.com
25ea0e7ee0
Fix for issue 22245
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//896613003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43404 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 15:48:39 +00:00
paulberry@google.com
fe8ad3584f
Fix return type checking for generator functions.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//894063004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43403 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 15:43:21 +00:00
scheglov@google.com
61d844224e
Match body modifiers in incremental resolver.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//896573003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43371 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-02 23:23:09 +00:00
paulberry@google.com
bde433f33a
Report a compile-time error if async/sync/yield used as an identifier.
...
This error is only reported inside methods marked "async", "async*",
or "sync*".
BUG=dartbug.com/22206
R=scheglov@google.com
Review URL: https://codereview.chromium.org//890253003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43368 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-02 23:13:08 +00:00
paulberry@google.com
b40a5702b3
Fix async/await type checking in analyzer.
...
This required making the "async" library into TypeProvider so that we
can create Future<...> types when doing resolution and error/hint
checking.
BUG=21888,22053,22091,22092,22160,22164
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//898513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43361 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-02 20:58:37 +00:00
brianwilkerson@google.com
890c99238c
Make source be a target
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//882813007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43355 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-02 17:08:28 +00:00
brianwilkerson@google.com
cb6c16922f
Fix for issue 22052
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//881403002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43292 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 16:01:58 +00:00
brianwilkerson@google.com
fe471e8f02
Make test context more accurate
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//879373002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43246 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-28 17:11:38 +00:00
paulberry@google.com
ea333d8459
Fix mixin resolution order when multiple mixins present.
...
BUG=dartbug.com/22069
R=scheglov@google.com
Review URL: https://codereview.chromium.org//879093002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43224 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 23:41:21 +00:00
danrubel@google.com
151d7d98b4
fix warning
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//878203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43196 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 17:42:51 +00:00
paulberry@google.com
69f751fc6e
Fix warnings introduced in r43163.
...
TBR=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//875263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43164 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 00:14:07 +00:00
paulberry@google.com
7bf029506d
Fix "reanalyze sources" when there are unsaved files.
...
The analysis server now maintains a single content cache which is
shared by all contexts; this allows it to persist the content cache
across reanalysis (which destroys all contexts and recreates them from
scratch).
Two other bugs are fixed in the process:
- If a file is analyzed in multiple contexts, then editing it will
cause all affected contexts to be notified of the change. (Note
that this could potentially account for some other strange behaviors
we've seen recently, such as incorrect semantic highlighting and
lingering errors/warnings.)
- If the client supplies a ChangeContentOverlay for a file which
currently has no overlay, the proper error is generated.
I plan to submit tests for these two bugs in a follow-up CL.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//880643005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43163 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-26 23:26:45 +00:00
scheglov@google.com
2b8c66ea79
Rename ChangeNotice resolved Dart/Html unit fields.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//881463004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43147 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-26 19:58:19 +00:00
danrubel@google.com
899de62bbf
(TBR) fix test_performAnalysisTask_importedLibraryAdd_html test
...
BUG=
Review URL: https://codereview.chromium.org//872553003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43091 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-23 03:00:12 +00:00
danrubel@google.com
d284fef9db
cleanup unused imports
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//868803006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43086 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-22 22:41:51 +00:00
scheglov@google.com
23215e71f4
Remove Element.users support.
...
R=brianwilkerson@google.com , pquitslund@google.com
BUG=
Review URL: https://codereview.chromium.org//854363005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43032 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-21 00:48:02 +00:00
jwren@google.com
252c19c920
Addition of the new flag "file-read-mode" into the analysis server to fix the offset bug with IntelliJs integration.
...
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//857283003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43028 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-20 21:48:00 +00:00
pquitslund@google.com
e20c2167a3
Linter API updates.
...
(A trimmed down version of: https://codereview.chromium.org//853123002 in a hopes of not unsettling the build.)
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//850343006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43023 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-20 19:38:14 +00:00
scheglov@google.com
fd6cef8a8b
Don't perform incremental resolution if curly brackets are not balanced.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//834383005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43022 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-20 19:28:12 +00:00
whesse@google.com
3a7594b9fe
Revert "Lint contribution refactoring.", r42967
...
This reverts commit r42967, https://codereview.chromium.org//853123002 .
The change causes an out-of-memory crash in analyzer batch mode, perhaps
a memory leak.
BUG=
R=ricow@google.com
Review URL: https://codereview.chromium.org//834323006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42979 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-19 09:26:45 +00:00
pquitslund@google.com
9b132e1032
Lint contribution refactoring.
...
A little shuffle to centralize the linter concern (and reduce the need to touch resolver.dart).
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//853123002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42967 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 18:29:41 +00:00
pquitslund@google.com
807a4fa8fa
Delegating AST Visitor and Linter refactoring.
...
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//813483007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42923 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 18:09:42 +00:00
jwren@google.com
8a495697e6
Move the class TypeTestProvider from the test directory into the lib directory so that other tools can use the class and other tools such as the ElementFactory which require a TypeProvider
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//853553005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42855 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 06:59:51 +00:00
scheglov@google.com
036b652dd1
Use all library units for hints during incremental resolution.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//818173003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42846 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 23:23:20 +00:00
scheglov@google.com
20e0b4b556
Match some constructor-based annotations.
...
It doesn't validate argments (we don't have them in annotation, and even if we had,
it is still not cheap to compare nodes with values, but we could remember source
strings, as we do for default parameter values), but it should not cause
invalid resolution, because we resolve incrementally only changes in methods bodies.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//847173002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42822 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:13:43 +00:00
scheglov@google.com
a38a503d86
Replace @ReflectiveTestCase() with @reflectiveTest.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//849863002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42821 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:11:24 +00:00
scheglov@google.com
3975cf30d0
Issue 22044. A changes in annotations should be considered as a mismatch.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22044
Review URL: https://codereview.chromium.org//832143007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42783 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 17:52:55 +00:00
pquitslund@google.com
e908f30d46
Pluggable lint verifiers first step and basic lint task tests.
...
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//848463003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42778 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 16:44:57 +00:00
scheglov@google.com
83ca7d2f30
Update errors offsets during incremental comment resolution.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//844063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42758 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 22:33:08 +00:00
scheglov@google.com
f9172b8c4c
Validate incremental resolutions results if requested.
...
It works by performing incremental resolution, remembering its results and
then pretending that incremental resolution did not happen. Later, after
the full resolution, we compare "full" result with the incremental one.
If there is a problem, it is sent to the instrumentation.
R=brianwilkerson@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//839913002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42710 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 18:57:23 +00:00
scheglov@google.com
11b1c09a10
Remove the Polymer support from the analyzer and analysis_server packages.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//830893003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42709 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 18:43:13 +00:00
pquitslund@google.com
eb6aac77be
Lint cleanup.
...
Missed an override in tests; incomplete refactoring of severity.
R=paulberry@google.com
Review URL: https://codereview.chromium.org//843583003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42706 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 17:55:19 +00:00
brianwilkerson@google.com
dd306dc9eb
Enable enum and deferred import support
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//829133007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42704 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 17:51:49 +00:00
scheglov@google.com
4fe7a9dd3e
Remove Angular support from the analyzer and analysis_server packages.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//844593003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42697 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 16:04:17 +00:00
brianwilkerson@google.com
54df418597
Enable async support
...
R=danrubel@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//842503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42666 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 16:51:14 +00:00
scheglov@google.com
030594b353
Disable type propagation for class/top-level fields.
...
It was added initially in https://codereview.chromium.org/300033008/
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//837063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42647 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 22:13:55 +00:00
scheglov@google.com
07ff6d4a45
Move incremental resolution validator into the analysis engine.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//842433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42642 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 19:05:27 +00:00
scheglov@google.com
e83d560f8d
Issue 21842. Fix for incremental resolution of function expressions in top-level variables.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21842
Review URL: https://codereview.chromium.org//836763002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42600 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 17:32:01 +00:00
scheglov@google.com
232504e215
Incrementally resolve users of a changed method.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//814533005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42515 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 17:42:12 +00:00
paulberry@google.com
2546490ed5
Ensure that AnalysisContext futures are completed when context disposed.
...
It's possible for the analysis server to create or destroy contexts in
the background while the user is working (as a result of changes on
the filesystem). This ensures that if any code completions are
waiting for analysis when that happens, they are aborted.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//807993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42416 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 23:41:56 +00:00
paulberry@google.com
3448724d3a
Improve nomenclature of new AnalysisContext async method.
...
R=danrubel@google.com
Review URL: https://codereview.chromium.org//809793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42404 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 18:05:02 +00:00
scheglov@google.com
bc3d00456b
Issue 21886. Make enums available outside of the defining library.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21886
Review URL: https://codereview.chromium.org//809763002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42403 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 17:33:13 +00:00
brianwilkerson@google.com
cbe501644b
Fix for issue 21771
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//810843002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42402 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 17:27:09 +00:00
paulberry@google.com
d2f11b6c44
Make futures returned by AnalysisContext cancelable.
...
R=brianwilkerson@google.com , danrubel@google.com
Review URL: https://codereview.chromium.org//806733003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42400 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 17:01:22 +00:00
paulberry@google.com
0b9ed18603
Allow completions to wait for analysis without requiring a busy wait loop.
...
Two new methods are added to the AnalysisContext which return
Futures--the futures complete with the result of analysis once it's
available, avoiding the need for a busy wait loop in the completion engine.
The futures are guaranteed to complete eventually (provided that
analysis reaches quiescence). If it is determined that the requested
analysis will never become available (e.g. because analysis was
requested for a file or file/library combination that is not subject
to analysis), the future will be completed with an
AnalysisNotScheduledError, so that the client isn't stalled forever
waiting for analysis results.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//800723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42339 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-12 18:22:34 +00:00
scheglov@google.com
085afe65ee
Issue 21850. Fix for incremental resolving field formal parameters.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21850
Review URL: https://codereview.chromium.org//799993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42325 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-12 16:42:43 +00:00
scheglov@google.com
958a1338e1
Issue 21842. Fix incremental resolving of parameters of function typed parameters.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21842
Review URL: https://codereview.chromium.org//794863003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42277 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-11 05:21:05 +00:00
brianwilkerson@google.com
f58bf4dbc9
Remove old instrumentation
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//784623004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42267 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 21:53:08 +00:00