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>