... for generic methods and local function. Also update capture
conversion to recognize the new kinds of type variables.
Change-Id: I9b8771b0ebe6c9e926712fa31b0bdea966cc6a25
Reviewed-on: https://dart-review.googlesource.com/34600
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
Change-Id: I5b1e5ce7334d56ac93613a60b958e2a66fe6d602
Reviewed-on: https://dart-review.googlesource.com/35281
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Change-Id: Iec0b2df092cffbbf720065b910e3bbefc41eb03a
Reviewed-on: https://dart-review.googlesource.com/35240
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
And so there is no need to maintain status files for this platform.
R=whesse@google.com
Change-Id: Ie70e4b7308cfd9b1b179b2d1eeeb8f36dd1a62dc
Reviewed-on: https://dart-review.googlesource.com/34824
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Change-Id: Ie83cd4692898c1b6e585ed5d47fc55be4d60c272
Reviewed-on: https://dart-review.googlesource.com/35162
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
The incremental compiler calculates which libraries are reusable,
but previously forgot about parts when mapping for changed files to
libraries.
This CL fixes that, meaning that a changed part file will invalidate
the Library it's a part of, meaning we get the needed re-compilation.
Fixes#31908.
Change-Id: Ic30c97af3f1c8166a82774040a2bbcebf5686415
Reviewed-on: https://dart-review.googlesource.com/34821
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
In addition to updating code completion, this also
addresses comments in https://dart-review.googlesource.com/c/sdk/+/34520
* Change expect to assert `}` where expect is unnecessary
* Extract skipToLastModifier utility method
* Fix spelling
Change-Id: I6a0446d77fac995da3e4d1d2f682f75d584b275f
Reviewed-on: https://dart-review.googlesource.com/34960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
- fix all usage of `.name` when `.name.name` is required
- fix handling of inline-JS in the SDK
- fix casts on SDK nodes
Change-Id: Ic48e0b77e6e03515f16b8c30d3e274abbe2ed272
Reviewed-on: https://dart-review.googlesource.com/34540
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Just noticed that the 'supportsRelection' flag was not checked when running with
'--use-kernel'.
Change-Id: I9f4bd540ad963c33c8b9013860ac63b1c6707299
Reviewed-on: https://dart-review.googlesource.com/35006
Reviewed-by: Harry Terkelsen <het@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
- Ignore ir.Instantiation in type inference
- Add 'special' Selectors, use for $instantiateN
- Lower ir.Instantiation to a call
Change-Id: I9da05014c10c9cddf9b32f6a492fab6ac2ad2f88
Reviewed-on: https://dart-review.googlesource.com/34421
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
The code to represent a tearoff of loadLibrary looked like this:
Future __loadLibrary__lib1 () {
lib1.loadLibrary();
}
but should have been like:
Future __loadLibrary__lib1 () {
return lib1.loadLibrary();
}
Change-Id: I31efb5bee9f7e376660602c1b842a90a0a2659a4
Reviewed-on: https://dart-review.googlesource.com/34510
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
This test was broken by 45b02f8216,
which changed the behavior of flattening in the kernel driver.
Unfortuately the error wasn't picked up by the build bots because the
test is disabled - see #30796.
Change-Id: I93f488f066434afbeaaa6b82ceb9ac1278574861
Reviewed-on: https://dart-review.googlesource.com/34920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
In order to un-block Flutter integration, we introduce partial support for
conditional imports into the CFE. There are two incomplete parts:
- The condition strings are evaluated by the Target.
They should be looked up in the environment, but this introduces
complications with modular compilation.
- Type inference and other static checks are performed with reference to
the implementation (conditionally-imported) library rather than the
interface library.
See issue #30143 for more details.
Bug:
Change-Id: I740b45e9d32796644837de4caefd8d6e8015f229
Reviewed-on: https://dart-review.googlesource.com/34721
Reviewed-by: Peter von der Ahé <ahe@google.com>
In addition to improving modifier recovery, this CL
* Improves recovery when builtin keywords are used as types
* Updates ModifierContext to avoid parsing modifiers used as identifiers
* Addresses comment in https://dart-review.googlesource.com/c/sdk/+/34200
* Streamlines missing class body recovery
* Ensures the endMember event is sent during recovery
Change-Id: I87bda7c7da9d0e951427037087c7aa7e8e4da109
Reviewed-on: https://dart-review.googlesource.com/34520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This CL fixes errors in a few incremental tests.
The remaining (with a previous references to issue #31909) are not
related to incremental compilation, but also fail to fail on regular fasta.
Closes#31909.
Change-Id: I3c50a4cbfb926f8f74570523a10885e1bd28a94b
Reviewed-on: https://dart-review.googlesource.com/34801
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@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>
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>
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>
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>
- 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>