Commit graph

52741 commits

Author SHA1 Message Date
Brian Wilkerson 7ed0bccca8 Add a README file to the meta package
Change-Id: Id8e9587a0a0f3573dcc713c9244c11d0d142a494
Reviewed-on: https://dart-review.googlesource.com/30140
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-17 21:53:17 +00:00
Samir Jindel 075720c352 [kernel] Add flag on Procedures for forwarding semi stubs.
Change-Id: I6e39557e9ed2e636a8f43e8835ae797e3fd8b0c2
Reviewed-on: https://dart-review.googlesource.com/29721
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2017-12-17 04:12:15 +00:00
Konstantin Shcheglov 31a0fe292d Remember import prefix name for static references.
Bug:
Change-Id: Ib71a9cc8e6c65d597f24c20c0260f7f37ef3674f
Reviewed-on: https://dart-review.googlesource.com/28541
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-12-16 05:09:35 +00:00
Brian Wilkerson 439dfe0c29 Revert "Produce an error if there would be an exception thrown by an assert in an initializer list"
Change-Id: I21553a5a3bf12b7636d9ef507092d0e19f9c0d57
Reviewed-on: https://dart-review.googlesource.com/30041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-16 01:44:13 +00:00
Dan Rubel 028773e032 Add fasta parser missing switch case recovery
Change-Id: I102586df07cf9178e47b5bb05e8b27af57f393c5
Reviewed-on: https://dart-review.googlesource.com/29920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-16 01:34:53 +00:00
Siva Annamalai 40a1b22df1 Adjust status file to account for issue 31667
Change-Id: I212eeed48b140793912d1b660b6b9aa9b55bde54
Reviewed-on: https://dart-review.googlesource.com/30060
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-16 01:18:04 +00:00
Régis Crelier 8836b116f9 [VM runtime] Fix function subtyping in the optimizer (fixes #31591).
The optimizer uses the "is more specific than" relation to eliminate type tests.
In strong mode, the "is more specific than" relation is supposed to be identical
to the "is subtype of" relation. However, it is not quite true, and this is the
cause of this bug. In non-strong mode (Dart 1), the "is more specific than"
relation uses covariance for both result type and parameter types of functions.
In strong mode, we need covariance of result type and contravariance of
parameter types.
Added regression test and updated status files.

Change-Id: I6315643890db75213af6720aa99d8da7b15f99d6
Bug:
Reviewed-on: https://dart-review.googlesource.com/29900
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-12-15 23:56:33 +00:00
Sam Rawlins 0d876c60ad Add a changelog entry for meta 1.0.5
Bug: https://github.com/dart-lang/sdk/issues/29220
Change-Id: I980fd5820d94803862aadd7c53a97daf864736d2
Reviewed-on: https://dart-review.googlesource.com/29180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2017-12-15 23:40:03 +00:00
Brian Wilkerson 71dd8acda1 Produce an error if there would be an exception thrown by an assert in an initializer list
Change-Id: Ia95b2e09c64846d319d940e29c422355ab972da6
Reviewed-on: https://dart-review.googlesource.com/29700
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-15 23:03:15 +00:00
Paul Berry f52cc1b382 Get rid of the clumsy while loop in inferInvocation.
See discussion in
https://dart-review.googlesource.com/c/sdk/+/29744/3/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart#892
Change-Id: I7b63269573749a61ff9e211d9df8676eae66b7e7
Reviewed-on: https://dart-review.googlesource.com/30000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-15 22:45:53 +00:00
Paul Berry ae9b0c42d7 Add type inference code to generate Instantiation nodes.
Fixes #31586.

Note that none of the back-ends handle Instantiation nodes yet, so the
language_2 tests added in this CL
(instantiate_tearoff_after_contravariance_check_test,
instantiate_tearoff_of_call_test, and instantiate_tearoff_test) fail
pretty much across the board right now.

Includes two fixes to Instantiation.getStaticType and the kernel type checker:

- Previously, they attempted to perform substitution on the full
  function type, which had no effect because the type parameters were
  bound.

- The type checker was not checking that type parameter bounds were
  satisfied.

Note that the front end doesn't yet check that type parameter bounds
are satisfied by the inferred type parameters.  I will address that in
a follow-up CL.

Change-Id: Ib0ad7a5fc5f4a2fdc8c99abe1f2d3d15b21a4974
Reviewed-on: https://dart-review.googlesource.com/29744
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-15 20:41:43 +00:00
Johnni Winther 6e8ddcfe3e Move unittests, part #2 of ?
Change-Id: I19f87d667453c395b604214b89b165986252e8a6
Reviewed-on: https://dart-review.googlesource.com/29980
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-15 20:07:49 +00:00
Johnni Winther 583de4a588 Port unittests to kernel, part #2 of ?
Change-Id: I0f835872736344ed3790086ff8f2b89961fd9a52
Reviewed-on: https://dart-review.googlesource.com/29960
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-15 19:59:32 +00:00
Johnni Winther 7979798d0a Move unittests, part #1 of ?
- frontend specific tests are moved to old_frontend/
- mirror specific tests are moved to mirrors/
- inference specific tests are moved to inference/

old_frontend/ and mirrors/ will be deleted with the old frontend
- possibly port some of the tests to the new frontend.

Change-Id: I5141238939944c49824f4abb886593f4f8443a94
Reviewed-on: https://dart-review.googlesource.com/29860
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-15 19:49:45 +00:00
Johnni Winther e4ac3fb74f Port unittests to kernel, part #1 of ?
Change-Id: I8e292f4ee6281d5bf2d6a664a97eb2832439deeb
Reviewed-on: https://dart-review.googlesource.com/29803
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-15 19:39:09 +00:00
Emily Fortuna 4cd0593574 Tiny fix to fix type errors in our compiler while running host-checked
and deferred loaded code.

Bug:
Change-Id: I57b51a287fd7ffad59a1a59eae34e739b5e5603b
Reviewed-on: https://dart-review.googlesource.com/29745
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-12-15 18:42:33 +00:00
Leaf Petersen 53908b0790 Remove warning for "is" checks with generic type parameters.
The analyzer used to emit a warning when a type parameter to a generic
method was used in an "is" check.  This warning was there to help
users write code that worked correctly on both Dart 1.0 and 2.0.  Now
that 2.0 generic methods are being more broadly supported and used,
this warning is blocking further library work, and is being removed.

Fixes https://github.com/dart-lang/sdk/issues/30530

Bug:
Change-Id: I70395305ad082aee3072b5beeb0b1b7f7883391b
Reviewed-on: https://dart-review.googlesource.com/29821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-15 18:12:03 +00:00
Paul Berry 2822fbadea Fix the interface definition for Socket.close and Socket.done.
These members were defined as returning Future<Socket>, but the
implementation in _Socket didn't conform to the interface.  There's no
reason these members need to return Future<Socket> anyway, so just
change them to return Future<dynamic>.

Avoids a strong mode error in socket_patch.dart.

Change-Id: Icdda5c7880daf0241e36f1d35e61d171f1694409
Reviewed-on: https://dart-review.googlesource.com/29741
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-15 16:16:14 +00:00
Dan Rubel 8239aa093e Fix synthetic token offset and length
During fasta parser recovery, the offset and/or length of some
synthetic tokens was incorrect. This caused problems during
code completion.

Change-Id: Iace73d06bb5da3ae916c69b7823367d8fc6e16b8
Reviewed-on: https://dart-review.googlesource.com/29822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-15 16:06:43 +00:00
Dan Rubel c780e6a935 Add fasta parser map literal recovery
Change-Id: Icde67bdef748a2bce4811d61bda19e9e4a008d52
Reviewed-on: https://dart-review.googlesource.com/29820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-15 16:05:54 +00:00
Paul Berry 4669a2107f Add a language_2 test to illustrate the scenario described in #31649.
Change-Id: I93ada8e3fb00029f5af18753c62deb78b944728d
Reviewed-on: https://dart-review.googlesource.com/29743
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-15 13:53:43 +00:00
Dan Rubel b16baaf8cf Add fasta parser property access recovery
Change-Id: Iece1dc1ea8eeb0928ffbcdefdbbdb54cb4277e31
Reviewed-on: https://dart-review.googlesource.com/29740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-15 12:47:22 +00:00
Erik Ernst 065d4a2f6c Adjusted status for flakiness on new platform
As reported in SDK issue #30068, co19/**/mouseOverEvent_A01_t01 is
flaky. This CL adds the flaky status for that test also on chrome.

Change-Id: I02dcdce69161a88661bed392bb5e3650893f3315
Reviewed-on: https://dart-review.googlesource.com/29802
Reviewed-by: Erik Ernst <eernst@google.com>
2017-12-15 10:50:44 +00:00
Florian Loitsch 11eda99413 Allow different kind of errors when the bigint would be too large.
Fixes #31661.

Bug: http://dartbug.com/31661
Change-Id: I3ea4ac51f84e50f63e8fdee1364637b91a6ef610
Reviewed-on: https://dart-review.googlesource.com/29800
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-12-15 10:38:39 +00:00
Erik Ernst 863609b7c9 Adjusted status of bigint_test with vm-reload
Change-Id: If28d63cfb14d951e48278ad37cb6b23f68f7496a
Reviewed-on: https://dart-review.googlesource.com/29781
Reviewed-by: Erik Ernst <eernst@google.com>
2017-12-15 09:26:23 +00:00
Erik Ernst ae04de301e Adjusted status of bigint_parse_radix_test to allow for timeouts
Gardening, reported as SDK issue #31659.

Change-Id: Ic261cf0a10602f0084a52c3201150c79606fdc55
Reviewed-on: https://dart-review.googlesource.com/29780
Reviewed-by: Erik Ernst <eernst@google.com>
2017-12-15 09:13:00 +00:00
Alexander Thomas 102a3c8e72 Revert "[Infra] Remove all sharded builders from the CQ to restore service"
This reverts commit 5d8771fe69.

TBR=whesse@google.com

Change-Id: Ica990cafe0955d966bd8ccdf3e5eaaba2f3ff1f2
Reviewed-on: https://dart-review.googlesource.com/29760
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2017-12-15 07:37:33 +00:00
Terry Lucas 0f07255380 Another passing test.
TBR=vsm@google.com

Change-Id: Ic01d3e213d30d7b5da61c2ccd9d0faf2de804dff
Reviewed-on: https://dart-review.googlesource.com/29746
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
2017-12-15 05:01:54 +00:00
Ryan Macnak 62ae8cda0a Parallel compaction.
Divide the heap by pages into k tasks. Use ThreadBarrier to ensure
planning -> sliding and non-stack forwarding -> stack forwarding.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: I2c9fcec0a0794bfea96ca1a0fb509a9f93242b65
Reviewed-on: https://dart-review.googlesource.com/29444
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Erik Corry <erikcorry@google.com>
2017-12-15 01:38:42 +00:00
Ryan Macnak 5554382135 Get a better stack trace from conversion errors in File.readAsString.
Bug: https://github.com/dart-lang/sdk/issues/31619
Change-Id: I79ae0337e35c8dd44aeff0613edaad620e82848e
Reviewed-on: https://dart-review.googlesource.com/29447
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-15 01:36:02 +00:00
Sam Rawlins ee07335392 Improve message around re-assigning a local final.
Add a new ASSIGNMENT_TO_LOCAL_FINAL code for the new text.

Fixes https://github.com/dart-lang/sdk/issues/28721

Bug: https://github.com/dart-lang/sdk/issues/28721
Change-Id: I5492dd0d9ee09d5b73296b46fe10271661c3c64f
Reviewed-on: https://dart-review.googlesource.com/29621
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-15 01:09:55 +00:00
Terry Lucas 3ebdf40490 Another passing test.
TBR=vsm@google.com

Change-Id: Ie5d759f11ebec219a7834dd5f4913b5ae1cf8333
Reviewed-on: https://dart-review.googlesource.com/29660
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2017-12-15 01:09:40 +00:00
Mike Fairhurst a9fe991cc5 First pass at plumbing fasta errors through to the analyzer. Hopefully this is
all satisfactory infrastructurally, organizationally, performance wise.

This does not handle summarizing errors so that we can produce them for existing
dill files, and some other places where special analysis is performed like on
the standard libs.

The CompilationMessage object is less rich than the Message object that other
code is using, see \#31644. However, workarounds included.

Bug:
Change-Id: I5b436b0de6051877801c1d128f43a9656df1b549
Reviewed-on: https://dart-review.googlesource.com/29400
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-15 00:49:55 +00:00
Vijay Menon 28ae7ff5b0 DDC cleanups
- Fix kernel invocation via ddc/ddw tools
- Remove sdk_expected_errors file - it's often out of date

Change-Id: I07bc073e7ebaffd39ff31b9438fd632e14aeac73
Reviewed-on: https://dart-review.googlesource.com/29640
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2017-12-14 22:56:35 +00:00
Devon Carew 3bca5b6a1d Duplicate some analyzer cli tests to also run in --preview-dart-2.
Bug:
Change-Id: Ic2b96434e58a7d3eff3ff9aef1bcb540d8f4f0ce
Reviewed-on: https://dart-review.googlesource.com/29623
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2017-12-14 22:18:35 +00:00
Alexander Markov ab8629af65 Revert "[VM] Enable --limit-ints-to-64-bits in Dart 2.0 precompiler"
This reverts commit 752dd8921a.

Reason: buildbot failures. Batch compiler which is used on certain
buildbots doesn't have --limit-ints-to-64-bits enabled yet.

Issue: https://github.com/dart-lang/sdk/issues/31339
Change-Id: I75a3940f981f47cb83425b99842c15c7d81b3c2d
Reviewed-on: https://dart-review.googlesource.com/29701
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2017-12-14 22:04:16 +00:00
Vijay Menon e0f5891850 Merge ddc type fixes to html_common
Change-Id: If8583c824989c9729ae2c29c718a514f24be0d2d
Reviewed-on: https://dart-review.googlesource.com/26840
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-12-14 22:04:05 +00:00
Alexander Thomas 5d8771fe69 [Infra] Remove all sharded builders from the CQ to restore service
TBR=whesse@google.com

Change-Id: Id0386cd6af03647f22fe7c95aed0c00b0e9a60f1
Reviewed-on: https://dart-review.googlesource.com/29720
Reviewed-by: Alexander Thomas <athom@google.com>
2017-12-14 21:51:21 +00:00
Terry Lucas bfea069823 Test possible keyevent fix.
Change-Id: I3f90979fad2681775cae56d499f3ff5968ea6485
Reviewed-on: https://dart-review.googlesource.com/29545
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
2017-12-14 21:22:39 +00:00
Konstantin Shcheglov 92bf47e7e4 When vm_platform_strong.dill is loaded, and an SDK library is requested, we don't need cycles.
R=brianwilkerson@google.com

Bug:
Change-Id: I0bd39b5bd8fa414a59b27b21e1a63196ec8a4300
Reviewed-on: https://dart-review.googlesource.com/29620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-14 21:10:49 +00:00
Alexander Markov 752dd8921a [VM] Enable --limit-ints-to-64-bits in Dart 2.0 precompiler
* Also enable --limit-ints-to-64-bits for CFE when it is used to generate
  kernel for VM as CFE relies on int.parse being able to parse correct
  literals and reject incorrect.

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

Change-Id: I4d12057457869e86945a4d3cf83326be7c93c17f
Reviewed-on: https://dart-review.googlesource.com/29546
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-14 21:03:42 +00:00
Brian Wilkerson a39bf4764b Add some recovery tests inspired by an issue
Change-Id: Ic5fe3fde8dc6223fb78647f90052cd1a2e758dca
Reviewed-on: https://dart-review.googlesource.com/29600
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-14 19:19:06 +00:00
Dan Rubel b709bc4bbe Fix AstBuilder interpolation expression construction
Add a new handleInterpolationExpression fasta parser event
so that AstBuilder can correctly construct interpolation expressions
with left and right brackets.

Change-Id: Icca977067fe3a28dbab83488108c7286ec135dca
Reviewed-on: https://dart-review.googlesource.com/29541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-14 19:18:16 +00:00
pq d0249ee8f4 Bump DEPS to pull in linter 0.1.41.
* broadened `args` package dependency to support versions `1.*`

Bug:
Change-Id: I682e784de77c999e792aec90ec966944db85cb95
Reviewed-on: https://dart-review.googlesource.com/29448
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2017-12-14 19:02:56 +00:00
Terry Lucas 642b768e87 Fixed default parameter messagePorts for MessageEvent factory.
R=vsm@google.com

Change-Id: Ic94ccbe4c29302e44c58791658ce75dff86d9ac2
Reviewed-on: https://dart-review.googlesource.com/29544
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-12-14 18:21:25 +00:00
Brian Wilkerson 08ae137688 Attempt to fix the status file to fix the bots
Change-Id: I605ee84a13e34502033e28cfb15cbe3982f4d3dd
Reviewed-on: https://dart-review.googlesource.com/29547
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-14 18:14:15 +00:00
Martin Kustermann 52a25e1b4b Update status files for -cdartk -asimarm/simarm64 --strong
This brings the following configurations green:

  tools/test.py -mrelease -cdartk -asimarm --strong
  tools/test.py -mrelease -cdartk -asimarm64 --strong

Issue https://dart-review.googlesource.com/c/sdk/+/29581

Change-Id: Ieb236d19886147fb38aca982f69a2a9ff7ac2457
Reviewed-on: https://dart-review.googlesource.com/29592
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2017-12-14 16:15:55 +00:00
Martin Kustermann 0b8d270434 Do not use pkg/vm wrapper script when running fully-linked kernel files
Issue https://github.com/dart-lang/sdk/issues/31585

Change-Id: I5211c7d8fb16ea60509916bf525cc36ac05dd3a9
Reviewed-on: https://dart-review.googlesource.com/29591
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2017-12-14 16:03:15 +00:00
Devon Carew 38df6ea1f4 Only show closing labels that have nesting.
Bug:
Change-Id: Ifc9177973961f2a74be3e2871aa2d58c28007478
Reviewed-on: https://dart-review.googlesource.com/29540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-14 15:54:50 +00:00
Brian Wilkerson df479ca916 Accept a trailing comma in asserts in initializer lists (issue 31320)
Change-Id: I6166aac91abc65c0817d14e1d98f5944236016bf
Reviewed-on: https://dart-review.googlesource.com/29520
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-14 15:49:45 +00:00