Our tests (including code in core libraries) are never run with
assertions enabled.
=> Add the necessary configuration support in test_matrix.json
=> We'll then add a new builder running one configuration with asserts.
Change-Id: Id1bc27ddf7d683846510af4711679ad14f0e4168
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370620
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Runs only the ffi test suite with no shards due to limited capacity. Runs JIT and AOT on the same builder to avoid building twice without RBE.
Change-Id: I1cebff950d89b3302169e9e4cdb68772cd8bf413
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365865
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This gives some more coverage for `dart compile wasm`
Change-Id: I62e7f9c6ecbdf80a1445c35d1733a7f89e6bcf54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366623
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
* We make the test runner use the same runner script as golem uses
* We make the runner script work for different JS shells
=> The runner script encapsulates how to invoke different JS shells, the
commandline format, environment variables, ...
=> Golem can then continue to use same runner script, but also with new
shells
Change-Id: Iad63fe6c0563cfeac28cbfb25eb41ee1b7c13f3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365740
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
- Compile tests to kernel and use that instead of source for the Fuchsia test package.
- Skip multitests instead of the running them and approving the failures.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/38752
Change-Id: Idd9bef0f6026c6d882712eb1083e88433bb53b13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333121
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This was causing issues with tests when there are two expected
errors at the same lines, in different files. The first expected
error would (and consume) both actual errors. So, the second expected
error would say that is unsatisfied.
Change-Id: I0bd7b56d070732c83d1d87f3dcf8ba20a693028c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364604
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Restore timeout for windows-arm64, which did not get faster.
Change-Id: I9f032c25fc69454929348f0589d35200a4728142
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364625
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
We've roughly doubled bot speeds; half timeouts to provide pressure against this simply getting filled with slower tests.
Change-Id: I812da7adc6c08e6d484732c2558e0d3f63b2694a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364385
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
When running in d8 the runtime flags need to be set by loading an
SDK with the same name passed for the application that gets used
when the application is started. If not the module system will
create an additional instance of the SDK module. This meant the
runtime flags were being set in one instance while the application
read them from another.
The same issue was present in the ddb script and this change fixes
it there as well.
Add the `--interop-null-assertions` option to the ddb script that uses
the runtime flag to enable null checks on non-static JavaScript
interop APIs.
Issue: https://github.com/dart-lang/sdk/issues/55378
Change-Id: Id8c31383fa601f5953e2cc41021746aa918186b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/361133
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Scripts that load logs and results produced by package test_runner
will print more error details when a results file does not contain
a valid JSON map on each line.
Change-Id: Ia2789dd5c0bf565eb74f6960ec8783201ff9f0ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359220
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
- Assertions are enabled in the compiler itself. DDC already enables
assertions in the test code by default.
- Runs tests in d8.
Change-Id: Ibdf285d9ab182c3859f4724b4c0740579d6d2377
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349361
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: William Hesse <whesse@google.com>
- Add a runtime flag to enable checks on non-nullable APIs that
return values from non-static JavaScript interop.
- Call a new helper method at the call site when these APIs are
detected to perform the null check.
- Add test file for the cases we can detect and enforce.
NOTE: This does not make non-static JavaScript interop sound.
This only adds more checks to enforce soundness with respect
to nullability in some cases. There are still holes that will
never be closed due to the permissive nature of this form of
JavaScript interop.
Change-Id: I2f88d1543a683fdc84d764e2b0eaafeb0ca73107
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358581
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This stops over-matching which was causing paths to be incorrect when there were multiple errors, breaking the expectation updater.
R=srujzs@google.com
Change-Id: I357d0c96ed2d5bc3658d6cc2eb9ca82f86860818
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357700
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
The updates the static error parser for the CFE to avoid capturing
previous messages as part of the path for the subsequent error.
Change-Id: I131f14000a874ff9336244372b47a3913237c939
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357323
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This is a redo of https://dart-review.googlesource.com/c/sdk/+/332220
where extra timeout wasn't given to a new process after a timeout
actually occurred, which can lead to cascades of timeouts in unfortunate
circumstances.
The extra startup time is furthermore increased from 30 seconds to 60
seconds.
Change-Id: I7d052fc1e04b374d3a6d1d82370f8edc1143291e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357280
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: William Hesse <whesse@google.com>
* Switch to `std::unique_ptr<wchar_t[]>` to represent a
dynamically strings instead of wrappers like
`StringRAII` and `Utf8ToWideScope`;
* Avoid back and forth conversion between UTF8 and UTF16:
convert to UTF16 first then work on that. This also simplifies
code - previously it tried to work with strings allocated in
different ways uniformly, which is actually unnecessary if
resulting string needs to be converted to UTF16 (and allocated
with `malloc`) anyway;
* Fix a bug in `File::CreateLink`: it was handling relative
links with long paths incorrectly. Change file_long_path_test
to cover this case and make it run on non-Windows systems as
well to ensure that all behavior that can match actually
matches.
TEST=ci
Change-Id: I1279aff1d2cdace5e2ce8633c2f7ea69a34fe41a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356680
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
The buildbot progress reporter is no longer used by anything
in our CI setup. The step-name option was only used by this
progress reporter.
Bug: https://github.com/dart-lang/sdk/issues/33078
Change-Id: Ibbee189eb08c91c9306b349b3a09a781695f095b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356800
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
These are a new type of test that runs with the SDK under test against what
looks like an external package; they start by running "pub get" then run SDK
build commands to build the package, and check that macros applied correctly.
Add tests for various builds that already pass, plus one that doesn't:
cfe_sdk_cli_test fails because it was switched to run from an AOT snapshot
and that doesn't support macros yet.
Change-Id: Ic801cb61bd414d4876566452e01dd8c8203e9013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353100
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
The checking for loops did not normalize the first entry, causing the
expectation to be read twice in case of a loop, and the test to fail.
Simplify a little by checking when adding to the "already seen" set.
R=brianwilkerson@google.com
Change-Id: I1862f98051fc5e4f867fdf0d9b1b0884b99610ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353681
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Fixes: #54971
Change-Id: I033c8ba78e6cdcf26dce9cae8998308a595a37e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353262
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
The path separator in the expect makes it fail; shorten the path, there
is no need for a separator in the test case.
R=whesse@google.com
Change-Id: Ief6078828daa18e1bf552e62ea0d3d4dee70ec84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353400
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Based on abandoned change #264261.
Changes to that PR: compare and show file paths, improve part parsing, include analyzer expectations from other files as well as CFE expectations, update unit tests.
Add end to end tests. The simplest case "library_failure_test.dart" passes before this PR, all others require the change in this PR to pick up expectations in other files.
Change-Id: Ia71b78a8f0dced83f603309877132f261b47c5a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345541
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Support `checkedExplicitCasts`,`checkedImplicitDowncasts`, `checkedParameters`, `jsNumbers`, and `nativeNumbers`.
dart2js and DDC configs should support `jsNumbers`.
dart2js and dart2wasm (both optimized) do not support checked parameters nor implicit downcasts checks.
dart2wasm optimized does not support explicit cast checks.
This CL adds these features and makes sure certain configs are opting into these features.
Bug: https://github.com/dart-lang/sdk/issues/54798
Change-Id: If61d513569259317b1fb89c27d3fd97e3542697d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352103
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
This is a reland of commit 244f8cee87
with fixes for the file URIs passed on the command line.
Original change's description:
> [ddc] Fix running d8 with test.py
>
> - Add build targets to compile .dill outlines for common test
> dependencies using kernel_worker.dart.
> - Build ddc modules for common test dependencies and move amd versions
> to a separate subdirectory.
>
> Change-Id: I126b5821f6aea00b753d83560c76f00c6c5edc61
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350081
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
Change-Id: I5a77512984fda1d91c812f1e240e9c10609914f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351622
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This reverts commit 244f8cee87.
Reason for revert: Breaks windows builds.
Original change's description:
> [ddc] Fix running d8 with test.py
>
> - Add build targets to compile .dill outlines for common test
> dependencies using kernel_worker.dart.
> - Build ddc modules for common test dependencies and move amd versions
> to a separate subdirectory.
>
> Change-Id: I126b5821f6aea00b753d83560c76f00c6c5edc61
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350081
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
Change-Id: Ic5a17edc323b298eb8d60c82c755c6929e2cacc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351520
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
- Add build targets to compile .dill outlines for common test
dependencies using kernel_worker.dart.
- Build ddc modules for common test dependencies and move amd versions
to a separate subdirectory.
Change-Id: I126b5821f6aea00b753d83560c76f00c6c5edc61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350081
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Cleanup this old naming scheme before adding new configs for DDC
that run with assertions enabled in the host compiler.
Change-Id: Icbdee694fac46b3a1d5bab7ee7411c8e9be8c4a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335385
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
* Allow --minify/--no-minify to override defaults from -O<level>
* Remove the unused(!) --name-section option from pkg/dart2wasm/*
=> Stripping it only makes sense at the binaryen step
* Make pkg/dart2wasm/tool/compile_benchmark support -g/--no-minify
=> Only useful for dart2wasm developers
Issue https://github.com/dart-lang/sdk/issues/54675
Change-Id: I695e985897b212fc345dcfd776553a009723d3b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351121
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Adds `readableTypeStrings` feature.
Configurations where `Type.toString` is expected to show the original type name and original names in function type named parameters will have this feature.
Exceptions are dart2js-prod, dart2js-minified, and vm-obfuscated configurations.
Change-Id: I5423bc31afd586733c6249519f030f7152ac4fc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349460
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
This also removes deprecated references to the DDC module system as the "legacy" module system.
This is part of an ongoing effort to deprecate the AMD module system: https://github.com/dart-lang/sdk/issues/52361
Change-Id: Ic32c6c6a0b7bf2c3bf0326be42cc9a88db8e303e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348183
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
The CIPD download puts the platform-specific executable for jsc
(JavaScriptCore) directly in the third_party/jsc directory.
Follow-up to https://dart-review.googlesource.com/c/sdk/+/347283
Bug: b/322134579
Change-Id: I6af151de10e28fee06f6ba64a288f12859516151
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348642
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: William Hesse <whesse@google.com>
"DDC" is now the accepted name for the module system.
Change-Id: I655219ccc7cff7ff99b1311518ef6ed6e7d1b2a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348085
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
This also fixes some code that was assuming the args parser returns
`Map<String, String>` for the `--define` multi-option, it's rather returning
a `List<String>`.
Forwarding these two flags will allow running some of our configurations
using `dart compile wasm` as opposed to
`pkg/dart2wasm/tool/compile_benchmark` (though the former is still
slower than the ladder).
Though since `dart compile wasm` is still a bit slower then the shell
script, we'll do that only for one configuration.
Issue https://github.com/dart-lang/sdk/issues/54675
Change-Id: I74e9edb2f635f48faade8d843857be2aa7c6066f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347903
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This reduces time for `dart compile wasm` on a hello world in
* `--no-optimize` mode from 8.2 to 1.8 seconds (0.6 sec via [0])
* `--optimize` mode from 9.2 to 3 seconds (1.6 sec via [0])
[0] pkg/dart2wasm/tool/compile_benchmark
Issue https://github.com/dart-lang/sdk/issues/54675
Change-Id: I47093e747f343b542bc7faa34e102c62657c7b81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347902
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
JSC only supports `print()` but not `console.log()`.
=> The changes to `printToConsole()` are therefore extended
to check for `console.log()` as well as `print()`.
=> This is extending it to a broader subset of dart2js's print
Change-Id: I7efa697477aa60e473d01716b104fc1526035c67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347283
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
We already have a shell script that compiles dart code to wasm and
optimizes it. I think it's rather confusing to have multiple, they
contain somewhat duplicated code as well.
We therefore remove `sdk/bin/dart2wasm{,_developer}` (which is
not used by any CI but purely for developers) in favor of
`pkg/dart2wasm/tool/compile_benchmark`.
=> It support with/without binaryen
=> It support measuring size/time/memory of dart2was & binaryen
=> It supports running compiler with assertions
Some flags/vars are not supported anymore:
* `DART_VM_OPTIONS`: Has no effect (as there's no need to support this)
* `sdk/bin/dart2wasm_developer`: Pass `--compiler-asserts` to `compile_benchmark`.
* `-O`: Optimizes now by-default, pass `--no-binaryen` to `compile_benchmark` to disable
* `-O`: Doesn't implicitly pass `--inlining-limit=10`
Change-Id: Ice656d1bfc216a536522b254e2d52bd4cad73e8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347040
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
After discussion with Siggi about
https://dart-review.googlesource.com/c/sdk/+/341020 (which removed a
lot of mixed-mode tests from the language test suite), we've decided
that these tests are worth keeping around, because they exercise
important "weak mode" runtime functionality on the web platform, and
weak mode is still used inside google3.
However, we would like to unblock removal of legacy support from the
analyzer (because this is _not_ used inside google3 anymore, and
there's a nontrivial cost to maintaining it). So, to ensure that
removing legacy support from the analyzer doesn't cause test failures,
we need to stop running these "weak mode" tests on the analyzer
platform.
The test runner already has the ability to recognize these tests and
skip them; it recognizes them by the comment `Requirements=nnbd-weak`
at the top of the test. We simply need to instruct the test runner not
to run these tests on the analyzer platform anymore.
This CL also disables running of `Requirements=nnbd-legacy` tests on
the analyzer. No such tests exist anymore, but since support for this
requirements comment still exists in the test runner, it makes sense
to include it in the effect of this CL.
Change-Id: Ib5d5eb7c1bf879581b21fa5093fa7fa6304005a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342080
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Change-Id: I69eb125f0df46bdc3be65b99985bfcdaa0d51bfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337300
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Refactor `JSStringImpl` to use the js-string-builtins API[1].
When the module `WebAssembly.String` is not available we define a
"polyfill" with the previous imports, so this change is backwards
compatible.
Also updates some of the methods to use avoid multiple `this.length`
calls (which do an FFI call), and use unchecked getters when possible.
A new library `dart:_error_utils` is introduced for faster range and
index checks when the length (or max value) is known to be positive
(e.g. when it's the length of a string).
For now only `JSStringImpl` and `operator []` and `operator []=` of
`JSArrayImpl` are updated to use the new range and index checks. Rest of
the libraries will be updated separately.
[1]: https://github.com/WebAssembly/js-string-builtins
CoreLibraryReviewExempt: dart2wasm specific library change.
Change-Id: I9436def0cfe59c631f6f4e15ea06cc18a47a738e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335043
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
- Fixes new AOT snapshots in the SDK failing with SIGILL in ARM environments that don't support the integer division instructions.
- Likewise fixes snapshot generated by `dart compile exe`.
TEST=local QEMU
Bug: https://github.com/dart-lang/sdk/issues/54198
Change-Id: Ifb998ced4e900a64ef02a464903a50954f6e0699
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339104
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>