Commit graph

91733 commits

Author SHA1 Message Date
pq 8d6bc8dd60 quick fix for unnecessary_to_list_in_spreads
See: https://github.com/dart-lang/lints/issues/80

Change-Id: I4c77c69e8449a4db1f267143d3dcad19b89d3bed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303785
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-05-16 18:08:28 +00:00
Devon Carew 94c2f6528c [deps] rev args, async, bazel_worker, benchmark_harness, boolean_selector, browser_launcher, characters, cli_util, clock, collection, crypto, dartdoc, leak_tracker, lints
Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (1864048..f0f6cd2):
  f0f6cd2  2023-05-12  Devon Carew  blast_repo fixes (#243)

async (0f368d3..d744058):
  d744058  2023-05-12  Devon Carew  blast_repo fixes (#242)

bazel_worker (1b86d3c..d9b389f):
  d9b389f  2023-05-12  Devon Carew  blast_repo fixes (#73)

benchmark_harness (f81b042..e717ad4):
  e717ad4  2023-05-12  Devon Carew  blast_repo fixes (#90)

boolean_selector (7eed402..3a1c982):
  3a1c982  2023-05-15  Devon Carew  Update README.md (#48)
  23e08e0  2023-05-12  Devon Carew  blast_repo fixes (#47)

browser_launcher (551e101..40e4315):
  40e4315  2023-05-12  Devon Carew  blast_repo fixes (#45)

characters (2af6783..3ef8883):
  3ef8883  2023-05-15  Devon Carew  blast_repo fixes (#82)

cli_util (7234f17..5a49947):
  5a49947  2023-05-15  Devon Carew  blast_repo fixes (#83)

clock (6b9df3e..fe85908):
  fe85908  2023-05-15  Devon Carew  blast_repo fixes (#51)

collection (6abff47..db2da48):
  db2da48  2023-05-15  Devon Carew  blast_repo fixes (#288)

crypto (4e9dde1..216931a):
  216931a  2023-05-15  Devon Carew  blast_repo fixes (#149)

dartdoc (d01ddc5..2952f6b):
  2952f6bf  2023-05-16  Sam Rawlins  Simplify ToolConfiguration and other options code (#3414)
  0cf21c15  2023-05-12  Janice Collins  Extract fileName / fileType from ModelElement, LibraryContainer into FileStructure (#3413)
  2ae78bcc  2023-05-12  Sam Rawlins  Split sidebars out into separate HTML files (#3384)
  f00d0443  2023-05-11  Janice Collins  Housekeeping:  language version 3.0, analyzer deprecations, pubspec update (#3412)
  370477d2  2023-05-10  dependabot[bot]  Bump github/codeql-action from 2.3.2 to 2.3.3 (#3410)
  e8c5de44  2023-05-08  Janice Collins  Begin extracting file structure information from ModelElement (#3408)
  24af8a11  2023-05-04  Janice Collins  Add a hideConstantImplementations dartdoc directive (#3398)
  078d42fd  2023-05-03  Janice Collins  Change language feature wording based on review in #3401 (#3405)
  31088c1b  2023-05-03  dependabot[bot]  Bump github/codeql-action from 2.2.12 to 2.3.2 (#3403)
  60055b4e  2023-05-03  Sam Rawlins  Update validate-sdk-docs task to allow 20 libs (#3404)

leak_tracker (bc7f604..8ae200a):
  8ae200a  2023-05-15  Polina Cherkasova  - (#62)

lints (17276ec..72f107a):
  72f107a  2023-05-15  Devon Carew  blast_repo fixes (#120)
  6732fbc  2023-05-15  Devon Carew  blast_repo fixes (#119)

Change-Id: Ibbb1fcc530da01653fe325bdcf77f1c764887a81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303783
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-16 17:51:42 +00:00
Konstantin Shcheglov 39f240e751 Reset _classMembersLengthsIndex in LibraryReader.
This change might help with analyzing the bug.

Bug: https://github.com/dart-lang/sdk/issues/51855
Change-Id: I214a6238e696ffa2ba16df11946e65da18e81945
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303782
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-16 17:47:48 +00:00
Brian Wilkerson 85221a9ba6 Convert variable name contributor tests
Change-Id: I21983e7492420a93e562a94e7907707b90d1938e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-16 17:33:47 +00:00
Nate Biggs bb179504c0 [dart2js] Resolve non-converging parameter types in linearized inference algorithm.
Due to the introduction of "virtual parameters" (parameters of virtual functions) there was a new pattern that allowed for non-converging types. If two functions are mutually recursive and one makes a virtual call to the other, then we end up with a cycle in the parameter types.

That part isn't new, that cycle already existed. However, now the cycle can include the virtual parameters for those functions. The way we enqueue the users after resolving a virtual parameter can cause an alternating pattern of refinement that doesn't allow the cycle to fully resolve itself.

We resolve this by manually enqueueing the concrete parameter and its associated NarrowTypeInformation (which enforces the static type). The key is that these are enqueued before other users of the virtual parameter which in the bad case are other members in the cycle that were being processed out of order.

Change-Id: Ic20afcc55ca6e75152d7858eaab1cb24a57ea20e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303120
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-05-16 17:24:48 +00:00
Nicholas Shahan 8ed4c94893 [ddc] Avoid .__proto__ in super constructor call
Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: I0ee52ea11eeaea8b444ca2deaafb5ee1fe734fdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303089
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-16 16:34:49 +00:00
Ryan Macnak 3c06a5aa17 [build] Update Android SDK to match Flutter.
TEST=ci
Change-Id: Ic86332a60fe570d0e79272869284a69ea109edef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303520
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-16 16:32:58 +00:00
Konstantin Shcheglov 85d09eb89f Issue 52387. Report an error for !super
Bug: https://github.com/dart-lang/sdk/issues/52387
Change-Id: I9893315b988c3096ea2d103f6a46f00ff0450afe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303446
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-05-16 15:51:45 +00:00
Janice Collins fef81857ca Implement broad-spectrum filtering for possible path and filenames in exception strings.
Change-Id: Ibe3d08739e2f1f199f11d40c01699ff194fc5028
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303442
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-16 15:25:37 +00:00
Danny Tuppeny 84f528d26d [dds/dap] Handle "Service has disappeared" errors for in-flight requests when app may be shutting down
Fixes https://github.com/flutter/flutter/issues/116235.

Change-Id: Ibfd24bce45519116e350a7f409609f19ca502ad3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303580
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-05-16 14:44:23 +00:00
Tim Sneath 578dd70fae Tighten introductory text
Closes https://github.com/dart-lang/sdk/pull/52065

GitOrigin-RevId: f1b58633b1069f129d8c88ac7fca1bc9a48f3beb
Change-Id: I4af2e3b69711e4a393c154a98b4a4e5a26e8a03e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295700
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2023-05-16 13:55:23 +00:00
Ilya Yanok 126a941e72 Revert "[deps] rev args, async, bazel_worker, benchmark_harness, boolean_selector, browser_launcher, file, mockito, tools, dartdoc"
This reverts commit e3ba8552f6.

Reason for revert: b/282823291, breaks Flutter tests at least on Android.

Original change's description:
> [deps] rev args, async, bazel_worker, benchmark_harness, boolean_selector, browser_launcher, file, mockito, tools, dartdoc
>
> Revisions updated by `dart tools/rev_sdk_deps.dart`.
>
> dartdoc to 0cf21c15d7346a81838bd1c56677d88d690887f5
>
> args (1864048..f0f6cd2):
>   f0f6cd2  2023-05-12  Devon Carew  blast_repo fixes (#243)
>
> async (0f368d3..d744058):
>   d744058  2023-05-12  Devon Carew  blast_repo fixes (#242)
>
> bazel_worker (1b86d3c..d9b389f):
>   d9b389f  2023-05-12  Devon Carew  blast_repo fixes (#73)
>
> benchmark_harness (f81b042..e717ad4):
>   e717ad4  2023-05-12  Devon Carew  blast_repo fixes (#90)
>
> boolean_selector (7eed402..23e08e0):
>   23e08e0  2023-05-12  Devon Carew  blast_repo fixes (#47)
>
> browser_launcher (551e101..40e4315):
>   40e4315  2023-05-12  Devon Carew  blast_repo fixes (#45)
>
> file (e90e5ed..f05f5db):
>   f05f5db  2023-05-15  James D. Lin  Make MemoryFile.openRead and _ChrootFile.openRead return Stream<List<int>> again (#217)
>   f2f3076  2023-05-12  Ross Wang  MemoryFileSystem addStream onError (#220)
>   5e76f74  2023-05-12  James D. Lin  Fix MemoryFileSystem to treat an empty path as non-existent (#213)
>   7941466  2023-05-12  James D. Lin  Make `FileSystem.isLink` actually work (#214)
>
> mockito (51a7728..b14d571):
>   b14d571  2023-05-15  Googler  Fix for InvalidType
>
> tools (62c9604..49da4ca):
>   49da4ca  2023-05-12  Polina Cherkasova  Add memory events. (#92)
>
> Change-Id: I582320bb68ff5f48e9969cef906073e25ad6b875
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303380
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

Change-Id: Ifc2aa278a47a4060f2be28c1950084eb0c2de812
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303720
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-05-16 13:38:48 +00:00
Michael Thomsen bb62614202 Update CONTRIBUTING.md
Closes https://github.com/dart-lang/sdk/pull/52410

GitOrigin-RevId: a81636fadcf2c506cc3b0946388055aa7442b2ad
Change-Id: I70efc8015e4bf3c1c4d6f230de8e0d1a735d636a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303680
Reviewed-by: Alexander Thomas <athom@google.com>
2023-05-16 13:04:13 +00:00
mnordine 2369a3be0f Fix bool.parse() examples
Closes https://github.com/dart-lang/sdk/pull/52389

GitOrigin-RevId: 4987894e85a28e18b183eb45a111d47444d305db
Change-Id: Ib68581d7966c0fb24ccd9070054ea9aaadd2e17d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303221
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-05-16 11:16:16 +00:00
Jens Johansen f85112d6ef [CFE] Benchmarker tool using perf stat
Tool that runs two or more aot-snapshots in the same way through perf
stat, then performing statistics on the result.

This generally runs

```
perf stat -B taskset -c 7 out/ReleaseX64/dart-sdk/bin/dartaotruntime \
  --deterministic <snapshot> <arguments>
```

a number of times, doing statistics on the data from `perf stat`.

Note that this makes it only run on 1 core as that seems a little more
stable, though it's normally not necessary. The `--deterministic` is
necessary though.

Change-Id: I4846972598eb4d019a44e7bbd2314f0b6d2aaa47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303340
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-05-16 10:57:50 +00:00
Daco Harkes 3466d6855a [frontend_server] Support @Native assets in compute_kernel
The utils/bazel/kernel_worker.dart entry-point uses
pkg/frontend_server/lib/compute_kernel.dart as entry-point.
So we need to cover this entry point to the frontend_server as well
to pass the native asset yaml file.

Upstreamed from cl/530924434 and cl/512913404.

Change-Id: I86204870807da4ee3e8a7b10c40a17862042da08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286141
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-05-16 09:50:38 +00:00
Mayank Patke ea84221100 Fix nullability of cast to FunctionType.
Fixes: #52403
Change-Id: I6eeaad51f45b8dabfd61132d2deae0893b01e99b
Fixed: 52403
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303420
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Mayank Patke <fishythefish@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-05-16 06:43:09 +00:00
Johnni Winther 70fc3c3e14 [cfe] Add private injected constructors to origin constructor scope
This normalizes the handling of private injected constructors to
how private injected members are handled, making them available in
the origin library as well as in other patch libraries for the same
origin library.

Change-Id: I917652795c04c099412248c074ea50553f9f2676
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303361
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-05-16 06:40:48 +00:00
Liam Appelbe d6931e618e [vm] Make x86 disassembler able to handle invalid input
Arm, arm64, and riscv disassemblers already pass the new test.

Change-Id: Iaeb84d8db007d35225f77505503ca7614f82fb77
TEST=Disassembler_InvalidInput
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303560
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Liam Appelbe <liama@google.com>
2023-05-16 06:31:21 +00:00
Jens Johansen b535072a07 [parser] Fix issue 52365 about parsing parenthesised functions followed by >> etc
Record parsing is generally done by accepting what comes after as
something that can follow a record type.
To support something like `List<List<(int, int)>>` we have to accept
`>>` after a record type.
When parsing something like `(whatever here) >> 42;` we thus say that
it's a record --- even if the stuff inside is a recovered type. We
inherit the `recovered` mark, but will say we're a record type.

This CL fixes parsing this by returning that it's _not_ a record type
when seing the `>>` (an a few others) if what's inside is recovered.

This _might_ mean worse recovery in some situations but fixes parsing
valid code such as `(() => print("hello")) >> 42;`.

Fix: https://github.com/dart-lang/sdk/issues/52365
Change-Id: Ie56958f5503e74d37c181c0b71003b8e61209c6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303242
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-05-16 06:09:47 +00:00
Nicholas Shahan acf6ef5a86 [ddc] Avoid .__proto__ in mixin application
Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: Ifd51750acad3b889a620d945db36d777cb4b8e5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303088
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-16 03:41:17 +00:00
Srujan Gaddam 5225b3d408 [ddc] Remove @staticInterop runtime type in favor of erasure
While we can't modify the kernel ASTs due to modular compilations, we
can change the type we emit instead of using a runtime @staticInterop
type. This CL refactors the erasure so that DDC can use it to emit
JavaScriptObject instead of StaticInteropType.

Change-Id: I9cbeaa2127e50702d2bdf6aeedb2744b7ece33c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295392
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-05-16 01:37:28 +00:00
Nicholas Shahan dd6257a2d3 [ddc] Support dynamic calls of generic functions
Adds the ability to call functions/methods/tearoffs with
generic type arguments when running with the new type system.

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: I28b8cdad56d614a6b9904995634c0cef67d88ebc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296960
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2023-05-16 01:12:54 +00:00
Jake Macdonald df61eeb0d9 Allow adding doc comments from macro apis that didnt already.
Some functions just allow augmenting an existing declaration with a function body or initializer, so a separate api is needed to add doc comments.

Bug: https://github.com/dart-lang/language/issues/3047
Change-Id: I163b57d47218eb2ad9e459c55f2622ecf1b88c70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303461
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2023-05-16 00:37:00 +00:00
Nicholas Shahan adc2935ff4 [ddc] Remove __proto__ use from records.dart
Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: I05806656ac9ce2c1ddee233ec836b0a8d0aed464
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303143
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-16 00:32:56 +00:00
Konstantin Shcheglov 18de295d52 Issue 53378. Report when 'super' is used as a standalone expression, not as a receiver of an invocation.
Bug: https://github.com/dart-lang/sdk/issues/52378
Change-Id: I4dea36b545a4c26ed8e8dc54367159b48fae2bfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303501
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-16 00:22:57 +00:00
Nicholas Shahan e61a6175ee [dart2js][ddc] Remove __proto__ use from dart:_rti
Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: I86c5545c7e4c7d6c3636a849e8d67066f8155662
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303443
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-15 23:47:08 +00:00
Nicholas Shahan 334a552d96 [ddc] Remove use of __proto__ from subtype check
Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: I2aed1970164be1e2d4ee525891eaa452e59cd6f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303142
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-15 23:46:06 +00:00
Devon Carew e3ba8552f6 [deps] rev args, async, bazel_worker, benchmark_harness, boolean_selector, browser_launcher, file, mockito, tools, dartdoc
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc to 0cf21c15d7346a81838bd1c56677d88d690887f5

args (1864048..f0f6cd2):
  f0f6cd2  2023-05-12  Devon Carew  blast_repo fixes (#243)

async (0f368d3..d744058):
  d744058  2023-05-12  Devon Carew  blast_repo fixes (#242)

bazel_worker (1b86d3c..d9b389f):
  d9b389f  2023-05-12  Devon Carew  blast_repo fixes (#73)

benchmark_harness (f81b042..e717ad4):
  e717ad4  2023-05-12  Devon Carew  blast_repo fixes (#90)

boolean_selector (7eed402..23e08e0):
  23e08e0  2023-05-12  Devon Carew  blast_repo fixes (#47)

browser_launcher (551e101..40e4315):
  40e4315  2023-05-12  Devon Carew  blast_repo fixes (#45)

file (e90e5ed..f05f5db):
  f05f5db  2023-05-15  James D. Lin  Make MemoryFile.openRead and _ChrootFile.openRead return Stream<List<int>> again (#217)
  f2f3076  2023-05-12  Ross Wang  MemoryFileSystem addStream onError (#220)
  5e76f74  2023-05-12  James D. Lin  Fix MemoryFileSystem to treat an empty path as non-existent (#213)
  7941466  2023-05-12  James D. Lin  Make `FileSystem.isLink` actually work (#214)

mockito (51a7728..b14d571):
  b14d571  2023-05-15  Googler  Fix for InvalidType

tools (62c9604..49da4ca):
  49da4ca  2023-05-12  Polina Cherkasova  Add memory events. (#92)

Change-Id: I582320bb68ff5f48e9969cef906073e25ad6b875
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-05-15 23:29:09 +00:00
Paul Berry 5043c38d25 Flow analysis: additional tests for error types.
Verify that the presence of an error type doesn't accidentally trigger
"unnecessary cast pattern" or "unnecessary wildcard pattern" warnings
(this verifies that `promoteForPattern` returns the proper value when
an error type is encountered).

Verify that the presence of an error type doesn't alter reachability
conclusions that were established by previous subpatterns (this
verifies that `promoteForPattern` uses the proper join to update
`_unmatched` when an error type is encountered).

Change-Id: I351c71574dff31602c40b257c28681b81fad2867
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303260
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-05-15 23:11:46 +00:00
Danny Tuppeny dff000708f [analysis_server] Copy the original imports from source when moving top-levels to new files
Previously we would just import the library containing the declaration (which for other packages could be in `src/`).

See https://github.com/dart-lang/sdk/issues/30310#issuecomment-1508226776.

Change-Id: I1f2c8f480b60240bd7f88e037fd768e157f96f17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301400
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-15 22:55:01 +00:00
Nicholas Shahan f0c14f5b9a [ddc] Remove __proto__ use from debugger.dart
Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: I1caa35917ab0b7f0db06da08f70ddffb7bb5653b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303141
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-15 22:49:06 +00:00
Simone Stasi c8ad2102b1 [analysis_server] fix 'add await' quick fix with parser error
When there's a parser error (like a missing semicolon) the 'add await' quick fix writes 'await' in the wrong place (right after 'async'). This CL simply writes 'await' in the correct place by using errorOffset.

Bug: #52390
Change-Id: I2f59433054826b492c448e2f35e2c2a00b2a775c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303240
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-15 22:45:18 +00:00
Devon Carew e94774e014 [pkg/dap] update the pubspec for package:dap
Change-Id: Ib97074904ade337cc2b68d9953160564b45b4f6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303500
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-05-15 22:41:03 +00:00
Nate Bosch 271f7dddde Bump test_process to b6a6cd5f598250c71d8deeea3d38eb821af5e932
Changes:
```
> git log --format="%C(auto) %h %s" 89c4fdc..b6a6cd5
 https://dart.googlesource.com/test_process.git/+/b6a6cd5 Remove expectation of process exit in test body (43)

```

Diff: https://dart.googlesource.com/test_process.git/+/89c4fdc496ba08473459ed32d00372b5069fd4de..b6a6cd5f598250c71d8deeea3d38eb821af5e932/
Change-Id: Idfb727ab866b98997ee180357efeeb2375204cb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303441
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-05-15 22:15:24 +00:00
pq 12851f730d fix convert_to_boolean_expression for as-expressions
Fixes: https://github.com/dart-lang/sdk/issues/52368


Change-Id: I9196aebd17305c1d65c178a8c90270ff8eb733ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303147
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-05-15 22:02:18 +00:00
Konstantin Shcheglov f6c4ba3748 Don't report exhaustiveness diagnostics when InvalidType is present.
This partially reverts changes made in
https://dart-review.googlesource.com/c/sdk/+/302455

Bug: https://github.com/dart-lang/sdk/issues/52151
Change-Id: I1851e170794f4777499d81fea4fb0f5c877a0bbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303084
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-05-15 21:54:50 +00:00
Danny Tuppeny f74132e636 [analysis_server] Handle postfix/prefix operators, compound assignments in Move to File
+ some additional tests for extension operators.

Change-Id: I32b705c4e0fa96c785e55b41aba713c6026eecca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301060
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-15 21:54:07 +00:00
Helin Shiah cc461910af Add changelog to dap package
Change-Id: I42aba7a4977467aa7fea1c7e1ee1aa0a94f1711f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303144
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2023-05-15 20:59:42 +00:00
Derek Xu 0e3069ea23 [VM/Timeline] Support serializing duration events in Perfetto's format
TEST=Reported duration events using the embedder API, then retrieved the
trace using GetPerfettoVMTimeline and checked that the timestamps of
events were correct in the Perfetto trace viewer.

Change-Id: I077d7f545d9546727bcc3022c05dfc0b7b3826f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302962
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-05-15 20:51:38 +00:00
Derek Xu fe43431184 [VM/Timeline] Add perfetto_utils::SetTimestampAndMonotonicClockId
TEST=Retrieved a trace using GetPerfettoVMTimeline and checked that the
timestamps of events were correct in the Perfetto trace viewer.

Change-Id: Ie06e9e883a5d740022fa162bf7162dca6babcf58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302961
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-05-15 20:51:38 +00:00
Derek Xu 61e280aa11 [VM/Timeline] Change return type of GetIsolate(Group)Id to unique_ptr
TEST=Retrieved a trace using GetPerfettoVMTimeline and checked that the
isolateIds and isolateGroupIds of events still showed up correctly in
the Perfetto trace viewer.

Change-Id: I13cf8dd2bb9af7fbe82da199b7f0d3c32a8cf1e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302960
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-05-15 20:51:38 +00:00
Brian Wilkerson 7f1a5cc20f Attempt to fix the windows bot
This reverts the changes to ResourceProviderMixin that made it possible
for a test to explicitly set the context type of the resource provider.
I don't believe that's necessary because we run all of the tests on the
windows bot with that context type anyway.

It also removed the windows-specific subclasses of the URI suggestion
tests. They were duplicates of the non-windows-specific tests that were
probably added before we had a windows bot.

Change-Id: I4547cc768992c4d272871032a6939cd216dc5e96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303422
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-15 20:30:25 +00:00
Danny Tuppeny 465d65d657 [analysis_server] Handle prefixed functions in move_to_file
See https://github.com/dart-lang/sdk/issues/30310#issuecomment-1524282552.

Change-Id: I26c2ff905a474d24b85ca970dda0f67398ca7adb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-05-15 20:23:28 +00:00
Nicholas Shahan 3b0e3b98af [ddc] Remove __proto__ use from operations.dart
Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: Idc1d64243438d8cd289c64c7df8e9293ab45a548
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303140
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-15 20:22:22 +00:00
Helin Shiah 1e16fff65f Add myself and Ben to owners of package:dap
Change-Id: I46db89503d036ee4ceff4b252f0dd813f7e4395f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303440
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-05-15 19:12:16 +00:00
Nicholas Shahan 4adf002b1d [ddc] Remove __proto__ use from js_array.dart
Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: I65ddae15e31ea85a431a62c8b4454710503fd30f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303085
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-15 18:57:43 +00:00
Ryan Macnak 6250eeca95 [vm] Make clz/ctz inlinable.
TEST=ci
Change-Id: I0eb4480e165259763befd3e7ee519fda111faefe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303040
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-15 17:52:49 +00:00
Ryan Macnak 37145bc023 [infra] Define builders for Windows ARM64.
Change-Id: I13aa4441b5fe9a9d78d57cb4350a26aea5b8dbda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303006
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-05-15 16:52:30 +00:00
Ryan Macnak a0a210a779 [vm] Initialize the is-zone-handle slot of read-only handles.
Cf. 715866aed3.

TEST=msan
Bug: https://github.com/dart-lang/sdk/issues/52351
Change-Id: I5d435f40b55a530cce0bb61ea2a9be232caf8e1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303145
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-15 15:41:28 +00:00