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
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
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
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
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
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
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
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
scheglov@google.com
21fa0f35f8
Issue 21549. Fix for infinite loop in the Angular expression parser (Dart version).
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21549
Review URL: https://codereview.chromium.org//717723003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41672 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 21:10:57 +00:00
brianwilkerson@google.com
bc1972c228
Add parser recovery tests. These correspond to some cases that dart2js is currently handling that I wanted to make sure we also handled.
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//703773004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41652 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 03:46:08 +00:00
scheglov@google.com
24a93f8cee
Report HintCode.UNUSED_ELEMENT for classes.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//704413005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41650 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 02:57:23 +00:00
paulberry@google.com
5aa9f8cd8c
Fix incorrect syntax in constant evaluation test.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//711963002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41648 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 20:31:27 +00:00
brianwilkerson@google.com
93cecbd276
Fix hurt recovery
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//713953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41646 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 19:38:15 +00:00
paulberry@google.com
3bf0ca6aa8
Fix analyzer's treatment of mixin constructors.
...
This changes analyzer to match the spec (and the VM behavior) with
regard to which base class constructors are forwarded through mixin
applications: only those constructors that take zero optional
parameters are forwarded. In addition, the tests in tests/language/
are updated to match analyzer and the VM.
There is one small difference between analyzer and the VM behavior:
the spec says that if no constructors are forwarded at all, then the
mixin application will automatically acquire an implicit default
constructor. The VM behavior is to issue an error in this
circumstance. After consulting with Gilad, it seems like the VM
behavior is more consistent with the intent, so I've chosen to make
analyzer and the tests match the VM behavior, in the hopes that the
spec can be changed accordingly.
Should we change our minds in the future and decide that we want to
keep the spec as is, the tests and analyzer behavior can easily be
changed.
BUG=dartbug.com/19576
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//707073002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41645 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 19:28:40 +00:00
brianwilkerson@google.com
c258a1d7f6
Create fewer unnecessary lists
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//712083003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41641 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 17:25:58 +00:00
brianwilkerson@google.com
d23df4f448
Clean up references in comments
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//708263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41623 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-08 15:45:19 +00:00
brianwilkerson@google.com
f4f12546ad
Fix for issue 20796
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//689383005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41622 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-08 04:48:44 +00:00
paulberry@google.com
9c1ea65f07
Prevent conflict between parameter names and local function names.
...
From section 9.2 (Formal Parameters) of the spec:
The formal parameter list of a function introduces a new scope known
as the function's formal parameter scope. The formal parameter
scope of a function f is enclosed in the scope where f is declared.
Therefore, if one of the function's parameters has the same name as
the function itself, that isn't a problem.
Previously, we would add a local function to its own formal parameter
scope before visiting it (to allow it to call itself recursively), and
then after visiting it we would add it to the scope of the enclosing
function (so that the enclosing function could call it).
The fix is to add the local function just to the scope of the
enclosing function, and to do it before visiting the local function so
that recursion still works.
BUG=dartbug.com/20074
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//688253004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41621 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-08 01:11:17 +00:00
brianwilkerson@google.com
009128c945
Fix issue 20577
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//705393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41616 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 21:33:44 +00:00
brianwilkerson@google.com
ec7979a9a2
Fix for issue 20125 - improved error messages
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//712663002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41613 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 19:29:12 +00:00
paulberry@google.com
8ff8367558
Additional fixes to printing of error codes.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//706933005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41611 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 17:43:28 +00:00
paulberry@google.com
d3101210b2
Fix printing of error codes in unit tests.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//707733005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41590 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 22:31:43 +00:00
brianwilkerson@google.com
debee8c776
Fix for issue 19100 - better recovery
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//692303003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41584 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 21:37:27 +00:00
scheglov@google.com
772a0c6b22
Fix 'Unused local variable' hints in analyzer and analysis_server.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//709493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41576 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 18:32:54 +00:00
scheglov@google.com
ca91f9f770
Report HintCode.UNUSED_LOCAL_VARIABLE for local variables whose value is never used.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//686113007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41568 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 17:00:28 +00:00
brianwilkerson@google.com
750b5e426c
Fix issue 19424
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//700943003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41526 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 17:05:58 +00:00
paulberry@google.com
92b1c25f83
Avoid traversing classes when looking for circular references in typedefs.
...
BUG=dartbug.com/19459
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//705553003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41525 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 16:58:56 +00:00
paulberry@google.com
df62a0d75d
Warn when implicit default value overrides explicit one that differs.
...
BUG=dartbug.com/18914
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//700923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41503 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 20:32:18 +00:00
paulberry@google.com
e18464b912
Always check if instance method name collides with superclass static.
...
Previously we only did this check if nothing was overridden.
Persumably that was intended as a speed optimization, since at first
glance it would seem that if the instance method overrides something,
then it can't possibly conflict with a static method in the
superclass. However, that optimization doesn't work if the method
being overridden is in an interface (in that case the superclass can
still have a static method with the same name). So just go ahead and
check in all cases.
BUG=dartbug.com/18947
R=scheglov@google.com
Review URL: https://codereview.chromium.org//698973005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41501 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 19:31:31 +00:00
paulberry@google.com
ae271bf236
Split the largest classes from resolver.dart to their own files.
...
This should make resolver.dart small enough to support side-by-side
diffs in the code review tool.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//700753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41489 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 14:04:36 +00:00