Commit Graph

3034 Commits

Author SHA1 Message Date
jwren@google.com c82b826af1 New getter: FieldElement.isEnumConstant (Dart version of source)
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//790103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42249 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 16:20:49 +00:00
paulberry@google.com 7cd5226565 Annotate remaining analyzer/analysis server tests with "@ReflectiveTestCase()"
In r42181, I failed to notice the need to annotate these tests because
they aren't currently being run under dart2js (most likely due to
slowness).  I've modified runReflectiveTests() to check for the
presence of the annotation before running the tests, in order to
ensure that all the classes are properly annotated now, and so that we
won't forget to add annotations in the future.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//742273005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42185 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 21:35:52 +00:00
paulberry@google.com 280657737f Annotate analyzer tests with @ReflectiveTestCase().
Fixes analyzer tests when run under dart2js.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//780763004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42181 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 21:00:51 +00:00
brianwilkerson@google.com 59f66641c8 Partial fix for issue 1934
R=scheglov@google.com

Review URL: https://codereview.chromium.org//765923003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42155 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-06 01:04:23 +00:00
brianwilkerson@google.com e15eff9ed2 Fix for issue 3001
R=scheglov@google.com

Review URL: https://codereview.chromium.org//780403002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42154 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-06 01:00:11 +00:00
scheglov@google.com 71bb5315f7 First step to resolving simple API changes.
Limitations:

1. Errors are not updated.

2. Classes are not resolved when it might be required.

3. Just method invocations, and just static elements.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//770333003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42153 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-05 23:48:32 +00:00
brianwilkerson@google.com 7e19f48c13 Fix for issue 4070
R=scheglov@google.com

Review URL: https://codereview.chromium.org//781133002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42143 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-05 20:09:58 +00:00
scheglov@google.com a7d32f9212 Consider adding/editing a method as a resolvable mismatch.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//778153003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42142 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-05 19:46:11 +00:00
brianwilkerson@google.com 625b422a82 Fix for issue 4482
R=scheglov@google.com

Review URL: https://codereview.chromium.org//785573002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42136 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-05 18:12:19 +00:00
scheglov@google.com a6123dccea Always build elements, then match and restore if matches.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//779333002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42135 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-05 18:12:07 +00:00
scheglov@google.com 5858d6558e When the same contents is set for a source, we still need to reset its modification time.
Otherwise quick add/remove a character causes non-incremental resolution.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//750953005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42120 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-04 22:31:02 +00:00
scheglov@google.com 5278fa209a Replace hints. Resolve TODO.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//781683004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42110 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-04 16:21:57 +00:00
brianwilkerson@google.com 6b378d5007 Fix for issue 18244
R=scheglov@google.com

Review URL: https://codereview.chromium.org//772423004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42097 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-04 00:48:11 +00:00
scheglov@google.com 784058d8a2 Don't throw an exception when model is changed.
I don't add much information, just 'return false;' is enough.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//770613003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42094 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-03 23:21:25 +00:00
scheglov@google.com 05e842e503 Rework the whitespace/comment change detection.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//774153006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42093 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-03 22:48:27 +00:00
brianwilkerson@google.com 3696e4601d Fix for issue 18598
R=scheglov@google.com

Review URL: https://codereview.chromium.org//749283007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42091 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-03 20:07:29 +00:00
scheglov@google.com c4818d34c4 More work on logging - new classes and timers.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//780643002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42090 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-03 19:47:06 +00:00
scheglov@google.com 354081528c Update local functions methods/functions.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//770253003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42078 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 23:51:10 +00:00
paulberry@google.com 581996f315 Evaluate annotations using ConstantValueComputer.
This is a step towards fixing bug 15467 (Analyzer does not handle
aliases of @proxy).  It should also help integration between analyzer
and dart2js (since Dart2js will need to know the constant values
associated with annotations).

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//772133002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42076 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 20:59:13 +00:00
paulberry@google.com b9ee97a93f Rename all_the_rest.dart to all_the_rest_test.dart.
So that it will be run by the buildbots.

Also fix a bug which would have caused the test
'DirectoryBasedDartSdkTest.getSdkVersion' to fail when run by the
buildbots.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//762823003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42068 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 16:29:30 +00:00
scheglov@google.com f499514469 Extract DocumentationCommentToken with field.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//768233002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42056 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 01:39:25 +00:00
paulberry@google.com 1bace1461b Respect order dependencies in ImplicitConstructorBuilder.
Since implicit constructors for a mixin application are based on the
constructors of the superclass, we must build implicit constructors
for superclasses before we build them for derived classes.

BUG=dartbug.com/21600
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//738863005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42052 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-01 22:35:42 +00:00
scheglov@google.com cd3d01103b Updated detached tokens of references in documentation comments.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//764243003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42050 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-01 22:22:59 +00:00
scheglov@google.com 0bb68fba0a Incremental resolution of updated DartDoc comments.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//758383003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42045 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-01 16:05:21 +00:00
scheglov@google.com 63b8bba102 A whitespace-only change can be incremental anywhere.
Just one change thought.
Does not work for a formatting causing multiple whitespace changes.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//767453002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42012 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 23:26:18 +00:00
scheglov@google.com 05ea658841 Finish parameters matching.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//760933003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42008 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 20:47:29 +00:00
scheglov@google.com 360a076c94 Fix for incremental resolution of top-level and class-member accessors.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//759353002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42006 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 19:42:45 +00:00
brianwilkerson@google.com 6b244a1856 Fix issue 21426
R=paulberry@google.com

Review URL: https://codereview.chromium.org//757023004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42004 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 18:28:43 +00:00
paulberry@google.com f9afec6a18 Fix incremental scanner's computation of scanEnd.
Previously, if the last token to be replaced (oldLast) was followed by
a lot of whitespace, we ended the scan at the end of oldLast (adjusted
by delta), which meant that we missed tokens inserted into the
whitespace region.  The correct place to end the scan is at the start
of the first token to be kept (oldRightToken), since that ensures that
we include the whitespace region.

Also, change the expression for scanStart to use oldLeftToken rather
than oldFirst (the two are equivalent) in order to highlight the
symmetry between the expressions for scanStart and scanEnd.

This bug was discovered by the incremental parse stress tester.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//717393006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42002 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 16:41:40 +00:00
paulberry@google.com f822139cc5 Add incremental parser test for splitting a combinator.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//762703004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42001 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 16:28:30 +00:00
paulberry@google.com e93f6ff2ea Fix incremental parsing when class name is changed.
This bug was discovered by the incremental parse stress tester.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//760863002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42000 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 16:22:00 +00:00
scheglov@google.com 5269d25368 Fix for resolving super.method() invocations.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//757193002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41998 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 15:55:54 +00:00
scheglov@google.com 417c3a125e Incremental improvements in the matcher.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//764493002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41997 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 14:55:37 +00:00
paulberry@google.com a36d6c0a6c Fix incremental parsing of import combinators.
This bug was discovered by the incremental parse stress tester.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//759183002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41993 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 14:05:47 +00:00
scheglov@google.com a4737c6027 Try to resolve incrementally whole functions, constructors or methods.
So, for example, not-named parameter rename in a function can be incrementally resolved.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//755373003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41977 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 05:11:35 +00:00
scheglov@google.com 709dbe943c Function type aliases matching.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//759763003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41974 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 22:18:20 +00:00
scheglov@google.com 039d975dba Fixes for identifying changed token ranges and updating them.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//751343002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41972 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 21:20:25 +00:00
brianwilkerson@google.com ff7f0f4bd4 Fix for issue 20930
R=scheglov@google.com

Review URL: https://codereview.chromium.org//755313003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41970 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 20:51:36 +00:00
scheglov@google.com 18ee8a8abf Update errors during incremental resolution.
Update offsets for the existing ones, remove some of them, add new.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//757743004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41966 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 18:53:24 +00:00
paulberry@google.com 2eaef9ba80 During resolution, record the target of break/continue statements.
This adds a new "target" field to BreakStatement and ContinueStatement
which points to the AST for the statement that the break/continue is
breaking from or continuing to.  For labeled break and continue
statements, this will always be the statement identified by the label
(not the LabeledStatement itself but its child).  For unlabeled break
and continue statements, this will be the innermost enclosing loop (or
switch statement, for break statements), provided that it is not in an
enclosing function.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//725473005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41961 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 17:04:59 +00:00
scheglov@google.com 371e52317a Incremental improvements in parameters and types matching.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//755743002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41942 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 21:11:31 +00:00
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