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>
This also introduces a first step toward de-duplicating suggestions as
part of the responsibilities of the SuggestionBuilder.
Change-Id: I1bcda241b0caee528c5740deae5662c6d43102aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145143
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
In weak mode dynamic is a subtype of Object and
A<dynamic> is A<Object> should evaluate to true, as
LEGACY_SUBTYPE treats Object as legacy.
This change fixes language/constructor/constructor12_weak_test in weak mode.
Fixes https://github.com/dart-lang/sdk/issues/41642
Change-Id: Ie02888841a5cea9f6a8ccd38df504d6c938e58f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144992
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@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: Idec0990c731f34efda9c39672067eae9174319f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144826
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Inlining of implicit getters of late fields is enabled in call
specializer. In addition, this change enables CSE for InitInstanceField
instructions.
Fixes https://github.com/dart-lang/sdk/issues/40447
Change-Id: I58db86e7c20d4cfe943a2bb49dcee03c5963775b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144981
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
E.g., reproducing #40707:
$ time out/ReleaseX64/dart pkg/front_end/test/crashing_test_case_minimizer.dart --platform=[...]/flutter_web_sdk/kernel/flutter_ddc_sdk.dill --invalidate=[...]/gallery/lib/main.dart --target=ddc --widgetTransformation [...]/gallery/lib/main.dart
[...]
DONE
Uri file://[...]/gallery/.dart_tool/package_config.json has this content:
{
"packages": [
{
"name": "flutter",
"rootUri": "file://[...]/flutter/packages/flutter",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
}
],
"generatorVersion": "2.9.0-3.0.dev.flutter-b0d35855d8"
}
====================
Uri file://[...]/gallery/lib/main.dart has this content:
import 'package:flutter/material.dart';
class RootPage extends StatelessWidget {
====================
Uri file://[...]/flutter/packages/flutter/lib/foundation.dart has this content:
export 'src/foundation/diagnostics.dart';
====================
Uri file://[...]/flutter/packages/flutter/lib/material.dart has this content:
export 'widgets.dart';
====================
Uri file://[...]/flutter/packages/flutter/lib/src/foundation/diagnostics.dart has this content:
abstract class DiagnosticableTree with Diagnosticable {
====================
Uri file://[...]/flutter/packages/flutter/lib/widgets.dart has this content:
export 'src/widgets/framework.dart';
export 'src/widgets/widget_inspector.dart';
====================
Uri file://[...]/flutter/packages/flutter/lib/src/widgets/framework.dart has this content:
import 'package:flutter/foundation.dart';
abstract class Widget extends DiagnosticableTree {
}
abstract class StatelessWidget extends Widget {
====================
Uri file://[...]/flutter/packages/flutter/lib/src/widgets/widget_inspector.dart has this content:
abstract class _HasCreationLocation {
}
class _Location {
====================
real 5m28.400s
user 7m24.233s
sys 0m9.895s
Change-Id: Ide66ad928699b781f3cfa8de11536cc8125983e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145080
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
* Fix version detection in checked-in SDK update script.
* Invoke gclient setdep in checked-in SDK update script.
* Move SDK version to a DEPS var.
Change-Id: If1e265f365a0a9b94d22acfe61109db92fb2afab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144823
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This reverts commit 8e90d2b4d2.
Reason for revert: Causes test failures on reload/reload-rollback bots.
Original change's description:
> [VM] Mark all indirectly dependent code dirty on hot reload
>
> The idea behind this is that the incremental compiler can now
> (currently experimentally) recompile less if the outline didn't change.
> This also mean that it can output less (e.g. only the changed library).
> This change should make sure that the VM still invalidates everything
> it needs to.
>
> See also:
> https://github.com/dart-lang/sdk/issues/34001
> https://dart-review.googlesource.com/c/sdk/+/77722
>
> Change-Id: I8d04bb86d2a27dd2706ec83f53fa98453eb41ce1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144299
> Commit-Queue: Jens Johansen <jensj@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
TBR=kustermann@google.com,aam@google.com,rmacnak@google.com,jensj@google.com
Change-Id: I5158447943c5dab18f4ed433f3709e6ee403606a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144822
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
The idea behind this is that the incremental compiler can now
(currently experimentally) recompile less if the outline didn't change.
This also mean that it can output less (e.g. only the changed library).
This change should make sure that the VM still invalidates everything
it needs to.
See also:
https://github.com/dart-lang/sdk/issues/34001https://dart-review.googlesource.com/c/sdk/+/77722
Change-Id: I8d04bb86d2a27dd2706ec83f53fa98453eb41ce1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144299
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
https://dart-review.googlesource.com/c/sdk/+/144945 will add the first
co19 status files, these will need to be sent to the shards as well.
Change-Id: I463b03cf54f5ab24774ce56921076c97448e5d68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144946
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
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>