Commit graph

96980 commits

Author SHA1 Message Date
Sigurd Meldgaard 22c467636f Bump pub to be6868ba132c782d9835b1638a634ecb73428579
Changes:
```
> git log --format="%C(auto) %h %s" 42819a1..be6868b
 https://dart.googlesource.com/pub.git/+/be6868ba Improve precompilation (4005)
 https://dart.googlesource.com/pub.git/+/1ff7ed9f `upgrade --tighten` (3957)
 https://dart.googlesource.com/pub.git/+/a2ff15af Bump actions/checkout from 3.5.3 to 3.6.0 (4007)
 https://dart.googlesource.com/pub.git/+/9c041f97 Revert "Validate pubspec names after resolution, instead of when parsing (3956)" (4006)
 https://dart.googlesource.com/pub.git/+/62981e8c Switch vendor to a dev dependency (3997)
 https://dart.googlesource.com/pub.git/+/edcd5c2a Don't display detailed errors from credentials file (4004)
 https://dart.googlesource.com/pub.git/+/bddb0b8a Fix test expectation (4000)
 https://dart.googlesource.com/pub.git/+/c5541b33 Fix spelling errors (3999)
 https://dart.googlesource.com/pub.git/+/ee3f0ff7 Log missing compilation output (3992)
 https://dart.googlesource.com/pub.git/+/57e5d581 Remove remaining remnants of old packages folder and .packages file (3989)
 https://dart.googlesource.com/pub.git/+/edc76a1c Cleanup meta annotation usage (3990)
 https://dart.googlesource.com/pub.git/+/d619b373 Replace Pair usage with records (3988)
 https://dart.googlesource.com/pub.git/+/923cb7bd Enable lints to use new language features (3987)
 https://dart.googlesource.com/pub.git/+/78a39b05 Fix some type related lints (3986)
 https://dart.googlesource.com/pub.git/+/f41c6c80 Update Dart spec reserved words (3984)
 https://dart.googlesource.com/pub.git/+/6c267643 Fix and increase flexibility of language version override test (3985)
 https://dart.googlesource.com/pub.git/+/037138e6 Validate pubspec names after resolution, instead of when parsing (3956)
 https://dart.googlesource.com/pub.git/+/4d4ff446 Show dependency type changes in report (3954)
 https://dart.googlesource.com/pub.git/+/996fdcfd `pub add` Rely on git sources validation of --git-url (3951)
 https://dart.googlesource.com/pub.git/+/d7647400 Update tar (3976)
 https://dart.googlesource.com/pub.git/+/98565c3e Bump actions/checkout from 3.5.2 to 3.5.3 (3960)
 https://dart.googlesource.com/pub.git/+/f323772e Summary for `pub get`, don't show unchanged in `pub upgrade` (3952)

```

Diff: https://dart.googlesource.com/pub.git/+/42819a1e10f803eb7f6296692c5a976e1c647360..be6868ba132c782d9835b1638a634ecb73428579/
Change-Id: I4b4f42790bb50ad4b17bdf2ac195494a241a63f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324101
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2023-09-04 14:56:52 +00:00
Sergey G. Grekhov 4d9bfa2d75 [co19] Roll co19 to ea1107d66f543f79ce865522ddd63718c8eb109e
2023-09-04 sgrekhov22@gmail.com dart-lang/co19#2145. Fix roll failure (LateInitializationError) (dart-lang/co19#2257)
2023-09-04 sgrekhov22@gmail.com dart-lang/co19#2145. Add more local variable declaration tests (dart-lang/co19#2254)
2023-09-01 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 3.5.3 to 3.6.0 (dart-lang/co19#2256)
2023-09-01 sgrekhov22@gmail.com dart-lang/co19#2213. Fix stack trace comparison (dart-lang/co19#2255)
2023-09-01 sgrekhov22@gmail.com dart-lang/co19#2145. Update variables tests according to the current spec. Part 2 (dart-lang/co19#2240)
2023-08-31 sgrekhov22@gmail.com dart-lang/co19#2242. Add LFCR line ending test (dart-lang/co19#2251)
2023-08-31 sgrekhov22@gmail.com dart-lang/co19#2145. Rename Local Variable declaration tests. Delete duplicates (dart-lang/co19#2252)
2023-08-30 sgrekhov22@gmail.com dart-lang/co19#2242. Add line endings tests (dart-lang/co19#2250)
2023-08-30 sgrekhov22@gmail.com Fixes dart-lang/co19#2245. Fix expectations in static_analysis_extension_types_A24_t02.dart (dart-lang/co19#2248)
2023-08-30 sgrekhov22@gmail.com dart-lang/co19#2242. Change CRLF line endings to LF (dart-lang/co19#2249)
2023-08-30 sgrekhov22@gmail.com Fixes dart-lang/co19#2244. Fix typo in dynamic_semantics_member_invocation_A01_t02.dart (dart-lang/co19#2247)
2023-08-30 sgrekhov22@gmail.com Fixes dart-lang/co19#2243. Remove duplicated constructors (dart-lang/co19#2246)
2023-08-29 sgrekhov22@gmail.com dart-lang/co19#2145. Update assertions and descriptions in the current Local variable declaration tests (dart-lang/co19#2241)
2023-08-25 sgrekhov22@gmail.com Fixes dart-lang/co19#2235. Add missing operator tests (dart-lang/co19#2239)
2023-08-25 sgrekhov22@gmail.com dart-lang/co19#2119. Code format and description update in operator tests (dart-lang/co19#2238)

Change-Id: I5aeac05c1aa4cbaa0762ce4f23c1ee916d1006a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324040
Reviewed-by: Alexander Thomas <athom@google.com>
2023-09-04 14:43:21 +00:00
Tess Strickland c93f924c82 [vm/compiler] Further optimize setRange on TypedData receivers.
When setRange is called on a TypedData receiver and the source is also
a TypedData object with the same element size and clamping is not
required, the VM implementation now calls _boundsCheckAndMemcpyN for
element size N. The generated IL for these methods performs the copy
using the MemoryCopy instruction (mostly, see the note below).

Since the two TypedData objects might have the same underlying
buffer, the CL adds a can_overlap flag to the MemoryCopy instruction
which checks for overlapping regions. If can_overlap is set, then
the copy is performed backwards instead of forwards when needed
to ensure that elements of the source region are read before
they are overwritten.

The existing uses of the MemoryCopy instruction are adjusted as
follows:
* The IL generated for copyRangeFromUint8ListToOneByteString
  passes false for can_overlap, as all uses currently ensure that
  the OneByteString is non-external and thus cannot overlap.
* The IL generated for _memCopy, used by the FFI library, passes
  true for can_overlap, as there is no guarantee that the regions
  pointed at by the Pointer objects do not overlap.

The MemoryCopy instruction has also been adjusted so that all numeric
inputs (the two start offsets and the length) are either boxed or
unboxed instead of just the length. This exposed an issue
in the inliner, where unboxed constants in the callee graph were
replaced with boxed constants when inlining into the caller graph,
since withList calls setRange with constant starting offsets of 0.
Now the representation of constants in the callee graph are preserved
when inlining the callee graph into the caller graph.

Fixes https://github.com/dart-lang/sdk/issues/51237 by using TMP
and TMP2 for the LDP/STP calls in the 16-byte element size case, so no
temporaries need to be allocated for the instruction.

On ARM when not unrolling the memory copy loop, uses TMP and a single
additional temporary for LDM/STM calls in the 8-byte and 16-byte
element cases, with the latter just using two LDM/STM calls within
the loop, a different approach than the one described in
https://github.com/dart-lang/sdk/issues/51229 .

Note: Once the number of elements being copied reaches a certain
threshold (1048576 on X86, 256 otherwise), _boundsCheckAndMemcpyN
instead calls _nativeSetRange, which is a native call that uses memmove
from the standard C library for non-clamped inputs. It does this
because the code currently emitted for MemoryCopy performs poorly
compared to the more optimized memmove implementation when copying
larger regions of memory.

Notable benchmark changes for dart-aot:
* X64
  * TypedDataDuplicate.*.fromList improvement from ~13%-~250%
  * Uf8Encode.*.10 improvement from ~50%-~75%
  * MapCopy.Map.*.of.Map.* improvement from ~13%-~65%
  * MemoryCopy.*.setRange.* improvement from ~13%-~500%
* ARM7
  * Uf8Encode.*.10 improvement from ~35%-~70%
  * MapCopy.Map.*.of.Map.* improvement from ~6%-~75%
  * MemoryCopy.*.setRange.{8,64} improvement from ~22%-~500%
    * Improvement of ~100%-~200% for MemoryCopy.512.setRange.*.Double
    * Regression of ~40% for MemoryCopy.512.setRange.*.Uint8
    * Regression of ~85% for MemoryCopy.4096.setRange.*.Uint8
* ARM8
  * Uf8Encode.*.10 improvement from ~35%-~70%
  * MapCopy.Map.*.of.Map.* improvement from ~7%-~75%
  * MemoryCopy.*.setRange.{8,64} improvement from ~22%-~500%
    * Improvement of ~75%-~160% for MemoryCopy.512.setRange.*.Double
    * Regression of ~40% for MemoryCopy.512.setRange.*.Uint8
    * Regression of ~85% for MemoryCopy.4096.setRange.*.Uint8

TEST=vm/cc/IRTest_Memory, co19{,_2}/LibTest/typed_data,
     lib{,_2}/typed_data, corelib{,_2}/list_test

Issue: https://github.com/dart-lang/sdk/issues/42072
Issue: b/294114694
Issue: b/259315681

Change-Id: Ic75521c5fe10b952b5b9ce5f2020c7e3f03672a9
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-simriscv64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-simriscv64-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-aot-linux-release-simarm64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-ffi-qemu-linux-release-riscv64-try,vm-ffi-qemu-linux-release-arm-try,vm-aot-msan-linux-release-x64-try,vm-msan-linux-release-x64-try,vm-aot-tsan-linux-release-x64-try,vm-tsan-linux-release-x64-try,vm-linux-release-ia32-try,vm-linux-release-simarm-try,vm-linux-release-simarm64-try,vm-linux-release-x64-try,vm-mac-release-arm64-try,vm-mac-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-aot-android-release-arm64c-try,vm-ffi-android-debug-arm64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319521
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-09-04 14:38:27 +00:00
Johnni Winther b745fa8923 [cfe] Avoid "Instance of " in parser intertwined test expectations
Change-Id: I7d7b1c9a001c43ec160d26c478bd71b41505f273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323361
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-09-04 13:06:29 +00:00
Aske Simon Christensen 744c0e8b66 [dart2wasm] Support multiple returns in code generator call method
Removes the assumption from the code generator `call` helper method
that the called function has zero or one return value. This enables
the helper to be used for functions with multiple return values (e.g.
constructor initializer functions), allowing such functions to be
inlined.

Many places that explicitly called a function behind a reference using
`b.call(translator.functions.getFunction(reference))` are now using
the `call` helper like `call(reference)` such that those calls can be
inlined.

Also fixes a bug in the inlining heuristic that would allow inlining
of `async` functions, which would break.

Change-Id: I180d45de8ad36ef8ef1d27a71fc8ec473a25db8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324023
Reviewed-by: Jess Lally <jessicalally@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2023-09-04 11:29:44 +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
Ilya Yanok cbdae14d2f Revert "linter: Refactor prefer_collection_literals to use context type more"
This reverts commit cd8a3370e7.

Reason for revert: lint starts barking at the wrong tree: b/298917960

Original change's description:
> linter: Refactor prefer_collection_literals to use context type more
>
> There is a basic premise in this rule which we cannot satisfy exactly:
> we need to disallow `LinkedHashSet()` unless the context type requires
> the developer to use `LinkedHashSet`. But the context type is long
> gone when the lint rule is run.
>
> This CL adds some logic to try to attempt figuring out the context
> type in the cases where users have filed bugs, but it will never be
> super accurate.
>
> Fixes https://github.com/dart-lang/linter/issues/4736
> Fixes https://github.com/dart-lang/linter/issues/3057
> Fixes https://github.com/dart-lang/linter/issues/1649
> Fixes https://github.com/dart-lang/linter/issues/2795
>
> Change-Id: I3e6c6de81084dca2825488c89830ab3e7ea63186
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323680
> Reviewed-by: Phil Quitslund <pquitslund@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>

Change-Id: I980053dd51ffd4447721e0ad7436b07ca704b554
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324021
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-09-04 10:43:54 +00:00
Jens Johansen 44bcd896e0 [CFE] Enable fuzzing for strong suite by default
Most status updates have been copied blindly from the weak.status file.

Change-Id: I41c271c8658cb0d48d96ea6ace03279276528303
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324020
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-09-04 10:08:00 +00:00
Jia Hao Goh 4640efef8e [dart2wasm] Fix default name for pragmas
Fixes the following:

When using `@pragma("wasm:import")` or `@pragma("wasm:export")` without the second argument (as documented in https://github.com/dart-lang/sdk/tree/main/pkg/dart2wasm#imports-and-exports), this would fail with the following error:

```
type 'NullConstant' is not a subtype of type 'String?' in type cast
#0      Translator.getPragma (package:dart2wasm/translator.dart:939)
#1      FunctionCollector._importOrExport (package:dart2wasm/functions.dart:52)
#2      List.forEach (dart:core-patch/growable_array.dart)
#3      FunctionCollector.collectImportsAndExports (package:dart2wasm/functions.dart:37)
#4      Translator.translate (package:dart2wasm/translator.dart:268)
#5      compileToModule (package:dart2wasm/compile.dart:138)
<asynchronous suspension>
#6      main (package:dart2wasm/dart2wasm.dart:134)
<asynchronous suspension>
...
```

Change-Id: Ie9b6766be10ced45ec360c7fb71cffa7097ee38a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323140
Commit-Queue: Jia Hao Goh <jiahaog@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-09-04 09:43:00 +00:00
Johnni Winther e3621561aa [parser] Refactor BlockKind
Refactors BlockKind to pass an explicit template/message instead
of injecting words directly into the message which leads to
grammatically incorrect english in the output message.

Change-Id: I3b91abf2e5a748f3dfca2cc0a6c877e77b3ad7d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322121
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-09-04 09:40:21 +00:00
Sam Rawlins 0a567d01e5 linter: Move unnecessary_this tests
Change-Id: I689feebb74a03e810853faf5f3d2d7dd917701b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323962
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-09-01 22:47:59 +00:00
Konstantin Shcheglov a7bb403125 Extension type. Test for DartSelectionRangeComputer.
Change-Id: I5e88681dc901a900e5de7ccd13e0c05341c42456
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323963
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-09-01 21:48:09 +00:00
Devon Carew e268258df6 [deps] rev async, bazel_worker, boolean_selector, browser_launcher, cli_util, clock, convert, crypto, csslib, dartdoc, ecosystem, ffi, fixnum, http, lints, logging, markdown, matcher, mime, native, path, pool, shelf, source_map_stack_trace, sse, stack_trace, stream_channel, string_scanner, term_glyph, test, test_descriptor, test_process, tools, typed_data, watcher, yaml, yaml_edit
Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (b65622a..75efa6c):
  75efa6c  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#250)

bazel_worker (c29d162..f950bbf):
  f950bbf  2023-08-31  Parker Lougheed  Regenerate worker protocol protos to add constructors and comments (#78)
  9b4c6a0  2023-08-30  Parker Lougheed  Update e2e_test dependencies (#79)

boolean_selector (303635d..f255921):
  f255921  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#50)

browser_launcher (27ec600..1f69393):
  1f69393  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#48)

cli_util (9b7ce78..44118e3):
  44118e3  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#88)

clock (263e508..1e75f08):
  1e75f08  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#55)

convert (79ee174..c058c8f):
  c058c8f  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#86)

crypto (8b704c6..1e26879):
  1e26879  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#151)

csslib (7e91228..bd30a1a):
  bd30a1a  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#188)

dartdoc (5fda5eb..695b218):
  695b218c  2023-08-30  Sam Rawlins  Tidy Category: (#3488)
  b26af96f  2023-08-30  Sam Rawlins  Tidy up library exports (#3487)
  be35cb00  2023-08-29  Devon Carew  Update dependabot.yaml (#3486)
  649bb8d2  2023-08-29  Sam Rawlins  Migrate to create_api_docs.dart (#3482)

ecosystem (f777da7..89e58de):
  89e58de  2023-09-01  Hossein Yousefi  also install flutter on validate (#160)
  f95d0f2  2023-09-01  Hossein Yousefi  Add use-flutter arg to validate (#159)
  8743a9d  2023-09-01  Moritz  Pass a parameter for Flutter `firehose` support (#158)
  54d1628  2023-08-31  Moritz  Setup Flutter in publish workflow (#157)
  8fa89c6  2023-08-31  Moritz  Add flutter support (#155)
  65817bf  2023-08-29  Moritz  Switch to Pub API (#152)

ffi (e2c01a9..d36e05a):
  d36e05a  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#208)

fixnum (00fa120..87ed065):
  87ed065  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#114)

http (cad7d60..7fb6fd6):
  7fb6fd6  2023-08-31  Brian Quinlan  Clarify how to set the body without a content type header (#1014)

lints (54cd7a0..da44af3):
  da44af3  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#144)

logging (5214987..bcaad0f):
  bcaad0f  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#147)

markdown (56e75df..6cfd6f1):
  6cfd6f1  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#554)
  52be591  2023-08-30  Parker Lougheed  Fix a few more lints, no longer ignore line length (#552)

matcher (ce8f409..80910d6):
  80910d6  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#227)

mime (799b398..37ef637):
  37ef637  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#104)

native (5a1361b..a2dfedc):
  a2dfedc  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#117)
  8dfb0d2  2023-09-01  dependabot[bot]  Bump nttld/setup-ndk from 1.2.0 to 1.3.1 (#118)

path (7c2324b..96d9183):
  96d9183  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#150)

pool (7700102..a5bee35):
  a5bee35  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#73)

shelf (73edd2b..2926f76):
  2926f76  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#376)

source_map_stack_trace (16e54fd..196d7bf):
  196d7bf  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#41)

sse (8cc5b11..eeb2588):
  eeb2588  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#87)
  2bb1a6e  2023-09-01  dependabot[bot]  Bump nanasess/setup-chromedriver from 2.1.1 to 2.2.0 (#88)

stack_trace (4ddd86d..bcf2a0b):
  bcf2a0b  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#140)

stream_channel (e54234f..0ce7ab6):
  0ce7ab6  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#94)

string_scanner (413b57a..da9142c):
  da9142c  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#62)

term_glyph (423700a..1b28285):
  1b28285  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#41)

test (d0fc4bd..27dcae1):
  27dcae11  2023-09-01  dependabot[bot]  Bump github/codeql-action from 2.21.2 to 2.21.5 (#2086)
  cf0a0a73  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#2085)

test_descriptor (36d8617..030193d):
  030193d  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#55)

test_process (b360784..2a6ee23):
  2a6ee23  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#47)

tools (b72fae8..2c8cbd6):
  2c8cbd6  2023-09-01  Jonas Finnemann Jensen  Extension discovery 2.0.0 (#156)
  3e12c2e  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#157)
  0f28f80  2023-08-28  Kenzie Davisson  Prepare extension_discovery for 1.0.1 release (#154)

typed_data (a20be90..80e8943):
  80e8943  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#72)

watcher (7457413..1aed03e):
  1aed03e  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#149)

yaml (7930148..ae00187):
  ae00187  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#150)

yaml_edit (87dcf31..4a9734d):
  4a9734d  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#56)
  83f9033  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#54)

Change-Id: Ie6b9d9ef138730b98e9df8cbb31c6cc330ada9f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323703
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-09-01 21:24:08 +00:00
Nicholas Shahan 83bbef0dba [dart2js, ddc] Avoid multiple _getKind() calls
Add a local variable for the result.

Change-Id: Iff4002ecd3d491c9b12b3e7baf98394612983520
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323710
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-09-01 21:16:08 +00:00
Nicholas Shahan 4b3e1a234d [ddc] Avoid casts to Rti
Implicit downcasts from dynamic were accidentally added in this
code that is only exercised by DDC.

Change-Id: I8514b0d8c09a76ac58dec0faed853ce007a144c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323709
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-09-01 21:16:08 +00:00
Nicholas Shahan b6c90d027b [ddc] Avoid Object casts in JsArray constructors
Implicit downcasts from dynamic were accidentally introduced
when changing to use the `jsObjectSetPrototypeOf()` helper.

Change-Id: Idda8c553b4aa0f6c3387f8c6682c23938c7959a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323708
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-09-01 21:16:08 +00:00
Anna Gringauze 3740e620cd Reland "[ddc] Add module local caches for new types"
This is a reland of commit a9fc9ffc4d

Additional changes:

- Set incremental mode on generic class table
  - fixes expression evaluation failure discovered by dwds tests
    (generic class table was not always defined in compiled expression)
- Allow expression evaluation while the app is running in e2e suite
- Add regression tests for the expression evaluation failure.

Original change's description:
> [ddc] Add module local caches for new types
>
> - Provides fast access for types that are used multiple times in the
>   same module.
> - Enable the existing type table cache when running with new types.
> - Add a similar cache for instantiated generic classes. This cache
>   is used in the current type system as well to help keep the
>   difference between types and classes more clear.
>
> Issue: https://github.com/dart-lang/sdk/issues/48585
> Change-Id: I32103cf0c0bcf9b9771e789c0d04e63a4365a066
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321320
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Mark Zhou <markzipan@google.com>

Change-Id: I9c31d1d07d7f9bb15645ac9aa6e91d35e8906e85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323501
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-09-01 21:10:09 +00:00
asiva 36c6daa920 [dartdev/test] Added missing test case for https://github.com/dart-lang/sdk/issues/52892
Change-Id: If3b17d9c6d87c126afee6ec962f6049b4942624d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323960
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2023-09-01 21:05:04 +00:00
Konstantin Shcheglov 53cd950e7a Extension type. Code folding.
Change-Id: I33ee2cf63a275c7c2d8f41c4033a0ee4d2641e28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323944
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-01 20:47:23 +00:00
Konstantin Shcheglov 49f5312fed Extension type. Overrides notification.
Change-Id: I1865e0d44093c1501b422d1b6d34fbc1e9612db8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323943
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-01 20:44:38 +00:00
Keerti Parthasarathy 234c129a81 Add test for extension type documentation.
Change-Id: Ic7ebad6865207339528abafb8e58b39accdab589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323942
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-09-01 20:19:29 +00:00
Konstantin Shcheglov a0d32a1e3f Extension type. Include into 'occurrences' notification.
Change-Id: Ibfe62a4916c9b991e5d407e239d82ad8eb90b5ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323923
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-09-01 20:07:35 +00:00
Sam Rawlins cd8a3370e7 linter: Refactor prefer_collection_literals to use context type more
There is a basic premise in this rule which we cannot satisfy exactly:
we need to disallow `LinkedHashSet()` unless the context type requires
the developer to use `LinkedHashSet`. But the context type is long
gone when the lint rule is run.

This CL adds some logic to try to attempt figuring out the context
type in the cases where users have filed bugs, but it will never be
super accurate.

Fixes https://github.com/dart-lang/linter/issues/4736
Fixes https://github.com/dart-lang/linter/issues/3057
Fixes https://github.com/dart-lang/linter/issues/1649
Fixes https://github.com/dart-lang/linter/issues/2795

Change-Id: I3e6c6de81084dca2825488c89830ab3e7ea63186
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323680
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-09-01 19:58:29 +00:00
Konstantin Shcheglov 13e109e6b6 Extension type. Workspace symbols.
Change-Id: Ied0e652a18f07ab3b3e7d2a0d76bf20bf3dc55d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323921
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-09-01 19:15:48 +00:00
Konstantin Shcheglov 3e4ab6bc16 Extension type. Implemented markers.
Change-Id: I9477ac521f8889a935fe8b439b92f9cb65acad69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-01 18:56:57 +00:00
Sam Rawlins d0273dda5f linter: Move no_runtimeType_toString tests
Also re-order the skip checks, to avoid walking up ancestors on
every method call that isn't named 'toString'.

Change-Id: I69e9b58b1ae26d44498381546d5881c7e66d4935
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323681
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-09-01 18:51:18 +00:00
Konstantin Shcheglov 12bd986c71 Extension type. Request based test for rename, a fix for representation field.
Change-Id: Ic10550089272797724a0047a31fa040f4a293001
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323706
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-01 17:53:57 +00:00
pq 349e6266ff verify linter source sorting
Fixes: https://github.com/dart-lang/linter/issues/2368

Change-Id: I498e271dc32348115a34472b44688be8de2169a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-09-01 17:40:07 +00:00
Konstantin Shcheglov 84f65be285 Fix 'Extract Method' refactoring inside extensions.
Change-Id: If055456980361c5ec768bf5cb104af11cfa1b12e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323704
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-09-01 17:06:39 +00:00
Konstantin Shcheglov 42d8cdfe29 Issue 53405. Report PATTERN_NEVER_MATCHES_VALUE_TYPE got record patterns.
Bug: https://github.com/dart-lang/sdk/issues/53405
Change-Id: I139fc620f10f18ab2b44b806ab24fa09e9956f61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323685
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-09-01 16:06:17 +00:00
Derek Xu 40c2a63c66 Revert "[analyzer] Make KernelCompilationService use AOT frontend_server snapshot"
This reverts commit 21743361b0.

Reason for revert: b/298654122

Original change's description:
> [analyzer] Make KernelCompilationService use AOT frontend_server snapshot
>
> TEST=pkg/analyzer/test/src/summary/macro_test
>
> Change-Id: I28a37c7648de3e9b3c98b93fea1244234854e439
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322424
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

Change-Id: Idec05c8759edd26821ee4eeffe9be76ed750f8fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323880
Commit-Queue: Derek Xu <derekx@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-09-01 15:57:47 +00:00
Danny Tuppeny ddfc758572 [analysis_server] Expand list of features to review for new language features
I'm not certain all of these could be affected by new language features, but
it seems better to include them and do nothing than potentially miss something.

Change-Id: I4fc74e91511039b6679bc7b72dc3d90a1a45fc30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323661
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-09-01 15:06:49 +00:00
Derek Xu 21743361b0 [analyzer] Make KernelCompilationService use AOT frontend_server snapshot
TEST=pkg/analyzer/test/src/summary/macro_test

Change-Id: I28a37c7648de3e9b3c98b93fea1244234854e439
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322424
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-09-01 15:02:30 +00:00
Johnni Winther 9e781c20e8 [cfe] Make TypeBuilder sealed
This changes the TypeBuilder to be a sealed class and changes
implementation to use exhaustive switch, including fixes for all
missing cases found.

Change-Id: I24436801c93ee43858d35ed6b396489fd13125be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322960
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-09-01 13:22:23 +00:00
Jonas Termansen 67a7eb63e5 [devtools] Remove obsolete update script.
The devtools cipd packages are now automatically built in the secure
release infrastructure and humans are no longer able to directly upload
the cipd packages. Cherry-picks to the release branches are handled by
specially triggering the secure builder.

Bug: b/297020298
Change-Id: I8d587cf787b85abea1762c7f302b261298adf83d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323640
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-09-01 12:48:31 +00:00
Tess Strickland 429ba99568 [vm/compiler] Only print traces when the flow graph should be printed.
When either the --trace-optimization or --trace-load-optimization
flags are used, only print those traces if the associated flow graph
would be printed (i.e., it matches the filter given by
--print-flow-graph-filter, or no filter is given).

TEST=ci

Change-Id: Ibfb72455de483fe471a5eb0261a5e803578f0bb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323600
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-09-01 10:39:46 +00:00
Nate Biggs 72694a93c8 [dart2js] Add option to only emit deferred load ID mapping.
Some customers use tools to preprocess this set of load IDs in order to optimize how code is loaded in their app. This flag allows us to emit this information as early as possible in the compiler without having to completely compile to JS.

Change-Id: I572d4f06ffd49a672767adc344819388a741e20c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323340
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-09-01 01:36:29 +00:00
Stephen Adams 42fbb693f3 [js_runtime] NullError always reports as a failed null check
Bug: b/244438673
Change-Id: Iaccfe428b4db2a8d0f910d5028aed77ac5d5ea80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306912
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-09-01 00:05:09 +00:00
Ryan Macnak 4038b4f9df [frontend_server] Forward --keep-class-names-implementing.
Cf. 708f098c4f

TEST=ci
Change-Id: I65b51d5aa93eeb0e41ee276b4288dd231d6dbc87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323424
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-08-31 22:27:45 +00:00
Konstantin Shcheglov 80a76ff357 Extension type. Extract method refactoring.
Change-Id: I34e08182b568bfc0296b45851ccedb803595efa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323701
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-31 21:35:39 +00:00
Konstantin Shcheglov 55634cbb5b Extension type. Rename refactorings.
Change-Id: Ia65a8e18ff0a92b799ac376872b621e69ad61701
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323683
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-31 20:40:00 +00:00
Alexander Aprelev 2f457d1a8a [vm/debugger] Use RwLock instead of SafepointRwLock, get rid of RunUnderLockIfNeeded.
RwLock, rather that SafepointRwLock, is okay to use for these two breakpoint_locations and single_stepping_set locks because they are short-lived, should not spawn over the safepoint.
TEST=ci

Change-Id: Iba83291978ba7980d0c6fd0a0a2cf2174c801359
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323202
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-08-31 19:52:23 +00:00
Konstantin Shcheglov 2c9089f120 Extension type. More tests for search, highlight, navigation.
Change-Id: Iffa7e73be52219591dc75f8aacb7defa4b001b1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-08-31 19:36:37 +00:00
Kallen Tu 74794c81b2 [analyzer] Fix comparison of doubles in constant evaluation.
Reland of https://dart-review.googlesource.com/c/sdk/+/96840

Bug: https://github.com/dart-lang/sdk/issues/36188
Change-Id: Iebfde151f098cb2352ddb5cb9368861b313fed4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323230
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-08-31 19:35:01 +00:00
pq 039640fad1 prefer_const_literals_to_create_immutables extension type test
Closes: https://github.com/dart-lang/linter/issues/4722

Change-Id: Ifd60ab27242e802638c072e5957c5c35fe89c399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-31 19:33:37 +00:00
Stephen Adams 565919a80f [js_runtime] Clean up String.trim{Left,Right}
- Use the standardized JavaScript names `trimStart` and `trimEnd`.
- Remove IE11 polyfill.

Change-Id: I9a469b8bf076efd16ef06b88c7fa111784054bb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323300
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-08-31 19:06:29 +00:00
Sam Rawlins 4a9a0dcfdb analyzer: Parse '@nodoc' in a doc comment
Work towards https://github.com/dart-lang/sdk/issues/52705

Change-Id: Icaa0bcb0e58ca07250d135372dc88985b5f1f68c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323423
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-31 18:27:28 +00:00
Konstantin Shcheglov 224a5c7d32 Enable language 3.2 for analysis_server/ and linter/.
Change-Id: Ifba960f2947a6c900c81fc794bfc5ed288cc2e97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323700
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-31 17:38:39 +00:00
pq 040c8e3247 allow @immutable extension types
Fixes: #53351

Change-Id: I5afcce3940fe7c01e37e0f133068325ec3fb5579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323203
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-31 17:00:37 +00:00
Konstantin Shcheglov 702cca5a18 Extension type. Updates and tests for search.
Change-Id: I17c5c9eb5237ba6f090cab974d4419e46b584ac8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323504
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-31 16:02:18 +00:00