Opt-in code can have Never types even with legacy subtyping.
Bug: 41675
Change-Id: I6dbdc064dceeedf0774d10faaca336561b41b7d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145561
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
CFE may use anonymous mixin application classes in types after
applying LUB (Least Upper Bound) algorithm in conditional expressions,
and then those types can spread via type inference.
After anonymous mixin application classes are deduplicated, all
references to removed mixin applications from types should be
updated to point to the remaining mixin application.
Fixes https://github.com/flutter/flutter/issues/55345
Change-Id: I7860b2868cb153d125fec363c1653b7aa16521e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145501
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Fixes https://github.com/dart-lang/sdk/issues/38291
This change also involves moving the "package" where test sources are
written and analyzed; It used to be /home/test (or /project in some
places); and a pubspec.yaml was written (or a .packages file) which
specified the package's name was "test". However, this conflicts with
adding an entry for a mock copy of the actual _test_ package. A
.packages file cannot have two entries for a package named "test", so
the package where all test sources are written is changed to "tests"
(located at /home/tests).
Change-Id: I462b88a814931dc2d4f1e72d07e3daf64768a399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144994
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
This reverts commit 8241779d83.
Revert "[vm, gc] Divide new-space into pages like old-space."
This reverts commit 3495158ec9.
Revert "[vm, gc] Set the scavenger's forwarding bit to equal to the pointer tag bit."
This reverts commit 6e37605661.
Bug: b/155227688
Change-Id: I7e26bd86e188fb3658b82ba311a261468db96b78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145444
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
With this change, each configuration is run on only one builder (per
branch). We need this to start processing and storing results by
configuration instead of by builder.
Change-Id: Ib11c1f3b459c2992440ce8a3540c455deb64b9f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144701
Reviewed-by: Jonas Termansen <sortie@google.com>
Without this, it's possible for a unit test failure to result in a
preview server remaining open, which can prevent test execution from
terminating.
Change-Id: I8a11056da5bea003dfa46e3871a241e8f5ce8cc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145440
Reviewed-by: Janice Collins <jcollins@google.com>
This CL makes the VM add support for .dart_tool/package_config.json via
* the --packages=<file> command line parameter
* the `packageConfig: <file>` parameter to `Isolate.spawnUri`
It also allows now `package:*` uris being used in `Isolate.spawnUri`
The CL also removes the unused `packageRoot` parameter from the Dart to
C++ interface as well as in various places in C++.
The CL also aligns the implementations between sdk and sdk_nnbd more.
Issue https://github.com/dart-lang/sdk/issues/41649
Issue https://github.com/dart-lang/sdk/issues/41245
Issue https://github.com/dart-lang/sdk/issues/41246
Change-Id: I0a7aa3040332abafa19bf80bdbd8a8f8594cc6fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145462
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
We really should switch this, if possible, to use the edit kind APIs
that the preview tool uses, so that we can categorize this without
guesswork.
However this will keep it as a rough list, and I don't know if we need
anything fancier that currently -- and it will no longer produce noise
if new changes are added.
(currently produces "and 0 other changes" when running on flutter, so
it's probably mostly comprehensive currently).
Change-Id: I9cb2662995af340346a61d38eba3469927a0f4ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145160
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
No semantic changes, I think.
Just a step closer to what the spec says.
R=paulberry@google.com
Change-Id: I3b27c3daa3b93d425ede56bc1b2b1056210135d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145243
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Since the tests use a MemoryResourceProvider we can run both kinds of
tests on both platforms. That should make it easier to track down and
fix issues occurring under Windows (see
https://github.com/dart-lang/sdk/issues/40381).
Change-Id: Ie058f8c08923a3ef4ea12c5f28219e48aa17c28d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145026
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This mechanism is simpler, and it has the advantage that if the
preview server fails to start for some reason, we get a useful failure
message rather than a timeout.
Change-Id: I6ead899b3af02431c2a022fa104c6596ff952917
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145142
Reviewed-by: Samuel Rawlins <srawlins@google.com>
So, we can use exact type for TypeOperations, and it will be convenient
for implementing promotion via initialization.
R=paulberry@google.com
Change-Id: I5b1243d5a4ac95f92ee1d08e6ed64be09e8c8f53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145306
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This change reverts an accidental breaking change in 6a5b87f where the
HTTP parser rejects characters in HTTP header values that it wouldn't
send itself.
This change restores the previous behavior of decoding these characters
as Latin-1.
Fixes https://github.com/dart-lang/sdk/issues/41688
Change-Id: I02bae07b5721eb4cbec789ad912c7fe6e2b2b015
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145244
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
The option is added to the unit testing framework and is supposed to
be used locally.
Change-Id: Ia043ca35d27c15e597fe1b66429f923ccb24f3dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144825
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
This reverts commit 1bf25798fa.
Reason for revert: Rolling back as it breaks more external targets and is currently blocking rolls.
Original change's description:
> Reland "[VM] Remove unnecessary Closure.clone() from sync*."
>
> This reverts commit 430c75b5fa.
>
> Reason for revert: We probably don't care about the dartkb breakages.
>
> Original change's description:
> > Revert "[VM] Remove unnecessary Closure.clone() from sync*."
> >
> > This reverts commit ca94ad7112.
> >
> > Reason for revert: Appears to break dartkb.
> >
> > Original change's description:
> > > [VM] Remove unnecessary Closure.clone() from sync*.
> > >
> > > Instead, this CL wraps sync*'s sync_op in an additional function
> > > that captures local copies of the necessary closure state.
> > > Notably this state includes the parameters of the original sync* function
> > > as these also need to be cloned for each instance.
> > >
> > >
> > > Note: a large number of .expect files have a small number of changes
> > > due to the additional wrapper function, as well as some extra plumbing.
> > >
> > > Bug: https://github.com/dart-lang/sdk/issues/37753
> > > Change-Id: If099dbfe9e5d62979626b852386fd0173fc76de5
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136190
> > > Commit-Queue: Clement Skau <cskau@google.com>
> > > Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> >
> > TBR=vegorov@google.com,cskau@google.com
> >
> > Change-Id: I89e517196f03622337f909f0fcecbdc77c9dda93
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: https://github.com/dart-lang/sdk/issues/37753
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144920
> > Reviewed-by: Clement Skau <cskau@google.com>
> > Commit-Queue: Clement Skau <cskau@google.com>
>
> TBR=vegorov@google.com,cskau@google.com
>
> Change-Id: I78589c83cbb17151ca4ab8f811b4f18f252fb9c1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://github.com/dart-lang/sdk/issues/37753
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144921
> Reviewed-by: Clement Skau <cskau@google.com>
> Commit-Queue: Clement Skau <cskau@google.com>
TBR=vegorov@google.com,cskau@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: https://github.com/dart-lang/sdk/issues/37753
Change-Id: I879df17bd282d01468fa010b94a8c89afdb8cd0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145361
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
This reverts commit 05b7f49c72.
Reason for revert: This appears to break other external targets. Rolling this and original CL back to unblock rolls until deeper investigation can be done.
Original change's description:
> [VM] Fixes missing bits for new sync* transform.
>
> The missing part of the transform fixes an issue that manifested
> as a crash when running tests for [0].
> Which was caused by un-transformed yields in nested functions in sync*s.
>
> The second half of this CL updates the type_checker tool for the new
> transform of sync*s.
>
> [0] https://github.com/KhronosGroup/glTF-Validator
>
> TBR: To unblock roll blocked by crash.
>
> Bug: https://github.com/dart-lang/sdk/issues/37753
> Change-Id: Ie20f351b16f2f87e92f0731fc96b0a5ea29e0300
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144948
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Clement Skau <cskau@google.com>
TBR=kustermann@google.com,cskau@google.com
Change-Id: Ided526100e7393375445545d0fe16806333b0d20
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/37753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145360
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
The missing part of the transform fixes an issue that manifested
as a crash when running tests for [0].
Which was caused by un-transformed yields in nested functions in sync*s.
The second half of this CL updates the type_checker tool for the new
transform of sync*s.
[0] https://github.com/KhronosGroup/glTF-Validator
TBR: To unblock roll blocked by crash.
Bug: https://github.com/dart-lang/sdk/issues/37753
Change-Id: Ie20f351b16f2f87e92f0731fc96b0a5ea29e0300
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144948
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
This test validates my understanding of
https://github.com/dart-lang/sdk/issues/39641#issuecomment-573669413,
namely that when assigning to a promoted variable, the context used to
do inference of the RHS of the assignment should come from the
promoted type, but it should still be ok if the RHS doesn't evaluate
to a subtype of the context type (in which case the assignment
de-promotes).
Change-Id: Iafb2e741f8b9631a9b017804a5ad59972bfc638e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144883
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
- Expose the internal runtime flag for the Null Safety mode.
- Add a guard to protect against accidental configurations
that set the mode multiple times.
Change-Id: I8d16a3c7bd8590ea6f2fee9b6f8c09009898a64b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144991
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This change introduces 2 new stubs, InitLateInstanceField and
InitLateFinalInstanceField. Those stubs call field initializer
directly without going to runtime.
Fixes the regressions on Uri.pathSegments.easy and Uri.pathSegments.hard.normalized
benchmarks with NNBD SDK after https://dart-review.googlesource.com/c/sdk/+/143189.
Change-Id: I6bde7a98010ac1321a95eda8b0f125105f3993c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144807
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Will allow
- merging heaps without first evacuating the donor's new-space
- visiting new-space in parallel during marking
Change-Id: I6189281801cdafa4f9944ab5e7bb2153f964b18b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143080
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Makes some conversions no-ops.
Change-Id: I577475b1ec3ee9d4e79f3deb931b9d225053d447
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144805
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>