Commit graph

7327 commits

Author SHA1 Message Date
Ryan Macnak 90d488b98e [build] Android RISCV64 using a Canary NDK.
Change-Id: I447941fd4eee0c1e4394b3ab5c0b9c36a7b4c257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330701
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-10-17 16:34:27 +00:00
asiva e0fa7f9d0f [VM] Remove observatory_2 directory and all references to it.
TEST=ci

Change-Id: I4e95e59fc909c01517ae59f39d04c38bb353b85a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330525
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2023-10-16 17:45:46 +00:00
Jonas Termansen e743910b18 Reland "Bump version to 3.3."
Please prefer not to revert this change. Any tests that fail are release
blockers and need to be approved and urgently fixed forward. Dart 3.2
has already been cut and the version number must be updated. It is
acceptable for rolls to be blocked until the release blockers have been
resolved as P0 issues.

Remove needless version number comment from experimental_features to
remove duplicated information and simplify version updates.

Update dartdoc to a version that supports 3.3.

Change-Id: I1a19aa86e185c99e61374665f18cf24c498935a5
Tested: CQ
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329588
Commit-Queue: Slava Egorov <vegorov@google.com>
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-10-06 19:00:58 +00:00
Ilya Yanok 85fd1b8f43 Revert "Bump version to 3.3."
This reverts commit 81aaf6c6c4.

Reason for revert: regression in G3: b/303734572

Original change's description:
> Bump version to 3.3.
>
> Remove needless version number comment from experimental_features to
> remove duplicated information and simplify version updates.
>
> Tested: CQ
> Change-Id: I864bfc44070136406e95fdaf4d83f491b2c95943
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329460
> Reviewed-by: Alexander Thomas <athom@google.com>

Change-Id: Ie7dca3106345ee7949ccd13ab4765998926c0abc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329603
Commit-Queue: Ilya Yanok <yanok@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-06 13:34:56 +00:00
Jonas Termansen 81aaf6c6c4 Bump version to 3.3.
Remove needless version number comment from experimental_features to
remove duplicated information and simplify version updates.

Tested: CQ
Change-Id: I864bfc44070136406e95fdaf4d83f491b2c95943
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329460
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-05 23:06:17 +00:00
Ryan Macnak 7534626f1e [infra] Enable Linux ARM64 try jobs, step 3.
Change-Id: Ib5a37f83ef2b1c8b2d5b17df8496af4b9cb608e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327241
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-10-05 05:02:29 +00:00
Devon Carew e2fe203adc [deps] roll package:lints to the latest
Change-Id: I582f956cd4b712203c2f6dd630b4e1384040446d
Tested: analysis clean (this is a lint only related change)
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329400
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-10-05 03:36:59 +00:00
Ryan Macnak c2a1585462 [infra] Enable Linux ARM64 try jobs, step 1.
Change-Id: I7bf26e933594f28caf543547df6c2c664a958897
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328560
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-09-29 15:05:10 +00:00
Ömer Sinan Ağacan f7064fc4fa [infra,dart2wasm] Add dart2wasm Firefox test configurations
Change-Id: I567732843bc305c4a42f10027cf0e9c705874713
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328822
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-09-29 12:54:12 +00:00
Liam Appelbe baaf5e1116 [ffi] Reland the iNativeCallable.listener example test.
The documentation changes already relanded. This is just relanding the
example.

Patchset 1 is a pure reland. Other patchsets are fixes.

Original CL:
https://dart-review.googlesource.com/c/sdk/+/326580

Change-Id: I04d24d63f08a351db7a6e43f331904274e28e2d5
Bug: https://github.com/dart-lang/sdk/issues/53435
TEST=samples/ffi/http/test/http_test.dart
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328681
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-09-28 22:41:42 +00:00
Jonas Termansen a35c8d5a63 Remove _webdevSoundSmoke workaround.
Change-Id: I866f388fa2b659505868b3ffe59eed5085b1ccfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328481
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-09-28 15:58:08 +00:00
Jonas Termansen df654c584f Remove obsolete checked-in SDK logic.
Change-Id: Ic92f68717a84b431fc271f6cd1bb1c4f70ea6135
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327869
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-09-28 10:49:23 +00:00
Devon Carew eae02502d4 [deps] ensure individual review of specific deps
Change-Id: I44f5bf01d43a1c4ee9b9b56ef15f9d0ec8cbabef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327701
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-09-27 17:26:35 +00:00
Jonas Termansen a97b977148 Reland "Forward compatibility for renaming the be channel to main."
Delete lots of dead code in bot_utils and utils. The logic has been
migrated into the recipes for a long time already or has otherwise
become obsolete.

This second version restores IncreasedNumberOfFileDescriptors which was
accidentally deleted while still in use.

Bug: b/270022416
Change-Id: Iea3a607663886c24ea7e0d19ea2a8a615f40ec31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327867
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-09-27 14:27:40 +00:00
Daco Harkes 0fdd69ac6e Revert "Forward compatibility for renaming the be channel to main."
This reverts commit 90300b9ca1.

Reason for revert: A bunch of purple bots mentioning:
`NameError: name 'IncreasedNumberOfFileDescriptors' is not defined`.

Original change's description:
> Forward compatibility for renaming the be channel to main.
>
> Delete lots of dead code in bot_utils and utils. The logic has been
> migrated into the recipes for a long time already or has otherwise
> become obsolete.
>
> Bug: b/270022416
> Change-Id: I7977c7a0d129e6112ad143f10f554aec7d9f653f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326780
> Commit-Queue: Jonas Termansen <sortie@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: b/270022416
Change-Id: I3b008eeb2c729fce4e9abc5879c91d2416dfa692
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327960
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-09-26 15:11:41 +00:00
Jonas Termansen 90300b9ca1 Forward compatibility for renaming the be channel to main.
Delete lots of dead code in bot_utils and utils. The logic has been
migrated into the recipes for a long time already or has otherwise
become obsolete.

Bug: b/270022416
Change-Id: I7977c7a0d129e6112ad143f10f554aec7d9f653f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326780
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-09-26 12:52:03 +00:00
Aske Simon Christensen d7b522508e Generate package config for Flute benchmark
Also conditionally check out the `characters` package, needed by Flute.

Change-Id: I71f42005bf78e7681500cca638147f8c978300ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327620
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2023-09-25 09:19:00 +00:00
Ryan Macnak 14d2789f18 [infra] Define an AOT eager optimization configuration.
Change-Id: I1098392c67da82d97c95b16490eb3beb31601896
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326760
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-09-21 15:24:32 +00:00
Johnni Winther f0933ab69e [cfe] Copy const_finder visitor from Flutter SDK
This copies the const_finder visitor from the Flutter SDK to the
Dart SDK to avoid having source code dependency on package:kernel
in the Flutter repository.

Change-Id: I76f98453c1650e63623708a9f4860d80ab4b25aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326645
Reviewed-by: Christopher Fujino <fujino@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-09-19 12:19:26 +00:00
Ömer Sinan Ağacan 3ee5bdfcf3 [dart2wasm] Add test configuration to test with wasm-opt
- Update dart2wasm script to accept a `-O` argument. When passed it also
  passed `--inlining-limit 10` to dart2wasm (unless it's already passed
  by the caller) and runs wasm-opt on the output, with the same
  arguments as `compile_benchmark`.

- Add new test configurations to run tests with optimized binaries.
  Example configuration: `dart2wasm-linux-optimized-d8`.

Change-Id: Ia7bd8d9c99d3a4baecb72b92b2ba38c0e92807c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326620
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-09-19 10:29:43 +00:00
Ryan Macnak ea9656ba38 [test] XCode's nm not available on shards that haven't yet run main task.
Change-Id: Ib438cac3acf1842afb4d55a203d1f7a0c91f5918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325451
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-09-13 10:27:59 +00:00
Zijie He 5282f6e33f [Fuchsia] Create CFv2 support
This change created a CFv2 build target and provided two
implementations of the FuchsiaEmulator, so that I can continually work
on both CFv2 build and test script integration independently.

The v2 target can be built with
```
tools/build.py --os fuchsia --mode release fuchsia_ffi_test_package_cfv2
```
And v2 FuchsiaEmulator implementation can be triggered with
FUCHSIA_CFV2 environment variable.

Bug: #38752
Change-Id: I31936a2ca967fbfeb2bc5628e2f005aef6762687
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322583
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2023-09-12 01:40:52 +00:00
William Hesse 979f5d097c [linter] Remove special handling of linter package in generate_package_config
The linter is moved from third_party to pkg, and the old copy has
been removed from DEPS for weeks now. Remove the workaround that
ignores an old copy of linter in third_party/pkg/linter.
Users who have updated without running gclient sync -D will
now get an error that they have two copies of the
linter package, and they will get a message that they should
run gclient sync -D when they run gclient sync.

This completes the migration of the linter package into the SDK
source repository.

This reverts most of https://dart-review.googlesource.com/c/sdk/+/321722
leaving a small refactoring cleanup in place.

Bug: https://github.com/dart-lang/linter/issues/4411
Change-Id: Id5cdb3485e42e78743303d64370bc9f7899ad00e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325301
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-09-11 17:18:05 +00:00
Ömer Sinan Ağacan 5865e6db9f [dart2wasm,smith] Add options support in test_matrix.json, jscm builder
- Add dart2wasm_options syntax to test_matrix.json.

- Add a new builder for the JavaScript compatbility mode
  (`--js-compatbility`).

Change-Id: I32642e932f1d4a8a74b5b75f7783117520d51f02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322281
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-09-11 10:50:22 +00:00
Daco Harkes 01b1291d54 [tool] generate_idefiles sanitizer argument
Change-Id: I6f93fdbce8f4cef6c606e8b43ae9e1e888772292
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325000
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2023-09-08 15:49:28 +00:00
Jens Johansen 0dc590e752 [CFE] Weekly bot needs ddc_outline_unsound.dill
Change-Id: I91be361535e8ac9c60dafe360c093ab7428f6d49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324022
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-09-04 11:24:28 +00:00
Jonas Termansen c9f8d41cd1 [infra] Use actual package names in the generated package config.
Fixes: b/297182119
Tested: Commit queue
Change-Id: I2935dacd9d879c474eaa31d85e67cb7b2bdff769
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322321
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-08-28 10:29:48 +00:00
William Hesse db8f386c77 [test] Improve dependency checking in package_deps.dart test
Change-Id: I8ac83357157d586e11564cddd74c324bf3935509
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322401
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-08-24 09:01:41 +00:00
William Hesse 6d8ef05196 Fix generate_package_config script for Windows paths
The change
https://dart-review.googlesource.com/c/sdk/+/321722
does not handle a package path on Windows that uses backslashes.
Add handling for this case.

Bug: https://github.com/dart-lang/linter/issues/4411
Change-Id: I38fe39491ed60306dec1717b32f275c19ed0076b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322342
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-08-23 12:58:40 +00:00
William Hesse 6e77184d71 [linter] Handle linter migration in generate_package_config.dart
The linter repository is moving into the SDK repo, moving
from third_party/pkg/linter to pkg/linter. Make generate_package_config.dart compatible with a non-breaking migration, that adds the package in the new location, changes Flutter and Dart
to use the new location, then removes the copy from the old location.

Bug: https://github.com/dart-lang/linter/issues/4411
Change-Id: I0653562a8af09a06582bbf17a44766fa64e2881f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321722
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-08-23 11:47:19 +00:00
Parker Lougheed a0d8796c94 [dart:html] Fix incorrect parameter mention in drawImageScaledFromSource docs
Closes https://github.com/dart-lang/site-www/issues/5138

Bug: https://github.com/dart-lang/site-www/issues/5138
CoreLibraryReviewExempt: Only updating a doc comment in dart:html which is web specific.
Change-Id: I58bd36764a6a86cfb7c30dbc60070025dfb2e51c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322181
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-08-23 00:25:29 +00:00
Ben Konyi ba1f302aae Update OWNERS_DEVTOOLS to include all members of the DevTools team
Change-Id: I10fbe18376f9bd771f77f2a159802036ad2875bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322160
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-08-22 14:35:00 +00:00
Nicholas Shahan a0ebfb9c3c [ddc] Add canary benchmark configs to test
This should signal what is needed to add DDC canary mode
golem configs.

Change-Id: Id1fe8ed016641bda4bfa9e5fabacc78b26a35503
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315560
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-08-18 23:15:55 +00:00
Nicholas Shahan f167e03ce5 [ddc] Update benchmark test to new build targets
Provides a signal for what needs to change in the golem configuration.

Change-Id: I1b77ec88ba3076cd4a0296a78950ed209e996661
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316843
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-08-18 22:21:47 +00:00
Erik Ernst f15404e908 Correct libraryExport to use configurableUri
Bug: https://github.com/dart-lang/sdk/issues/53214
Change-Id: Idb0756d0c666c8126f5bbb7247b0e40791f28e39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320560
Commit-Queue: Erik Ernst <eernst@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-08-14 16:33:19 +00:00
pq f72c1eba83 update analyzer owners
Change-Id: I5618b46dfa7412c52733a7ad4211aaa1438421e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319602
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-08-09 22:44:26 +00:00
Erik Ernst 30201181ce Update Dart.g to support extension types, not inline classes
Change-Id: I785eae3d32363db95a3cad00ee3c2c827a5ec9da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319400
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-08-09 11:34:28 +00:00
Dom Jocubeit f53a1f1cdd Correct example code in docs for DivElement class
Closes https://github.com/dart-lang/sdk/pull/53128

GitOrigin-RevId: 52d7b08f3b94439de5752655f06988f63ec24144
Change-Id: I8d87eacc961a7899509c8244f1a0efe4d9a9a8b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318580
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-08-08 17:25:35 +00:00
Nicholas Shahan 5ed1a94ced [ddc] Update ddc stable targets to use new targets
- Updates test infra to use the assets built by the new "ddc" build
  targets.
- The old "dartdevc" targets are still present to avoid breaking 
  golem when this change lands.
- Old targets are still used when packaging assets for the SDK.
- Golem and the SDK packaging will be updated in following changes.

Change-Id: I1926e0c86833c812f5ed8355d7cd4df8740d79ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315224
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-07-31 16:06:07 +00:00
William Hesse c1d081fbcd [test] Run all tests of native_assets on the main builder, not a shard
These tests require the toolchain to be present on the host, so
should not run on a shard.

Bug: https://github.com/dart-lang/sdk/issues/53060
Change-Id: I3a1adbf3b215d03c5f8c17d07d699af3c2951725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317100
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-07-31 13:17:31 +00:00
Paul Berry 2b8411f626 Enable language feature inference-update-2.
This language feature allows type promotion to apply to private final
fields, e.g.:

    class C {
      final int? _x;
      C(this._x);
    }
    f(C c) {
      if (c._x != null) {
        print(c._x.abs()); // (1)
      }
    }

Previously the line marked (1) would have needed to be written
`print(c._x!.abs());`.

Note that to ensure soundness, there are certain restrictions:

- Public fields don't undergo promotion (because a public field might
  be overridden by a class in some other library).

- Non-final fields don't undergo promotion (because a non-final field
  might be modified as a side effect of code executed between the type
  test and the field's usage).

- Fields that are forwarded to `noSuchMethod` in the same library
  don't undergo promotion (because there's no guarantee that
  `noSuchMethod` will return the same value on every invocation). For
  example:

    class C {
      final int? _x;
      C(this._x);
    }
    class D implements C {
      @override
      noSuchMethod(...) => ...;
    }
    f(C c) {
      if (c._x != null) {
        print(c._x.abs()); // ERROR: `c._x` might dispatch to
                           // `D.noSuchMethod`, in which case there's
                           // no guarantee that it will return a
                           // non-null value the second time it's
                           // invoked.
      }
    }

- If two classes define fields or getters of the same name, and
  promotion is not permitted for one of them, then it isn't permitted
  for the other. This is because there might be a class in some other
  library that's a subclass of both classes, causing a reference to
  one field or getter to dispatch to the other. For example:

    class C {
      final int? _x;
      C(this._x);
    }
    class D {
      int? get _x => ...;
    }
    f(C c) {
      if (c._x != null) {
        print(c._x.abs()); // ERROR: `c._x` might dispatch to `D._x`
                           // (e.g. because some library might declare
                           // `class E extends D implements C`), in
                           // which case there's no guarantee that it
                           // will return a non-null value the second
                           // time it's invoked.
      }
    }

Change-Id: Ib9183581aa0194377e38ab70d37c3e9f0bb57a75
Bug: https://github.com/dart-lang/language/issues/2020
Tested: TAP global presubmit
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314600
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-07-28 23:56:52 +00:00
Johnni Winther 74fa24d4c0 [cfe,analyzer] Remove 'extension-types' experimental flag
This is not the flag you're looking for.

The 'extension-types' flag was used for an early experiment that is
not directly related to the Extension Types feature currently being
developed. The current feature uses the 'inline-class' flag.

Change-Id: Icbb6c3828c41e743e726161b17da4c7784a2c677
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316380
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-07-27 09:30:36 +00:00
Daco Harkes 2e87f8c95a [tools] Fixes to find_builders.dart
Fixes the Gerrit CL footer.

Denylists some builders which are not available on CQ but only on CI.

Change-Id: Ie0716c52366a8be429c2b6aca030e61769ceca80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316382
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-07-26 16:02:56 +00:00
Alexander Thomas a3d48885e7 [release] Bump version on main to 3.2
Tested: CQ
Change-Id: I16210697b47dd85aec8743b457e773b044cab81f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316200
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-07-25 15:12:49 +00:00
William Hesse dab8ab7420 [tools] Use pattern matching in find_builders.dart
Minor changes to find_builders.dart script to use pattern
matching, drop duplicate builders, and drop some type casts.

Change-Id: I463ba8352622dc66678aa71627d84130308da9a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315261
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-07-25 09:30:16 +00:00
Nicholas Shahan f4e949609c [ddc] Add new build targets for DDC assets
- Introduces a new output subdirectory `gen/utils/ddc` where the
  new build targets output files. This is intended to make the
  migration to the new assets easier since landing this change
  shouldn't immediately break any dependencies.
- Enables building the canary and stable assets at the same time.
- Changes more names in our workflow from "dartdevc" to "ddc".
- Updates the ddc-canary-linux-chrome and
  ddc-canary-linux-chrome-unsound configurations to use the
  new assets.

The new outputs appear in directories that are more consistently
named, (no more sound vs kernel confusion). They are named in
preparation for the eventual deletion of the unsound targets
without any lingering cruft to be cleaned up in the sound
directories.

The new structure is:

```
gen/utils/ddc/
           |- canary
           |  |- pkg
           |  |- sdk
           |- canary_unsound
           |  |- pkg
           |  |- sdk
           |- stable
           |  |- pkg
           |  |- sdk
           |- stable-unsound
              |- pkg
              |- sdk
```

The 'pkg' and 'sdk' directories all contain outputs with the same
files names, each compiled in the respective build modes
(sound/unsound and stable/canary).

Change-Id: I66822ebf03bba487b6d359a8e0aa818b9e7b6bef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313081
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-07-25 00:19:52 +00:00
Nicholas Shahan 9c7a5b8ed0 [ddc] Create new configs for DDC unit test results
- Run the tests on the existing DDC bots.
- In the future we would like to move these to their own bots so
  they can be triggered individually.

Change-Id: I2ab022f19323cdfd20f42ef5c41777547ec428f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313882
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-07-24 17:44:19 +00:00
Martin Kustermann 8c60c4e70f [vm] Rewrite tools/offset_extractors.sh in Dart
Also

* Make C++ offset_extractor binaries emit entire if/def condition
  (including product vs non-product)
  => This makes it much nicer to look up offsets, as the preceding
     #if condition will be the whole condition.

* Run the builds & offset extractions in parallel

This will make it easier to extend the cross product of our
configurations that require different offsets (e.g. sanitizers)

TEST=Manually run.

Change-Id: I458deb7a1c9403ab3624dd6b6ca51df72d6a6b28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312442
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2023-07-24 12:47:52 +00:00
Daco Harkes 87aba00a12 [tool] find_builders.dart
A script to find all try jobs for a set of tests.

Usage:

```
$ tools/find_builders.dart ffi/regress_51504_test ffi/regress_51913_test
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64,...
```

Change-Id: I85abd3ca2b2adf4e184a38f5ef821d40fbd97bf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314800
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-07-24 09:07:04 +00:00
Chloe Stefantsova d3b2b764a1 [cfe] Remove 'value-class' experimental flag
Change-Id: I9bcb9e30732503c9da4e723ded863949f5f0f1b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315200
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-07-21 11:16:24 +00:00
William Hesse 9692a9dfef Revert "Balance tests equally across shards."
This reverts commit f827eb3a78.

Reason for revert: The tests being run, and the results being compared to, are changing dramatically, causing all sorts of test results going from [status] -> Skipped and from New Test -> [status].

Something is really going wrong.

Original change's description:
> Balance tests equally across shards.
>
> The sharded test runner invocations are now passed the previous results
> which contains the test timing, which are used to simulate how long each
> shard would take to run. The shards are now balanced as evenly as
> possible on a test level, taking multiple cores into account.
>
> Sharded tests are now run starting with the slowest test first, such
> that extremely long running tests finish as early as possible. This
> behavior ensures the cores are saturated and can be padded with fast
> tests near the end, rather than waiting for a few slow tests to complete
> while the rest of the system is idle.
>
> The algorithm works very well whenever it's able to accurately predict
> the time to run shards. In a number of cases, the model doesn't quite
> reflect reality and the data, which makes it fairly imperfect but still
> reasonably good. I think a second order feedback loop might kick in once
> it reorders the tests across shards and the test timing data reflects
> the new test timings.
>
> Multitests are no longer always sent to the same shard, since the data
> isn't available at the moment, and the change as-is speeds up the test
> running considerably.
>
> The front end unit test suites currently ignore the feature as there are
> no benefits yet to improving those quick shards.
>
> Upgrade the language version to 3.0.0 so patterns can be used and fix
> a mixin not being a mixin.
>
> Fixes: b/291585137
> Change-Id: I3cc1b1d96038d5b46e836b091e299097717c226c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314081
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: Jonas Termansen <sortie@google.com>

Change-Id: I233e4bfa6d6ecf0cea4f97c1e47f1635f7b9040c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315060
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: William Hesse <whesse@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-07-19 23:56:06 +00:00
stuartmorgan 69f95fa2cd Add --downgrade to flutter/packages analysis
Closes https://github.com/dart-lang/sdk/pull/52989

GitOrigin-RevId: 0f3e9114c0afe23ebfda7d80e89e5cd46a4419fa
Change-Id: I7d0632c8efd34b414b47d1e8d80e7996a5d7726e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314920
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-07-19 20:10:38 +00:00
Jonas Termansen f827eb3a78 Balance tests equally across shards.
The sharded test runner invocations are now passed the previous results
which contains the test timing, which are used to simulate how long each
shard would take to run. The shards are now balanced as evenly as
possible on a test level, taking multiple cores into account.

Sharded tests are now run starting with the slowest test first, such
that extremely long running tests finish as early as possible. This
behavior ensures the cores are saturated and can be padded with fast
tests near the end, rather than waiting for a few slow tests to complete
while the rest of the system is idle.

The algorithm works very well whenever it's able to accurately predict
the time to run shards. In a number of cases, the model doesn't quite
reflect reality and the data, which makes it fairly imperfect but still
reasonably good. I think a second order feedback loop might kick in once
it reorders the tests across shards and the test timing data reflects
the new test timings.

Multitests are no longer always sent to the same shard, since the data
isn't available at the moment, and the change as-is speeds up the test
running considerably.

The front end unit test suites currently ignore the feature as there are
no benefits yet to improving those quick shards.

Upgrade the language version to 3.0.0 so patterns can be used and fix
a mixin not being a mixin.

Fixes: b/291585137
Change-Id: I3cc1b1d96038d5b46e836b091e299097717c226c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314081
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-07-19 12:24:38 +00:00
Joshua Litt 9e37c2b480 [dart2wasm] Add JS compatibility mode.
The purpose of the wasm_js_compatibility target is to facilitate experiments with a JS compatibility mode for Dart2Wasm. Initially, we're just going to focus on typed data, but this will give us a place to experiment with moving List and String to JS as well.

In addition, someday down the road we hope to experiment with two additional compatibility changes:
1) Exclusively using double for all Dart numbers
2) Allowing undefined to flow as null.

The two major benefits of this approach are:
1) Much faster JS interop
2) To make it easier to bring up Dart2JS applications on Dart2Wasm

The only downside will be access overhead on the Wasm side, but the JS builtins proposal could potentially bring us close to parity with Wasm builtins someday.

Tested: Wasm specific trivial refactor.
Change-Id: I2c09426b6999507c1de6e584e9bc7072a088bda9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313240
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-07-18 19:34:38 +00:00
Jonas Termansen f9b8917e30 Balance VM JIT and AOT shards.
Add test.py --default-suites that includes all the default suites in
addition to the ones explicitly requested, so the test matrix can run
co19 together with the default suites in one sharded test step.

Bug: b/290617138
Change-Id: I5dd5d1aaf3b1ee38adf88c6e9ee6ec13d97fe1ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313567
Reviewed-by: William Hesse <whesse@google.com>
2023-07-14 16:01:09 +00:00
Jonas Termansen 2a302a96ac Balance ddc-linux-chrome-unsound shards.
Bug: b/290617138
Change-Id: I6f60f1d7ba96832cda96f34f436f593717460709
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313820
Reviewed-by: William Hesse <whesse@google.com>
2023-07-14 15:52:48 +00:00
Jonas Termansen ab4ab9b52e Balance ddc-linux-chrome shards.
Bug: b/290617138
Change-Id: I7ac3f0136e059bdbea3d72c3a3f64611472b2c96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313564
Reviewed-by: William Hesse <whesse@google.com>
2023-07-14 15:52:11 +00:00
Jonas Termansen 26a94439c6 Balance dart2js-unit-linux-x64-release shards.
The non-sharded tests takes 10 minutes and each of the sharded tests
takes 14 minutes. It's faster to shard immediately (costing one bot
more) and concurrently run the local tests.

Fix end to end dart2js test that times out when sharded and run outside
a directory called sdk.

Bug: b/290617138
Change-Id: If71f0d301edf565c9f15847098320106ca383635
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312983
Reviewed-by: William Hesse <whesse@google.com>
2023-07-14 15:38:29 +00:00
Jonas Termansen f7a138417c Balance dart2wasm-linux-chrome shards.
The try builder is among the fastest commonly used builders at 21
minutes average, which is less than the current 25 minute best case
goal. Free up 2 of 10 shards to be available for other work during peak
load, which will slow it down by 2 or 3 minutes and finish at the same
time as the other try builders, resulting in an overall faster commit
queue experience.

Bug: b/290617138
Change-Id: Iea2ba71248fa0d3c21f1d80b540b55ce810d96af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313565
Reviewed-by: William Hesse <whesse@google.com>
2023-07-14 13:39:26 +00:00
Jonas Termansen 4ac58f4df4 Optimize benchmark-linux-try.
Bug: b/290617138
Change-Id: I898ab9d7b441c58cec4b9604860ee4fcdfcbc994
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313783
Reviewed-by: William Hesse <whesse@google.com>
2023-07-14 11:35:36 +00:00
Jonas Termansen 006b3a8780 Balance front-end-linux-release-x64 shards.
Bug: b/290617138
Change-Id: I9747fe4d5ec995bd17ccf3781036a52af9c2de19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313506
Reviewed-by: William Hesse <whesse@google.com>
2023-07-14 09:54:39 +00:00
Jonas Termansen 185aa1f36f Balance dart2js-linux-chrome shards.
Bug: b/290617138
Change-Id: If6217e2774dd7a6fe2834e64d3a9daf10eebda0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313486
Reviewed-by: William Hesse <whesse@google.com>
2023-07-13 16:04:24 +00:00
Jonas Termansen 073ffa0ca9 Balance dart2js-hostasserts-linux-d8 shards.
Bug: b/290617138
Change-Id: Icef886185e300f4555207463d90ac5ae8f24baf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313485
Reviewed-by: William Hesse <whesse@google.com>
2023-07-13 16:00:54 +00:00
Jonas Termansen 21c18eb046 Balance analyzer-linux-release shards.
Bug: b/290617138
Change-Id: Icd9fef5b7462fcebe92a6ff4af946b225be889e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313484
Reviewed-by: William Hesse <whesse@google.com>
2023-07-13 15:51:41 +00:00
Jonas Termansen 172f76ce8c Balance front-end-nnbd-linux-release-x64 shards.
Bug: b/290617138
Change-Id: Ief19c6f377ad35f4cc8a681a7f471ddc0075ff2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313502
Reviewed-by: William Hesse <whesse@google.com>
2023-07-13 14:12:56 +00:00
Daco Harkes a08e829ff2 [tool] Bisection tool
A basic bisection script.

Currently only supports substring matching for detecting the error.
This was enough for three use cases today:

* https://github.com/dart-lang/sdk/issues/52910
* https://github.com/dart-lang/sdk/issues/52911
* https://github.com/dart-lang/sdk/issues/52912

Produces a concise output on standard out, and a very detailed log
with all process invocation results in `.dart_tool/bisect_dart`.

Usage: tools/bisect.dart -Dstart=23f41452 -Dend=2c97bd78 -Dtest_command="tools/test.py --build -n dartk-linux-debug-x64 lib_2/isolate/package_resolve_test" -Dfailure_string="Error: The argument type 'String' can't be assigned to the parameter type 'Uri'." -Dsdk_path=/usr/local/google/home/dacoharkes/dart-sdk/sdk/ -Dname=20230712_package_resolve_test

This script starts a bisection in the provided SDK path.

It will write logs to .dart_tool/bisect_dart/.

start          : The commit has at the start of the commit range.
end            : The commit has at the end of the commit range.
test_command   : The invocation of test.py.
                 This should include `--build`.
                 This should be within quotes when passed in terminal because of spaces.
failure_string : A string from the failing output.
                 Regexes are not yet supported.
                 This should be within quotes when passed in terminal when containing spaces.
sdk_path       : The SDK path is optional.
                 The SDK path defaults to the current working directory.
name           : The name is optional.
                 The name defaults to the current date and the recognized test name.
                 The name is used for distinguishing logs.

Change-Id: Ib071a5305d4992cf189e35eb3dcc50c83101503e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313384
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-07-13 13:22:26 +00:00
Jonas Termansen 84e8babf23 Balance dart2js-hostasserts-linux-unsound shards.
The test steps with the same configurations have been unified and
the shard number balanced so each step finishes as closely to each
other as possible.

Bug: b/290617138
Change-Id: I6616fb78e5cd6db36153db0d9e2b45131eef25fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312984
Reviewed-by: William Hesse <whesse@google.com>
2023-07-13 13:09:37 +00:00
Erik Ernst ca71bbb0ea Change formal parameter syntax to require "=" (and not ":")
A named optional parameter could previously be equipped with a default
value using ':' or '=' (as in `void f({int i : 1})` or `... i = 1 ...`).
The language has now (Dart 3.0) been updated to eliminate the form
using ':' (it has been deprecated for a long time).

This CL updates the spec_parser accordingly.

Change-Id: I28f9ec605699a9ffb2f7349a6a4b698fa709247b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313482
Commit-Queue: Erik Ernst <eernst@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-07-13 12:41:46 +00:00
Ryan Macnak 2051bcf619 [infra] Reduce the suites run by Windows ARM64 to fit under the timeout.
Change-Id: I37070079ddbdc86fb0e5144842690877abb1b031
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313283
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-07-12 21:06:27 +00:00
Daco Harkes b64ef27dec [pkg/ffi] Roll dart-lang/native
Rolling https://github.com/dart-lang/native/pull/87 manually because
of the c_compiler -> native_toolchain_c rename.

Change-Id: I2592882a7137a40703f96a487a66d31eac7c990d
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313200
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-07-11 19:14:48 +00:00
Alexander Thomas 9a741507d1 [infra] Add missing build targets to windows arm64 AOT builders
Change-Id: I995d739948858473d8213262509910b158c04ef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312985
Reviewed-by: William Hesse <whesse@google.com>
2023-07-11 10:58:42 +00:00
Ryan Macnak 99ef36064f [infra] Make the sanitizer a first-class status variable.
Makes the TSAN skips apply to
 `test.py -mrelease --sanitizer=tsan`
and not just
 `test.py -n vm-tsan-linux-release-x64`.

Also makes the timeouts agree.

Change-Id: I10315e754a4ebb3020f3c2f6cecfac6b77e77a9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311828
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-07-10 17:46:31 +00:00
Srujan Gaddam b859e00908 Reland "[dart:html] Throw exception if Window.open opens null window" and
"[dart:html] Move NullWindowException to implementation"

This is a revert of bd3e6fa1a3 and
2b250992f9.

This adds some small code change to avoid a null-assertion being emitted
that would lead to a browser SecurityError.

CoreLibraryReviewExempt: Reland.
Change-Id: Iab52bb728b14fd0b2378b8923b0e1ea8ea930b12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311922
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-07-06 15:50:48 +00:00
Jonas Termansen 089364baab Shard pkg-linux-release-try.
Fixes: b/290033281
Change-Id: Id04aa6f71fcbb29c62c2ba3abdb7812f3e3cb8f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312482
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-07-05 16:23:40 +00:00
Srujan Gaddam bd3e6fa1a3 Revert "[dart:html] Throw exception if Window.open opens null window"
This reverts commit a356f71b71.

Reason for revert: This should be handled by throwing an exception when
the methods of the returned window are called, not when it is opened.
This would be a noisy breaking change that we don't want for 3.1. For
now, revert until the change that affects the individual methods is
landed.

Original change's description:
> [dart:html] Throw exception if Window.open opens null window
>
> Window.open silently allows a null window to be opened, and
> issues arise later when users try to use the non-null wrapper.
> This CL changes that to throw an exception if the window is null.
> This exception can be caught and recovered from. This avoids the
> larger breaking change of making this API nullable.
>
> CoreLibraryReviewExempt: Backend-specific library.
> Change-Id: I9a53a477cb370c3bc6bc26b2162ce66c5af166aa
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306910
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>

CoreLibraryReviewExempt: Revert in backend-specific library.
Change-Id: I5007b7d7aa608bfc8e5827b5f967af5573d0b758
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309000
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-28 23:21:32 +00:00
Ivan Inozemtsev 2b250992f9 Revert "[dart:html] Move NullWindowException to implementation"
This reverts commit 14a3051552.

Reason for revert: b/289195983

Original change's description:
> [dart:html] Move NullWindowException to implementation
>
> Window.open may open a null window in more cases than expected.
> Users may not care that the window they get back is invalid if
> they never use it. Therefore, this CL moves the exception to
> the implementation of the returned window in order to reduce
> noise, but still give a way for users to recover if they wish
> to do so.
>
> CoreLibraryReviewExempt: Backend-specific library.
> Change-Id: I005cf80630cfb4db2f5ec2012cfcd0161ad10ff1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311460
> Commit-Queue: Srujan Gaddam <srujzs@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

Change-Id: Id7c514a80fdcaa18a7eb0acdcb7f36477a04d966
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311843
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
2023-06-28 23:21:32 +00:00
Daco Harkes bd1bad7afc [deps/ffi] Unbundle package:native_assets_builder
The Dart SDK CL for https://github.com/dart-lang/native/pull/69.

Bug: https://github.com/dart-lang/native/issues/67
Change-Id: I45d7ac691a6aaa41bce5be0e36403021a948bb4f
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311740
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-06-28 09:09:09 +00:00
Slava Egorov 630482342f [infra] Fix goma detection on Windows
It was looking for gomacc in .cipd_bin but it should have
been looking for gomacc.exe

Change-Id: Idec9eb956513ad39a2d0b0b51aa39da063c75e25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311601
Auto-Submit: Slava Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2023-06-27 10:31:50 +00:00
Srujan Gaddam 14a3051552 [dart:html] Move NullWindowException to implementation
Window.open may open a null window in more cases than expected.
Users may not care that the window they get back is invalid if
they never use it. Therefore, this CL moves the exception to
the implementation of the returned window in order to reduce
noise, but still give a way for users to recover if they wish
to do so.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: I005cf80630cfb4db2f5ec2012cfcd0161ad10ff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311460
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-26 22:58:08 +00:00
Nate Bosch a92a1e5064 Use main branch for flutter engine clones
The master branch was renamed to main.

Change-Id: Ib38f3976b497c17e0bda904cb99864e127016272
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311153
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2023-06-23 23:31:36 +00:00
Aske Simon Christensen 5838562040 [dart2wasm] Add option and target for stringref.
This adds basic infrastructure for a stringref implementation in
dart2wasm:

- A `--[no-]stringref` option to the compiler
- An option in the `WasmTarget`, controlling the name of the target
- Separate sets of patch files for the two targets
- Separate platform dill files for the two targets

For now, the patch file contents are the same, and the compiler flag
is not used by the backend (only by the `dart2wasm` script to select
the appropriate platform dill file). Both of these will change as the
implementation progresses.

Tested: ci + manual check that the option selects the correct dill
Change-Id: I2c9bb95ba06fd3de3f7007703ef545e3f0c728ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310621
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-06-21 14:25:38 +00:00
Srujan Gaddam a356f71b71 [dart:html] Throw exception if Window.open opens null window
Window.open silently allows a null window to be opened, and
issues arise later when users try to use the non-null wrapper.
This CL changes that to throw an exception if the window is null.
This exception can be caught and recovered from. This avoids the
larger breaking change of making this API nullable.

CoreLibraryReviewExempt: Backend-specific library.
Change-Id: I9a53a477cb370c3bc6bc26b2162ce66c5af166aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306910
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-06-12 18:29:56 +00:00
Jonas Termansen 9421ca0799 Delete old debianpackage-linux builder.
This has been replaced by debian-x64 via its own recipe.

Bug: b/283763308
Change-Id: I1ae5950407ba7a4caae7467b1b1e7b6d3d6fb781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304882
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-06-06 14:26:45 +00:00
Ryan Macnak 32977d8f43 [infra] Setup Windows ARM64.
Change-Id: I6a9c5beba0ec909b75a463de04586787068fdbcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303424
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-06-02 18:18:09 +00:00
Alexander Thomas 8dfd80486e [infra] Rename dart2wasm configurations and builders
This aligns builder names and configuration to make them more user
friendly.

Bug: b/285245159
Change-Id: Iac91bb24035ed4ed23dee36b10d290b345dfd221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307041
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-06-02 12:48:11 +00:00
Ryan Macnak b43d95a942 [test] Re-establish at least some Fuchsia testing.
Only works with FFI tests that don't use multitest. I.e., tests that only need things inside fuchsia_ffi_test_package.

Change-Id: I17d8cb4eafe02430f64f6ec60601095c49c54810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306675
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-06-01 22:44:03 +00:00
Ömer Sinan Ağacan 0f49f23be4 [dart2wasm] Add support for testing in Chrome
d8 doesn't have some of the JS and HTML functions we need for event and
micro-task scheduling. In [1] we add mock functions to allow running in
d8, but that means the mock event loop can run differently than the
actual Chrome event loop, so we need to test in Chrome. This CL adds
support for this.

[1]: https://dart-review.googlesource.com/c/sdk/+/305201

New failing tests with the new configuration:

language/nnbd/static_errors/unchecked_use_of_nullable_test/30 broke (RuntimeError -> Pass, expected RuntimeError)
language/regress/regress24935_test/01 broke (RuntimeError -> Pass, expected RuntimeError)
language/unsorted/flatten_test/01 broke (RuntimeError -> Pass, expected RuntimeError)
language/unsorted/flatten_test/05 broke (RuntimeError -> Pass, expected RuntimeError)
language/unsorted/flatten_test/09 broke (RuntimeError -> Pass, expected RuntimeError)
lib/js/export/static_interop_mock/proto_test is new and failed (CompileTimeError, expected Pass)
lib/js/static_interop_test/constants_test is new and failed (CompileTimeError, expected Pass)
lib/js/static_interop_test/futurevaluetype_test is new and failed (CompileTimeError, expected Pass)
lib/js/static_interop_test/supertype_transform_test is new and failed (CompileTimeError, expected Pass)

New passing tests with the new configuration:

co19/Language/Expressions/Function_Invocation/async_generator_invokation_t10 was fixed (Fail -> Pass)
co19/Language/Libraries_and_Scripts/Scripts/top_level_main_t01 was fixed (RuntimeError -> Pass)
co19/Language/Libraries_and_Scripts/Scripts/top_level_main_t06 was fixed (RuntimeError -> Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A01_t07 was fixed (RuntimeError -> Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t03 was fixed (Fail -> Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t07 was fixed (Fail -> Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t08 was fixed (RuntimeError -> Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t09 was fixed (RuntimeError -> Pass)
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t11 was fixed (Fail -> Pass)
co19/LibTest/async/Future/Future.delayed_A01_t02 was fixed (RuntimeError -> Pass)
co19/LibTest/async/Stream/Stream.periodic_A01_t01 was fixed (RuntimeError -> Pass)
co19/LibTest/async/Stream/Stream.periodic_all_t01 was fixed (RuntimeError -> Pass)
co19/LibTest/async/Stream/Stream.periodic_all_t02 was fixed (RuntimeError -> Pass)
co19/LibTest/async/Stream/Stream.periodic_all_t03 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t01 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t02 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t03 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A02_t01 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A02_t02 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A02_t03 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/stream_all_A01_t01 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/stream_all_A01_t02 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/stream_all_A02_t01 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/stream_all_A02_t02 was fixed (RuntimeError -> Pass)
co19/LibTest/async/StreamController/stream_all_A02_t03 was fixed (RuntimeError -> Pass)
co19/LibTest/async/Timer/Timer.periodic_A01_t01 was fixed (RuntimeError -> Pass)
co19/LibTest/async/Timer/Timer_A01_t01 was fixed (RuntimeError -> Pass)
co19/LibTest/core/Stopwatch/elapsedTicks_A01_t01 was fixed (RuntimeError -> Pass)
corelib/throw_half_surrogate_pair_test/01 was fixed (NonUtf8Output -> RuntimeError)
corelib/throw_half_surrogate_pair_test/02 was fixed (NonUtf8Output -> RuntimeError)
language/async/return_throw_test was fixed (RuntimeError -> Pass)
language/async_star/async_star_await_for_test was fixed (RuntimeError -> Pass)
language/async_star/async_star_test was fixed (RuntimeError -> Pass)
language/async_star/yield_test was fixed (Fail -> Pass)
language/async_star/yieldstar_test was fixed (Fail -> Pass)
language/import/conditional_string_test is new and succeeded (Pass)
language/regress/regress21795_test was fixed (RuntimeError -> Pass)
language/regress/regress23244_test was fixed (RuntimeError -> Pass)
lib/async/multiple_timer_test was fixed (RuntimeError -> Pass)
lib/async/periodic_timer2_test was fixed (RuntimeError -> Pass)
lib/async/periodic_timer3_test was fixed (RuntimeError -> Pass)
lib/async/periodic_timer4_test was fixed (RuntimeError -> Pass)
lib/async/schedule_microtask_test was fixed (RuntimeError -> Pass)
lib/async/slow_consumer2_test succeeded again (Pass -> skipped)
lib/async/stream_timeout_test was fixed (RuntimeError -> skipped)
lib/async/timer_isActive_test was fixed (RuntimeError -> Pass)
lib/async/timer_repeat_test was fixed (RuntimeError -> Pass)
lib/async/timer_test was fixed (RuntimeError -> Pass)

Change-Id: I2c2f837b4a6093a1a9aad357df21a04a6907ab6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305941
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-05-31 18:06:55 +00:00
Vyacheslav Egorov bd2452c7e3 [infra] Workaround Python binary pecularities on Mac OS X
For some reason `python3` binary shipped with Mac OS X
sets LIBRARY_PATH, SDKROOT and CPATH environment variables.

This affects clang if it is spawned in such a modified environment,
because it picks and uses those values.

This CL simply removes these variables from the environment
if they are present.

See also https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4149962

Fixes https://github.com/dart-lang/sdk/issues/52411

R=kustermann@google.com

Change-Id: Id71ece4c3232c3e9ad19dc07d7546d1012d6330f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306540
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-05-31 08:51:22 +00:00
Janice Collins 2a56918725 [deps] rev dartdoc, http, lints, logging, tools, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.  rev_sdk_deps is changed to default to `main` if no branch is found, as `origin` doesn't seem to work for impacted repos (e.g. csslib).

dartdoc (1d94484..950898f):
  950898f5  Tue May 30 11:18:38 2023 -0700  Janice Collins  Reintroduce remote linking file type assumption (#3425)
  ef552992  Tue May 30 09:49:16 2023 -0700  Sam Rawlins  Refactor search ranking (#3424)

http (8a4a4a6..18a43a2):
  18a43a2  Tue May 30 09:44:24 2023 -0700  Brian Quinlan  Fix the failing cupertino_http tests (#949)

lints (4236c43..edc28ed):
  edc28ed  Tue May 30 11:56:29 2023 -0500  Parker Lougheed  Add topics to the pubspec file (#122)

logging (7ba155a..f2fe2ac):
  f2fe2ac  Tue May 23 15:01:13 2023 -0700  Jacob MacDonald  prep for release (#140)
  ce41605  Mon May 22 10:14:28 2023 -0700  Devon Carew  blast_repo fixes (#142)

tools (b90a7e8..d723a55):
  d723a55  Tue May 30 11:02:27 2023 -0700  Devon Carew  Update pull_request_label.yml (#107)

webdev (4b69f1d..d442fa8):
  d442fa89  Tue May 30 14:36:53 2023 -0400  Anna Gringauze  Check for new events more often in batched stream. (#2123)

Change-Id: I9e8905363ee51462529341bfba268504336d90e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306314
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2023-05-30 21:49:31 +00:00
Daco Harkes e1ae1b48ae [vm/ffi] dartdev CLI native-assets
This CL introduces native assets suport for `dart run` and introduces
`dart build` which is similar to `dart compile` but outputs a folder
instead to that native assets can be bundled with an executable.

Change-Id: Ib6cfb95539f0adee46c99e531e440928c3f72f2b
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267340
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-05-30 09:10:28 +00:00
Ryan Macnak b0170463af [infra] Run JIT FFI tests on QEMU.
Change-Id: I97dd32cff783265de6a431276434e79bb030939b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299780
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-26 23:22:32 +00:00
William Hesse 45f8866764 [infra] Forgive flakiness on tests that have been stable for a week
Flaky tests that have been stable for the last 100 runs are forgiven,
and not considered flaky any more.

Because nighly builders take three months to run 100 times, we also
set a flakiess horizon of one week, and tests that have been stable
for one week are also no longer considered flaky.

If flakiness reoccurs, the flakiness record for that test is
reactivated, with all historical flakiness data kept.

Bug: b/284458092
Change-Id: I5534314d810680e71667d7c0c790e6151dea9578
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306040
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-05-26 18:07:16 +00:00
Ryan Macnak 40b4e1dcd8 [infra] Switch dart2wasm configurations to --nnbd=strong.
Change-Id: Ib9a5f47420c431249e0a27a7a986b9de95f72970
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305481
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-05-25 15:54:14 +00:00
Ryan Macnak 032ace1944 [infra] Change default NNBD to strong.
Change-Id: I2d52bdb1747346d118ef962ab2caf910fe8ebf53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296703
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-24 20:48:36 +00:00
Nicholas Shahan 15903b76fe [dart:html] Delete unused private methods
The outdated custom element support has already been removed so these
methods are no longer needed.

Removes an access of `.__proto__`.

Issue: https://github.com/dart-lang/sdk/issues/52372
CoreLibraryReviewExempt: Change in web only library
Change-Id: Ia55c3be7f6c19433234c02b90981424e973866aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304781
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-05-23 21:40:32 +00:00
Ryan Macnak 60e76a406b [build] Pass targets from build.py to ninja unchanged.
Passing the empty set of targets to build.py now passes the empty set to ninja instead of substituting "all". Because ninja's default target is "default" instead of "all", this changes the meaning of `build.py` to `build.py default` instead of `build.py all`.

Bug: https://github.com/dart-lang/sdk/issues/52442
Change-Id: Ia82b7bdfc54a5dafdfe7a6426e5620ad7532dd87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305061
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-23 20:34:00 +00:00
Ryan Macnak 4a804b885a [infra] Rename VM fileset.
There is no non-kernel set to distinguish.

Change-Id: I28b1c0c0b7f778aebc9c6f426c1ab48acc37fe1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293522
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-23 19:55:48 +00:00
Erik Ernst 783abcd4e8 Add suport for inline classes in Dart.g
Change-Id: I63b829e107458268d91b39e7f0abb673dc20d0f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304004
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-05-22 14:09:48 +00:00
Martin Kustermann 42040116e0 [wasm] Add Omer to tools/OWNERS_WASM
Change-Id: I6e86af984ff3c65eeb35a51b121235a880e65f61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304641
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-05-22 11:12:02 +00:00
Ryan Macnak 5ad110fc4c [infra] Remove unused legacy configs and builders.
Change-Id: Id1c942eeb4c09b25a1349a98d5e783507a3b342b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303010
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-16 21:06:43 +00:00