Commit graph

93083 commits

Author SHA1 Message Date
Amir Panahandeh 6dfcd40684 Fix wrong example for queryParametersAll
Closes https://github.com/dart-lang/sdk/pull/53083

GitOrigin-RevId: 49d4b6666e901ecf5e5569532d9b8d19f057f2d4
Change-Id: Ie246ac593cae8638f2d4f5cc6950e426e4b74237
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317301
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-08-01 08:27:58 +00:00
Nicholas Shahan 858badcf50 [ddc] Optimize checks for object constructor
Flipped the ordering of the equality operation so that the compiler
can see it is being dispatched to a string literal and can generate
a faster check.

Change-Id: I5c2f6b123ebe0f6cb81efba94fe4bf81168bec74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317261
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-08-01 03:49:21 +00:00
Danny Tuppeny d9363a6639 [analysis_server] Don't show expression snippets in argument names
Fixes https://github.com/Dart-Code/Dart-Code/issues/4635

Change-Id: I8e8addabc7bd601ad9a9abffb87f318243255932
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316222
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-07-31 20:31:23 +00:00
Danny Tuppeny abc712af72 [analysis_server] Show types when hovering over a wildcard variable pattern
Fixes https://github.com/Dart-Code/Dart-Code/issues/4640

Change-Id: Ide55831c0a7711d2bf2d389742a47cebfbe22f6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-07-31 20:26:22 +00:00
Sam Rawlins 1934efbffb Refactor comment reference parsing, away from stack.
Now that comment reference parsing is done entirely in ast_builder, we
can simplify the implementation.

Work towards https://github.com/dart-lang/sdk/issues/50702

Change-Id: I0650706dfe31542454c7bc9832ec6104c141bd5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316643
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2023-07-31 20:23:19 +00:00
Kallen Tu c9d69866eb [analyzer] Revert 'Fix broken code generators in g3.' and add new fix for code generators that result in InvalidTypes.
Reverting previous change since it does break some other parts of g3. Shortcircuiting the `??` isn't sufficient in some cases. So we attempt to fix it further downstream.

This change does a check for unresolved types and ignores the cast since we can't tell what type it is anyways. Similar to what we do with type parameters and when we don't know the type.

The generators in g3 seem to emit a lot more InvalidTypes and this is necessary to avoid the errors now that we propagate errors upwards.

b/293326927

Change-Id: I172980dfd3338f27d0a57e156b15dd937619ff73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316841
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-07-31 19:32:38 +00:00
Srujan Gaddam 7d6414a6d5 [dart:js_interop] Restrict external members from using type parameters that don't extend static interop types
Since external APIs can only use primitives and JS types in static interop,
we should require that all type parameters on static interop APIs extend
another static interop type. This is the minimum required to ensure all
type parameters can be erased to JSValue. This only affects dart:js_interop
users and replaces the previous type parameter static error check.

Change-Id: Ia546874da73c808aa25deb8d54d581db783987df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316140
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-07-31 17:40:56 +00:00
Devon Carew 2e23d29bcd [deps] rev http, native, tools
Revisions updated by `dart tools/rev_sdk_deps.dart`.

http (1a42b4a..4289e8b):
  4289e8b  2023-07-27  Nate Bosch  Ignore generated flutter plugin files (#996)

native (2598ac6..f0dc3e9):
  f0dc3e9  2023-07-27  Daco Harkes  [native_assets_builder] Fix multiple invocations of the build runner (#103)

tools (600ea0a..ba55fd6):
  ba55fd6  2023-07-27  Jason C.H  Fix crash caused by response encoding for GAClient (#132)

Change-Id: Ibe40efb388c03967e9b4d78b4f954064bee64a3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317141
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-31 17:34:35 +00:00
Danny Tuppeny 8abaa7b81b [analysis_server] Fix finding references for the offset between a type name and generic type parameters
Fixes https://github.com/Dart-Code/Dart-Code/issues/4668

Change-Id: Ibdb45b5c09ab8de0746239e351b5e581af4bb7df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-07-31 17:14:33 +00:00
Jonas Finnemann Jensen 1a4c889fbc Fix verify_diagnostics_test, #53020
Change-Id: Ida68ed3995c4db9be34fa0ce90b6683fc826f8a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315822
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-07-31 16:42:29 +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
Joshua Litt 96d6c2e0d3 [wasm_builder] Refactor to a builder / built pattern.
This CL mostly just moves code around. There are three broad changes in this CL:
1) Reify the builder / built pattern that exists implicitly in the existing code. Builders now live in `src/builder`, while the built ir lives in `src/ir`.
2) Reify the module subsections.
3) `pkg/dart2wasm` has been updated to use the new API.

There is only one minor logic change in the entire CL, we now defer serialization of a module until the bytes are actually required, as opposed to serializing eagerly.

This change is designed to make the wasm_builder more robust. By clearly delineating which parts of the AST are mutable and which parts are immutable, then it should make it easier for users of the wasm_builder to avoid undefined behavior, i.e. holding on to something that can change.

Change-Id: I676107b867aa74fabf413108673e170126bdb5c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316280
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-07-31 15:27:58 +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
Daco Harkes c9634d7e4f [ffi/docs] Elaborate on limitations on leaf functions
CoreLibraryReviewExempt: VM-only API.
Closes: https://github.com/dart-lang/sdk/issues/53030
Change-Id: Ie62f66bcc9cbd631ad0e240bcc553be415e130bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316589
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2023-07-31 11:17:12 +00:00
Sergey G. Grekhov eeff47f1ff [co19] Roll co19 to 3f9d5d1f9ea353b61982236624809f930323dbf7
2023-07-28 sgrekhov22@gmail.com dart-lang/co19#2142. Fix typo (dart-lang/co19#2155)
2023-07-26 sgrekhov22@gmail.com dart-lang/co19#2149. Fix new errors due to changes with the constant evaluator (dart-lang/co19#2152)
2023-07-26 sgrekhov22@gmail.com dart-lang/co19#2145. Add more tests for Variable (dart-lang/co19#2146)
2023-07-25 sgrekhov22@gmail.com dart-lang/co19#2142. Add syntax tests (dart-lang/co19#2148)

Change-Id: I6ee222b74fc092d93a1b76d35d89a008a97056be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316590
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-07-31 08:44:45 +00:00
Sergey G. Grekhov d13732d382 [co19] Roll co19_2 to db818086e326fab3eb437c3c399f7f5401d10681
2023-07-26 sgrekhov22@gmail.com dart-lang/co19#2149. [co19_2] Fix new errors due to changes with the constant evaluator (dart-lang/co19#2151)

Change-Id: I1e9796146595c22c2694c6e555127823fc7f07ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316582
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-07-30 08:12:00 +00:00
Sam Rawlins 415ff8ece8 [analyzer] Remove all checks for set-literal and extensions enablement
And using Future from dart:core, which was not enabled until Dart
2.1.0.

Dart 3's minimum language version is 2.12. google3's is 2.9.

Change-Id: Id31d92007e685447ff217bdccf8161c8fd6ce6e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316863
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-07-30 00:12:59 +00:00
Konstantin Shcheglov 823f1583bf Extension types. Support in InheritanceManager3.
Change-Id: I49e30138f810247d1e20fa983f33f32d99a29c62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316845
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-29 18:10:24 +00:00
Sam Rawlins 06cce15193 Bump dartdoc to e8d00c079d83e9ee465cfeb9702eb2da765070d9
Change-Id: I10904625be18c98ccc2306dafa0d6a3ea2558b70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316864
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-07-29 16:31:17 +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
Kallen Tu 19859a0f91 [analyzer] Add error for deferred constants in const constructors.
There's a false positive with the `prefer_const_constructors` lint where
deferred constant values in const constructors were not being reported
as an error.

This change adds the new error so that the lint doesn't fire.

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

Bug: https://github.com/dart-lang/sdk/issues/48991
Change-Id: I378093c02ec63e0c5eb5a1a8d80c1bbb0c88ba2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316842
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-07-28 23:47:35 +00:00
Jake Macdonald 91f389ed6a Drop use of package:_dart_internal in _fe_analyzer_shared
This is largely a copy of https://github.com/leafpetersen/cast, with some extra magic.

Change-Id: Iff92ac9a57b1cfbaa67fe15647aabb8858442b60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316880
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2023-07-28 22:36:44 +00:00
Konstantin Shcheglov 1c241a195a Extension types. Test building getter / setter elements.
Change-Id: Ie88d9eded5389c081104f07df65405b690d3a354
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316840
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-28 18:17:30 +00:00
Konstantin Shcheglov eb639c559b Extension types. Basic resolution.
Change-Id: I40f15cea81909c2b8dbe79990ee52abf0fc2e196
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316860
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-28 18:17:20 +00:00
Sam Rawlins b87dee93a7 [analyzer] Rename AnalysisOptions.hint to AnalysisOptions.warning
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I7050b4f758976ff555e43f219c6f5c2b0e8d362a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-07-28 15:51:05 +00:00
Konstantin Shcheglov b477c154a9 Extension types. Implement isNonNullable(), etc.
Change-Id: Icc6e4bc71e139d0a90c77fe437ec90b550a4bd2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316720
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-07-28 15:25:10 +00:00
Alexander Markov 6f8ddef40b [test_runner] Fix passing --suppress-core-dump to Fuchsia emulator
Previously, --suppress-core-dump option was inserted into the beginning
of the command line and was effectively passed to fssh, which
doesn't understand this option:

  ./third_party/fuchsia/sdk/linux/tools/x64/fssh --suppress-core-dump run fuchsia-pkg://fuchsia.com/dart_ffi_test_release#meta/fuchsia_ffi_test_component.cmx --sound-null-safety -Dtest_runner.configuration=vm-fuchsia-release-x64 --ignore-unrecognized-flags --packages=/pkg/data/.dart_tool/package_config.json --disable-dart-dev /pkg/data/tests/ffi/callback_unwind_error_test.dart

Instead, it should be passed as the first argument after 'run ...cmx':

  ./third_party/fuchsia/sdk/linux/tools/x64/fssh run fuchsia-pkg://fuchsia.com/dart_ffi_test_release#meta/fuchsia_ffi_test_component.cmx --suppress-core-dump --sound-null-safety -Dtest_runner.configuration=vm-fuchsia-release-x64 --ignore-unrecognized-flags --packages=/pkg/data/.dart_tool/package_config.json --disable-dart-dev /pkg/data/tests/ffi/callback_unwind_error_test.dart

TEST=ci
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try
Change-Id: Id33a4c54478b872889dcdd7034e9dae6336a3ae8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316620
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2023-07-28 12:03:40 +00:00
Johnni Winther 4efcda0fd2 [cfe] Generate statements for trivial pattern assignments
Closes #52960

Change-Id: I868a7ef5867ad955072ae5425da82c007ca1d73c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315902
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-07-28 11:11:37 +00:00
Johnni Winther bbbf6b907a [cfe] Support extension types from dill
In response to https://github.com/dart-lang/sdk/issues/53036

Change-Id: I676f5086028b88023b37379d674d66a8908709e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316580
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-07-28 10:37:27 +00:00
Martin Kustermann 23109940e0 [vm] Separate for-snapshot vs embed-sources bools when compiling to kernel
Fixes https://github.com/dart-lang/sdk/issues/53010

TEST=Fixes vm/dart/regress_48523_test

Change-Id: I2066ffd250228c01bb7aa2de5d1d0362ba6f7071
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316581
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-07-28 10:01:53 +00:00
Srujan Gaddam 79df0b2789 [dart2wasm] Mark _typeArguments as synthetic
Fixes b/293426600

This synthetic procedure is added on every class with type args.
Mark it as synthetic so the JS interop checks don't trigger on
it.

Change-Id: I5b04fe4340b409a4ab1eb5c32e37fe6ff37df4b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316702
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
2023-07-27 22:54:58 +00:00
Sigmund Cherem 862d974619 [modular_test] second attempt to fix shards.
Turns out the old code was also checking for the presence of the DEPS file.
This is not necessary, it was only done as a safeguard in case we had multiple
folders with the same name lying around. We could add DEPS to the set of files
sent to the shard, but that seems unnecesary here.

Fixes #53059

Change-Id: I83fc2569f42117c5fc4ea90c651cd7627a21a9ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316700
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-07-27 22:29:07 +00:00
Konstantin Shcheglov 5f4a6f4629 Extension types. Resolve field initializers and default values.
Change-Id: I72f5cc6ae8970bce7382ab8d8994e07c256c94e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316644
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-27 22:20:36 +00:00
Alexander Markov e417cfb4ad [vm/compiler] Fix IL serialization of FFI trampolines
This is a follow-up to https://dart-review.googlesource.com/c/sdk/+/316160,
which introduced FFI trampoline callback functions without
FfiCallbackTarget, which caused mismatch between IL serialization and
deserialization code.

Fixes https://github.com/dart-lang/sdk/issues/53056
TEST=ffi/async_void_function_callbacks_test

Change-Id: I6bd23ac673fc0ea650d08786423dd34159232c8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316601
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2023-07-27 21:32:40 +00:00
Konstantin Shcheglov ec57086a04 Add visitExtensionTypeElement()
Change-Id: I1e4b9ed6c646640c4e8ad7b2b5223936605956e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316626
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-27 21:29:32 +00:00
Konstantin Shcheglov ff17bed0e6 Build superinterfaces for extension types.
Change-Id: I74743591947a5798b60770a7c202cecfc5098e46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316624
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-07-27 20:53:33 +00:00
Ryan Macnak cf9a8111bc [vm] Remove dead friend declarations.
TEST=ci
Change-Id: I0054c5057eb24e9117e7d80806270f694d8cbef8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316641
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-07-27 20:17:17 +00:00
Konstantin Shcheglov e623e291a7 Add TypeSystemImpl.isValidExtensionTypeSuperinterface()
Change-Id: Ic2d40f1faab9851b3f4f9ee7605dabf197dca433
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316640
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-27 19:29:22 +00:00
Ryan Macnak 5b2aa424e5 [vm, gc] Card progress bars also need to be reset on an aborted scavenge.
Cf. cac1319768.

TEST=ci
Change-Id: I3545943071334b7c1114999ce8f4a77fe22718f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316602
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-07-27 19:27:46 +00:00
Stephen Adams 74242b1b6c [js_runtime] Use Array.prototype.sort
Sorting is 2-3x faster for a 1024 element list and simple comparison function.

Change-Id: Iecb4dceb7155e430fcc2c0ddef977003d747ab9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315760
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-07-27 19:21:13 +00:00
Sigmund Cherem 0a3ca5a098 [modular_test]: support running modular_test unit tests in shards.
The findRoot method made assumptions that were only true when running the
test in the main shard of our test runners. This caused a few tests to
start failing when sharding was enabled in:
089364baab

Fixes #53059

Change-Id: I32c59d6ae396fba5cbf19491eb17d7b90a7b8cd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316642
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-07-27 19:19:43 +00:00
Devon Carew 97850321ca Move moving forward revisions for: collection, dartdoc, ecosystem, test, vector_math.
Revisions updated by `dart tools/rev_sdk_deps.dart`.

collection (db343da..0a2885a):
  0a2885a  2023-07-25  Devon Carew  prep for publishing 1.18.0 (#299)

dartdoc (a04ac3e..1cf8870):
  1cf88707  2023-07-26  Sam Rawlins  Convert 'p' prefixes to 'path' in tool/ (#3472)
  d44c8056  2023-07-26  Sam Rawlins  Move a few more grinder tasks to package:args commands (#3468)
  f66eb72d  2023-07-26  Sam Rawlins  Use path as import prefix in lib/ and test/ (#3471)
  34441f21  2023-07-25  Sam Rawlins  Move flutter-doc tasks to package:args; remove unused grinder tasks (#3466)

ecosystem (27ff3e9..97fc1a7):
  97fc1a7  2023-07-25  Moritz  Fix comment posting from forks (#144)

test (37e54e3..7f81dee):
  7f81deea  2023-07-24  Nate Bosch  Drop the Condition abstraction (#1956)

vector_math (048777a..88bada3):
  88bada3  2023-07-26  John McCutchan  Revert "Fix rotation around Y axis (#262)" (#300)

Change-Id: Ib7bc8c1bab60450e6b328c3075207adef4cf642b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316621
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-07-27 17:16:53 +00:00
Kallen Tu 13a986db82 [analyzer] Fix broken code generators in g3.
Some part of the code generators trigger the `??` RHS operand when there is an unresolved type on the LHS.

In the previous const evaluator prior to https://dart-review.googlesource.com/c/sdk/+/312347, errors triggered by unresolved types would be ignored. Now that we have specific unresolved constants, we need to short circuit the evaluation in some places.

Anyways, this change makes unresolved types return LHS early (they're represented by a `Null` state) until I can find a better fix for this.

b/293326927

Change-Id: Ifcbff9921e1d4a82dc24153b042eaaa862bcca68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316490
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-07-27 17:05:19 +00:00
Konstantin Shcheglov 293d32fe76 Share more code using TypeParameterizedElementMixin.
Change-Id: I47bdfac9befe020c1daef72aec299ad752710209
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316487
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-27 15:14:50 +00:00
Johnni Winther bf9ea56ff7 [kernel] Remove nodes used for the old 'extension-types' experiment
This removes ExtensionType, ExtensionTypeShowHideClause and
CallSiteAccessKind from package:kernel which where only used by the now
removed 'extension-types' experiment.

A follow-up CL will rename InlineClass/InlineType to
ExtensionTypeDeclaration/ExtensionType to match the names of the
Extension Type feature currently being implemented.

TEST=existing

Change-Id: I58d2e8b0a92ac61329ee161cc6884a2c0e6f87ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316420
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-07-27 10:47:08 +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
Konstantin Shcheglov b42c27f2a2 Issue 53029. Include constant dependencies of map patterns.
Bug: https://github.com/dart-lang/sdk/issues/53029
Change-Id: I8d604a153452acee581f291f5806f88b4478fee0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316081
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-07-27 03:22:23 +00:00
Sam Rawlins cb93ac73fd Re-add applyToAnalysisOptions, needed by internal customer
b/293297223

Change-Id: I852bbc5df9c5918b31a37eaebd4bf1d2895f6fb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316529
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-07-27 02:44:08 +00:00
Sam Rawlins ab8736cf7c [analyzer] Remove all checks for ui-as-code enablement
Dart 3's minimum language version is 2.12. google3's is 2.9.

Change-Id: I8303b14de17b695e835cf9f8018f08731b51ec35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316526
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-07-27 02:43:38 +00:00
Konstantin Shcheglov 88d84eb6f2 Remove ElementImpl.typeParameterContext, unused.
Change-Id: Idac59ddb6fa013ea1a01ff4cf16cd3df4b2cf672
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316489
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-27 02:21:30 +00:00