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>
This is done by setting the SDK constraint min version in the package's
pubspec to 2.9.0 which is the version that CFE currently uses to mean
"opt in".
However, the pre-built SDK currently checked into the repo can't handle
that version. To work around that, this CL has a gross hack to simply
omit the language version in the generated package config if the
pubspect's version is 2.9. This has the effect of telling CFE to use
the current language version, which is what we want, while also allowing
us to put the right SDK constraint in the package's pubspec.
Change-Id: I51c2952003c83b74fb6f3344c93839fbd267a3ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145020
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
We were only treating Object as a top type if NNBD was disabled. This is
incorrect and we should be treating Object as a top type whenever legacy
subtyping is in effect. In particular, Object acts as a top type in weak
mode.
Change-Id: I76acc25e92fda2b9e2b7872fc72d319161318874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144689
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reduces time, and more importantly auxiliary memory, to retrieve the timeline.
Change-Id: I0f87797f6d851d00cc5df0abaf5274693cb95752
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144810
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Running the standalone VM in the following ways will result in the
DartDev help message being shown:
- `dart`
- `dart --help`
The following will output the VM help message:
- `dart run`
- `dart help run`
- `dart --help --verbose` (includes verbose VM flags)
- `dart help run --verbose` (includes verbose VM flags)
- `dart run --verbose` (includes verbose VM flags)
The original standalone VM behavior can be restored by providing the --disable_dart_dev flag.
Change-Id: I67cf015d62366efdfd8bf9b215d4319fd5af3f46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144497
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
The startup info structure includes a pointer to an array of IO handles;
this was made from the address of a local variable with a scope that
ended before the call to CreateProcessW, leading to undefined behavior.
In practice this appears to have mostly been working, but it reliably
fails under some build configurations of Flutter using clang.
This gives that array the same lifetime as the rest of the arguments to
CreateProcessW.
Change-Id: I3142353fd19004372a771e0cbaf0ed846ae73b5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144520
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This reverts commit 87ce4a504f.
Revert "[vm] Make VM support .dart_tool/package_config.json"
This reverts commit b112aa0d8b.
Reason for revert: Failures on Windows
Change-Id: I3e4f601d7638b25df313773e525c9284737fa729
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144985
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This should enable strong mode tests to be fully NNBD opted in. At the
same time, legacy tests when run with the experiment off should
hopefully be able to still consume these libraries because they don't
actually use any NNBD features.
To do this, I changed the script that generates the SDK repo's package
config to not put in a language version for any package whose pubspec
has no SDK version. According to language versioning, that means the
package should be considered to be at the "current" version of the SDK
running the code.
In NNBD, that's opted in. With the experiment off, that is (presumably)
"opted out" in the sense that NNBD doesn't exist.
In order to *not* opt in some of the other packages that currently
lack SDK constraints, I put those in and pinned them to "^2.7.0" which
was what the package config script used to implicitly fill in for them.
I see a bunch of other changes in the generated package config too. The
update script probably hasn't been run in a while.
Change-Id: I55193d42eac0696a6b0105546551efa45a1f3252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144305
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Previously we just printed the result of calling Exception.toString(),
so the exception class name appeared in the output.
Change-Id: I789d4e5524cd8614d688252644b80898fd2cda17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144882
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is necessary for unit testing, and probably good practice for
normal usage; we don't want to fire up a server even briefly if the
user specifies `--no-web-preview` when running the migration tool.
Not yet wired up to dartfix--probably I won't bother to do this since
migration is being decoupled from dartfix and a new CLI is being
implemented for it.
Change-Id: I79862d9baf328d0f428f63955fb5918c94186ccb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144860
Reviewed-by: Janice Collins <jcollins@google.com>
This will allow us to publish the migration tool on pub, so that we
can ship improvements to it that aren't coupled to SDK releases.
As of this CL, basic read-only functionality of the preview site is
working. However, the ability to apply migrations and add hints to
existing code has not yet been tested.
Change-Id: Ib1588e741efa7be7861fa75b962fd1565765e794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144808
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: I642dfb89f82b3f2c1613e443850bf0b4fb91f4a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144766
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
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>
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>
This reverts commit cab69e7706.
Reason for revert: It was a temporary submit
Original change's description:
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> NOTE: This is a trial submit and will be reverted immediately.
>
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
> the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
> directory which has the 'Legacy' suffix added to it
> (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
> in during execution so that CFE runs in that mode. This is different
> from the 'null_safety' flag
>
> Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
> Reviewed-by: Siva Annamalai <asiva@google.com>
TBR=asiva@google.com
Change-Id: Ib0f99fc1a42c9c7a8b21f8542f4a35dba9105d5c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144900
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
NOTE: This is a trial submit and will be reverted immediately.
- Flips the flag from --nnbd to --no-nnbd so that by default it builds
the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
directory which has the 'Legacy' suffix added to it
(e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
in during execution so that CFE runs in that mode. This is different
from the 'null_safety' flag
Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
Reviewed-by: Siva Annamalai <asiva@google.com>