scheglov@google.com
8171f61532
Use a poor man's incremental parser to perform incremental resolution.
...
Also turns it on in the analysis server.
Limitations:
1. It works only inside a BlockFunctionBody.
2. It does not update errors.
3. Incremental resolution fails to resolve unqualified class member invocations.
But it works in general.
It take 3-4 milliseconds to perform incremental_resolver.dart resolution.
It was multiple seconds before (see my yesterday's log).
So, it is something like 1000 times faster now :-)
And it should be now much faster to fix the limitations :-)
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//753803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41937 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 18:58:38 +00:00
scheglov@google.com
c94412a1b6
Incremental resolution: rename function/constructor/method parameters.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//756453002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41931 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 16:20:15 +00:00
scheglov@google.com
d8cf8ac9e4
Matching of top-level functions, methods and accessors.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//754673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41930 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 16:02:32 +00:00
scheglov@google.com
1f3ab9c5dd
Extend resolution Scope with ResolutionContext and set it for ResolverVisitor.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//751553003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41922 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-23 17:41:12 +00:00
brianwilkerson@google.com
cb2fc08695
Resolve not-equals operator
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//747153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41920 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 21:23:42 +00:00
scheglov@google.com
28a463ba90
Build elements for local variable and label in functions/methods.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//746903002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41919 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 21:13:51 +00:00
scheglov@google.com
e4a68e9a96
Clean up hints.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//750103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41917 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 20:13:46 +00:00
scheglov@google.com
28e007b872
Matching for import/export/part directives.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//750083002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41915 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 20:07:39 +00:00
brianwilkerson@google.com
81a2f8406d
Stop copying tokens in incremental scanner. Once the incremental parser is no longer using the token map I can remove the tokenMap support.
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//745873002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41913 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 17:23:14 +00:00
scheglov@google.com
94677802eb
More tests for expressions inside methods, constructors, initializers.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//752483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41912 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 17:06:24 +00:00
scheglov@google.com
96da96fbc2
Restore (and deprecate) ForEachStatement.iterator getter.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//744693004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41879 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 00:19:17 +00:00
scheglov@google.com
cb767886bf
Match enums, class type alias, type parameters.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//745513003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41878 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 00:18:14 +00:00
scheglov@google.com
76f1d90e3e
Matching fields, some parameters, ignore locals.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//733203004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41868 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 22:08:47 +00:00
paulberry@google.com
8d7842bc3f
Incremental parser fix: handle insertion of method parameters.
...
This bug was discovered by the incremental parse stress tester.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//738133002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41864 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 19:22:31 +00:00
scheglov@google.com
3e9a3601a0
Tests for matching constructors.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//747503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41863 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 19:20:36 +00:00
scheglov@google.com
9feb90faa7
Remove in-bodies analysis from DeclarationMatcher.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//741183002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41859 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 18:29:01 +00:00
scheglov@google.com
6aea1f5970
Update 'nameOffset' for elements during incremental analysis.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//742103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41857 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 17:56:45 +00:00
brianwilkerson@google.com
e6686b2993
Move incremental scanner to separate file
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//746503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41856 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 17:54:41 +00:00
brianwilkerson@google.com
e65d299873
Code clean-up, add utility class for incremental scanning, add tests
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//742013003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41855 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 17:03:27 +00:00
scheglov@google.com
9b1afaea17
Infrastructure for testing IncrementalResolver.
...
It should help in tesing incremental resolution of any changed node.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//744553002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41854 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 16:14:39 +00:00
scheglov@google.com
a6f842dd9e
Drop return types in DeclarationMatcher visitor.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//738343002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41853 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 15:59:46 +00:00
danrubel@google.com
4a50ed6cf8
cleanup hints
...
BUG=
R=brianwilkerson@google.com , paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//734403004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41852 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 14:03:18 +00:00
scheglov@google.com
81d4af5e07
Tests for matching classes.
...
Matching type parameters is not implemeneted yet.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//738183002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41841 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 05:27:54 +00:00
scheglov@google.com
a663c547d4
Improvements and tests for top-level variables matching.
...
It is OK to reorder them.
But it is not OK to change number of them or their types.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//719383003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41839 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 19:31:16 +00:00
paulberry@google.com
5ff3e4a594
Incremental parser fix: handle insertion of "final" before field decl.
...
This bug was discovered by the incremental parse stress tester.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//739723003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41837 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 15:34:38 +00:00
scheglov@google.com
f551b6964c
Extract incremental resolver classes into separate files.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//743543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41819 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 01:18:07 +00:00
danrubel@google.com
8cd596e82c
add source changed event stream
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//737673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41818 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 01:02:42 +00:00
scheglov@google.com
438fbd7f6b
Cache ElementLocation instance and index key/location ids.
...
This saves us about 9% of time, as the previous CL.
From 22294 ms to 20040 ms.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//739643003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41814 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 23:02:14 +00:00
paulberry@google.com
4ef51cb52e
Fix incremental parsing of function literals in initializer lists.
...
One of the areas in which the Dart grammar is context sensitive is the
fact that function literals are disallowed inside initializer lists
(unless they are enclosed inside (), [], {}, or "${}").
To deal with this context sentitivity in incremental parsing, we must
rebuild the correct parser state for the subexpression we are going to
re-parse before parsing it. We do so with a new visitor,
IncrementalParseStateBuilder.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//736813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41813 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 22:49:59 +00:00
scheglov@google.com
58587a470e
Rollback r41807.
...
As discussed, it is not compatible with the incremental analysis.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//736603005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41809 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 18:50:28 +00:00
scheglov@google.com
4032b4d86b
Use shorter DartElementLocation.
...
This improves analyzer + analysis_server analysis time from 21841 ms to 19839 ms.
I.e. about 9% faster.
However it is still 25% slower than without index at all - 15593 ms.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//738673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41807 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 16:21:01 +00:00
scheglov@google.com
b8da9bc651
Format and sort analyzer and analysis_server packages.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//725143004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41792 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 22:23:53 +00:00
danrubel@google.com
fabddbd918
add ContextsChangedEvent
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//732093003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41786 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 17:14:48 +00:00
scheglov@google.com
30e11469c3
Use a better way to compute InterfaceTypes least upper bound.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//730803003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41761 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-15 16:52:58 +00:00
brianwilkerson@google.com
35b13e0885
Make constant lists immutable
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//730783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41757 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-15 01:33:57 +00:00
scheglov@google.com
2521c3703d
Fix formatter breakage.
...
Constants are special.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//724093007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41748 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 19:16:58 +00:00
scheglov@google.com
0a93cdbf9f
Report HintCode.UNUSED_ELEMENT for functions.
...
1 positive in dart2js
1 positive in analysis_server
0 positives in analyzer
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//725163004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41746 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 19:10:35 +00:00
paulberry@google.com
c54f6e774c
Improve error reporting when a mixin application is invalid.
...
For a situation like this:
class B {
B({int i});
}
class M {}
class C extends B with M {
C() : super();
}
we report the error at the node "with M", with the message "This mixin
application is invalid because all of the constructors in the base
class 'B' have optional parameters.".
Previously we would report the error at the site of the super call,
leaving the user no idea why there was a problem.
BUG=dartbug.com/19576
R=scheglov@google.com
Review URL: https://codereview.chromium.org//724133003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41745 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 18:04:55 +00:00
brianwilkerson@google.com
eb6aa7cacc
Code clean-up and minor bug fix
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//730533003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41744 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 16:06:11 +00:00
scheglov@google.com
256c3ddbe7
Remove unused fields in analyzer.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//727763003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41742 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 15:43:24 +00:00
scheglov@google.com
9e4a3ec845
Report HintCode.UNUSED_FIELD
...
There are two positives in dart2js, valid as I can see.
There are several positives in analyzer and analysis_server.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//728503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41727 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 23:12:40 +00:00
brianwilkerson@google.com
815e9ae0b7
Code clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//726663002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41725 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 20:01:57 +00:00
scheglov@google.com
890f2c34cd
Report HintCode.UNUSED_ELEMENT for non-synthetic property accessors.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//724113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41723 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 17:16:09 +00:00
scheglov@google.com
5f2f7a44bd
Remove some (but not all) unused methods in analyzer.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//728513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41721 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 17:07:54 +00:00
whesse@google.com
113bb8dc60
Allow dartanalyzer to parse options after the filename argument.
...
BUG=dartbug.com/21582
R=paulberry@google.com
Review URL: https://codereview.chromium.org//720143002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41719 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 16:32:15 +00:00
scheglov@google.com
0b2216978f
Report HintCode.UNUSED_ELEMENT for unused methods.
...
No positives in dart2js.
Several positives in analyzer - not finished _notifyX methods in AnalysisContextImpl,
not used (saved for later?) methods in BestPracticesVerifier, some other methods.
Several positives in analysis_server, actual problems.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//718323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41717 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 15:41:44 +00:00
whesse@google.com
31d13c3a19
Renumber enum constants in analyzer to be consecutive.
...
There is a unit test that expects them to be consecutive.
BUG=
R=ricow@google.com
Review URL: https://codereview.chromium.org//725543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41710 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 11:58:35 +00:00
scheglov@google.com
36d8576a8a
Move unused local variables and classes analysis into HintGenerator.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//719223002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41696 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 20:04:27 +00:00
scheglov@google.com
829ea71487
First fix for indexing slowness.
...
We can make it even faster, but this change alone reduces time
from 55000 ms to 22600 ms.
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//720543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41679 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 23:05:46 +00:00
paulberry@google.com
9bc06fbf41
Workaround for ConstantVisitor dependency issues.
...
This restores proper test functionality on the buildbots. I plan to
follow up with a more permanent fix.
BUG=dartbug.com/21572
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//701583003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41676 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:55:58 +00:00