We only check the expected stack starting from the call to
foo in main, so we no longer depend on what is captured in
the stacktrace for how main is invoked.
Also removes the old status lines for this test, which are no
longer applicable, and cleans up the documentation a little.
Fixes https://github.com/dart-lang/sdk/issues/39766.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try
Change-Id: I61f0465dcd55d090c49db9c6af503ae9c0df6313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128401
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
The CFE recently changed the name of the top-level deferred load library method
from `__loadLibrary` to `_#loadLibrary` (see #39682)
We were properly escaping this name when generating the method itself, but we
didn't properly escape the name when creating tearoff closures derived from it.
This is why the issue was not detected earlier.
Change-Id: Ic1487a10f521a86a3466608b1825a2b632a191be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128260
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Note that when generating unstripped ELF snapshots with --obfuscate,
this means DWARF sections in the resulting snapshot will leak
otherwise obfuscated information. To avoid this, use both --strip
to strip the generated snapshot and --save-debugging-info=<...> to
save the unobfuscated DWARF information to a separate file.
Fixes https://github.com/dart-lang/sdk/issues/35563.
Change-Id: I8795e2a5623ad5fc5362257007f677e622a7700b
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-mac-release-simarm_x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127166
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 84a4bbcabc.
Reason for revert: Another try to land, to get more logging data.
Original change's description:
> Revert "Reland "[infra] Add failing test to test CI systems and approvals workflow""
>
> This reverts commit c716068538.
>
> Reason for revert: Trying again to diagnose failure to copy approvals.
>
> Original change's description:
> > Reland "[infra] Add failing test to test CI systems and approvals workflow"
> >
> > This reverts commit 25def20f5d.
> >
> > Reason for revert: Retrying, now that we are copying CQ approvals for all commits in the blamelist of a builder.
> >
> > Original change's description:
> > > Revert "[infra] Add failing test to test CI systems and approvals workflow"
> > >
> > > This reverts commit e578eeb235.
> > >
> > > Reason for revert: The reverted commit is a test of the new approvals UI for tryjobs and the CI. It includes an intentionally failing test, that we now remove again.
> > >
> > > Original change's description:
> > > > [infra] Add failing test to test CI systems and approvals workflow
> > > >
> > > > The failing test lib_2/collection/failing_list_test.dart is added,
> > > > which imports dart:io. So it will be a compile-time failure on
> > > > some dart2js platforms, and a run-time failure on dart:io.
> > > >
> > > > This commit is just to test the UI and backend for test failure
> > > > approvals on tryjobs and on CI results. It will be reverted after
> > > > the CI builders have run on it.
> > > >
> > > > Change-Id: Icc3d11e72511cb0dbd9a62cb4fa80e754c203c8c
> > > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127883
> > > > Reviewed-by: Jonas Termansen <sortie@google.com>
> > >
> > > TBR=whesse@google.com,sortie@google.com
> > >
> > > Change-Id: I32b900e25dc562ac88f5cb496cdbca726fc70445
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127885
> > > Reviewed-by: William Hesse <whesse@google.com>
> >
> > TBR=whesse@google.com,sortie@google.com
> >
> > Change-Id: I64e528131c779c8d20c007ff715b57b599cd3f07
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127886
> > Reviewed-by: William Hesse <whesse@google.com>
> > Reviewed-by: Jonas Termansen <sortie@google.com>
>
> TBR=whesse@google.com,sortie@google.com,athom@google.com
>
> Change-Id: Icf68fd813d5f8f98d5ebf40c34e35811e8fffaf5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127892
> Reviewed-by: William Hesse <whesse@google.com>
TBR=whesse@google.com,sortie@google.com,athom@google.com
Change-Id: Ic63f74bf660e71e5e1853a391013368ce640bbc1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127895
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
The flag can be used when creating AOT snapshots. The resulting file can be
used with package:vm/dwarf/convert.dart to convert DWARF-based stack traces
to stack traces with function, file, and line number information.
Currently the saved file will be an ELF file with DWARF debugging information,
but this is subject to change in the future. To avoid being affected by any
changes in format, read the DWARF information from the file using
Dwarf.fromFile() in package:vm/dwarf/dwarf.dart.
Also adds --dwarf-stack-traces to the VM global flag list, so its value at
compilation will be read out of snapshots by the precompiled runtime.
Fixes https://github.com/dart-lang/sdk/issues/39512, which was due to
a missing compiler::target:: prefix for Instructions::HeaderSize() in
BlobImageWriter::WriteText().
Exposes the information suggested in
https://github.com/dart-lang/sdk/issues/39490 so that package:vm/dwarf
can appropriately convert absolute PC addresses to the correct virtual
address for a given DWARF line number program.
Bug: https://github.com/dart-lang/sdk/issues/35851
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-mac-release-simarm_x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I80d900fd9e5f1e2399ad3f2fd25c85131a7ea43c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121857
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This test was moved without updating its import. Convert the test
to a static error test (multitests can't have relative imports).
Change-Id: I075bf2f7d39f0958b8c625922c406cd5a7325836
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128068
Reviewed-by: Jonas Termansen <sortie@google.com>
Change-Id: Idbcc965a27e9ffeedf5e0a1068b019de4193070f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127745
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This reverts commit c716068538.
Reason for revert: Trying again to diagnose failure to copy approvals.
Original change's description:
> Reland "[infra] Add failing test to test CI systems and approvals workflow"
>
> This reverts commit 25def20f5d.
>
> Reason for revert: Retrying, now that we are copying CQ approvals for all commits in the blamelist of a builder.
>
> Original change's description:
> > Revert "[infra] Add failing test to test CI systems and approvals workflow"
> >
> > This reverts commit e578eeb235.
> >
> > Reason for revert: The reverted commit is a test of the new approvals UI for tryjobs and the CI. It includes an intentionally failing test, that we now remove again.
> >
> > Original change's description:
> > > [infra] Add failing test to test CI systems and approvals workflow
> > >
> > > The failing test lib_2/collection/failing_list_test.dart is added,
> > > which imports dart:io. So it will be a compile-time failure on
> > > some dart2js platforms, and a run-time failure on dart:io.
> > >
> > > This commit is just to test the UI and backend for test failure
> > > approvals on tryjobs and on CI results. It will be reverted after
> > > the CI builders have run on it.
> > >
> > > Change-Id: Icc3d11e72511cb0dbd9a62cb4fa80e754c203c8c
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127883
> > > Reviewed-by: Jonas Termansen <sortie@google.com>
> >
> > TBR=whesse@google.com,sortie@google.com
> >
> > Change-Id: I32b900e25dc562ac88f5cb496cdbca726fc70445
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127885
> > Reviewed-by: William Hesse <whesse@google.com>
>
> TBR=whesse@google.com,sortie@google.com
>
> Change-Id: I64e528131c779c8d20c007ff715b57b599cd3f07
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127886
> Reviewed-by: William Hesse <whesse@google.com>
> Reviewed-by: Jonas Termansen <sortie@google.com>
TBR=whesse@google.com,sortie@google.com,athom@google.com
Change-Id: Icf68fd813d5f8f98d5ebf40c34e35811e8fffaf5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127892
Reviewed-by: William Hesse <whesse@google.com>
This reverts commit 25def20f5d.
Reason for revert: Retrying, now that we are copying CQ approvals for all commits in the blamelist of a builder.
Original change's description:
> Revert "[infra] Add failing test to test CI systems and approvals workflow"
>
> This reverts commit e578eeb235.
>
> Reason for revert: The reverted commit is a test of the new approvals UI for tryjobs and the CI. It includes an intentionally failing test, that we now remove again.
>
> Original change's description:
> > [infra] Add failing test to test CI systems and approvals workflow
> >
> > The failing test lib_2/collection/failing_list_test.dart is added,
> > which imports dart:io. So it will be a compile-time failure on
> > some dart2js platforms, and a run-time failure on dart:io.
> >
> > This commit is just to test the UI and backend for test failure
> > approvals on tryjobs and on CI results. It will be reverted after
> > the CI builders have run on it.
> >
> > Change-Id: Icc3d11e72511cb0dbd9a62cb4fa80e754c203c8c
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127883
> > Reviewed-by: Jonas Termansen <sortie@google.com>
>
> TBR=whesse@google.com,sortie@google.com
>
> Change-Id: I32b900e25dc562ac88f5cb496cdbca726fc70445
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127885
> Reviewed-by: William Hesse <whesse@google.com>
TBR=whesse@google.com,sortie@google.com
Change-Id: I64e528131c779c8d20c007ff715b57b599cd3f07
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127886
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
This reverts commit e578eeb235.
Reason for revert: The reverted commit is a test of the new approvals UI for tryjobs and the CI. It includes an intentionally failing test, that we now remove again.
Original change's description:
> [infra] Add failing test to test CI systems and approvals workflow
>
> The failing test lib_2/collection/failing_list_test.dart is added,
> which imports dart:io. So it will be a compile-time failure on
> some dart2js platforms, and a run-time failure on dart:io.
>
> This commit is just to test the UI and backend for test failure
> approvals on tryjobs and on CI results. It will be reverted after
> the CI builders have run on it.
>
> Change-Id: Icc3d11e72511cb0dbd9a62cb4fa80e754c203c8c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127883
> Reviewed-by: Jonas Termansen <sortie@google.com>
TBR=whesse@google.com,sortie@google.com
Change-Id: I32b900e25dc562ac88f5cb496cdbca726fc70445
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127885
Reviewed-by: William Hesse <whesse@google.com>
The failing test lib_2/collection/failing_list_test.dart is added,
which imports dart:io. So it will be a compile-time failure on
some dart2js platforms, and a run-time failure on dart:io.
This commit is just to test the UI and backend for test failure
approvals on tryjobs and on CI results. It will be reverted after
the CI builders have run on it.
Change-Id: Icc3d11e72511cb0dbd9a62cb4fa80e754c203c8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127883
Reviewed-by: Jonas Termansen <sortie@google.com>
Arguments to simd type constructors were being checked in the bootstrap
natives entrypoint but not elsewhere. Checking for null in Dart code
ensures that we don't accidentally miss these checks in AOT.
The changes to sdk_nnbd are required in order to ensure the number of
arguments passed to native code match the number of arguments from the
non-NNBD implementation (we needed to remove the implicit type args
parameter).
Fixes https://github.com/dart-lang/sdk/issues/39518
Change-Id: Iaf7d8790c154f1e85db613b6dc84004c8013df9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126905
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Without "_test.dart" in the name, the test runner will not actually
run it.
Change-Id: Ia4f8d33c6b294879909b0a838971df21cae4e67b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127100
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
The separation will allow flutter/flutter integration tests to run the
non-vmspecific parts.
Change-Id: I0e771f1247ec62d2f0c3faa95ee10560e62524f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127144
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This is the result of running the tool from
https://dart-review.googlesource.com/c/sdk/+/124128 on the
language_2 tests that contain only static multi-test annotations.
Some of the results needed manual editing and in these cases I have
also changed the formatting of the tests.
Change-Id: I4ddd16a2c5d8576adccb0a740cb1d4aabbc001b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126161
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
The `tests/ffi/prepare_flutter_bundle.dart` script will try to discover
all synchronous, positive test from the "ffi" test suite, rewrite them
slightly and output a directory which can be used in a flutter/flutter
FFI integration test.
We split the ffi test functions into two parts, because a subset of the
C functions will issue calls to the VM via `dart_api.h`, which is not
available for the flutter/flutter integration test.
=> We make `runtime/bin/ffi_test/ffi_test_functions.cc` a pure C
library, usable without `dart_api.h` and move the remaining VM
specific code to .../ffi_test_functions_special.cc contains.
All tests from `tests/ffi/*_test.dart` will be included in the generated
bundle, which
* don't use async/isolates
* don't rely on VM api
* don't rely on DynamicLibrary.{process,executable}
* don't take too long to execute
The script can be used as follows:
sdk % dart tests/ffi/prepare_flutter_bundle.dart foo
Using SDK root: .../sdk
The following tests will be included:
aliasing_test.dart
data_not_asan_test.dart
data_test.dart
extension_methods_test.dart
external_typed_data_test.dart
function_structs_test.dart
negative_function_test.dart
regress_37254_test.dart
regress_39044_test.dart
regress_39063_test.dart
regress_39068_test.dart
stacktrace_regress_37910_test.dart
structs_test.dart
variance_function_test.dart
The following tests were filtered due to using dart_api.h/async/DynamicLibrary.{process,executable}/...
function_callbacks_test.dart
function_gc_test.dart
function_test.dart
object_gc_test.dart
regress_37100_test.dart
regress_37511_callbacks_test.dart
regress_37511_test.dart
regress_37780_test.dart
Please copy generated files into FFI flutter test application
* foo/lib/src/generated
* foo/ios/Classes
Change-Id: Ia13f97df3bbc90829bb8fde8265a7e1d2c0f8260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127006
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Original change was broken by the fact that DDC expects all types marked as
native have all their superclasses marked as native when the super classes are
compiled.
In this case `MapMixin` from dart:collection was not being marked as native and
the only reason it was working before was that the library dependency enforced
the necessary order.
* Now `MapMixin` is explicitly marked as native.
* Added a test case to use some of the API on `window.localStorage` that is
inherited from the MapMixin class.
Change-Id: I1584bfb86179016ee12c2acc5cfbbe81d086841e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126906
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Note that cast_test.dart isn't migrated yet due to #39517.
First patch set is just copying the tests over. The second patchset has
the actual meaningful changes.
Change-Id: I89233f20187b4305a776f865cde09a984423fa4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125920
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Change-Id: If0477e6096af1cec41b346c0c288ed73051f61df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126644
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
This exposed a bug in late_var_init_transformer, where statements that
came before the late var declaration weren't copied over. So I rewrote
it a lot simpler.
Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: I7f75448179f737fa1e3b90aefd9ea15a2c4be5d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126085
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Also fixes the low and high PC information in the DWARF output of
inlining nodes.
Bug: https://github.com/dart-lang/sdk/issues/35851
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-mac-release-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I11c3577bdc5c12abdc88aa799c1aae3f505294df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123734
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
If a late final field initializer is recursive, it can write multiple
values to the field. Only the first should succeed, and the rest should
throw.
Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: I87ffdc0b8fcd429c47f102fe76a0e6a577ae6c30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125934
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
This fixes the case where a late local var initializer allocates
variables or temporaries. It's not clear where they should be
allocated, since the initializer could be called anywhere the late
variable is accessed. So we wrap the initializer in a closure, since
calling a closure only requires a single temporary.
So then we just need to allocate that temp everywhere the late var is
accessed. Since temporaries are associated with specific AST nodes,
we also need to add the ability to swap out the temporaries associated
with a node, so that we can use the getter's temp when the getter
visits the initializer.
This will also reduce code bloat for large initializers.
Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: Ice8c16babc0e56368657088edf1b51b422ee0241
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125762
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
This will allow creation of the co19 NNBD CIPD package. We'll keep the
old variant of the script to create the co19 legacy packages until the
non-NNBD tests are no longer needed.
The new layout on CIPD will be:
dart/third_party/co19 (co19's master branch)
dart/third_party/co19/legacy (co19's pre-nnbd branch)
Change-Id: I21c61083630de43be10fcead221616a2bc6f9c20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125962
Reviewed-by: Jonas Termansen <sortie@google.com>
Type relations to be implemented in a later CL.
Also discovered some visitors were missing support for FutureOr.
Fixes: https://github.com/dart-lang/sdk/issues/38821
Change-Id: Iee494cfa2eff3b320a3fd1a2e7ffbf3f969b40e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125880
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Update DartTime.parse to support arbitrary precision fractional seconds. So it now conforms to ISO8901 and RFC3339 standards.
Closes#24205Closes#39350https://github.com/dart-lang/sdk/pull/39350
GitOrigin-RevId: 66f15b6e646a65b7955c7b617647b8edfd680481
Change-Id: Ife2211e6cce5922b59cdde0d30ed3ef887cffcf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124903
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
I am trying to migrate all of the negative tests to something more
precise. As far as I can tell, this test stopped being useful with Dart
2.0. Now that all compilation errors are reported eagerly, the file
simply doesn't run at all. It's now just another test of an unresolved
identifier.
(This is a good example of *why* I want to get rid of negative tests.
This test silently went from a desired runtime failure to a compile-time
failure.)
Change-Id: Iec3cdd32a15612c0760119e92d618e3a5ba1f5ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125555
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Note function_type_parameter_negative_test and
function_type_parameter2_negative_test were identical as far as I could
tell, so I merged them into one.
Change-Id: I00d53bf8ec9534b0c2832b0ea2cc4da442bfd683
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125556
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Change-Id: Ia5a397825417e2a849367efd92fc06ec682f3d1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125661
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
In order to manage the implementation of nonfunction-type-aliases,
this CL adds a new status file for co19_2 (because there was no such
file, corresponding to 'language_2.status' in 'language_2', etc.).
It skips every test that has the option 'nonfunction-type-aliases',
unless the compiler is fasta.
Change-Id: Ibfd536f6e47d6e28d6d2fb23a3676e4a5875e4df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125640
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Change-Id: I89ed80c973c5f2c76d534fcbd0f16d8141869757
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125601
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
- Copies corelib_2/a* -> corelib/
- Copies language_2/ab* -> language/
- Copies lib_2/math/ -> lib/math/
- Copies standalone_2/a* -> standalone/
And also copies over and renames all of the status files in those
directories.
Then it migrates those tests to be static error free in NNBD.
Finally, adds support to the test_runner for the new suites.
Note that this review is split into multiple patchsets. The first
patchset is a straight copy of the existing files. Then the later
patchsets have the interesting changes.
Change-Id: Icec2ff850a3aee30b653066ac184495d1e3814d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125467
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Rationale:
Rename traverses blocks in DOM order, not in execution order.
As a result, blocks that are directly entered from the entry
should introduce synthetic phis during OSR with non-empty stack
to make sure incoming stack values are merged properly.
https://github.com/dart-lang/sdk/issues/39193
Change-Id: Ic35961169aa535657333c2ab14fbd2c4e1f0783f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125489
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Rationale:
Loop analysis did not take outer indices used as bounds
(triangular loops) into account to enhance analysis. This
left some obvious BCE optimizations on the table (mainly AOT).
Observed improvements (performance and code size):
About 5-15% performance on golem benchmarks:
mainly armv7, and TypedData*Bench
Minor overall code size reduction on flutter gallery (arm32,arm64)
Comparing ./orig32.json (old) to ./new32.json (new)
Old : 6614912 bytes.
New : 6600336 bytes.
Change: -14576 bytes.
Comparing ./orig64.json (old) to ./new64.json (new)
Old : 6459216 bytes.
New : 6458736 bytes.
Change: -480 bytes.
Similar on velocity_tracker_bench (arm32,arm64)
Comparing orig32.json (old) to new32.json (new)
Old : 804280 bytes.
New : 794552 bytes.
Change: -9728 bytes.
Comparing orig64.json (old) to new64.json (new)
Old : 705520 bytes.
New : 705312 bytes.
Change: -208 bytes.
Change-Id: Ifc3b3a378ae6fd98743c48944a86a9e90ce4da5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117200
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Setting the `enableTimelineLogging` property of `HttpClient` to true results in
timeline events being created for HTTP connections and HTTP requests.
Timeline events contain general connection information, including:
- Request type
- Status code
- Request / response headers
- Cookies
- Non-sensitive proxy information
- Relevent error messages for failed connections
Change-Id: Ibe16a312ab5398c9ae886ea07bea5ca70b63e440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123540
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
I also added a test for top level late variables (they already worked).
Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: I6720e6476a067c7f8b21a34b87b23ab14fc866a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125224
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
This is practically a copy of the change in
https://dart-review.googlesource.com/c/sdk/+/118040 but applied to the non-nnbd
sdk.
Even though there is no intent to run the non-nnbd sdk with the non-nullable
experiment, we need to add this annotation because of how we
intend to gradually start testing NNBD. The libraries.json under
sdk_nnbd is allowed to point to libraries under the non-nnbd sdk in order to
temporarily build without errors until all patch files are migrated and all CFE
issues are addressed.
Change-Id: I53c1123a8d86c10695832a8a0ad35adb7b4d92fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125181
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
This is some preparation for the NNBD migration where the existing downcasts and
possible nullable accesses will be errors.
- Downcasts have been replaced with covariant parameters.
- Local variables have either been declared with a specific type or given
initial values so that they can become non-nullable in the future.
Change-Id: Ie871095ee26771833318d1dfce2b5986afaf8c69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125227
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Original change is in patchset 1.
The issue was that the expected "_Closure.call" frame is not always present.
Change-Id: I91116861e785a72536dde300f4771de4f6fa9d3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124988
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Change Expression.getStaticType to take a StaticTypeContext instead
of a TypeEnvironment.
The StaticTypeContext provides access to the TypeEnvironment and the
current 'this type' as well as determining the nullability state of the
enclosing library.
This change is needed to support nnbd types for getStaticType and also
serves as a step towards supporting caching during static type
computations to avoid repeated computations of the same (complex)
expressions.
Change-Id: Ied974dff7f6f7c3c8f262aa80c8dea5c674662f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124683
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This fixes `package:stack_trace` in the sync-start case of async/async* calls.
Change-Id: I5c41a35283439f533ab19c9fd1cc542931de4b43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124560
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Walk through http headers class. Since http header uses case-insensitive headers, noFolding() implicitly assumes field name is lower-cases. It is used to compare to lower-cases field name. Validate the field name before it is stored and also add a test case for noFolding().
Change-Id: I58f8a0ed0d366281e1e7a8c60fd46ff81c8ee796
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121773
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
Change-Id: Iecfe33abaf440576127f9a2b536593328c906e12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124332
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Adds tests for the change to make extension members accessible even
for prefixed imports. Also tests that it is an error to import a
library with extensions as deferred without hiding the extensions.
Change-Id: I3a81c560694d34c8adbb4cc86ca9e6b8a129ae56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124589
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
* Treat the assertion condition offset as a character offset in the file.
* Allow unrecognized characters to be replaced by a placeholder character. This
is unrelated to the fix but is just a precautionary measure.
Fixed: 39271
Change-Id: I4871ea41d3a46d26ecac5047265a1dbc1c889350
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124602
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Crashes come from assertion in ReturnTokens() and new_mask() in Eventhandler.
Another issue is when multiple serversockets bind to the same address, Socket will be reused to all Dart_Ports. But Socket didn't keep track of corresponding Dart Port.
When one of isolates is killed, finalizer wakes up and close most recent Dart Port that sends data.
After this cl, Socket may not be reused by different Dart Sockets. All Dart socket will has its own Socket object. But Sockets can have same fd.
This will guarantee finalizer will close right Dart Port.
Bug: https://github.com/dart-lang/sdk/issues/36106
Change-Id: Ib4620ada5f120ffda719052297009280c73b4315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122490
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
I tested it locally by updating `SharedOptions` to include not only
`--enable-experiment=non-nullable`, but also the forced path to NNBD
SDK: `--dart-sdk=/Users/scheglov/Applications/dart-sdk-NNBD`.
This will fail for now, I will accept current bot failures.
Change-Id: I72c9b46049de6cd25eddebd43d5c73c2fc9d7825
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124168
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This implements the logic for initializing, getting, and setting
non-final instance fields that have initializers. It doesn't address
statics, finals, local variables, or the no-initializer case, and is
only implemented for bytecode.
Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: I3b9e2772abdc04e3bfede56d2fcf06738f234cbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122489
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
On most apps, `==` is a very common invocation that adds lots of edges to
our global inference graph. It appears that for the most part we don't
learn much from it and that we save a considerable amount of space and
time durning global inference if we model them differently.
The amount of space varies a lot by application. Some large internal apps
show about 200K edges removed, other large apps show an incredibly large number
(1.3 M edges!)
Change-Id: I5168978f922c4d74adfae2de7fe69d56ff85ade0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123980
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
- Cache the Rti in a property on the constructor.
- Put the dodgy closure logic behind the cache to move the _isClosure
test off the fast path.
- Allow different closure.runtimeType.toString() results. The old result is not
worth preserving because it shows a 'type' that does not otherwise exist. The
actual closure.toString() is still informative.
Change-Id: I7f30e5975ce289fa6b85a22c65f76e80055ef548
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124021
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
When an explicitly defined type variable is used in an incorrect
variance position in a (final/non-final) field, an error is emitted.
Change-Id: Id1af7bdcd9adfe0c94ee76612c58ff63d011a1fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122881
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
When an explicitly defined type variable is used in an incorrect
variance position in a method (whether in the return or the
parameters), an error is emitted.
Change-Id: I7e49687579bb2ce6e293b052b657b98741cb04f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122740
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This moves the five test suites for flow analysis along with the
constants test suite.
Note that a few files have formatting errors. I'll fix those in a
follow-up CL.
Change-Id: Ie9bba74c7d91e49ac6c9d3c64a96be007b6a94c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123680
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This can be used in combination with `dart:ffi` to allow C code to post
messages asynchronously back to Dart.
Issue https://github.com/dart-lang/sdk/issues/38544
Change-Id: I0293337785a3555b4147e25f1a904f333da62c52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118565
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
In weak mode when a subtype check fails it is performed again with more lenient
rules. If the second check passes a warning is printed to the console and it is
allowed to pass. If the second check fails it is treated as a failure.
- Add a method to set the runtime mode.
- Update test expectations for more permissive subtype checks.
Issue: #38128
Change-Id: I7d55bfffad16077c50b6b2c3bf6df8367e6f7785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123300
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
- Adds a temporary modular test suite to prevent regressions on NNBD tests.
- New modular tests build the standard SDK with the dart:_runtime library from
the NNBD fork.
- Unblocks DDC development while the forked SDK is in a state that does not
build.
Change-Id: If422f5d19237f9d11e26aad503f1be960b331c57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123541
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
DDC does not generate correct bindings for async operations in spread,
resulting in errors on member accesses.
```
class A {
m1() => [1, 2];
Future run() async {
return [await null, ...m1()];
}
}
```
Another case with yield:
```
class C {
List<int> m2() => [1, 2];
Future run() async {
return await run3().toList();
}
Stream<int> run3() async* {
for(var k in [... await m2()])
yield k;
}
}
```
Fixes#38896
Change-Id: I6ea28080414e5843ab647516cc223fd218f8c17e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123465
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
This test already has several GCs under the default growth policy, so the verifier runs enough with this flag omitted.
Also, re-enable the background compiler in this test.
Change-Id: I5b874984f45766be76d5ab429df84c2f64bf7e17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123330
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
- The strong and weak tests are still identical because weak mode still executes
with the strong mode semantics.
- This is organization prep to make it easier to all what cases are covered and
what changes when I land the weak mode support.
Change-Id: I4b067cee9a4f88b417587f1bf6a42c15fa4f624e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123005
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Update spec_parser to enable configurableUri in deferred imports,
make cascade syntax compositional, include `extension` declarations,
add `late` as a built-in identifier, and reorder the lexical rules for
single words such that they are grouped into reserved words, built-in
identifiers, and "other words known by the grammar".
Cf. language issue #615, #627, #628, #638.
Change-Id: If60b2ba2ca0e7d4bbc9b4e886857f657fb14c809
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121991
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
- Copy the strong mode subtype test and change the requirement to weak mode.
Later commits will update the test to add extra weak mode expectations.
- Update the normalization tests to run in both modes.
Change-Id: I5ccff181f12756aab003c2e6db43b52ead257b19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122589
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Allows for reuse of the standard helpers that create types with and without
NNBD.
Change-Id: I8e16483e704efb47173f56c126311f7d57ece8a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122487
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Shared snapshots have been disused by Fuchsia deduping.
Reused instruction has been disused by Flutter code push.
Change-Id: Ia4cb570935c233a9365d521ca04a477c5550ef83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122421
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
- Save the canonical instance of a nullable or legacy types on the canonical
instance of the non-nullable type.
- Add additional normalization when creating nullable and legacy types.
Issue: #38109
Change-Id: I1132917965db3b00f87b891a0800da46e2cc6b3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122061
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Will be used for runtime subtype changes in future CLs.
Change-Id: I53ba10c994f13300541b3ae7a9e14d52c3836771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121821
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Remove shards from builder configuration for now because there is currently only
one test.
Change-Id: I5dcce5601ed46e36b28f9cab9bede1d81c1a42ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121865
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Uses a temporary representation for nullable and legacy types that is subject to
change.
Updated subtype test to include expectations when running with strict mode
checks.
Does not yet include support for:
* Required named parameters
* Weak checking modes (currently only strict checking)
* Caching the results of a check for a later lookup
Issue: #38128
Change-Id: I60935c071affdb56c368e9555fce8f86931103e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119537
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This makes all tests in the ffi test suite pass:
% tools/test.py -cdart2analyzer -mrelease -ax64 ffi
Issue https://github.com/dart-lang/sdk/issues/35777
Change-Id: I93338ee530041e5e8cb1eb5958b12fbf1517496e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121711
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This has coupled changes in package:ffi and package:tflite_native which are pinned in DEPS.
This CL includes the required analyzer changes from https://dart-review.googlesource.com/c/sdk/+/121647.
Issue: https://github.com/dart-lang/sdk/issues/38611
Change-Id: I712a886fd28ce0a2954fc42c90e1dfa495057732
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try,dart-sdk-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121422
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Rationale:
When the static class type does not match information found
in ICData, we require a check on a mismatch. However,
unused data should not be considered
https://github.com/dart-lang/sdk/issues/38741
Change-Id: If7717bfbce2f2a09014ce3e7cdcbf34816102b9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121141
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Follow up of https://dart-review.googlesource.com/c/sdk/+/117547
This gets rid of unnecessary allocations in hot loops with indexed loads and stores.
Issue: https://github.com/dart-lang/sdk/issues/38172
Change-Id: I37a4b1aba00084e465d47cce79bb9963e1afc104
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119645
Reviewed-by: Martin Kustermann <kustermann@google.com>
Also clean up test/benchmark/sample code using nullptr and fix pubspec.yaml in the SQLite sample.
Fixes https://github.com/dart-lang/sdk/issues/37362
Change-Id: I6fa0522374af28020ef8f096ac22b23712aedb5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121122
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Though we disable deduplication for instance methods because switchable
calls rely on a unique PC -> Code mapping atm.
Change-Id: I80915e97f5e06c3f1251ea3176d5c4f8413a81ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120041
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
The master branch in the co19 repository is now the NNBD fork. For the
time being, we want to roll the legacy variant into co19_2. At a later
stage, we will also depend on the NNBD fork, but it will likely be a
different suite.
Change the script to use dart/try rather than the legacy bucket format.
TBR=whesse@google.com
Change-Id: I9b43d9d4a49f2cfd16b8be9cca025c6d750cf2bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120781
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Added ability to recognize a MethodMirror to be a mirror of an extension member
Added ability to recognize a VariableMirror to be a mirror of a static
extension field.
Change-Id: I56715a491bba0d8cafb2796ebb755bd339e147c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120760
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Tests have both correct and erroneous implementations
of variance.
Change-Id: I49dd76f42399015dd6e3f9688e598c271ce7ab1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119722
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
I used the regex replaces documented on the `load` and `store` deprecated methods.
I manually replaced some `.val` to `.ref` when a regex could not detect whether something was a primitive value or a struct.
Issue: https://github.com/dart-lang/sdk/issues/37773
Change-Id: I3534b6dd00d9ac45fa1a11fe75c80fb3cccc07dc
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118993
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Original CL in patchset 1.
Fix for simdbc in patchset 4.
Fix for arm32 precompiled in: https://dart-review.googlesource.com/c/sdk/+/120660/
This CL optimizes Pointer operations in hot loops for Pointer<NativeInteger/NativeDouble/Pointer> (not for structs).
Design: go/dart-ffi-pointers-il
It provides roughly a 100x speedup for the FfiMemory benchmark. The next 5x speedup is to get rid of allocations due to `load` and `store` not being inlined.
FFI API is changed to enable optimizations:
* Disable dynamic invocations of Pointer.load / Pointer.store.
* Disallow implicit downcast of argument passed to Pointer.store.
* Stop zeroing out Pointer.address on Pointer.free().
Issue: https://github.com/dart-lang/sdk/issues/38172
Related issues:
Closes: https://github.com/dart-lang/sdk/issues/35902 (Disallowing dynamic invocations of Pointer ops.)
Closes: https://github.com/dart-lang/sdk/issues/37385 (Function variance checking)
Change-Id: I3921a595fd05026d6ca565ace496771d7c1d877b
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120661
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This CL optimizes Pointer operations in hot loops for Pointer<NativeInteger/NativeDouble/Pointer> (not for structs).
Design: go/dart-ffi-pointers-il
It provides roughly a 100x speedup for the FfiMemory benchmark. The next 5x speedup is to get rid of allocations due to `load` and `store` not being inlined.
FFI API is changed to enable optimizations:
* Disable dynamic invocations of Pointer.load / Pointer.store.
* Disallow implicit downcast of argument passed to Pointer.store.
* Stop zeroing out Pointer.address on Pointer.free().
Issue: https://github.com/dart-lang/sdk/issues/38172
Related issues:
Closes: https://github.com/dart-lang/sdk/issues/35902 (Disallowing dynamic invocations of Pointer ops.)
Closes: https://github.com/dart-lang/sdk/issues/37385 (Function variance checking.)
Change-Id: I96058d8b5b49052eb6999f084372e6f08b4f6f17
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117547
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
These test basic correct usages of variance modifiers in fields
and methods.
Erroneous usages will come in a future CL, as well as more complex
examples + subclassing.
Change-Id: I05d547ac1db9e22235a0bf64b05fcb3e119e3157
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119169
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Fixes#38703
This fixes the last whitelisted DDK test.
Change-Id: I1fd79c2bc361b2a4bf7fce60a406be521408024b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119921
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
This fixes the issue we had with shared/diamond depedencies. This also matches
more closely how DDK is invoked internally and externally.
While the change to use `--dart-sdk-summary` is not necessary, this brings the
API closer to how it is used elsewhere. It should be cleaned up in the future to
reuse the `--input-summary` flag instead.
Change-Id: Iec3695b5541ffaf7f5762a3d77f071a596237da1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119723
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
The interpretation of the subtype check result depends on the mode. In partial
NNBD mode all type errors that wouldn't be errors in non-NNBD programs should
become warnings. In full NNBD mode all such errors are errors. This CL adds
the mode explicitly to the interface of the subtype check as a parameter.
Bug: http://dartbug.com/38673
Change-Id: I14bcdd260618530cfdd8189c01abba7469a16679
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119545
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>