Konstantin Shcheglov
1bdee25bdf
Revert "Do nothing if [changeFile] reported, but the file content is the same."
...
This reverts commit 1ffda5601b .
There is a bug with reporting changeFile() twice, first time the change
be noticed and the file content hash updated. But the second time the
content hash is the same, and we unschedule the file from analysis :-(
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2462743003 .
2016-10-28 18:06:46 -07:00
Konstantin Shcheglov
1ffda5601b
Do nothing if [changeFile] reported, but the file content is the same.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2458853003 .
2016-10-28 14:08:50 -07:00
Konstantin Shcheglov
2625d6af37
More tests and a few fixed for the driver.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2450183004 .
2016-10-27 10:52:12 -07:00
Konstantin Shcheglov
0fcf8924d5
Several tests for AnalysisDriver and an elements.dart tweak.
...
I will not land this without review.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2455843002 .
2016-10-27 09:24:31 -07:00
Konstantin Shcheglov
f797154673
Fix for LibraryDirective annotations while applying resynthesized element model.
...
This allows us to clean up the analysis driver.
I will NOT land this without your review.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2445193003 .
2016-10-26 07:40:07 -07:00
Brian Wilkerson
b719474fd9
Intial support for unifying command-line handling
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2441053003 .
2016-10-21 13:16:25 -07:00
Brian Wilkerson
785b949894
Improve error recovery (issue 27646)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2444453002 .
2016-10-21 12:36:01 -07:00
Paul Berry
396d7862b4
More improvements to DeclarationResolver.
...
This CL makes the following improvements:
- When visiting an executable element, local variables and labels are
rebuilt rather than matching them up to the old element model. This
ensures that if the element model was resynthesized from an API
summary (which doesn't contain local variables or labels), these
elements are not lost.
- When matching up existing elements, if the elements did not
previously contain offsets, offsets are recorded. If they did
previously contain offsets, the offsets are compared to verify that
they match. This ensures that if the element model was
resynthesized from an API summary (which doesn't contain offsets),
the offsets will be correct.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2435313002 .
2016-10-21 11:13:55 -07:00
Paul Berry
f1aee7cf68
Fix static modifier for synthetic fields coming from summaries.
...
R=jmesserly@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2439023002 .
2016-10-21 11:09:11 -07:00
Paul Berry
74d8298777
Fix handling of default formal parameters in DeclarationResolver.
...
When visiting a DefaultFormalParameter, we can't call
super.visitDefaultFormalParameter, because that would cause the
default value to be visited twice.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2438113002 .
2016-10-20 12:34:16 -07:00
Vyacheslav Egorov
1f6e03883e
Teach analyzer parser to handle native const factories/const constructors.
...
This is needed to parse VM patch files, which contain things like:
@patch const factory String.fromEnvironment(String name,
{String defaultValue})
native "String_fromEnvironment";
Currently analyzer would throw "Only redirecting factory constructors can be
declared to be 'const'." error when it sees this code.
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org/2435013003 .
2016-10-20 20:09:07 +02:00
Brian Wilkerson
96750cd5cb
Split out options from ContextBuilder
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2425423009 .
2016-10-20 11:03:11 -07:00
Brian Wilkerson
d42a22bb1d
Deprecate ToSourceVisitor
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2439773002 .
2016-10-20 08:38:22 -07:00
Brian Wilkerson
b3f66b03a1
Provide an extensible form of ToSourceVisitor (issue 27169)
...
R=matan@lurey.org
Review URL: https://codereview.chromium.org/2429243003 .
2016-10-19 14:31:21 -07:00
Paul Berry
4729ba0055
In DeclarationResolver, handle generic function-typed parameters.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2441483002 .
2016-10-19 14:21:52 -07:00
Konstantin Shcheglov
bf43e4b43e
Validate local resolution scope, and compute initial name scope.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2439583003 .
2016-10-19 14:08:46 -07:00
Paul Berry
148af481ff
Fix DeclarationResolver handling of annotations containing closures.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2436733004 .
2016-10-19 13:23:11 -07:00
Paul Berry
4054d93fc9
Handle default formal parameters in LocalElementBuilder
...
Fixes #27615 .
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2437793002 .
2016-10-19 11:17:43 -07:00
Konstantin Shcheglov
38e2b55fff
Implement 'local' mode in TypeResolverVisitor.
...
If we start resolution not from CompilationUnit, we need to put type
parameters into scopes. This is not implemented yet.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2432273003 .
2016-10-19 09:47:40 -07:00
Konstantin Shcheglov
b64e116422
Add TypeResolverMode and implement 'api' in TypeResolverVisitor.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2428233002 .
2016-10-18 19:31:14 -07:00
Jennifer Messerly
7b5e6be4a8
fix #27284 , allow FutureUnionType to be preserved during generic inference
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/2425143002 .
2016-10-18 15:55:27 -07:00
Konstantin Shcheglov
412cceb7d0
Add tests showing using LocalElementBuilder separately, for variable or body.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2428773004 .
2016-10-18 14:38:06 -07:00
Konstantin Shcheglov
529ebf7be2
Add (shared) tests for ApiElementBuilder and ElementBuilder.
...
Also copy API-only tests from the old CL.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2431783002 .
2016-10-18 12:28:09 -07:00
Konstantin Shcheglov
13d2420a3d
Extract ElementBuilder tests into a separate file.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2430723002 .
2016-10-18 10:22:45 -07:00
Konstantin Shcheglov
e1f8a0a103
Begin separating API and local element builders.
...
I will write separate tests for them and do some more clean up in
separate CLs.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2425853003 .
2016-10-18 08:22:30 -07:00
Brian Wilkerson
724ac40b8d
Improve error messages and add many corrections
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2426583003 .
2016-10-17 10:40:43 -07:00
Brian Wilkerson
3155b1e08c
Remove unused method and field from DartSdkManager
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2415413003 .
2016-10-14 09:53:44 -07:00
Lasse R.H. Nielsen
efb9a12811
Add = as default-value separator for named parameters.
...
Fixes issue #27559 .
BUG= http://dartbug.com/27559
R=asiva@google.com , eernst@google.com , floitsch@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/2411633002 .
2016-10-14 11:25:25 +02:00
Konstantin Shcheglov
4c065c8443
Allow new public names in patches for the dart:_internal library.
...
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2413403002 .
2016-10-13 14:52:22 -07:00
Konstantin Shcheglov
f63a9d1219
Add support for patching parts.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2414123003 .
2016-10-13 14:27:22 -07:00
Konstantin Shcheglov
2b40c57781
Add support for patching fields.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2416073002 .
2016-10-13 14:04:58 -07:00
Paul Berry
809c80fa49
Fix summarization of closures in toplevel variable declarations in part files.
...
We were forgetting to include the unitNum, so it was defaulting to zero,
which worked for non-part files but not for part files.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2416863003 .
2016-10-13 13:29:06 -07:00
Konstantin Shcheglov
452e180dbc
Add support for patching constructors.
...
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2417933002 .
2016-10-13 13:03:26 -07:00
Konstantin Shcheglov
cbb898bca7
Add support for patching class methods.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2412453007 .
2016-10-13 11:55:53 -07:00
Konstantin Shcheglov
0ae79f6f4b
Patch token stream when replace/add nodes.
...
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2413293002 .
2016-10-13 10:37:18 -07:00
Konstantin Shcheglov
1f373db98e
Test that IncrementalCompilationUnitElementBuilder keeps elements in the same order as nodes.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2413023003 .
2016-10-13 09:15:47 -07:00
Brian Wilkerson
1a893edb82
Add prefix to path import to work around breaking change
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2411423003 .
2016-10-13 08:29:09 -07:00
Konstantin Shcheglov
2150f5d1d1
Patch imports and function type aliases. Report more errors.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2405383002 .
2016-10-11 17:08:53 -07:00
Konstantin Shcheglov
9b2c5ce5b0
Add SdkPatcher and implement top-level function / getter / setter patching.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2411883003 .
2016-10-11 14:06:17 -07:00
Konstantin Shcheglov
f233d759a2
Validate patch file paths.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2406353002 .
2016-10-11 10:07:35 -07:00
Konstantin Shcheglov
1a70ff791a
Parse the 'patches' argument in SDK libraries declarations.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2408863002 .
2016-10-11 09:19:27 -07:00
Konstantin Shcheglov
ee28ff0fe8
Fix context/builder_test.dart on Windows.
...
TBR
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2411513002 .
2016-10-10 15:24:36 -07:00
Konstantin Shcheglov
4c05421229
Support for Bazel workspaces in ContextBuilder.
...
This replaces custom fileResolverProvider and packageResolverProvider
that were used for the same purpose internally.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2405953002 .
2016-10-10 13:51:50 -07:00
Paul Berry
cf5f9e0a38
Move class DeclarationResolver to its own file.
...
Auxiliary classes ElementGatherer, ElementMismatchException, and
ExistingElementResolver, which were only used by DeclarationResolver,
are also moved.
(No functional change; just code motion).
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2406863003 .
2016-10-10 11:43:26 -07:00
Konstantin Shcheglov
8760cb6edf
Tweaks for MockSdk and test ContextBuilder.findSdk() and dart:html.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2408633003 .
2016-10-10 10:59:38 -07:00
Konstantin Shcheglov
4511504171
Implement BazelPackageUriResolver.restoreAbsolute().
...
It is mostly tested with the same tests as for resolveAbsolute().
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2403733002 .
2016-10-10 08:16:00 -07:00
Brian Wilkerson
cc7eeb9611
More test clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2402883002 .
2016-10-09 16:32:07 -07:00
Konstantin Shcheglov
78051dc47d
Add more tests for BazelPackageUriResolver.resolveAbsolute().
...
Create separate set of resources in each test in order to simplify the
tests.
Fix the case when files are generated for third_party/dart/XXX.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2403723002 .
2016-10-09 14:40:18 -07:00
Brian Wilkerson
514f611dba
Fix more tests on windows bots
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2409473002 .
2016-10-09 11:59:35 -07:00
Brian Wilkerson
cce23d60b0
Fix more tests under windows
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2404703002 .
2016-10-09 08:45:46 -07:00