Commit Graph

1846 Commits

Author SHA1 Message Date
scheglov@google.com f072f62f11 Handle the new analyzer type warnings in tests.
Unfortunately we are back to 600+ failing tests.

R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22876 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 21:55:52 +00:00
scheglov@google.com 14cebd0b05 Report ParserErrorCode.MISSING_IDENTIFIER
Fixes many trivial co19 tests.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22875 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 21:37:14 +00:00
scheglov@google.com f9b3d290cd Report UNDEFINED_CONSTRUCTOR_IN_INITIALIZER and others
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22855 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 16:09:04 +00:00
scheglov@google.com c1e870fc03 Report CTEC.RECURSIVE_CONSTRUCTOR_REDIRECT
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22852 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 15:35:33 +00:00
johnniwinther@google.com cb7bedf860 Implement continue for switch.
The overall strategy is to convert the following:

switch (e) {
  l_0: case e0: s_0; break;
  l_1: case e1: s_1; continue l_i;
  ...
  l_n: default: s_n; continue l_j;
}

into this:

var label;
switch (e) {
  case e0: label = 0; break;
  case e1: label = 1; break;
  ...
  default: label = n; break;
}
l: while (true) {
  switch (label) {
  case 0: s_0; break l;
  case 1: s_1; label = i; continue l;
  ...
  case n: s_n; label = j; continue l;
  }
}

BUG=http://dartbug.com/8270
R=ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22838 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 09:35:05 +00:00
scheglov@google.com f7f4a68d72 Report ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22824 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 23:13:29 +00:00
scheglov@google.com e2d48ce25a Report CTEC.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22821 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 22:46:29 +00:00
scheglov@google.com 0523ecb9db Report CompileTimeErrorCode.REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22795 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 15:02:50 +00:00
scheglov@google.com ed18ddd4d5 Report CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22759 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-15 22:19:23 +00:00
scheglov@google.com b1ac8785fa Report NON_CONSTANT_VALUE_IN_INITIALIZER
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22747 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-15 16:59:17 +00:00
scheglov@google.com 4a64347799 Report CompileTimeErrorCode.INVALID_CONST_FACTORY
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22746 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-15 16:24:00 +00:00
scheglov@google.com 76e2c6438d Report CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22706 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-14 21:39:51 +00:00
scheglov@google.com 88943dfad4 Report CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22694 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-14 18:13:54 +00:00
scheglov@google.com 3e857985dc Report CTEC.CONST_WITH_NON_CONSTANT_ARGUMENT
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22646 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-13 19:45:48 +00:00
scheglov@google.com 44ab6ee5f2 Report CTEC.AMBIGUOUS_EXPORT
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22583 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-10 15:13:47 +00:00
scheglov@google.com e1c1d8c09b Report CompileTimeErrorCode.MIXIN_REFERENCES_SUPER
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22569 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 21:23:21 +00:00
scheglov@google.com 08ed1cdb5d Report CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22566 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 21:05:00 +00:00
scheglov@google.com 5d1a4b46b3 Report MIXIN_INHERITS_FROM_NOT_OBJECT
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22559 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 19:34:58 +00:00
scheglov@google.com 7da1adef44 Report CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER for top-level setters.
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22554 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 18:10:52 +00:00
scheglov@google.com 79e7230e06 Report CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22549 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 15:48:05 +00:00
scheglov@google.com 7fd5cf3e12 Report CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22548 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 15:32:36 +00:00
scheglov@google.com bd38f82625 Report StaticTypeWarningCode.AMBIGUOUS_IMPORT when used as type annotation.
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22542 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-09 01:43:28 +00:00
scheglov@google.com 60ac65a3e0 Make analysis dyi bot green.
TBR

R=devoncarew@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22538 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 23:58:11 +00:00
scheglov@google.com c7c94a3b3c Tweak new analyzer status files.
Skip 20 tests.
Update for new passed/failed tests.

R=devoncarew@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22522 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 18:40:06 +00:00
scheglov@google.com 98d449366f More new analyzer status file tweaks to run with --checked
R=devoncarew@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22492 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 05:38:51 +00:00
scheglov@google.com 2214a97df7 Update status files for 'dartanalyer'.
Small tweak for the Java command line analyzer to actually support --package-root option in batch.

R=devoncarew@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22480 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-07 21:45:20 +00:00
karlklose@google.com 57124b5594 Implement implicit constructors in mixin applications.
R=kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22367 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 12:15:35 +00:00
hausner@google.com 1d9eb0d9f0 Fix status file for dart
Review URL: https://codereview.chromium.org//14586005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22294 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-02 00:05:41 +00:00
ngeoffray@google.com e5e17e71fa Fix issue 10216. If the type mask is a subtype, and its base mixes in class A, it should consider an element of class A as potential runtime targets.
R=kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22111 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-29 10:58:42 +00:00
kasperl@google.com 102da4779f Update dart2dart test status (after throw as an expression).
R=ngeoffray@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21933 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 09:18:39 +00:00
kasperl@google.com 1ae2542bae Add support for rethrow and start treating throw <expr> as an expression.
R=ngeoffray@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21930 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 08:24:28 +00:00
hausner@google.com 54dde7ce89 Implement rethrow statement
Or: how to turn a 5 minute task into a 2 hour ordeal.

The actual business of the change is one line in token.h and one line in parser.cc.
Review URL: https://codereview.chromium.org//14012005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21371 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 16:32:37 +00:00
ngeoffray@google.com 563aa07a72 Fix typos.
Review URL: https://codereview.chromium.org//14137006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21280 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 13:29:31 +00:00
ngeoffray@google.com ba4d23258b Fix first part on liveness analysis of bug https://code.google.com/p/dart/issues/detail?id=9687: a throw in a catch block must have the finally block as a successor.
Review URL: https://codereview.chromium.org//14071003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21278 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 13:20:12 +00:00
karlklose@google.com 2b1e42801d Make this available in closures if a type variable is used as expression.
Review URL: https://codereview.chromium.org//13527003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20950 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 08:32:30 +00:00
srdjan@google.com ae25ca904c Fix issue 9608: When replacing call with assert assignable, transfer call's deopt_id to the new node.
Review URL: https://codereview.chromium.org//13464021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20871 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 16:22:24 +00:00
asiva@google.com e7bb0455bc Fix status file to account for crash in issue7525_test.dart
Review URL: https://codereview.chromium.org//13421003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20823 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 21:36:58 +00:00
hausner@google.com a9324c5338 Add constructor test
Constructor has side effects mutating the parameters and checking
whether the mutated values are remembered in the constructor body.
Review URL: https://codereview.chromium.org//13181004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20638 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-28 20:06:56 +00:00
iposva@google.com 349391e323 - Add issue number.
Review URL: https://codereview.chromium.org//12729033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20411 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 19:57:12 +00:00
iposva@google.com 9419bdadc1 Fix bug 4898:
- Mark test as runtime error based on the spec.
- Update status files for dartc, dart2dart and dart2js.
Review URL: https://codereview.chromium.org//13009002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20407 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 19:11:10 +00:00
hausner@google.com d4872a1499 Support initialized mixin fields across scripts
Add capability to set parser to read tokens from different
scripts and token positions. This is used when the initializer
expression of a field resides in a different script.
Review URL: https://codereview.chromium.org//12827007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20388 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 17:06:42 +00:00
hausner@google.com ba144dfb97 Mixin tests that check compile time errors
Check that compiler complains with wrong number of type arguments are passed
to super type and mixin type.
Review URL: https://codereview.chromium.org//12946006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20261 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 23:55:22 +00:00
hausner@google.com ed2e198b99 Mixins with Generics
This change adds support for generics to mixins. It's not a particularly elegant
implementation, so I expect to change how it works internally in later checkins.

Also, there is still one aspect of the implementation that is incorrect. In the
case of typedef, the newly introduced name is not yet an alias for  the
mixin application. Instead, the MA is a superclass of the typedef name. That
will need to be fixed in a later checkin. I don't want to make this change
bigger.
 
Review URL: https://codereview.chromium.org//12779008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20084 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 15:59:24 +00:00
erikcorry@google.com c8fc3e76c4 Mark test passing and fix bad merge
R=kasperl@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20017 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 12:57:12 +00:00
karlklose@google.com cee21aae21 Support type variables as expressions.
BUG=dartbug.com/6248

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19850 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 11:21:21 +00:00
aprelev@gmail.com 16cabfa936 Support optional function expression parameters in dart2js... and dart2dart.
BUG=dartbug.com/4597

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19849 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 11:10:22 +00:00
srdjan@google.com dd6691ab27 The complete fix for issue 8919.
Review URL: https://codereview.chromium.org//12643004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19661 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 23:09:47 +00:00
srdjan@google.com e004e397a8 Fix status for a test that now fails in release mode as well.
Review URL: https://codereview.chromium.org//12628005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19660 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 22:20:21 +00:00
srdjan@google.com 5135d46cbf Fix crash in issue 8919. The test still fails.
Review URL: https://codereview.chromium.org//12628003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19657 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 21:59:02 +00:00
regis@google.com f644ba9791 Complete implementation of bounds checking in the vm, by introducing a vm object
BoundedType that represents a type that could not be checked against an upper
bound at compile time. A BoundedType is verified at run time when used,
typically when it (and/or its bound) gets instantiated.
This fixes issues 7075 and 7625.
Added one test.
Review URL: https://codereview.chromium.org//12473002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19519 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 22:04:23 +00:00