This fixes two incorrect status changes in commit 473eb4be4.
There were duplicate lines for some tests and the wrong line
was removed for two of them.
TBR: sjindel@google.com
Change-Id: I518d444d0717f6e6b76130dd284746d6f100c54a
Reviewed-on: https://dart-review.googlesource.com/34700
Reviewed-by: William Hesse <whesse@google.com>
Change-Id: Id845a025ae9823fd3e53aaac7b5a95aa9e2ad767
Reviewed-on: https://dart-review.googlesource.com/34380
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Change-Id: I6e3d9f60c43ccb34df0b58c635be51ea0aa2e789
Reviewed-on: https://dart-review.googlesource.com/32600
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Currently the [Invocation] class does not actually have support for
storing the type argument vector passed on the call site of an NSM (see
issue https://github.com/dart-lang/sdk/issues/27323).
Nonetheless do we need to support calling NSM where the call site has
type arguments provided.
Closes https://github.com/dart-lang/sdk/issues/31880
Change-Id: I0f7db12d3e8c60e45c2a3b501c39fc1d4fc796ae
Reviewed-on: https://dart-review.googlesource.com/34584
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Adjusted return types such that `return` test cases test the intended
situation; added new `testReturnToVoid` function to test the case which
was previously overlooked (that is, "`return e;` where `e` has type
void is OK in void function).
Change-Id: I9859b5ff33f0ac5d1e33d16f40fe57a6c1a7b4d0
Reviewed-on: https://dart-review.googlesource.com/34582
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
The original change is available in patchset 1.
The changes since then are just status file updates.
Change-Id: I0c45c4b09a187bdd60c6a38bf23f6b7a0cf80c97
Reviewed-on: https://dart-review.googlesource.com/34400
Reviewed-by: Jens Johansen <jensj@google.com>
Change Fasta type inference and Kernel type checking to use the new
definition for Future flattening, which is really unwrapping (peeling
off one layer of Future or FutureOr). Use this for inferring types of
`await` expressions and return types from `async` functions.
Ensure that we are using the same notion of flattening for inference
and checking. (Maybe it was a red flag that we weren't.)
This fixes await_test so that it produces a runtime error rather than
a compile time error - see #31541.
A similar change will need to be made to the analyzer - see #31887.
Change-Id: I7d936e9788969a48fdc216628eaa793389fb5e30
Reviewed-on: https://dart-review.googlesource.com/34504
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
- fix some discrepancies between old and new deferred loading.
* Kernel is now using the correct world impact
* For the old FE, I'm more careful about avoiding metadata nodes when mirros
are disabled as well.
* Better approximate when a constant is deferred in the kernel codegen
- make 'dump()' independent of the IR, so we can easily compare them side by
side.
- exclude primitives in kernel since we don't need to track them. I
didn't change the old front end because it is not as easy to do. I did this
change because kernel was processing many more constants than the old frontend
(the old frontend skipped constants that were never evaluated, we have no way
to do it selectively like that in the new front end).
Change-Id: I337d3fd818753125476b7390da5d900ebdc02709
Reviewed-on: https://dart-review.googlesource.com/34509
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Some additional optimization work will need to be done at the end so
that we take out these functions when they are not needed (when we
don't have type variables).
Bug:
Change-Id: I28d59d04844ec18510b9befe45f26f4109d86ffa
Reviewed-on: https://dart-review.googlesource.com/32667
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Conceptually this is a port of analyzer/nullable_type_inference.dart.
It contains some refactoring and other improvements, as well as tests.
Change-Id: I448440793f11e2e87583d9d47c0e6a1e54ae21f7
Reviewed-on: https://dart-review.googlesource.com/34308
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
This CL fixes two minor flaws in the type inference of closure return types:
- inferReturnType needs to call _wrapAsyncOrGenerator prior to
checking whether the inferred return type is a subtype of the
context. This is necessary because for async and generator
functions, the context type is the "wrapped" type (FutureOr<>,
Iterable<>, or Stream<>).
- _updateInferredReturnType needs to perform implicit downcasts before
storing the inferred return type. This is necessary because if in
implicit downcast is added, the inferred type that should be stored
is the type that was downcast to. In order to make this work, the
"unwrapping" logic needed to be moved from
_updateInferredReturnType's two call sites into
_updateInferredReturnType itself.
These flaws were benign because they were masked by the looseness of
the future flattening operation. They need to be fixed so that future
flattening can be made more precise.
Change-Id: I2b5ea3f63632638b5fadbce7d52c5d028acda5ab
Reviewed-on: https://dart-review.googlesource.com/34480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Update status files.
This cl includes implementing these two features on all platforms:
1) Support calling generic functions via DartEntry::InvokeFunction().
2) Support native generic functions. These are currently allowed, but type
arguments are ignored, and therefore not accessible from the C++ side.
Change-Id: Id39e8ca46c2ba1ba3d46946c16712a8572ff64ea
Reviewed-on: https://dart-review.googlesource.com/34023
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This linked in kernel service dill file will be used to load the kernel
isolate if the attempt to lookup the kernel service snapshot fails. The
kernel service snapshot is looked up in the following order.
1. If the "--dfe" option is specified, the file specified is used.
2. If the kernel service snapshot is found next to the executable,
then it is used.
3. If the kernel service snapshot is found in the "snapshots" directory
next to the executable, then it is used.
Change-Id: I5a0e757eb27b26a274b22b4bc36350fee59a100f
Reviewed-on: https://dart-review.googlesource.com/32446
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Chandra <sivachandra@google.com>
Old dart2js behaviour is incorrect.
Fasta behaviour is correct as recently specified.
See https://github.com/dart-lang/sdk/issues/30909 for details
Bug:
Change-Id: Ie9b24d19cab81be764cec02baa327283f4a3b3ce
Reviewed-on: https://dart-review.googlesource.com/34225
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
A fairly internal case, so I ended up guarding it semi-heavily with
asserts, which could go against convention, but seems fairly safe here.
Two tests: One that sanity checks some edge cases & exemplary values,
and another one that checks each combination programmatically. Together
they should be the best coverage; both the reliance of computers and
the simplicity of specific cases.
Should be very easy to pop in the void type here next.
Bug: 28513
Change-Id: Id20811a77b4de3f2c4ede7a77e1da5a114432e97
Reviewed-on: https://dart-review.googlesource.com/34305
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
This also changes the implementation of Function::LookupImplicitGetterSetterField to **not** use
token positions for finding the right field, but rather the name.
Issue https://github.com/dart-lang/sdk/issues/31798
Change-Id: I418c89a1426c33b2bfa8adc00534511657af51f1
Reviewed-on: https://dart-review.googlesource.com/34141
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Since implicit field getters have the receiver as the only argument
(on which don't have to perform any type checks), we can allow
intrinsification of implicit getters even in checked/strong mode.
Issue https://github.com/dart-lang/sdk/issues/31798
Change-Id: If08c6ee33818ab513a9dbf1457fede0eeb8c4404
Reviewed-on: https://dart-review.googlesource.com/34142
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
A new Expression was added in bc2560069a
but C++ wasn't updated to handle it.
The crash reported in 31868 is caused by trying to skip past such an
expression, which is now possible.
Actually using that expression is still unhandled though, although thats
a separate issue.
Fixes#31868.
Bug: 31868
Change-Id: Ife0aadb97cee398ee1925fb52f91127225253768
Reviewed-on: https://dart-review.googlesource.com/34361
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
- closed world is incomplete anyway; we're missing the call methods from static and instance tear-off.
Change-Id: Ibd3fc9d80220bef3ee651bf529a487b617de7a6b
Reviewed-on: https://dart-review.googlesource.com/34144
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This reverts commit 784ee768d8.
Reason for revert: Turns many kernel bots red.
Original change's description:
> [kernel] Unrevert "Support for the partial tearoff type application operator in VM."
>
> The original revision is available in the first patchset.
>
> Change-Id: I579b4b85a19ac17088eed050680a46df7ffc5c0a
> Reviewed-on: https://dart-review.googlesource.com/34102
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,sjindel@google.com
Change-Id: I7262f9b578bf9991f1e79aacb88c446950c79bc7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/34340
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This is part of implementing generalized void, see #30516.
Add regression test.
Update status files.
Change-Id: I0b4730734238b4dc463ddd7835e30ea8a2bd4300
Bug:
Reviewed-on: https://dart-review.googlesource.com/34224
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>