Commit Graph

243 Commits

Author SHA1 Message Date
Ben Konyi 89eda8a533 Updated status file to fix kernel bot failures.
TBR=zra@google.com
BUG=

Review-Url: https://codereview.chromium.org/2953933003 .
2017-06-22 15:09:49 -07:00
Ben Konyi 143baba8fc Reintroducing parser changes to cause compile-time errors when trying to reinitialize a final field. Updated status files to hopefully address the test failures. Issue 29658.
This reverts commit 12e93cc41e.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2953843003 .
2017-06-22 13:48:57 -07:00
Martin Kustermann 42e2ae40e8 Update status file for dartk-checked (status files are out-dated due to builder being on FYI)
Closes https://github.com/dart-lang/sdk/issues/29225

R=jensj@google.com

Review-Url: https://codereview.chromium.org/2948153005 .
2017-06-22 15:36:30 +02:00
Ryan Macnak 095ff155fd VM: Allow trailing comma in assert statements.
Issue #29959

R=regis@google.com

Review-Url: https://codereview.chromium.org/2946173002 .
2017-06-21 09:08:16 -07:00
Jens Johansen 202306f39b [kernel] Fix loading of type argument in catch.
Catch simply gave NullConstant as arguments to _instanceOf,
now I've copied what the IsExpression does, and made
LoadInstantiatorTypeArguments actually work in this case
(by filling out the scopes_->this_variable value,
by actually visiting the catch guard in the scope builder
rather than skipping it).

Fixes #29553.

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2938173002 .
2017-06-21 10:56:21 +02:00
Jens Johansen 29036d398b [kernel] Fix loss of supertype arguments.
Before this, if a generic class was instantiated with only dynamic,
TypeArgument::null would be used as the type argument, ignoring
types from the super.
Now it only returns TypeArguments::null if the class directly gives all
type arguments (and they are all dynamic).

Fixes #29537

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2941983002 .
2017-06-21 10:22:40 +02:00
Alan Knight 12e93cc41e Revert "Updated parser to produce error when trying to reinitialize final variables in class constructors. Fixes issue #29658."
This reverts commit 9755a98b00.

BUG=

Review-Url: https://codereview.chromium.org/2949943002 .
2017-06-20 15:25:55 -07:00
Ben Konyi 9755a98b00 Updated parser to produce error when trying to reinitialize final variables in class constructors. Fixes issue #29658.
BUG=
R=zra@google.com

Example:
Foo {
  final int x = 10;
  Foo(this.x); // Error
  Foo.named() : x = 42; // Error
}
Review-Url: https://codereview.chromium.org/2947043002 .
2017-06-20 14:40:36 -07:00
Jens Johansen 5472eb7831 [kernel] Don't emit field initializers in a redirecting constructor
BUG=
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2940323002 .
2017-06-20 13:54:25 +02:00
Jens Johansen c649557584 [kernel] Check type for list literals
BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2949493002 .
2017-06-20 13:04:08 +02:00
Ben Konyi a4a227e375 Revert "Updated parser to produce error when trying to reinitialize final variables in class constructors. Fixes issue #29658."
This reverts commit b5cff3f68f.

TBR=zra@google.com

Review-Url: https://codereview.chromium.org/2944223002 .
2017-06-19 17:23:01 -07:00
Ben Konyi b5cff3f68f Updated parser to produce error when trying to reinitialize final variables in class constructors. Fixes issue #29658.
BUG=
R=asiva@google.com

Example:
Foo {
  final int x = 10;
  Foo(this.x); // Error
  Foo.named() : x = 42; // Error
}
Review-Url: https://codereview.chromium.org/2939553005 .
2017-06-19 12:07:37 -07:00
Jens Johansen 0a1583aa04 [kernel] Fix assert message.
This mimics the behaviour of the source-based pipeline,
i.e. instead of "manually" calling _AssertionError._create and giving
the correct parameters (wrong parameters, actually), use the helper
method _AssertionError.ThrowNew.

BUG=
R=ahe@google.com, vegorov@google.com

Review-Url: https://codereview.chromium.org/2940283002 .
2017-06-16 12:28:18 +02:00
Jens Johansen dc72d9c34e Update language_kernel.status for closed issue.
BUG=
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2940073002 .
2017-06-15 13:41:13 +02:00
Peter von der Ahé 6302a5b31b Implement metadata on classes and additional semantic checks.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2938793002 .
2017-06-14 14:59:53 +02:00
Peter von der Ahé 5f3fd3060b Restore status file comment.
R=jensj@google.com

Review-Url: https://codereview.chromium.org/2939713002 .
2017-06-14 08:31:37 +02:00
Peter von der Ahé 3c17c44d52 Implement metadata on methods and fields.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2935993002 .
2017-06-14 08:25:17 +02:00
Peter von der Ahé db2e915aac Improve recovery from compile-time errors.
R=danrubel@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2938573002 .
2017-06-13 16:00:15 +02:00
Jens Johansen 76336b225f [kernel] Streaming ScopeBuilder
The old ScopeBuilder is replaced with StreamingScopeBuilder
that does not use the Ast.

R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2886873008 .
2017-06-13 11:39:31 +02:00
Peter von der Ahé ea30fb6a0d Follow-up to CLs 2933723002 and 2932973003.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2933813002 .
2017-06-13 09:45:41 +02:00
Peter von der Ahé a78250d931 Support metadata on local variables.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2936503002 .
2017-06-13 09:15:54 +02:00
Peter von der Ahé 092ef81f95 Complain about cyclic typedefs.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2931303002 .
2017-06-13 09:13:23 +02:00
Peter von der Ahé 8da7993d63 Attempt to instantiate an enum class is a compile-time error.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2935593002 .
2017-06-13 09:12:51 +02:00
Peter von der Ahé f559a6d1e9 Throw NSM on unresolved factory redirection.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2933733002 .
2017-06-13 09:12:20 +02:00
Bob Nystrom e5263f0c40 Removed uses of removed negated status variables.
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2935883002 .
2017-06-12 16:04:18 -07:00
Peter von der Ahé 080a25f3a6 Various semantic checks on field initializers.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2929383002 .
2017-06-12 11:15:49 +02:00
Peter von der Ahé 2867303232 Various issues with duplicated names.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2934713002 .
2017-06-12 11:11:45 +02:00
Peter von der Ahé 0c7d657333 Complain about duplicated defer.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2933723002 .
2017-06-12 10:33:40 +02:00
Peter von der Ahé 35d77460e4 Various semantic checks regarding const and final.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2932973003 .
2017-06-12 10:27:22 +02:00
Peter von der Ahé 96e494d534 Complain about external methods with a body.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2930093002 .
2017-06-10 10:13:04 +02:00
Peter von der Ahé 043c0096ad Complain about use before declaration.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2924423003 .
2017-06-10 10:12:18 +02:00
Peter von der Ahé dcbac2be00 Complain about incorrect use of null-aware operations.
R=danrubel@google.com, johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2932723003 .
2017-06-10 10:11:36 +02:00
Peter von der Ahé fd9716fa95 Various semantic checks on formal parameters.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2926953004 .
2017-06-10 10:10:07 +02:00
Paul Berry 8f5bcddc31 Implement type inference for assignments to a static variable.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2933643002 .
2017-06-09 17:36:20 -07:00
Paul Berry 029771d746 Add type inference for complex assignments whose LHS is an index expression.
In later CLs I will expand on this code to handle other kinds of
complex assignments.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2926763003 .
2017-06-08 09:25:24 -07:00
Peter von der Ahé f73e2ecf28 Clean up status files.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2928903002 .
2017-06-08 13:50:30 +02:00
Peter von der Ahé 001ac97389 Implement initializer asserts.
Closes https://github.com/dart-lang/sdk/issues/29762

R=kasperl@google.com

Review-Url: https://codereview.chromium.org/2930673002 .
2017-06-08 13:46:26 +02:00
Peter von der Ahé ba345471d5 Update status files for debug mode.
Review-Url: https://codereview.chromium.org/2928703003 .
2017-06-07 15:04:56 +02:00
Peter von der Ahé c4a8b146e0 Semantic checks on switch cases and fall-through errors.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2926533004 .
2017-06-07 11:26:34 +02:00
Peter von der Ahé d6a766bb14 Improve NSM handling.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2927613002 .
2017-06-07 09:28:13 +02:00
Peter von der Ahé 470127ae46 Setup correct scope for initializers and complain about fields initialized more than once.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2916333002 .
2017-06-06 19:35:35 +02:00
Peter von der Ahé cbcb7d4885 Clean up handling of types.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2915933004 .
2017-06-02 14:53:20 +02:00
Peter von der Ahé 696f00d96b Implement library access restrictions and privacy.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2916863003 .
2017-06-02 13:13:38 +02:00
Kevin Millikin 1624c4f9c3 Kernel/VM: Set the instantiator type arguments on closures
If a closure has uninstantiated type arguments from the enclosing
class, set them on the freshly allocated closure.

Closes issue #29409.

BUG=https://github.com/dart-lang/sdk/issues/29409
R=kustermann@google.com, regis@google.com

Review-Url: https://codereview.chromium.org/2912393004 .
2017-06-02 11:44:15 +02:00
Sigmund Cherem 7affe8f0e5 update .status file once more: move dartk condition to the _kernel.status file.
R=ahe@google.com, efortuna@google.com

Review-Url: https://codereview.chromium.org/2918653005 .
2017-06-01 11:18:13 -07:00
Peter von der Ahé c0bf4eddbe Various checks for constant expressions.
Fixes https://github.com/dart-lang/sdk/issues/29379

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2911023002 .
2017-05-31 15:57:03 +02:00
Peter von der Ahé 8ea78cbc3f Avoid using Invalid{Statement,Expression,Initializer}.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2906253004 .
2017-05-31 14:53:44 +02:00
Régis Crelier b7ebbf8c77 Allow a function named 'get' to be generic (fixes #29746).
Add regression test.
Mark status files for failing dartk, dart2js, and analyzer.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2911333002 .
2017-05-30 15:31:04 -07:00
Peter von der Ahé 0eae9218f4 Complain about duplicated names.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2902113005 .
2017-05-29 09:45:05 +02:00
Peter von der Ahé 7065a8dfd4 Update kernel status file.
Review-Url: https://codereview.chromium.org/2898173003 .
2017-05-24 13:42:05 +02:00