Commit Graph

344 Commits

Author SHA1 Message Date
brianwilkerson@google.com 2fbdbde9b9 Change resolution of fields to resolve to getters and setters. This allows inherited getters and setters to be correctly resolved.
Review URL: https://chromiumcodereview.appspot.com//10338004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7257 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 21:31:24 +00:00
brianwilkerson@google.com 45a58a6f74 Copy identifier names so that we don't hold on to the original source. If I'm reading the results right, this saves a significant amount of space.
Review URL: https://chromiumcodereview.appspot.com//10339002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7256 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 21:31:01 +00:00
brianwilkerson@google.com f47446c473 Improve memory efficiency by not creating empty lists
Review URL: https://chromiumcodereview.appspot.com//10271033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7198 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 18:08:05 +00:00
danrubel@google.com ea52cb33d7 Fix DartC NPE
Review URL: https://chromiumcodereview.appspot.com//10266004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7141 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-29 19:20:49 +00:00
scheglov@google.com 85c5ba16b5 Add the most useful Apache Commons utils
R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10236009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7049 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 22:59:32 +00:00
brianwilkerson@google.com 0c72e4194e Fix a bug that caused private names from an imported library to be included in the name scope of the importing library (issue 2651)
Review URL: https://chromiumcodereview.appspot.com//10134035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6908 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-24 18:47:33 +00:00
scheglov@google.com 820ae0a56d Prevent infinite recursion
http://code.google.com/p/dart/issues/detail?id=2702

Can not reproduce however.

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10140009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6880 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-24 14:02:21 +00:00
scheglov@google.com c937e8b6e0 Issue 2693. Don't add null imports
http://code.google.com/p/dart/issues/detail?id=2693

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10200005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6866 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-24 00:19:03 +00:00
scheglov@google.com 11d4d91b23 Report warnings and non-fatal errors for shadowing declaration and usage.
Fix for Type references in declaration.

Make Back a default button if there is Error in refactoring status.

R=messick@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10162026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6859 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 19:57:12 +00:00
danrubel@google.com eb17b63eb0 Update AnalysisServer to preserve DartC import prefixes
Review URL: https://chromiumcodereview.appspot.com//10174004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6853 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 18:19:53 +00:00
scheglov@google.com 8b0805f08e Support for same prefix for multiple imports.
R=zundel@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10139017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6819 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-21 01:35:40 +00:00
scheglov@google.com 42c3daeb88 Issue 2639. Resolve implicit super() constructor invocation.
http://code.google.com/p/dart/issues/detail?id=2639

R=devoncarew@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10116032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6719 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 01:02:10 +00:00
brianwilkerson@google.com cf0cedfdda Fix for issue 2569
Review URL: https://chromiumcodereview.appspot.com//10066047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6638 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 13:38:19 +00:00
zundel@google.com 9965d546ab Another case of creating from factory constructors was not taken into account in r6619
http://code.google.com/p/dart/issues/detail?id=2282

Review URL: https://chromiumcodereview.appspot.com//10108014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6636 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 13:36:14 +00:00
zundel@google.com 082190545e Remove warning for using a factory constructor on an abstract class.
http://code.google.com/p/dart/issues/detail?id=2282

Review URL: https://chromiumcodereview.appspot.com//10106016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6619 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 09:30:21 +00:00
scheglov@google.com 310487fec0 Fix for parsing qualified type in for-in
R=devoncarew@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10097021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6598 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 18:27:32 +00:00
zundel@google.com 6115c5e824 Revert "Moves the 'import_*.config' files in dart-sdk into a new directory"
Review URL: https://chromiumcodereview.appspot.com//10083015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6545 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 23:02:36 +00:00
zundel@google.com 2ebe9b35b7 Moves the 'import_*.config' files in dart-sdk into a new directory
These files are used by the static analyzer and editor to target
different implementations of the system library.

This change moves these files from lib/config to lib/_internal/config so
that there will be no confusion that these might be intended to
be dart system library files.

http://code.google.com/p/dart/issues/detail?id=2510

Review URL: https://chromiumcodereview.appspot.com//9998005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6543 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 22:17:48 +00:00
danrubel@google.com 1c9c439a52 prevent cached DartUnit from being referenced and resolved by multiple libraries
Review URL: https://chromiumcodereview.appspot.com//10066020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6470 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 20:00:00 +00:00
zundel@google.com c8166f9f01 Got rid of peculiar null literal in parsing an incomplete new expression.
Review URL: https://chromiumcodereview.appspot.com//10069022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6469 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 19:35:51 +00:00
zundel@google.com 9ff833160b Adds parser recovery at the statement level for unterminated statements (no semicolon)
this change will allow the parser to recover when it sees the start
of a new statement after an invalid token.  All 24 of these new test
cases failed in the state the code right before this change, so
I'm hoping this will make a significant improvement in the quality of
the AST created and therefore code completion.

Review URL: https://chromiumcodereview.appspot.com//10068008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6463 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 14:26:50 +00:00
zundel@google.com e54d389410 Fix flaxy test issue for analysis parser found in r6414
http://code.google.com/p/dart/source/detail?r=6414

Review URL: https://chromiumcodereview.appspot.com//10069006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6462 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 13:44:20 +00:00
zundel@google.com 97925a7d68 Adds parser recovery to the class right brace and handles stray semicolons in a class
I modified 'expectCloseBrace()' to not be so greedy of no opening brace
was ever seen.

Review URL: https://chromiumcodereview.appspot.com//10020008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6370 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 17:03:50 +00:00
zundel@google.com a16e4b0eeb Adds parser recovery for type parameters and type arguments
Note that this un-does part of a previous change for parser recovery.
   http://codereview.chromium.org/8576007/

The resulting AST seems more complete in the test cases I came up
with.

Review URL: https://chromiumcodereview.appspot.com//10021017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6364 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 15:49:28 +00:00
zundel@google.com 08d912226a Adds more parser recovery to '#' directives
Review URL: https://chromiumcodereview.appspot.com//10019010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6335 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 18:57:16 +00:00
zundel@google.com caeaafbaf3 Revert "Adds parser recovery to the class right brace and handles stray semicolons in a class"
Breaks completion tests in the editor.

Review URL: https://chromiumcodereview.appspot.com//10020022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6325 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 15:19:50 +00:00
zundel@google.com 5845cd3db1 Adds parser recovery to the class right brace and handles stray semicolons in a class
I modified 'expectCloseBrace()' to not be so greedy of no opening brace
was ever seen.

Review URL: https://chromiumcodereview.appspot.com//10020008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6324 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 14:57:19 +00:00
zundel@google.com 43b2154b54 Fixes warnings and formatting issues in some dartc files
After these changes, I have no more warnings printed in Eclipse.

Review URL: https://chromiumcodereview.appspot.com//10027003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6321 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 14:05:05 +00:00
zundel@google.com 72488e17be Add more parser error recovery for List and Map literals
Review URL: https://chromiumcodereview.appspot.com//10025009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6310 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 21:26:07 +00:00
zundel@google.com 3d5df7a80d Improve error recovery in formal parameter lists
Review URL: https://chromiumcodereview.appspot.com//10021013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6309 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 21:19:42 +00:00
zundel@google.com bfbc8f4ff4 Improve parser recovery inside of a block
Review URL: https://chromiumcodereview.appspot.com//10024009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6305 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 17:25:37 +00:00
messick@google.com 1c6a2105b8 Teach DeltaAnalyzer to recognize library prefixes.
Review URL: https://chromiumcodereview.appspot.com//10024002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6303 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 01:57:55 +00:00
zundel@google.com 5bcc817ce2 Using annotations to help with parser recovery
There are cases in the parser where a method is consuming tokens aren't
expected at that level, but could have been used to sucessfully complete
a non-terminal further up in the stack.

This change adds an annotation @Terminals that is consulted when
an unexpected token is encountered to determine whether or not the
token should be consumed.  Adding a token to @Terminals tells the
parser it is OK not to consume that token, that the parser will eventually
make progress.

http://code.google.com/p/dart/issues/detail?id=2417

Review URL: https://chromiumcodereview.appspot.com//10005040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6299 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 22:54:33 +00:00
zundel@google.com 191810e590 Add element to qualifier name for code completion
http://code.google.com/p/dart/issues/detail?id=2422

Review URL: https://chromiumcodereview.appspot.com//10006030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6272 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 14:26:11 +00:00
zundel@google.com e1da301847 Error recovery for unsupported operator overloads
Review URL: https://chromiumcodereview.appspot.com//10012012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6245 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 20:06:38 +00:00
zundel@google.com 4d40985460 Implement @runtime-error in co19 tests for static analysis (no runtime)
http://code.google.com/p/dart/issues/detail?id=2406

Review URL: https://chromiumcodereview.appspot.com//10010004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6243 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 19:39:38 +00:00
zundel@google.com ec609edb6d Adds fixes for the 'super' keyword used by itself in certain situations
Review URL: https://chromiumcodereview.appspot.com//9949016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6240 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 18:48:42 +00:00
scheglov@google.com 3ae8698f48 Report missing #source after 'unitAboutToCompile'
R=zundel@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10010007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6220 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 14:58:43 +00:00
zundel@google.com f3c3451cbf Show an error if a field has no getter defined in a getter context
http://code.google.com/p/dart/issues/detail?id=2408

Review URL: https://chromiumcodereview.appspot.com//9979004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6199 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 21:51:46 +00:00
scheglov@google.com 52324c399c Remember visibility range for DartVariable
This will allow us to check name conflicts between local variables during refactoring.

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9977007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6192 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 20:22:13 +00:00
zundel@google.com 969d4caa18 Make sure toplevel final fields are initialized
http://code.google.com/p/dart/issues/detail?id=2372

Review URL: https://chromiumcodereview.appspot.com//9982003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6184 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 18:05:12 +00:00
zundel@google.com c4d9d56627 Dartc's 'can't use a type variable in static context' message now works the same way as 'NO_SUCH_TYPE'
The error message for can't use a type variable in a static
context is useful, but it was an unconditional error.  Really,
the message is just a more friendly version of 'NO_SUCH_TYPE' and
needs to work in the same way, being a warning in some contexts, and
a compile time error in others.

http://code.google.com/p/dart/issues/detail?id=2374

Review URL: https://chromiumcodereview.appspot.com//9963082

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6146 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 20:32:23 +00:00
scheglov@google.com 22ef1c8c6a Issue 2420. Better error message for 'duplicate top-level definition'
http://code.google.com/p/dart/issues/detail?id=2420

R=zundel@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9968091

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6142 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 19:40:53 +00:00
zundel@google.com 9f9f6ffe34 Prevent NPE in TypeAnalyzer
This came from a bug report in the editor without a
specific repro case, so I just added protection
at the several places on the line where fetching the
type arguments might hit a null pointer.  If I had
a repro case, I would work on preventing the null pointer
from getting in there in the first place.

http://code.google.com/p/dart/issues/detail?id=2365

Review URL: https://chromiumcodereview.appspot.com//9959110

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6140 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 19:07:16 +00:00
devoncarew@google.com 46a4edf55f Fix for an issue where reported line positions on windows files were off by a factor of 2.
Review URL: https://chromiumcodereview.appspot.com//9959103

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6130 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 17:53:39 +00:00
zundel@google.com 17c8c7acc1 More error recovery back to the top level for some cases
Review URL: https://chromiumcodereview.appspot.com//9959054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6113 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-02 21:32:26 +00:00
danrubel@google.com 51a35a9051 Entries for relatively referenced system libraries to prevent duplicate resolution
Review URL: https://chromiumcodereview.appspot.com//9959076

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6109 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-02 20:11:30 +00:00
danrubel@google.com d2ee00cfaa Ensure usage of short form (e.g. dart:io rather than dart://io/io_runtime.dart) if available
Review URL: https://chromiumcodereview.appspot.com//9958074

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6106 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-02 19:42:56 +00:00
danrubel@google.com 0038d2e303 Resolve all new libraries when called from AnalysisServer
Review URL: https://chromiumcodereview.appspot.com//9963062

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6100 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-02 18:12:23 +00:00
zundel@google.com 27237ce51e Implements error recovery for cases where 'var' or 'final' prefix a method def'n
These are common user mistakes, it prints a reasonable diagnostic
as opposed to 'unexpected token'.

Review URL: https://chromiumcodereview.appspot.com//9950045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6078 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-01 16:55:56 +00:00