This allows us to keep symbol names for classes/methods/fields - even if
obfuscation is enabled, but has no other effect on tree shaker / ...
For go/dart-ama
TEST=vm/dart/keep_name_pragma_test
Change-Id: I66c0fc32217d9180f821658bae463f2c1d7fb1af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309740
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
"dartdevc" and "dartdevk" have been replaced with "ddc".
Change-Id: I823bc029a0bbe1295fd731efcc32961e61c6c175
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282485
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
* The new compiler name "ddc" will be used for all configurations
in an upcoming change.
* Aliases "dartdevc" and "dartdevk" will be removed in the future.
Change-Id: I2fa48e0ec043b1ba7fb70f883b39e40f338b6928
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280862
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Actually, for `Expect.fail`, the return type is kept as `void`, as
changing this to `Never` would apparently change a lot of static
analysis of language and co19 tests. It seems the `@alwaysThrows`
annotation is no longer (or was never) relied upon for static
analysis (usually around dead code analysis).
Bug: https://github.com/dart-lang/sdk/issues/49583
Change-Id: I6d9daaa1d290ab0322a529faaf9574fe83b9cd25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279742
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
This CL cleans up the logic in two tests to better prepare for Dart2Wasm. In addition, env_test has been cleaned up now that the multitest no longer makes sense.
Change-Id: I0a7eabff1e2bfb6ea7aa1078ee85a58db9886e21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267286
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
This reverts commit 7f0fa313cc.
Reason for revert: Breaks a VM test
Original change's description:
> [test] Fix some tests for Dart2Wasm.
>
> * bool_from_environment_test is updated with the correct check.
> * env_test is updated to consolidate some of the test cases so that it
> has the correct behavior on all backends.
>
> Change-Id: I1cb2d7f3ddd7042b26eda4fee2616aa47a55bd74
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267221
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
TBR=askesc@google.com,joshualitt@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I338a280f48d362b5b021df58c56fbb3978489932
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267284
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
* bool_from_environment_test is updated with the correct check.
* env_test is updated to consolidate some of the test cases so that it
has the correct behavior on all backends.
Change-Id: I1cb2d7f3ddd7042b26eda4fee2616aa47a55bd74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267221
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
It should not be necessary to ever run `pub get` for a package which is
not published. All packages used in the SDK are controlled by a single
package config, so it's not necessary to declare versions or paths for
any packages.
Remove all dependency overrides.
R=devoncarew@google.com
Change-Id: Icb328813b471f35ee4c99995f4e90aac4d8ed438
Tested: Covered by existing static analysis.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244767
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
I don't seem to have much time for hacking on the test runner these
days, unfortunately, but I'm still happy to review changes and keep an
eye on it.
Change-Id: I273f720e7bbd0b6658d1554898cfc8ff2f815111
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235480
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.
For additional background information see go/dart-sdk-owners.
TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
Fix the test so it reports that mirrors are not supported in aot configuration.
Fixes https://github.com/dart-lang/sdk/issues/48125
Change-Id: I07fceebf8cbee8048988c8bd5287c8aec1bb8f0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227582
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
For `asyncExpectThrows`, instead of taking a function,
then checking if that function can be called with zero arguments,
and then immediately calling it and checking that it returns a future,
just take the future as argument.
Since synchronus errors from calling the function were not caught
anyway, doing the entire `Future` computation directly shouldn't
change behavior.
Also make `asyncExpectThrows` and `Expect.throws` return the caught error,
so that you can use normal `Expect.something` checks on it afterwards,
instead of doing that in the `check` function.
That basically makes the `check` function unnecessary (but hard to remove
with the existing test corpus using it heavily).
This makes some uses of the `asyncExpectThrows` function slightly more
complicated, those that have no other way to create a future than calling
the argument function anyway, but other uses become simpler
when they can avoid adding the function wrapper.
TEST= Refactoring. If the tests keep running, it's successful.
Change-Id: I983eb65ea4805760339073fabc27f78c57f9a471
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226102
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Zero runtime affect to these unpublished packages
Allows using standard tools such as dart test, etc
Also allows better checking of dependency constraints
TEST=no effect on SDK build process
Change-Id: Ic6fbe6ce8f57724a87c058eccad64ce8e7473af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218180
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
When --resolve-dwarf-paths is enabled, then paths output to DWARF
information will be resolved to either an absolute or relative path.
If this cannot be done, snapshot creation fails.
File URIs are output as absolute paths.
SDK URIs are output as paths relative to the SDK root.
TEST=vm/dart{,_2}/use_resolve_dwarf_paths_flag_test
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try
Change-Id: I63c694f0f707ef6a3d3faa690e001fefe2b26094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196491
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
This is a reland of 5909fd111d
Does a large refactoring on the V8 snapshot profile writer
to clean things up, add more debugging support, and to fix
the problems that surfaced during the original landing.
Other changes:
Changes Serializer::CreateArtificialNodeIfNeeded() to create
artificial nodes for Code objects and immutable arrays.
Fixes CodeSerializationCluster::Trace() to only push needed parts of
discarded code objects, instead of tracing them like full code objects.
Adds test cases to v8_snapshot_profile_writer_test that exercise
the following situations (both separately and together):
* Non-symbolic stack traces are enabled and code and function objects
are dropped when not needed at runtime.
* Creation of the dispatch table is disabled.
TEST=vm/dart{,_2}/v8_snapshot_profile_writer_test
Original change's description:
> [vm] Fix V8 snapshot profile handling of the dispatch table.
>
> Fixes https://github.com/dart-lang/sdk/issues/45702.
>
> TEST=Tests listed in the issue above.
>
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try
> Change-Id: Ibf5e3ccf3828c01f9dda47de360314dabe8cb8a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195272
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>
Change-Id: I8e7030267fe190079a8f68d00fe20bf7170e5719
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-obfuscate-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195513
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Now they are only retained if one of the following is true:
* The parent is Future.wait or Future.timeout.
* The local function is a generated body of an async/async*/sync*
function.
* Symbolic stack traces are enabled.
When a local closure's parent is dropped, the parent name will
be printed as `<optimized out>` in places like exceptions.
Changes in Flutter gallery in release-sizeopt mode:
* ARM7: ROData -1.41%, Isolate snapshot -2.35%, Total snapshot -0.54%,
Isolate heap -1.38%, Total heap -1.38%
* ARM8: ROData -1.55%, Isolate snapshot -2.34%, Total snapshot -0.65%,
Isolate heap -1.41%, Total heap -1.41%
TEST=Existing tests on CI.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try, vm-kernel-precomp-dwarf-linux-product-x64-try
Change-Id: I9d05f9e0e30e9f428eff16a15b0f1eeb974419c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190023
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
TEST=Presubmit tests and local builds
Change-Id: I1b15d60eced0cf3f422548eda75706609f6640cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182624
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This is a reland of 42c76fd910
Main issue was due to the parameter order of the invoke field dispatcher
not matching the argument order described by its saved arguments
descriptor. There's no reason for it not to, so now it does.
Also fixes some issues with stack trace tests that failed due to
increased deduplication of closures by forbidding deduplication for
those tests.
TEST=Run on trybots of all architectures as well as flutter engine
trybot, new test added for downstream issues seen after initial landing.
Original change's description:
> [vm/compiler] Move AssertAssignables out of closure bodies.
>
> This CL moves the final set of checks out of closure bodies and into
> dynamic closure call dispatchers. It also adds stubs for checking top
> types and null assignability for types only known at runtime.
>
> Fixes https://github.com/dart-lang/sdk/issues/40813 .
>
> Changes in Flutter gallery in release mode:
>
> * arm7: -3.05% total, +0.99% vmisolate, -0.89% isolate,
> -1.20% readonly, -4.43% instructions
> * arm8: -3.20% total, +0.99% vmisolate, -0.88% isolate,
> -1.18% readonly, -5.05% instructions
>
> TEST=Run on trybots of all architectures, includes test adjustments where needed.
>
> Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try
> Change-Id: Ifb136c64339be76a642ecbb4fda26b6ce8f871f9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166622
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>
Change-Id: Ic5ec59cf355f7779bb82db798d97d762ba1e5556
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-linux-product-x64-try,flutter-engine-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172644
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
All code which was tested now throws a TypeError in both
sound and unsound null safe mode.
Change-Id: I304dfa6b8683223562f8613f3d14823fccab35bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170439
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Now `pub get` actually succeeds on `pkg:front_end`
Change-Id: Ifdab9d6741efba034ecd56f27fd83e288267e46c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168662
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
When we moved to make errors non-nullable in the async API, I added
legacy tests, but not NNBD tests because it is a static error in NNBD.
However, we've since started testing that null is caught dynamically
when flowing into those APIs from legacy code.
So this migrates those tests over.
Change-Id: I8002bacb45e947ef8c93dca10c7c1fd41afaa696
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152614
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Change-Id: I4b287ab1f1160550682a6afb706f5985b9fb474d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148282
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
This test confirms that the NNBD mode predicates are consistent with
equivalent dynamic tests.
Change-Id: Ifeb2b9a14144ce3bee10580c80fd4a1aeea43c32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148581
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Change-Id: I8d41ad649c83cd97253006693a0cf3676de418e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145542
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Auto-Submit: Bob Nystrom <rnystrom@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>
Fix a couple of errors when compiling those libraries as opted in to
NNBD.
Change-Id: I7dfb629d951d8531c8bed4e765950984e9291f44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139686
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
There's a bundle of improvements here:
- Show the stack trace of the failure when a test using async_minitest
fails. The trade-off is that it now only reports the first failure.
Collecting all of them didn't play nice with the stack trace
deobfuscation the test runner does.
- Report the group and name of the test that failed when known.
- Fix as many double-reporting test result bugs as I could find. Also,
in case that still happens, don't spew out a pile of useless JSON.
- Correctly wait for a test to complete even if it schedules its own
asynchronous operations without returning futures.
- Generally simplify and clean some stuff up.
Change-Id: Ie020ae0b80a11764c455cf0ce24dfea09ca0adce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138903
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Also include the generated output.
Change-Id: Ic2818f544972c737f69913122e366ea48375e950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135795
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
We don't intend to migrate unittest to NNBD, so the remaining tests
that use it need to be migrated off. This takes care of the couple of
tests in standalone/ and standalone_2/ that used it.
The tests should behave the same as they did before. I verified by
making the tests fail in various ways after the migration and ensuring
that the tests failed as expected.
Change-Id: I938229cabad1d78a42a030970f2003edd36572f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136060
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
It was literally only used by one test, and only used a single function
not already defined in minitest. That function was only used in one
place and wasn't very useful, so just refactored to not use it.
Change-Id: Ib51ac255233aa29bcaf19aaba16bc99d7eff724d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135965
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
This reverts commit 10c212f910. This is breaking on mirrors_reader_test.dart
in the VM on debug mode.
TBR=leafp,asiva
Change-Id: I71f1d78c2e1ca800584438b161c89115cd46d644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114627
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Not sure this entirely a good goal, but this is attempt to make package:expect
NNBD-agnostic. I.e., make the same code compile with or without the "non-nullable"
experiment enabled in order to avoid forking for tests.
I am still hitting two errors with NNBD - see comments. They both appear to be
bugs with type promotion + NNBD.
Change-Id: Ibf444a20c484daa38fdb88b92a26c4acac833d1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113924
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
This allows to break a circular dependency between package:expect and
package:async_helper, which will simplify the support for modular tests using
package:modular_test.
Change-Id: Ie48723d3f35d51a8fbe622e0158450e8104fe3f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102140
Reviewed-by: Johnni Winther <johnniwinther@google.com>