Type arguments should not be reused if type parameter has a nullability
other than non-nullable or undertermined, as instantiating such type
parameter may alter the type.
Also, this change adds printing of nullability when dumping bytecode
and updates expectations accordingly.
Fixes language/nnbd/is_type_test/null_is_type_in_legacy_lib_test in
bytecode mode.
Change-Id: I4378a4e42fa0bf014840b9b1ef09a633c1825e20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155560
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
I don't like having a large volume of Dart code sitting under tools/
where it is hard to analyze, lint, test, and reuse. Also, eventually
we want to merge test.dart and test.py. This seems like an easy mostly
mechanical first step.
All I did was:
1. Move the contents of tools/test.dart to
pkg/test_runner/lib/test_runner.dart. (That's not a great file name
since we already have pkg/test_runner/bin/test_runner.dart, but it
was the best I could come up with.
2. Copy tools/bots/results to pkg/test_runner/bot_results.dart. I
don't like duplicating this, but there are other scripts under tools
that import the old location. Eventually, we should have those
scripts import it from package:test_runner/bot_results.dart, but I
didn't want to do that here since I'm not familiar with those other
scripts.
3. Make tools/test.dart import and forward to
pkg/test_runner/lib/test_runner.dart.
4. Fix any linter and type errors. The test_runner package has a bunch
of strictness checks and lints enable to keep it cleaner.
5. Run dartfmt --fix to format and get rid of "new", etc.
Change-Id: Ifc89817508d3fc147fa78dbc6744d547aeaf4c55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155240
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
This doesn't actually run DDC to generate the web errors yet, but it
changes the CLI in anticipation of that, and adds tests to verify that
once web errors are reported that the updater handles them correctly.
Change-Id: I31264e3d468969b07f9eb60353a9b02a93bec7ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155102
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Newer GN doesn't allow `*.framework` elements in `libs`. It
requires using `frameworks` instead. The toolchain definitions need
to pass the new substituted variable to the link to make use of the
new required way to express these dependencies.
Bug: fxbug.dev/56683
Change-Id: I62e68a8e5bdfef095b72b38d9d41f757e510012b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155482
Auto-Submit: Roland McGrath <mcgrathr@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This reverts commit e3a682480a.
Reason for revert: Broke time reporting on new
devices.
Original change's description:
> Reland "[vm] Replaces fuchsia.deprecatedtimezone"
>
> This is a reland of 16f09f20b3
>
> The apparent break of internal tests was not caused by this change.
>
> Original change's description:
> > [vm] Replaces fuchsia.deprecatedtimezone
> >
> > (prior attempt was rolled back as it caused downstream tests to time
> > out. See prior attempt at: See:
> > https://dart-review.googlesource.com/c/sdk/+/149206)
> >
> > The FIDL library fuchsia.deprecatedtimezone is going away. There are
> > different and better ways to obtain the same functionality. This change
> > removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.
> >
> > Adds inspect metrics that allow whitebox testing of the runners. Here's
> > a sample `fx iquery` excerpt from a running device, showing both a dart
> > and a flutter runner exposing the same OS diagnostic metrics.
> >
> > ```
> > /hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
> > /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
> > dst_status = 0
> > get_profile_status = 0
> > timezone_content_status = 0
> > tz_data_close_status = 0
> > tz_data_status = 0
> > /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
> > /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
> > dst_status = 0
> > get_profile_status = 0
> > timezone_content_status = 0
> > tz_data_close_status = 0
> > tz_data_status = 0
> > ```
> >
> > Under nominal operation, all of the above values should be equal to 0.
> > Nonzero values indicate an error.
> >
> > This functionality is guarded by Fuchsia integration tests at
> > //src/tests/intl.
> >
> > Tested:
> > (compile locally for Fuchsia and deploy)
> > fx test //src/tests/intl
> >
> > See:
> > - https://github.com/dart-lang/sdk/issues/42245
> > - https://github.com/dart-lang/sdk/issues/39650
> >
> > Fixes#39650
> >
> > Change-Id: I97f6e17e57000f6eec71246aee670bca65b7e1d1
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150662
> > Commit-Queue: Filip Filmar <fmil@google.com>
> > Reviewed-by: Martin Kustermann <kustermann@google.com>
>
> Change-Id: I5da6b0f481af0eb42c3b5e74c920588ac2ef5be9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151862
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Filip Filmar <fmil@google.com>
TBR=kustermann@google.com,kaushikiska@google.com,fmil@google.com
Change-Id: I6e590cf22347f9153e5203b255f37872dbd91fa6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155505
Commit-Queue: Filip Filmar <fmil@google.com>
Reviewed-by: Filip Filmar <fmil@google.com>
This reverts commit 6bba75079a.
Reason for revert: Starts reporting new hints in front-end libraries. Breaks bots. Will clean-up and reland.
Original change's description:
> Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns.
>
> R=brianwilkerson@google.com
>
> Bug: https://github.com/dart-lang/sdk/issues/42797
> Change-Id: I14e50c231935a4025d33762843f5a54a1ee2154c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155500
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
TBR=scheglov@google.com,brianwilkerson@google.com
Change-Id: I99e845d9bd1d9c0882fecc8d72d18d5582454461
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/42797
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This reverts commit 444cb00610.
Reason for revert: The original change broke time reporting on new
devices. Since this was a touch-up, it will need to change as well.
Original change's description:
> Fix the #include path for ICU headers
>
> The ICU headers in os_fuchsia.cc have been included with their path
> relative to the dart root directory. They should instead be included
> relative to the paths mentioned in `-I` directives of the current
> compiler invocation.
>
> This allows downstreams that have a different directory organization to
> build dart sdk even if they don't exactly replicate the directory
> structure of dart sdk.
>
> Change-Id: Iec79f261aee5ccc7b74448978fc69244e260400a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154163
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Filip Filmar <fmil@google.com>
TBR=kustermann@google.com,kaushikiska@google.com,fmil@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ib2c22c2bfaabb07001acb707d996d90a18df3fd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155502
Reviewed-by: Filip Filmar <fmil@google.com>
Commit-Queue: Filip Filmar <fmil@google.com>
- bumps the meta version so it can be published
- updates sdk constraints to be consistent with all other packages (should have been equivalent anyways)
Change-Id: I83520d291625f13b0029e28aecb9714f365a75b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155460
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Some package configuration tests have the current version hardcoded
in local package_config.json files. Update these from 2.9 to 2.10.
Change-Id: I77bf63c0e5dfa73aa8a86fb1b4e8a404e8cfaa7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155441
Reviewed-by: Martin Kustermann <kustermann@google.com>
I found literally zero tests for INVALID_CAST_FUNCTION_EXPR, and I was
unable to write any code that triggers it. :/
The rest are classified as compile-time errors in CFE; I am confident
that "compile-time error" is the correct classification.
Change-Id: Ib0cf543b983f8e28b45d40cc9cd4dc9f14b2f387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155302
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This reverts commit d870a71b20.
Reason for revert: ASAN failures
Original change's description:
> [ VM ] Print a meaningful error message when a user attempts to run an AOT snapshot with a JIT VM.
>
> Fixes https://github.com/dart-lang/sdk/issues/42482
>
> Change-Id: I284a5673e30f59b127e69c712df93552cdfcde41
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154834
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: I3639ede6987fbb51fb95584685c472abb789970e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155303
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Now the call in `dtest()` (directly above) is known to never return
so the type of `obj` can be promoted and there is no cast in the
return statement.
Change-Id: I9096dab87cfba5ea2289530070d0214974379ebc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155068
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Don't assert that RSS > VM memory as VM memory might not be all resident.
Change-Id: Ie00c3e382d7b219fdb462a6e61d649f4d5276964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155140
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
The IO tests aren't working yet, but basic tests work:
tools/test.py -n dartk-fuchsia-debug-x64 language_2/list/literal3_test
You may need to run this first:
sudo chmod 666 /dev/kvm
Change-Id: I04915ce11f671f1d493f9eeb6bc832089ba9bfa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154828
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Previously, we considered an expression unreachable if its type was
exactly `Never`. This CL switches to using TypeSystem.isBottom, which
correctly handles types like `T extends Never`.
Change-Id: Ia6ce580caab6bc7ce7cceb1d0097b50f1da88f8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154746
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
process had an isolate without an associated pause event.
Change-Id: I2c833335129d120aec84e3a2327d1f10560fe186
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155145
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This heuristic can cause the heap to consume memory in excess of the growth ratio after the application's memory usage shrinks.
Bug: https://github.com/dart-lang/sdk/issues/18147
Change-Id: I3d4aa0bc4b74d22e974e3cac00ee9e42967e0826
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125000
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>