Commit Graph

108154 Commits

Author SHA1 Message Date
Vyacheslav Egorov 593da80b8b [vm] Switch reloadSources to object parameters
Currently it using legacy stringified parameters which
makes it hard to pass complex structured data to it.

TEST=ci

CoreLibraryReviewExempt: vm-service implementation changes no affecting public corelib APIs.
Change-Id: I1291e0a2971ad51fef4bc4a2d53e7ec0a76b3131
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437221
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-06-27 06:53:41 -07:00
Tess Strickland 81cb17ebca [io/win] Allow notFound stat errors in testDriveLetterNoBackslash.
Since the test uses existing system temp directory entries that
aren't created/maintained by the test itself, they may be removed
between the two calls to statSync().  Modify the test to allow for cases
where the first statSync() returns a non-notFound result and the second
returns a notFound result.

Also check that at least one iteration of the loop had a successful
result where the statSync() result is the same for both and was not a
notFound result, as all system temp entries retrieved by listSync()
being removed before one or both statSync() calls is highly unlikely.

TEST=standalone/io/file_windows_test

Fixes: https://github.com/dart-lang/sdk/issues/61007
Cq-Include-Trybots: luci.dart.try:vm-win-release-x64-try
Change-Id: If4bb4a6f6b1e21558e447e4e5a918523c69ff044
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437442
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-06-27 05:52:10 -07:00
Paul Berry fb2ada0ee0 [flow analysis] Simplify reachability computation in attachFinally.
Previously, `attachFinally` took advantage of
`Reachability.rebaseForward` to compute reachability after a
`try/finally` statement. This was overkill, since
`Reachability.rebaseForward` contains special logic to account for
widely diverging reachability stacks, whereas `attachFinally` always
deals with reachability stacks that have an immediate common parent.

This change adds an assertion to verify that the reachability stacks
always have an immediate common ancestor, and replaces the call to
`Reachability.rebaseForward` with the equivalent direct logic.

Making this change will simplify the process of writing a spec for
flow analysis.

Change-Id: Icd7d3ebc150d1836932efe3891b3ea1077134351
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437300
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-06-27 05:20:23 -07:00
Johnni Winther 0dbc8c0107 [cfe] Split type_parameter_scope_builder.dart into multiple libraries
Change-Id: I90a200feb4bf829825d55720665d082f7e852ad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437420
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2025-06-27 04:05:27 -07:00
Johnni Winther b8638d9e2e [cfe] Add SyntheticDeclaration
This adds a SyntheticDeclaration interface and uses it to add enum values.

Change-Id: I91b5a255032a5071dfc286358970d5d50108223b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437223
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-06-27 03:23:11 -07:00
Johnni Winther bb9252a605 [cfe] Report conflicts through _Declaration
The reports the declaration conflicts through the _Declaration objects,
which streamlines the code and helps providing more targeted messages.

Change-Id: I013c9974de87c5a1c541ba6aa5d78a1ba63e1074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437241
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2025-06-27 03:23:11 -07:00
Jens Johansen e656fec1ee [CFE/Analyzer/parser] Fix crash upon double with separators and missing number after e
E.g. the user typing "1_234e" (and having yet to type a number) would
crash the analyzer.

Change-Id: Iff71c274a5e4719b3c8877ddbc9775d8d091c42f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437240
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-06-27 02:29:33 -07:00
Konstantin Shcheglov d79ebc6165 Elements. Remove ExecutableElementOrMember.
Change-Id: I1a48c337a3b74058bd9c62cf8b95e3eabfd8f4b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437263
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-06-27 00:50:19 -07:00
Jens Johansen 90fb141aa2 [analyzer] Speedup assist calls when file has non-Windows line-endings
Before an assist call on a file with non-windows lineendings would first
search through the entire file for Windows line endings, then search for
the non-Windows line endings. As such Windows line endings was faster.

This CL changes the semantics slightly from "Windows line endings if
any Windows line endings exist" to "whatever line endings are first
used" which should be good.

It speeds up assist calls with non-Windows line endings:

Statistics on 5 runs each:

```
Windows / 2000: No change.
Windows / 4000: No change.
Windows / 8000: No change.

Unix / 2000: 1000 assist calls: -46.9900% +/- 6.1715% (-0.88 +/- 0.12) (1.86 -> 0.99)
Unix / 4000: 1000 assist calls: -59.1561% +/- 6.3982% (-1.79 +/- 0.19) (3.03 -> 1.24)
Unix / 8000: 1000 assist calls: -63.8429% +/- 4.3083% (-3.68 +/- 0.25)(5.76 -> 2.08)
```

Change-Id: I61278ed4ad31b891e87951da0a6162fe37376888
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437224
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-06-26 23:26:20 -07:00
Konstantin Shcheglov 28d25e437e Elements. Remove 'variable' and 'toFunctionValue' from DartObjectImpl.
Change-Id: Ia696347266cb4b54f5248fb1f9f0f73290fddc5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437380
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-06-26 17:23:01 -07:00
Konstantin Shcheglov 0e12390e63 Elements. Remove PropertyAccessorElementOrMember.
Change-Id: I3882b02140021fbb2733ff8f5ff2ae575ab129fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437361
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-06-26 17:16:13 -07:00
Konstantin Shcheglov 7505e450f5 Elements. Remove 'get identifier' from ElementImpl and FragmentImpl.
We used it to construct `ElementLocation`, and we already removed it.

Change-Id: Ie88ba3aae24f094c6eb2c5b656cc64398e5ba91b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437360
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-06-26 16:47:12 -07:00
Nicholas Shahan c98b675eb1 [DEPS] Update web engines
Chrome: 139.0.7258.5
Firefox: 140.0.1
d8: 14.0.45
jsshell: 140.0.1
jsc: 296663
Change-Id: I1f02844155f8e6292172dc40539f5aaf1b3b0e45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437362
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2025-06-26 16:30:57 -07:00
Fedor Shcheglov c8f8ba6875 Deprecate Element.accept2, use accept instead.
Change-Id: I4ec0389663164b8dde0b0321e4457f2ae655785a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435745
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-06-26 15:02:22 -07:00
Brian Wilkerson b402fac6fa Adds library cycle data to the analytics.
The two pieces of information we're tracking are
- the number of libraries in each library cycle
- the number of lines of code in each library cycle

The data is reported in terms of percentage.

This doesn't give us any way to correlate the two values. Knowing that
there is a library cycle with M libraries and a cycle with N lines of
code, doesn't tell us whether it's the same library cycle in both cases.
Still, I think it will help us understand the nature of the code that
we need to be able to analyze quickly.

Change-Id: I36a8bf11c4c6fdced6c524225be7a633062351ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437126
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-06-26 14:54:52 -07:00
Parker Lougheed 873a88bd6d [analyzer/linter] Mark a few diagnostic docs as published
Also regenerate the diagnostic codes and (deprecated) lint rules.json file.

Change-Id: Id50dfe81a7bc3a62fee9d6b99f0e045804e95685
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436960
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2025-06-26 13:38:04 -07:00
Danny Tuppeny 5d2d5cb8ba [analysis_server] Pre-compile server for integration tests
By default the integration tests spawn the server using the snapshot from the active SDK. If you forget to recompile the SDK when running the integration tests, you may get inaccurate results.

One option is to set the `TEST_SERVER_SNAPSHOT` env variable to `"false"` which will run the tests from source, however using the "Run All Tests" command in VS Code will result in a lot of timeouts because tests run concurrently and each one will cause a compilation.

This change instead creates a new VS Code task that will compile the server to a temporary file in `.dart_tool`, and creates a launch configuration that triggers this task (via `preLaunchTask`) when running integration tests. This supports both running all tests (with the "Run All Tests" command) or running individual integration test files, with just a single up-front compilation.

Change-Id: I0970ffb76240abd54ff2c8a9c9be4bab40693691
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2025-06-26 13:35:13 -07:00
Jake Macdonald 5e562b2383 add basic tests for the dart mcp-server command
Change-Id: I7c6071fc7b015f8d7e0cbdf4b2cb2d31358d442c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437140
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2025-06-26 13:24:40 -07:00
Konstantin Shcheglov 4d36ef3a37 Elements. Remove MethodElementOrMember.
Change-Id: I062e1a55867ba541290ed948081cf4ea26dab2cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437320
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-06-26 12:47:53 -07:00
Konstantin Shcheglov 56536ba054 Elements. Remove ConstructorElementMixin.
Change-Id: I4a5391d4a886f6d69c7bec35c86bd6b4e82d9c03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437261
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-06-26 12:46:59 -07:00
Sam Rawlins a8414a4962 vm_service: Use less dynamic, both explicit and implicit
Change-Id: Idde221b094fd23ded8e6d77d47f8ce73ab2549c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437022
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-06-26 12:07:31 -07:00
Patt O'Brien c537260fab fix: Typos in element model migration guide.
Closes https://github.com/dart-lang/sdk/pull/60998

GitOrigin-RevId: bae0908f7b5a956b2ffd2f0fcd8fda64af60cc55
Change-Id: Iea1879bfc62016e0f70bc442a197aae321e17b61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437125
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-06-26 11:56:11 -07:00
Devon Carew 68b1fabe01 [deps] rev ai, protobuf, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

ai (https://github.com/dart-lang/ai/compare/706d224..d0b89cf):
  d0b89cf  2025-06-25  Greg Spencer  Add enum support to `Schema` (dart-lang/ai#190)
  f219861  2025-06-26  Brett Morgan  Update `simple_server.dart` (dart-lang/ai#187)
  8e3365f  2025-06-24  Greg Spencer  Add error checks for accessing Request members (dart-lang/ai#184)

protobuf (https://github.com/dart-lang/protobuf/compare/0bfff0c..bce362d):
  bce362d  2025-06-24  Devon Carew  prep to publish 22.4.0 (dart-lang/protobuf#1023)
  269e004  2025-06-24  Devon Carew  improve the readability of generated gRPC client files (dart-lang/protobuf#1021)
  48ba649  2025-06-24  Devon Carew  update the header for generated files (dart-lang/protobuf#1022)

webdev (https://github.com/dart-lang/webdev/compare/6dc3dde..7f376d2):
  7f376d24  2025-06-25  Derek Xu  Set package versions to WIP versions (dart-lang/webdev#2637)

Change-Id: Ib720f5127f3fddeb82b62cf13f24c3ddb4038e33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-06-26 11:39:51 -07:00
Sam Rawlins 1091aed650 DAS: only attempt to compute fixes for fix-supporting producers
The diff makes this change look bigger than it is.

Here's how the code worked before: `compute()` called `_addFromProducers()`. `_addFromProducers()` had a local function, also
called `compute()`, which is called per CorrectionProducer. The local
`compute()` function would unconditionally create a ChangeBuilder and
call each CorrectionProducer's `compute()` method, then call back out
to an instance method called `_addFixFromBuilder()`, which would drop
the computed change on the floor if `fixKind` was `null`.

This CL contains the following changes to the above system:

* The local `compute()` function and the instance method,
  `_addFixFromBuilder()` are combined together, into one instance
  method, `_addFromProducer()`.
* Then, the `fixKind` check is moved to the very top of that
  method, bailing out _before_ computing changes if `fixKind == null`.

Change-Id: I6c61059fc36ec1587b15ca01b43830a5b179da9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417326
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-06-26 10:51:44 -07:00
Konstantin Shcheglov bdc01d108e Elements. Stop using ConstructorElementMixin in constants evaluation.
Change-Id: I54e22bd9a0068ffa8de5a7ded932131327f672fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437105
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-06-26 10:44:39 -07:00
Kallen Tu 78b27083c9 [analyzer] Dot shorthand: Update constant verification for default parameter values.
The constant visitor was missing an extra check that we had for instance creation expressions, but not for dot shorthand constructor invocations. It's definitely a little funky because of how we've chained up the ConstantVisitor + ConstantVerifier, but this is how we currently handle this error.

Added a unit test.

Fixes: https://github.com/dart-lang/sdk/issues/60962
Bug: https://github.com/dart-lang/sdk/issues/59835
Change-Id: I76489a425c5e01c4d9edb34ac6dc62f109e6a32a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436821
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2025-06-26 10:43:40 -07:00
Kallen Tu c7765a8205 [analyzer/linter] Dot shorthands: Update ConstantVerifier for dot shorthand constructor invocations.
Updates the `ConstantVerifier` so we're checking the dot shorthand constructor invocation is a constant constructor call and that its arguments are constant expressions.

Tweaked the constant error handling a little bit to handle dot shorthands. It's always a little funky, but needed to prevent duplicate errors.

Added a few unit tests from the example in the bug.

Fixes: https://github.com/dart-lang/sdk/issues/60963
Bug: https://github.com/dart-lang/sdk/issues/60893
Change-Id: I77b2dff4a274241b2c98b3e6cd34c620d08435a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436742
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2025-06-26 09:52:12 -07:00
Paul Berry 59db156aee [flow analysis] Make split/conseravativeJoin order more uniform.
While doing specification work for flow analysis, I noticed that in
circumstances where a flow model needs to have both the `split` and
`conservativeJoin` operations applied to it, sometimes flow analysis
applied `split` first, and sometimes it applied `conservativeJoin`
first.

The actual order doesn't matter, since `split` only affects the flow
model's reachability, and `conservativeJoin` only affects the flow
model's variable info. But for the purpose of making the specification
clearer, it's nice to be consistent. This change adjusts the order so
that `split` always happens before `conservativeJoin`.

Change-Id: Ia5dfc9335ee85f122ae274f6bb850f83f12b88d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-06-26 09:28:52 -07:00
Alexander Markov d2923b2818 [vm,dyn_modules] Do not share bytecode between field getter and field initializer
Profiler does not allow 2 distinct Bytecode objects to use the same
range of bytecode, as it needs to map PC to a Bytecode unambiguously.

So this change removes reuse of the field initializer bytecodes for
a field getter (in case of const fields).

TEST=pkg/vm_service/test/get_perfetto_cpu_samples_rpc_test

Change-Id: I758286f6f4fcfe2e2169bbc19ae233594e263522
Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436740
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-06-26 08:16:39 -07:00
Alexander Markov 1164ea7f7e [vm,dyn_modules] Support collecting source positions for a script declared in bytecode
TEST=pkg/vm_service/

Change-Id: If9111373f4ddf08bded2a23ab4bb130f1f6ad4a4
Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436680
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-06-26 08:08:20 -07:00
Daco Harkes 592e5c144a [native assets] Support PATHEXT invocations with appended snapshot
This CL introduces an `IsolateData::asset_base_path` which contains
the fully resolved base path used for assets which are loaded with a
relative path. (Resolving both PATHEXT and symlinks.)

The asset base path is now only resolved once, instead of on every
relative asset load.

The asset base path is now eagerly resolved.
To prevent existing error messages for files not existing changing in
`dartdev` and `Isolate.spawnUri`, files not existing errors are
ignored.
To prevent `tests/standalone/io/named_pipe_script_test.dart` from
failing, failing to canonicalize a file path is treated as no asset
base path rather than reporting a failure.

TEST=pkg/dartdev/test/native_assets/*.dart

Bug: https://github.com/dart-lang/sdk/issues/60946
Change-Id: I79a9144d220dfb3e54311725d41f8f91c88db3a1
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-win-release-arm64-try,pkg-win-release-try,vm-aot-dyn-linux-debug-x64-try,vm-aot-android-release-arm64c-try,vm-aot-linux-debug-x64-try,vm-aot-mac-debug-arm64-try,vm-aot-win-debug-arm64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-msan-linux-release-x64-try,vm-asan-linux-release-x64-try,vm-linux-release-x64-try,vm-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435421
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-06-26 07:47:32 -07:00
Fedor Shcheglov 86df26dd2f Consolidate fragment writing into _writeTemplateFragment.
Migrate hand-rolled _writeXxxFragment helpers to the shared _writeTemplateFragment. This eliminates duplicated serialization logic  (ID / name / offset / modifiers), shrinks the code base, and makes it easier to add new fragment types without boiler-plate.

Removed flags from `bundle_reader` and `bundle_writer`, will remove flag classes in the future as they will be replaced with reading/writing modifiers.

Change-Id: I79aabd1e94bfa831d6718bb2889a6a00e6561112
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437102
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-06-26 06:10:31 -07:00
Sergey G. Grekhov 2efecc91e9 [co19] Always run minified trybot
R=srujzs@google.com

Change-Id: Idad7be6b1df65239474111b418d58a3c6dceda43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437220
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Sergey Grekhov <sgrekhov22@gmail.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-06-26 02:47:11 -07:00
Martin Kustermann 59aa1cfe7b [co19] Roll co19 to a2087664aff8aa48ab19f52ac5ddfaf3ef3f20ab
2025-06-25 sgrekhov22@gmail.com dart-lang/co19#3180. Add `JSFloat32Array` tests (dart-lang/co19#3234)
2025-06-25 sgrekhov22@gmail.com Fixes dart-lang/co19#3231. Fix co19 tests failures in minified mode (dart-lang/co19#3233)
2025-06-24 sgrekhov22@gmail.com Fixes dart-lang/co19#3073. Wait for async check to complete (dart-lang/co19#3235)

Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try
Change-Id: Ie57c2f7a75e5af9933f318a254b6dbf029abaf5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437200
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-06-26 02:00:48 -07:00
Jens Johansen 1530dcc679 [analyzer] Return null faster in _getDocumentation on DocumentationPreference.none
For some requests this seems to be ~3.5-4.5% faster.

Change-Id: Ifff8656dc1237e1d0014305efa31906be9120d05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-06-26 01:38:49 -07:00
Jens Johansen 2910b812fc [analyzer] Fix wrong .run call in lsp completion handler; add timing to sendResponse
E.g. when sending 2000 results to a completion request, sending (json
and utf8 encoding) can be a very big part of the cost and it's very
confusing having it attributed to "self" in "request".
Also `mapSuggestions` looked much cheaper than it was because it used
`run` instead of `runAsync`.

Change-Id: Ifd219adb25fa658930548536eb8eb46276acd4a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436922
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-06-26 01:38:02 -07:00
Jens Johansen 863bc97881 [analyzer] Speedup receiving of data in benchmark
Change-Id: I3e37a1d8b17393ce3c41e33b1b90049c754cc595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-06-26 01:07:09 -07:00
Ryan Macnak b374d4265b Revert "[test_runner] Use relative paths in commands."
This reverts commit 1b4a56692b.

Reason for revert: breaks Fuchsia builders

Original change's description:
> [test_runner] Use relative paths in commands.
>
> This makes it easier to copy commands between checkouts or between the bot and local development.
>
> Change-Id: I74bc9dcb83855e295fe40fa4ef81871ccc537d29
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400180
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8c7cca1e9c82a5b6e237d0b7611647a6168e6397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437123
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Ryan Macnak <rmacnak@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-25 18:08:07 -07:00
Fedor Shcheglov 98f233bfa7 Deprecate InterfaceType.constructors2, use constructors instead.
Change-Id: I2d63bc1b61acb781ad0b8a45f15a05d36ee3a304
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435748
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-06-25 17:38:01 -07:00
Ryan Macnak 528b01e69e [test] Mark vm/cc/ArrayTruncationRaces as Slow.
Change-Id: I2d0a2d4027599212f0517421181a05e9296f388b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437103
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-25 17:03:28 -07:00
Ryan Macnak 554cb577e3 [infra] Add missing Android debug and RISC-V release builders.
Run co19 on fewer builders.

Change-Id: I7d6ea9f1f0cf2f9553a4a0dd34a608fa86916398
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437180
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-25 16:22:25 -07:00
Nicholas Shahan 884a48c988 [ddc] Delete macro options and cli arguments
Change-Id: I83bd63f707758e82ac23a80b7442d57746f6b125
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436941
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2025-06-25 15:21:55 -07:00
Konstantin Shcheglov 9270f0fad0 Elements. Stop implementing ConstantEvaluationTarget by ElementAnnotation.
This is an internal interface that should not have been exposed.

Change-Id: I92ddc64766e3b9d183750a3406d03215275a58a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-06-25 15:20:10 -07:00
Ryan Macnak 1b4a56692b [test_runner] Use relative paths in commands.
This makes it easier to copy commands between checkouts or between the bot and local development.

Change-Id: I74bc9dcb83855e295fe40fa4ef81871ccc537d29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400180
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-25 15:13:50 -07:00
Brian Wilkerson 8f1a2b39ea Bump tools to 7bf22c951019f860aa52a8b7dc97fba5880aa9ba
Changes:
```
> git log --format="%C(auto) %h %s" 1e110fc..7bf22c9
 https://dart.googlesource.com/tools.git/+/7bf22c95 [unified_analytics]Add library cycle info to analysis server data (2117)

```

Diff: https://dart.googlesource.com/tools.git/+/1e110fcf8da4fbd423e22ae7d14f04c908d7c139..7bf22c951019f860aa52a8b7dc97fba5880aa9ba/
Change-Id: I0cd6893dc35fd4dc938070afb4ec1c2f45054dea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436943
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2025-06-25 15:08:46 -07:00
Fedor Shcheglov b017489312 Removed ElementModelWriter due to it being unused.
Change-Id: Ib2bb8b877e23fdff884bd03b208ea4d077c6e927
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437120
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-06-25 15:04:34 -07:00
Konstantin Shcheglov 3e6edd36e1 Elements. Remove deprecated methods from InheritanceManager3.
With mockito migrated off of them, we can now remove them.

Change-Id: Ib5e3d354cdf2d9b44d0d3a87e4dfa024b8fdb29f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437040
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-06-25 15:00:43 -07:00
Fedor Shcheglov a801e69e26 Consolidate fragment reading into _readTemplateFragment
Replace eight bespoke implementations for reading fragments with the existing `_readTemplateFragment()` method.

This enforces the consistent use of the template method design pattern, reduces code duplication, and makes future maintenance easier.

Change-Id: If213b146e4b055523432c6d12f36994cac8f38c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436820
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-06-25 14:36:12 -07:00
Jake Macdonald 1e639b977e change the MCP server build script to point at the custom binary
update package:ai in deps, add entrypoint script for the mcp server which injects an analytics instance

Change-Id: I1fd770a061085e7303c24b0c76e48d208687d9ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437080
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2025-06-25 13:47:54 -07:00
Ryan Macnak bb08090c5a [test] Mark package:vm_service tests as Slow.
Change-Id: I51a7e29e25e409965e1bb581f8edd8ef39345a87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437020
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-25 13:39:50 -07:00