Also fix the type inference algorithm so that when it explores
multiple alternatives (as a result of the use of FutureOr<>), if one
alternative generated some constraints but failed to produce a match,
it rewinds those constraints and tries the other alternative.
(Previously, it erroneously assumed that if any constraints were
generated, the alternative matched successfully).
Also add unit tests to verify the proper operation of the subtype
match algorithm.
Fixes#32305.
Change-Id: I060b5d6d5247a68d2b27bba78819bae172e43d97
Reviewed-on: https://dart-review.googlesource.com/53685
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
This avoids conflicts with client repos that have a file
//build/compiled_action.gni with something different in them.
Change-Id: I133f66b0989bcb547cb8eed8710a88e2c1384bd7
Reviewed-on: https://dart-review.googlesource.com/53440
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
(Prefered style is to surround lists with blank lines.)
Change-Id: I96e5d6715e056e3dd531059e86262e1028b51209
Reviewed-on: https://dart-review.googlesource.com/53689
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This CL updates dart:io but not dart:_http. It updates the sdk sources,
the patch files, and tests.
Change-Id: I64c3da407f09fa2bc6eec582049c4ae3a8afbe6d
Reviewed-on: https://dart-review.googlesource.com/52990
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Change-Id: Ifa9dd128ef7179ec521c893ac567b0f81ba5e306
Reviewed-on: https://dart-review.googlesource.com/53120
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
* Assert computeType and TypeInfo.skipType do not modify the token stream
* Rename TokenInfoTest to TypeInfoTest
* Move skipMetadata to util.dart
* Address comments in https://dart-review.googlesource.com/c/sdk/+/53300
Change-Id: Id2dbe54c5bc688db268e18b0a491367115f7b091
Reviewed-on: https://dart-review.googlesource.com/53640
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Change-Id: Id023f24c9e115e15ed81b93625e39230649b7822
Reviewed-on: https://dart-review.googlesource.com/53600
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
The test revealed a problem with depfile generation on Windows. Raised dartbug.com/33032 to track the fix.
Bug: dartbug.com/33032
Change-Id: I5950418d2dd61bb00ba6da752b9e3c8d9246715c
Reviewed-on: https://dart-review.googlesource.com/53541
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This is a follow-up to 4c9b712052.
Change-Id: I0a20f38b3370eda6dcda218a5a76b58646aeb2f3
Reviewed-on: https://dart-review.googlesource.com/53523
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
'--snapshot_kind=script --snapshot=xyz'
produce a kernel dill file which is the equivalent of a script
snapshot in Dart2 world.
Change-Id: I7ba66eb86d9ecdfe1426b8b22b8d673598c4b71f
Reviewed-on: https://dart-review.googlesource.com/52740
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Its last user was Dartium's DevTools.
Change-Id: I86e1a2aacc7f2589be53418b3030accc0cef9a7d
Reviewed-on: https://dart-review.googlesource.com/53464
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This reverts commit 24dd9b4176 as it broke
the presubmit buildbots.
Change-Id: If225ad7c5728413860ce7b5493e8a7fcd92f54e8
Reviewed-on: https://dart-review.googlesource.com/53461
Reviewed-by: Emily Fortuna <efortuna@google.com>
This reverts commit 7d5025e814.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Fix incorrect handling of NSM forwarders and pull all logic into CFE.
>
> The original implementation was designed around a shared misunderstanding
> of optional parameter handling in the spec. (which was also ambiguous about type parameters).
>
> The correct behavior for optional/type parameters is to fill them in with their default values/bounds.
> This behavior can be implemented without any backend support, as is done in this CL.
>
> Change-Id: Ib81f17ead2d2920e755703e244db5afc328d0315
> Reviewed-on: https://dart-review.googlesource.com/52802
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
TBR=dmitryas@google.com,sjindel@google.com
Change-Id: Ice6cd36cc62772e013bded83e0f589fe4b5e9d53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/53400
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Since there were already non-negative tests with the same numbers, I
gave them meaningful names.
Merged a couple of tests into the same file when it made sense since
multitests let us do that.
Deleted prefix1_negative_test, because it essentially tested only that
a random identifier does not resolve, which is not particularly related
to prefixes.
Change-Id: I91718f6df5126f123d9a8ea3abbc6898797db2db
Reviewed-on: https://dart-review.googlesource.com/52985
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Currently on sim* architectures we use a script snapshot (and not an app
jit snapshot, as we normally do) for the kernel isolate.
-> See utils/application_snapshot.gni:declare_args()
The change in [0] causes a deadlock where we try to compile the kernel
isolate (or rather a script snapshot of it) via the kernel isolate.
This CL fixes all the dartk-sim* builders by allowing us to run the
kernel snapshot from a script snapshot.
[0] https://dart-review.googlesource.com/52986
Change-Id: I513993f7c78310165d90f7622879482598f1e577
Reviewed-on: https://dart-review.googlesource.com/53380
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
The original implementation was designed around a shared misunderstanding
of optional parameter handling in the spec. (which was also ambiguous about type parameters).
The correct behavior for optional/type parameters is to fill them in with their default values/bounds.
This behavior can be implemented without any backend support, as is done in this CL.
Change-Id: Ib81f17ead2d2920e755703e244db5afc328d0315
Reviewed-on: https://dart-review.googlesource.com/52802
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Bug: None
Change-Id: I5627ac27907acfa5e304e47720758383a2e6376a
Reviewed-on: https://dart-review.googlesource.com/53166
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>