Commit Graph

2317 Commits

Author SHA1 Message Date
Morten Krogh-Jespersen 3db4b1070b Normalize all status files and enable presubmit hook.
This CL normalizes all status files by the status file normalizer found at
pkg/status_file/bin/normalize.dart.

To make sure all status files are kept in pristine condition, a linter is placed
on the presubmit hook. The linter can be found at pkg/status_file/bin/lint.dart.

Bug:
Change-Id: I20bdb74824be65f079b8c9ab08b7ae38394d637f
Reviewed-on: https://dart-review.googlesource.com/24112
Commit-Queue: Morten Krogh-jespersen <mkroghj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2017-12-07 08:38:30 +00:00
Sigmund Cherem 30f154c8ea Bring status on a few suites up to date for --checked and --fast-startup
TBR=efortuna@google.com

Change-Id: If7196983eecf4cd7932e20332dca5471f24319f0
Reviewed-on: https://dart-review.googlesource.com/27087
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-07 05:08:30 +00:00
Paul Berry b75502513a Fix type inference of closures using '=>' syntax.
This CL fixes type inference of closures using '=>' syntax so that
they infer consistently with an equivalent closure defined using block
syntax ('{}').

Fixes #31436.

Change-Id: I5463dd0ba986e9953ebabbc24ce3ced9a7220007
Reviewed-on: https://dart-review.googlesource.com/27084
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-07 04:52:10 +00:00
Régis Crelier 17b5516143 [VM runtime] Fix omission in recent change 26720: Check if the tested instance
is of class Future, when test type is FutureOr.
This was missing only when testing an instance, not when testing a type or a
parameterized class.

Change-Id: I1609f6f7df80f15a8f36d18bf504df444dfbb928
Reviewed-on: https://dart-review.googlesource.com/27083
Reviewed-by: Régis Crelier <regis@google.com>
2017-12-07 03:10:29 +00:00
Régis Crelier a4bcdef9bd [VM runtime] In strong-mode, apply FutureOr subtyping rules (fixes #31377).
Change-Id: Id792eae9fbd08783443ec6341e17208f9e78e5f0
Reviewed-on: https://dart-review.googlesource.com/26720
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-07 00:19:27 +00:00
Paul Berry 5710de9c78 Do assignability checks on return/yield using the greatest closure of the context.
Without this fix, there is a risk that the unknown type ("?") will
leak into kernel code via the "as" expression inserted for an implicit
downcast.

Change-Id: Iea7276c8489eff80fe32f33e53efd42571c94a89
Reviewed-on: https://dart-review.googlesource.com/26861
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-06 22:41:50 +00:00
Paul Berry 115d54f0b4 Implement strong mode "invalid cast" rules.
When an implicit cast can be proven by the front end to always fail,
due to the form of the expression being cast, the front end now
reports this as a compile-time error.  (This feature is not new--it is
part of the analyzer's implementation of strong mode).

Newly failing tests are marked with issue #31537.

Change-Id: Ib3fc068352bb91dd283fa4b81d8104fa213eafe9
Reviewed-on: https://dart-review.googlesource.com/26420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-06 20:01:02 +00:00
Harry Terkelsen 9f973c6599 Disable importing dart:mirrors in kernel mode
Change-Id: I9a4b7d32a67cc109b9a9d3a33b5996176988a97c
Reviewed-on: https://dart-review.googlesource.com/26404
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Harry Terkelsen <het@google.com>
2017-12-06 18:44:15 +00:00
Régis Crelier a38ac7cf12 Resubmit "Set --strong in runtime arguments also when specified in the precompiled configuration"
Update dartkp status files, since --strong is now properly passed to the runtime.

Change-Id: I36dcc04a70f46730b24b5aaa2f118ed9baf42cbd
Reviewed-on: https://dart-review.googlesource.com/26561
Reviewed-by: Régis Crelier <regis@google.com>
2017-12-06 17:25:23 +00:00
Lasse R.H. Nielsen 8dc7d5e907 Update language_2/await_test.dart to use async_helper.
Add more tests.

See #31535.

Bug: http://dartbug.com/31535
Change-Id: I1db9ecb84d9ed87f1111e3fdc9637143cf46fa33
Reviewed-on: https://dart-review.googlesource.com/26220
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-12-06 12:05:59 +00:00
Lasse R.H. Nielsen 7f91a438f5 Fixes async for two other language_2 tests.
Change-Id: Id805a913275468f70cfbe03e37f2534fad6aaab8
Reviewed-on: https://dart-review.googlesource.com/26221
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-12-06 09:11:36 +00:00
Emily Fortuna 5c932019ff Reapply "Fix order of runtime type checks of optional function parameters." It wasn't working with inlining previously.
This reverts commit 301c501924.

Bug:
Change-Id: I26059705b8410ad4e8b5b580ff85dd324727f755
Reviewed-on: https://dart-review.googlesource.com/26460
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-12-05 23:44:36 +00:00
Sigmund Cherem e7b7b68ef6 Update status file.
The test status changed when I fixed a typedef bug in the FE (see https://github.com/dart-lang/sdk/commit/a10da3ae66b2e5f23632f833df0e0fb437575210)


TBR=efortuna@google.com
CC=bkonyi@google.com

Change-Id: I6419cf1d515dbc70e7407ccd2051bc1beab022f9
Reviewed-on: https://dart-review.googlesource.com/26464
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-05 23:00:28 +00:00
Emily Fortuna 301c501924 Revert "Fix order of runtime type checks of optional function parameters."
This reverts commit 964332fc79.

Bug:
Change-Id: Ib2715d82a296f030fb32855c29c77997692e79ef
Reviewed-on: https://dart-review.googlesource.com/26441
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-12-05 21:43:18 +00:00
Emily Fortuna 964332fc79 Fix order of runtime type checks of optional function parameters.
Bug:
Change-Id: Ic5b69030c9854502b70f1fa2030f974e99f10ad3
Reviewed-on: https://dart-review.googlesource.com/26400
Reviewed-by: Stephen Adams <sra@google.com>
2017-12-05 20:11:24 +00:00
Paul Berry 2744918dc6 Create language_2 tests for cascaded forwarding stubs.
Change-Id: I6c3261311b5112d478525df1f06e40f04c129e03
Reviewed-on: https://dart-review.googlesource.com/25760
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-05 19:35:51 +00:00
Karl Klose 73df542d0e Skip dartdevk tests on Windows for now
Change-Id: I221340772de45c241a31f113f3f38f1d7fae3c73
Reviewed-on: https://dart-review.googlesource.com/26180
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2017-12-05 09:24:31 +00:00
Emily Fortuna 31cb880614 Add parameter type checks in constructor body methods.
Bug:
Change-Id: Ic62886aa9db8dbe1f16f85ea528faffdeb299dac
Reviewed-on: https://dart-review.googlesource.com/26044
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-12-05 00:28:04 +00:00
Paul Berry e8091b27b1 Implement "unknown getter/setter/method" compile time errors in the front end.
Fixes #21938 (Front end does not warn on function calls on Object).

A small number of tests begin failing with this change--these tests
have been marked with issue #31533 for later triage.

Change-Id: I3a956410a6780772fe90098d8604fb10718504df
Reviewed-on: https://dart-review.googlesource.com/26045
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-05 00:14:54 +00:00
Alexander Markov 2cd25f0210 [VM] Wire up package:vm/kernel_front_end in precompiler2 and test.py
This CL introduces a tool for compiling Dart sources to kernel
files specifically for Dart 2.0 AOT compiler (precompiler).

Internally, the new tool uses package:vm/kernel_front_end which invokes
kernel front-end to produce kernel Program and then runs additional
whole-program transformations specific to AOT.

The new tool is used in pkg/vm/tool/precompiler2 and in tools/test.py
when running tests in '-c dartkp --strong' mode.

This CL re-enables AOT-specific transformations disabled by
6cfc0558ec, so it silences several
tests for https://github.com/dart-lang/sdk/issues/31424#issuecomment-347996235

Closes https://github.com/dart-lang/sdk/issues/31498

Issue: https://github.com/dart-lang/sdk/issues/30480

Change-Id: I4860f2adad17be9dcb1ca4609a4a10ad29ec51cd
Reviewed-on: https://dart-review.googlesource.com/25720
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-04 22:28:39 +00:00
Emily Fortuna dc1b5525bf Create temporary Method type in kernel world for compatibility with Dart 1
Bug:
Change-Id: I9efa163ce1a9a76df405f32d35850743e7f090cc
Reviewed-on: https://dart-review.googlesource.com/25723
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-12-04 19:37:54 +00:00
Samir Jindel c187a88998 [kernel] Update dart2js status files.
Bug:
Change-Id: Ia1c31443640b450caee5974ba384fee092b84c15
Reviewed-on: https://dart-review.googlesource.com/25880
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-04 12:53:30 +00:00
Samir Jindel bf797e6507 [kernel] Re-land assert initializers.
This change updates Dart2js and DDC.
Thanks to johnniwinther@ for the Dart2js updates.

The original revision is in patchset 2.

Change-Id: I26db33312f003f88ccccb67b27998ef21a1f667f
Reviewed-on: https://dart-review.googlesource.com/25820
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2017-12-04 11:22:34 +00:00
Kevin Millikin 9f12c3da2b Update DDC status files
Mark a test that is now passing on DDK.

Bug:
Change-Id: I1ad0ec6fe9fbb44e7a72f8e6285e5d763dc0cd85
Reviewed-on: https://dart-review.googlesource.com/25860
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-04 10:32:33 +00:00
Paul Berry 7d65fec76e Reland "Route all messages through Loader."
This is the same as https://dart-review.googlesource.com/24481, but
with additional status file fixes.

Change-Id: Ic076c4dbf9c07e0fdf316298ca1ee1b6ce25002b
Reviewed-on: https://dart-review.googlesource.com/25508
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-01 22:47:06 +00:00
Johnni Winther cc21375ab0 Update dart2js_with_kernel status after revert
Change-Id: I4ab972028e1d080b7a82f2b7dc342c72413d750b
Reviewed-on: https://dart-review.googlesource.com/25620
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-12-01 18:55:01 +00:00
Régis Crelier 08b2294713 [kernel] In strong mode, change covariant parameter types to Object in the
implicit closure of a method compiled by kernel (fixes #31305).

Change-Id: Iabeee2e382bf07ff78645054e453e0bd1afd02ab
Reviewed-on: https://dart-review.googlesource.com/24362
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-12-01 18:00:16 +00:00
Johnni Winther ede2367ef6 Update dart2js_with_kernel status
Change-Id: Iac1643bfe2110eb5c3448dd865e016410b59d494
Reviewed-on: https://dart-review.googlesource.com/25540
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-12-01 17:35:09 +00:00
Kevin Millikin 2419840741 Update DDK status files
Bug:
Change-Id: Ie5f9153400d55167284ab4633d6e85160fa05cc4
Reviewed-on: https://dart-review.googlesource.com/25480
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-01 16:32:48 +00:00
Samir Jindel f5fc335a4c [kernel] Check bounds of type arguments in strong mode.
Change-Id: I2cb230db322cc26fb62e932b40882200de38c3d4
Reviewed-on: https://dart-review.googlesource.com/24180
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-01 14:55:56 +00:00
Samir Jindel e50326af39 [kernel] Update cloner.dart
Several revisions have updated ast.dart without updating cloner.dart to
clone the newly added fields. This revision fixes #31438.

Bug: https://github.com/dart-lang/sdk/issues/31438
Change-Id: I2347de69e6a424f25c04d2a773d3f8d8b8387619
Reviewed-on: https://dart-review.googlesource.com/23180
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-01 14:06:26 +00:00
Dmitry Stefantsov 149c3dd3ab [ddc-kernel] Fix status entries for dartdevk after 316bc2d96e
Bug:
Change-Id: I07949acbf369a1c4b29c7f8e60bc01c092e9d37a
Reviewed-on: https://dart-review.googlesource.com/25360
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-01 11:22:09 +00:00
Dmitry Stefantsov 316bc2d96e [ddc-kernel] Fix how mock members for fields are generated
Bug:
Change-Id: I6b910c9faa741fd8c8121250fbce55e9a9d29c50
Reviewed-on: https://dart-review.googlesource.com/24121
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2017-12-01 09:46:16 +00:00
Emily Fortuna b7ef9072f1 Set "type" for FutureOr to dynamic (temporarily).
Bug:
Change-Id: Ie4a376316c0fa444642c2535c0a97f3245c92fda
Reviewed-on: https://dart-review.googlesource.com/24621
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-11-30 18:18:04 +00:00
Régis Crelier 9fd442107a [Gardening] Mark tests as passing in status files. See #31498 for details.
Change-Id: Ifa66601e5d504160ba7f4311e72ac84fb87240e0
Reviewed-on: https://dart-review.googlesource.com/25041
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-30 17:48:15 +00:00
Kevin Millikin 83cabf36e3 More DDC test status file hygiene
This block of tests will fail with a MissingCompileTimeError.  The
RuntimeError expectation is not correct, but overlapping.

Bug:
Change-Id: Ie6a2b96603690779b4e2e15f3cc2d6da8a2c92c3
Reviewed-on: https://dart-review.googlesource.com/24924
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-11-30 15:11:04 +00:00
Paul Berry 7208c76c38 Add language_2 tests demonstrating issue #31484.
Change-Id: I029ece5a3364cc3cd3526c965d3768c21487636b
Reviewed-on: https://dart-review.googlesource.com/24601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-30 14:49:05 +00:00
Kevin Millikin 8b3fad2946 Another round of DDC test status updates
These are expected to cause the buildbots to cycle green.

Bug:
Change-Id: If5e7607ae738a8d300eae0a1b51d2d61e9f6c9ba
Reviewed-on: https://dart-review.googlesource.com/24922
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-11-30 12:22:10 +00:00
Lasse R.H. Nielsen f205ec5d6c Make bots green. See issue #31496
Change-Id: I6870407fad0ca5a5ea94504b7c5b3d1c3b17c593
Reviewed-on: https://dart-review.googlesource.com/24920
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Anders Sandholm <sandholm@google.com>
2017-11-30 11:57:53 +00:00
Dmitry Stefantsov b0160af36a [ddc-kernel] Restore status entry for issue13179_test
TBR=karlklose@google.com

Change-Id: I85188f4157d28c8cc02bf63248dd5356cd02a725
Reviewed-on: https://dart-review.googlesource.com/24880
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-11-30 11:07:41 +00:00
Dmitry Stefantsov 2a84f4c546 [ddc-kernel] Correct status file dor dartdevk
TBR=karlklose@google.com

Change-Id: I18efa0d50c2d120a49a0cd17e0d776e0a5d3eeae
Reviewed-on: https://dart-review.googlesource.com/24840
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-11-30 10:33:49 +00:00
Karl Klose 2eccf08bd0 Add missing test expectation for ddc-kernel-chrome
R=dmitryas@google.com

Change-Id: Ie6ff65e99ccdc9752a71324a2ef29f6cdd78f4db
Reviewed-on: https://dart-review.googlesource.com/24820
Reviewed-by: Karl Klose <karlklose@google.com>
2017-11-30 10:04:30 +00:00
Alexander Markov d282487636 Enable devirtualization optimization when testing dartkp --strong.
Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I09a93391eaa42ff2c258b33bb229e2ca662463db
Reviewed-on: https://dart-review.googlesource.com/24562
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-11-29 22:56:40 +00:00
Régis Crelier 87ff74f2d3 [VM] Fix parsing of 'covariant' followed by 'void' and look-ahead parsing of
type argument starting with 'void' (fixes #31279).
Add regression test.

Change-Id: I590e6ce0e7e915098cb24e91db9c1c8549606208
Reviewed-on: https://dart-review.googlesource.com/24624
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-11-29 22:32:35 +00:00
Paul Berry 327adac235 Insert implicit downcasts for function expressions.
Note that there are currently some inconsistencies between how
function expressions are inferred depending whether they are defined
using `{}` or `=>` (see issue #31436).  This CL preserves the existing
inconsistencies.  Once we decide how we want to resolve issue #31436,
I'll revisit this code to ensure that it is still correct.

Change-Id: I3926a4b3dc51155d8f03adaae380b50aab39ca60
Reviewed-on: https://dart-review.googlesource.com/24622
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-29 22:24:31 +00:00
Paul Berry d358897ab2 Insert implicit downcasts for for-in loops.
Note that this CL makes a minor change outside of type inference: it
changes the BodyBuilder so that when it desugars a for-in loop that
assigns to a variable declared elsewhere, the desugared assignment is
expressed using shadow objects; this is necessary to ensure that the
type inference engine can walk the desugared assignment and insert an
implicit downcast if necessary.

Change-Id: I4d87f83b8a4b3b72e7ba8042ccd711f0d012fac0
Reviewed-on: https://dart-review.googlesource.com/24340
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-11-29 19:20:31 +00:00
Martin Kustermann 2375383a93 Move status file entries to different section (independent of checked mode)
Change-Id: I5e280b901500df2eb81832df91dc96220b63d291
Reviewed-on: https://dart-review.googlesource.com/24482
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2017-11-29 18:18:00 +00:00
Martin Kustermann 88915b6efb Add test for int64 literal semantics in Dart 2.0
Issue https://github.com/dart-lang/sdk/issues/31479

Change-Id: Ifb303c5ea751fa5700abbbfd679e5c1517af9c5b
Reviewed-on: https://dart-review.googlesource.com/24520
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-29 16:36:30 +00:00
Karl Klose 763bb456a9 Update dartdevk status files
R=dmitryas@google.com

Change-Id: I4bf27162c717e42a368a73a0f60f559e7447aa00
Reviewed-on: https://dart-review.googlesource.com/24460
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-11-29 16:30:10 +00:00
Paul Berry 2b567c53d4 Insert implicit downcasts for parameter default values.
No language_2 tests are added to validate this behavior yet, because
we are still deciding what we want the semantics to be.  I will follow
up with language_2 tests once the semantics have been decided upon.

Tests that have begun failing due to this change are marked with a
reference to issue #31402.

Change-Id: Ia24c9789220d09682b4b3ade9374d279ff2a4b6e
Reviewed-on: https://dart-review.googlesource.com/24320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-29 00:00:09 +00:00