Commit Graph

452 Commits

Author SHA1 Message Date
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 4ce241dc76 Revert "Renamed the 'dartc' launch script to 'dart_analyzer' and adds it to dart-sdk"
This reverts r6629.  Breaks the windows editor build in a different way.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6633 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 13:26:54 +00:00
zundel@google.com f209ea4140 Renamed the 'dartc' launch script to 'dart_analyzer' and adds it to dart-sdk
Some now unused scripts and files were also removed.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6629 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 12:59:39 +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 467c3e9968 Fix build break in one of dartc's JUnit tests
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6306 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 17:51:31 +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 c9190bd33e Removes remants of precompiled .jar files from dartc build
Review URL: https://chromiumcodereview.appspot.com//10005005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6217 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 13:15:56 +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 9c5ae41ae1 Adds Junit tests in dartc back into test.py
http://code.google.com/p/dart/issues/detail?id=2366

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6080 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-01 19:02:44 +00:00
zundel@google.com c3db078aa0 dartc Eclipse projects no longer need these two source dirs.
Review URL: https://chromiumcodereview.appspot.com//9959053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6079 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-01 18:34:51 +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
zundel@google.com f8c2584f55 Fix bad merge in CommandLineOptions.java (broke build at r6076)
Review URL: https://chromiumcodereview.appspot.com//9958050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6077 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-01 03:30:25 +00:00
zundel@google.com 9dae63b313 Add some command line options to debug AST parsing of illegal dart
There are 2 cmdline options added in this change
 1.  --source-from-ast  reprints out the source by walking whatever
AST was constructed from the parse.  This helps visualize what the
partially constructued AST looks like.
 2. --resolve-on-parse-errors this option has been availble to
API users, now it is exposed on the commandline.

Used together, you can take dart source that doesn't parse and see
how well the static analyzer understand it.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6076 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-01 03:23:15 +00:00
zundel@google.com 457c114b8b Removed unused dartc 'disable-type-optimization' command line flag
Review URL: https://chromiumcodereview.appspot.com//9950044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6075 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-01 02:19:42 +00:00
zundel@google.com 8cdd2f25cb Revert "Renamed the 'dartc' launch script to 'dart_analyzer' and adds it to dart-sdk"
Was r6073

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6074 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-31 21:27:15 +00:00
zundel@google.com fdc069b8e4 Renamed the 'dartc' launch script to 'dart_analyzer' and adds it to dart-sdk
Some now unused scripts and files were also removed.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6073 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-31 17:19:32 +00:00