Closes https://github.com/dart-lang/sdk/pull/50240
TEST=building for fuchsia and testing on Nest Hub device.
GitOrigin-RevId: 28a6d9d8654f81cdf86161b1fc884b289a035392
Change-Id: Ie84d7943ea0d874fe4e5b421ddf47b8f0a884628
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264640
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This rehabilitates language server support for Fuchsia.
This makes GnWorkspace more like PubWorkspace, not like BlazeWorkspace. The workspace is the location of `BUILD.gn` file (and is identical to the package, although I did not change this in this CL). And there must be also `.jiri_root` somewhere above it.
We don't look for `pubspec.yaml` files to decide that we have a new `ContextRoot`, instead we rely on `.dart_tool/package_config.json` created by `Pub` from `pubspec.yaml`. For GN, I had to specialize it to look for `BUILD.gn` files.
With this change `BUILD.gn` takes preference over any other signal, so we don't care if there are `pubspec.yaml` files.
Fixed: fuchsia:109640
Change-Id: I2277336bd377abb9d8c8c33529183e21b2f51c4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
* Use dartk as the default compiler for runtime=vm.
* Status file entries for checking for the `none` compiler now either
use dartk or are deleted.
Tested: Standard CQ and local testing.
Fixes: https://github.com/dart-lang/sdk/issues/50241
Change-Id: I7a08d3e491ae1c82a0348fb66ea7b557398f97e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264682
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
The snapshot is already available in the build directory, this makes the
test save up 11 times all the parse and warmup costs of loading the
compiler in the VM.
In aggregate, this made the test run in 5 seconds instead of 2 and half
minutes on my local desktop.
Change-Id: Ic0f1ef030b06467999fd0178b599de697f8ccc94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264730
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
So, that it is easier to find ones that don't use named parameters
yet with `^ \w*Impl\([^{]` regular expression.
Change-Id: I1621093e4d41ca43f781d63781dc5883fef12ab2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264729
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
It is allowed to have named fields $N in records unless they conflict
with corresponding positional fields. So when accessing $N fields
dynamically we should look for both positional field and named field.
TEST=language/records/simple/dynamic_field_access_test
Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: Id31dcb82e753aeeaeed74d5d07aac556ae08a7b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264740
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Removes the need to make extra requests when building CPU profiles with
code nodes.
TEST=N/A
Change-Id: Iade2bcbbf36cce83046c7123628a215636786967
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264780
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This is the first phase of preparing it to be moved. The plan is for the
extensions to remain in this library along with an export of the new
library in the analyzer package.
The second phase will be to rewrite it to not use string_scanner so that
we don't have to add a dependency to the analyzer package.
Change-Id: I0d4e9c47bdcb7b825a9d3bfc76331a4e575ac664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263443
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
We need this in order to override the default as we start to migrate the
linter docs to the new format. We also need this for internal lints.
Change-Id: I9da7be2e6c657b390ae355cdfcd1e007c70769fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264061
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Bug: https://github.com/dart-lang/sdk/issues/49350
Checks to see that external extension members on `@staticInterop` types
do not declare or use a type parameter.
Change-Id: Id8646b599094b748c5490810b64d872065676014
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254103
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
This CL also changes the runtime algorithm to fully substitute
interface type parameters before performing type checks. This change is unfortunate, but necessary so that normalization of types works as expected. In the longer term we should cache generated types to avoid redundant work.
Change-Id: I9441ccdea8c6a9ac598cae043937cf683616d227
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262821
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
This change replaces the InferenceVisitorImpl.visitSwitchStatement
with a call to the new shared type analyzer, and implements the
necessary callbacks to allow analysis to work end-to-end.
Change-Id: I73a9514428b4ce092762d3ea450545986d0e1ea9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257491
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Fixes issue where --enable-experiment options passed after `dart
run` weren't being handled by the VM.
Fixes https://github.com/dart-lang/sdk/issues/50205
TEST=pkg/dartdev/test/commands/run_test.dart
Change-Id: Ia9c585a16756fd4450cfd159a1b9864ebfb6d200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264200
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Change-Id: I6b26b6171b35d22cdb706d96fdb0045eef7e7264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264100
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Joshua Litt <joshualitt@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Wasm `i64.div_s` result[1] is undefined when the division result is
2^63, and v8 traps with "divide result unrepresentable".
This change follows the checks in native runtime (in
`Integer::ArithmeticOp`) to handle overflowing in
`-9223372036854775808 ~/ -1`:
case Token::kTRUNCDIV:
if ((left_value == Mint::kMinValue) && (right_value == -1)) {
return Integer::New(Mint::kMinValue, space);
}
return Integer::New(left_value / right_value, space);
These tests now pass:
- corelib/integer_parsed_div_rem_vm_test/01
- language/operator/left_shift_test
language/operator/arithmetic_test used to fail with the same trap, but
it now fails because of #50228.
[1]: https://webassembly.github.io/spec/core/exec/numerics.html#op-idiv-s
Change-Id: Ib43ac7a53d5cf96c01b016f73240da533ef84516
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264460
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Tested: No new behaviour. Covered by prior tests.
Change-Id: I739649a53c3982b673b1144e3c5aa98cc75f98a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263042
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>