Commit Graph

1991 Commits

Author SHA1 Message Date
Tony 08139af589 Add compact AOT patching support and related APIs
- Introduced Dart_SetObfuscationMap to restore obfuscation maps before AOT precompilation.
- Added Dart_AotPatchInstallOptions structure for AOT patch installation options.
- Implemented Dart_AotPatchingEnabled to check if compact AOT patching is supported.
- Created Dart_SetAotPatchKeyCallback for AES key resolution during AOT patch installation.
- Developed Dart_InstallAotPatch for validating and installing encrypted AOT patches.
- Added Dart_FreeAotPatchPayload to free memory allocated for patch payloads.
- Updated runtime_args.gni to include dart_enable_aot_patching flag.
- Added tests for AOT patching functionality and ensured exported symbols include new APIs.
- Refactored existing code to accommodate new AOT patching features and improve error handling.
2026-06-24 03:00:14 +08:00
Johnni Winther 8e2d140fa5 [cfe][InternalNodes] Implement InternalVariable directly
This updates the InternalVariable hierarchy to be based on a sealed base class InternalVariable with no connection to IVariable. IVariable is removed and unused properties of InternalVariable are removed.

TEST=existing

Change-Id: Iacfbe9ab21d1c9aab043712099cd1ee6e4cee174
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510825
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-06-11 02:43:16 -07:00
Johnni Winther c390eb0931 [cfe][InternalNodes] Separate Variable from InternalVariable
This adds an InternalLegacyVariable the doesn't derive from LegacyVariable. This fully separates InternalVariable from Variable and assigned variable tracking and flow analysis is now changed to used InternalVariable instead.

TEST=existing

Change-Id: Ida9dc78d4f0e3fab3baf7a965273e1ddf68a80b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510341
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-06-11 02:43:16 -07:00
Alexander Markov 6b9aecbe5f [vm,aot] Fix parameter type checks in the implicit setters of covariant-by-class fields
Implicit setters of covariant fields (both covariant by declaration and
covariant by class aka generic-covariant-impl) need to perform a type
check of their argument.

It means that inferred type of the field cannot be used as inferred
type of parameter of such setter. This change removes such uses of
an inferred type of the field, which restores parameter type check
which was previously incorrectly optimized out.

TEST=runtime/tests/vm/dart/regress_63419_test.dart
Fixes https://github.com/dart-lang/sdk/issues/63419

Change-Id: Ie313dbaab51dff15d60ce4390e7e41bdc66ad59d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509020
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-06-03 11:32:28 -07:00
Alexander Markov 7ff5e3654d [tfa] Fix handling of late local variables with static type Never
Initializers of late local variables are wrapped into closures.
The result type of a closure is a static type of the variable.
So initializer of a late variable with static type Never have a call
to a closure with static result type Never.

TFA summary collector handles calls with static result type Never
specially, treating all subsequent code as unreachable (by setting
control-dependent condition to empty). As a result, all subsequent
code after late variable with static type Never (and initializer) is
tree-shaken.

The fix is to avoid propagating control-dependent condition out of
the late variable initializers.

TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_63478.dart
Fixes https://github.com/dart-lang/sdk/issues/63478

Change-Id: If41221777c9d249dd21ce5827c586b0f531cbce8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508363
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-06-02 05:42:19 -07:00
Jens Johansen d441e28656 [CFE/VM] Fix mixin deleting procedure-setter because of final field
Fixes https://github.com/dart-lang/sdk/issues/63440
Tested: Tests added.
Change-Id: I0bdfd71c48ecae6094557fa4f46b8fc4b50afa73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506980
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2026-05-28 05:15:07 -07:00
Johnni Winther 6b693e00bc [kernel][Contexts] Add VariableDeclaration
This adds a VariableDeclaration node which is used in ForStatement instead of VariableStatement.

This is a step towards removing the initializer from Variable. Long term, VariableDeclaration will own the initializer expression for variables and function parameters will have a defaultValue property instead of using the initializer property for the default value.

TEST=existing

Change-Id: I4a663eeb6006a0f9f098fb2b3e3b502d2ae583b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505681
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2026-05-27 00:41:34 -07:00
Johnni Winther d18803c5be [kernel][Contexts] Move initializer from VariableInitialization to Variable
This is a step back towards the end goal of separating Variable its initializer. This is done in order to normalize the encoding between the old and the new variable model, such that the split can be perform in both the old and new model simultaneously.

TEST=existing

Change-Id: I3ad6595613c06812d95dff3cabbca6eb05dc1c98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505000
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-05-21 01:51:10 -07:00
Johnni Winther 80c9d57250 [kernel][Contexts] Rename VariableDeclaration to Variable
This is a step towards split variables from their declarations as part of encoding variables and their usage more precisely.

TEST=existing

Change-Id: I4a0eeb2947bdebce3667afda4e6cfbfdf5d7de18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504201
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
2026-05-21 01:51:10 -07:00
Simon Binder ff25d85758 [dart2wasm, standalone] Rename JSStringImpl to EmbedderStringImpl
The standalone target used `JSStringImpl` as the name for its string
implementation even though JavaScript isn't involved in that at all.
This was to simplify parts of the compiler which can then refer to both
classes with the same name.

Changing this in the compiler is not that complicated however, so it
makes sense to align the string implementation name with the embedder
terminology we also use for other host imports.

TEST=pkg/dart2wasm/test/ir_tests/standalone.{dart,wat}

Change-Id: I1e112c8a72bb43a7edfa73ff7205d353edc7403a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504581
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2026-05-21 01:35:53 -07:00
Johnni Winther e30cd0322c [cfe][Contexts] Split VariableDeclaration and VariableStatement
This separates VariableDeclaration from Statement. VariableDeclaration no longer implements Statement and variable declared in a block or in a for-statement are now wrapped by a VariableStatement.

Currently there are two VariableStatement implementations; LegacyVariableStatement for variables in the current model, called LegacyVariable, and VariableInitialization for variables used in the new, still experimental, encoding that supports scope computation.

This CL is a step towards realigning the AST nodes to the new model in which each kind of variable has its own distinct subclass. (LocalVariable, PositionalParameter, NamedParameter, SyntheticVariable, etc.)

Note that it is not the intent to use VariableStatement in ForStatement going forward but that will be handled in a follow-up.

TEST=existing.

Change-Id: I5b309cd62c9b138f95b74fb054686edffa49a393
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502681
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-05-18 05:49:28 -07:00
Johnni Winther c2787e1cf4 [cfe][Contexts] Flatten variables hierarchy
This removes the LegacyVariableDeclaration and VariableInitializationBase classes to create a simpler hierarchy. This is done preparation for splitting variables from statements.

TEST=existing

Change-Id: If29c9eee1e3d8bed819ce53ed178c3efa3bffaea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501961
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-05-11 00:38:41 -07:00
Jens Johansen ec5e71ead4 [CFE] Rename additionalDills to additionalDillModules; don't use it to load platform
* Rename additionalDills to additionalDillModules to indicate that it
   is used to load a "module", not any old dill file.
 * Where additionalDills was used to provide the platform use sdkSummary
   instead.
 * Remove unused constructor in KernelCompilationResults.

Tested: Existing tests.
Change-Id: I5f73f61db73b2bc932c211fb0b2e66ec2f5c50c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/495981
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-05-01 00:57:31 -07:00
Nate Biggs 6ebcada9ff [dart2wasm] Fix loading unit lookup for top-level constants.
Change-Id: Ia7de84a88efbc53f170ec156046a892310399f58
Tested: Added function_invocation.dart test
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498380
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2026-04-28 07:36:44 -07:00
Kilian Schulte 9e8fdef17c Add annotation-based creation location tracking
Closes https://github.com/dart-lang/sdk/pull/63011

GitOrigin-RevId: 926534c2f5d3cd1e9629cf25f6b028ab34c00e64
Change-Id: I88460a060faabeae8f611e88f23b2eb5fc99f21a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/491702
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-04-28 03:06:03 -07:00
Sigmund Cherem 7f4f8347a9 [dyn_modules,vm] Apply dynamic interface annotator on non-AOT compiles
In order to perform runtime checks on dynamic calls, the JIT runtime
needs to also have access to some pragmas introduced by the annotator.
Primarily we need the `dynamically-callable` and
`implicit-dynamically-callable` pragmas.

For now, this CL allows us to mimic the behavior in JIT by using the
annotator also when doing non-aot kernel compiles. This is not enough to
support JIT in the general case: it doesn't support compiling from
source with the front-end-server or incremental builds. To support those
we will likely need a modular approach (like only annotating explicit
dynamically-callable during kernel compiles and inferring
implicit-dynamically-callable in the VM instead).

Note: this CL doesn't introduce new logic, it mainly moves the existing
logic to also run when building kernel snapshots for JIT.

TEST=existing, in the future additional coverage will be added when
performing runtime checks.

Change-Id: I9b97dd9f029f1d538ee23c0dff73b01dec0d776b
Bug: b/506246406
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/497622
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2026-04-24 17:59:27 -07:00
Nate Biggs e066caea9f Fix recorded usages test creating temp directories without deleting.
Change-Id: Ie3235b15d0f456ffb53f5132ba7929759b61afda
Tested: Test cleanup
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498180
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-04-24 14:06:40 -07:00
Sigmund Cherem 14517e3735 [dyn_modules] dynamically-callable pragmas in annotator and TFA.
This change introduces the `dyn-module:dynamically-callable` and
`dyn-module:implicitly-dynamically-callable` entrypoint pragmas. It
changes the annotator to attach these pragmas to kernel nodes based
on the dynamic-interface and updates TFA to treat these nodes as
reachable and not elegible for tree-shaking.

On a later change, the pragma will be read by the VM to verify that
dynamic modules can only call dynamically members that were exposed
as dynamically callable in the dynamic interface..

TEST=pkg/vm/test/

Bug: b/448095881
Change-Id: I4a8dbe0614e23d8b921e83323eacf1a1b1171ab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/495660
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-04-16 09:49:11 -07:00
Sigmund Cherem 2540a8fae5 [cfe,dyn_modules] add dynamically-callable section to dynamic interface
This introduces the `dynamically-callable` section in the dynamic
interface and adds an initial, but incomplete, validation pass for it.

The current validator:
* Checks that dynamic calls use a selector that matches one of the
  exposed members in the `dynamically-callable` section.
* Validates that subtypes of `dynamically-callable` classes
  added in a dynamic module don't overlap with classes
  implementing `noSuchMethod`.

Note that the latter check is incomplete. Additional checks need to be
added when building the host app to reject subtypes defined in the host.

Future changes:
* validate during host compilation about other subtypes
* move validation for classes exposed in the dynamic interface to be done while compiling the host
* reject mixin methods that contain dynamic calls during host compilation.
* accept providing an allow list of valid selectors during compilation of dynamic modules, so it module-to-module calls are supported too.

TEST=CFE unit tests

Change-Id: I8d12192ef374c34a48fbdf2ba5002d2850ce926f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/494001
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2026-04-14 17:16:33 -07:00
Chloe Stefantsova b43c8e8696 [cfe] Remove remaining casting getters from AST nodes
This is a follow-up to
https://dart-review.googlesource.com/c/sdk/+/492101, where some part
of the casting getters was removed.

Part of https://github.com/dart-lang/sdk/issues/61572

TEST=ci

Change-Id: I7eefc226ca2edeb10e80d2d110a72acb2b7770f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/493681
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-04-14 02:29:57 -07:00
Slava Egorov fff4f2324d [vm] Remove _HashFieldBase
This class is structurally equivalent to _HashVMBase and the only reason
for it to exist for inability of normal Dart classes to extend
_HashVMBase - but this can worked around by properly configuring
_HashVMBase class in bootstrapping.

TEST=ci

Change-Id: I5ca401e274920d2b4739424c6b6595306a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/494140
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-04-13 10:10:42 -07:00
Lasse R.H. Nielsen 711e50389f Remove var and final from parameters in pkg/.
Doesn't change anything in `front_end/*testcases/primary_constructors/`.
(Would have skipped any other file with `test` in its path and
an explicit language version marker, but there weren't any outside
of those `front_end` directories).

Almost no files used as test input were affected, and none testing the actual syntax changed.
The `.../nnbd/required_2.dart` test case was split into a legacy version retaining the `var`/`final` with a language marker, and a new version without the `var`/`final` cases.

The `pkg/analyzer/` tests, and any other tests that have source code
in strings, are not migrated by this CL.

Tested: No change to behavior. One test split into legacy and new.
Change-Id: I7f5aa4cc98001a9adecacd106c0b3be14f96be1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/480542
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2026-04-10 09:09:39 -07:00
Alexander Markov 56186c7e96 [vm,dyn_modules] Fix dynamic calls from host app to a dynamic module
Fix the following cases of incorrect optimizations:

* In TFA, when anlyzing a dynamic call with unknown receiver type,
  do not assume that all possible targets can be computed at compile
  time (if there can be dynamically loaded classes).

* In the AOT, disable optimizations for dynamic calls with unique
  selectors (if there can be dynamically loaded classes).

TEST=pkg/dynamic_modules/test/data/dyn_call_from_host

Change-Id: I39d620aae3c116de03d4a2a3fd61864d88c48c8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/493960
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2026-04-09 09:22:14 -07:00
Johnni Winther 85991680ac [cfe] Include (super)-initializing-formal modifier in ast-to-text
This adds the initializer-formal and super-initializer-formal modifiers to the ast-to-text output.

These flags are used by backends, so we should expect when these are present.

Triggered by discussion on https://github.com/dart-lang/sdk/issues/62645

TEST=existing

Change-Id: I3eec128c912249bc907931bcf01b52c0ec1eda62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/494080
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-04-09 06:22:54 -07:00
Chloe Stefantsova aebe572acb [cfe,vm,dart2bytecode] Rename Variable into VariableDeclaration
Part of https://github.com/dart-lang/sdk/issues/61572

TEST=ci

Change-Id: I2c11c354611d48e6b57146fc6f3403597d87c2a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/492101
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-04-02 09:33:54 -07:00
kryxen 95c1a0df7f [vm] Apply FFI use-site rewrite in expression evaluation
Run FFI use-site transformation during expression compilation so
evaluate/evaluateInFrame handles FFI use-site APIs (for example,
StructPointer.ref and sizeOf<T>()).

[vm/tests] Add regression for FFI use-site rewrite in compileExpression

R=dacoharkes@google.com, jensj@google.com, leonsenft@google.com

Change-Id: If28f2db1ddbd16931ca441a743041aea496e4f78
Tested: python3 tools/test.py -m release -c dartk -r vm -a arm64 pkg/vm/test/incremental_compiler_test.dart
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/483480
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Auto-Submit: kryxen <kryxen.dev@gmail.com>
Commit-Queue: Michael Goderbauer <goderbauer@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
2026-03-26 01:46:34 -07:00
Daco Harkes de57e3949a [deps] Roll dart-lang/native
Rolls in:

* Revamping `Definition`s hierarchy.
* Correctly identifying unnamed constructors and extensions.
* Operator names.
* Removal of the metadata section.

Closes: https://github.com/dart-lang/native/issues/3193
Closes: https://github.com/dart-lang/native/issues/3144
Closes: https://github.com/dart-lang/native/issues/3251
Closes: https://github.com/dart-lang/native/issues/3252

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: Ief3c2e74c3527f55dc6c29bf288d2a4f65627f4e
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489960
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-03-25 01:48:37 -07:00
Lasse R.H. Nielsen 56505e0575 Stop using Match.group.
The `Match.operator[]` does the same thing and is
generally recommended (and shorter).
(I want to deprecate `group` and `groups`)

Tested: Refactoring.
CoreLibraryReviewExempt: Calling equivalent function.
Change-Id: I4c758968ae622fe16b7322be1b29b05b91e7fcd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489021
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2026-03-20 09:09:46 -07:00
Alexander Markov 8a2deccc9a [vm,dart2bytecode] Reformat pkg/dart2bytecode and pkg/vm
Reformat these packages after the language version was bumped in
https://dart-review.googlesource.com/c/sdk/+/487942

TEST=ci

Change-Id: I6475e4b3d096b3c1f9aded34a5736989222e1689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489400
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-03-20 06:35:41 -07:00
Daco Harkes a5edb1208f [record_use] Support Set constants
Closes: https://github.com/dart-lang/native/issues/3233

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: I806ccc1c18c9ce106ac5106f4ca1c2237655d95f
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488300
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-03-17 01:46:44 -07:00
Daco Harkes 786e90791d [record_use] Support double constants
Quirks:
- JS backend compiles some values to ints instead of doubles.

Closes: https://github.com/dart-lang/native/issues/3221

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: Ic8c95094343d6d1fed3a37b0772269a8232bc205
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/487860
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2026-03-17 01:46:44 -07:00
Daco Harkes aa08628c36 [record_use][tfa] Moving isBeingUsed to NativeCodeOracle
TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: Ia277d274046ac3b587732bc9cf853dce12427db9
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/487360
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-03-17 01:46:44 -07:00
Paul Berry 63dc645f6e Bump VM packages to language version 3.12.
This CL is part of an effort to bump the SDK requirement to `3.12.0-0`
for all the packages in `pkg` that are not published to `pub`, so that
we can get better testing of the "private named parameters" feature.

(Packages that *are* published to `pub` can't be safely bumped yet,
because SDK 3.12 hasn't been released, and I don't want to block those
packages' ability to publish useful updates to customers.)

This change covers the following packages, which are owned by
OWNERS_VM:
- pkg/dart2bytecode
- pkg/dart2native
- pkg/dtd_impl (jointly owned with OWNERS_DEVTOOLS)
- pkg/mmap
- pkg/observatory
- pkg/vm

Changes to `pubspec.yaml` files were made manually.

Changes to `.dart` files were made automatically, using `dart
fix`. Two kinds of changes were made:

- Migrate to using private named parameters where it is possible to do
  so without changing semantics. Note that this migration is
  conservative; see https://github.com/dart-lang/sdk/issues/58607 for
  details.

- Migrate to using null aware elements.

Tested: Standard trybots
Change-Id: I1666e5771a34ef3c30ceeadced3d505d6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/487942
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2026-03-16 07:59:07 -07:00
Chloe Stefantsova 67b3b0709f [cfe,vm,dart2bytecode] Rename Variable into BaseVariable, ExpressionVariable into Variable
This is a follow-up to
https://dart-review.googlesource.com/c/sdk/+/487381/comment/3eb20545_b37553c4/

Part of https://github.com/dart-lang/sdk/issues/61572

TEST=existing

Change-Id: I15c7438dcec3d412f3050d3d80517d5cff5b515f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/487800
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-03-13 05:42:05 -07:00
Daco Harkes 264583c9d6 [record_use] Test large ints
Close: https://github.com/dart-lang/native/issues/3220

TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: Ibc158c5e48eb341c203fe2a1ed21f1543d8ca683
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/487420
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-03-12 11:03:05 -07:00
Sigmund Cherem 354b0f8606 [dyn_modules] Support types in a dynamic interface.
This CL adds a new `can-be-used-as-type` section in the dynamic
interface to expose the type of a class or extension type, without
making them callable or exposing their members.

Details:
* add the new section to the documentation
* add support in the TFA transformation to annotate kernel nodes
* add support to the validator to check for proper usage from dynamic modules
* add CFE, transformation, and end2end tests.

The CL ignores DDC and Dart2wasm at the moment and we intend to approve
any failures. It's possible that DDC works due to its modular nature.

BUG=b/488343137
TEST=cfe, annotator, and e2e tests

Change-Id: I900b22b85950f8ac379eabaa2ef58f075e18519c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486340
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-03-12 09:46:50 -07:00
Daco Harkes 6142ecf618 [deps] Roll dart-lang/native
Rolls in:
* https://github.com/dart-lang/native/pull/3215
* https://github.com/dart-lang/native/pull/3216

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: I9a0a6d8f1ef4cfe7f3d74f9abea3e2272d0c62fc
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486980
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-03-11 13:35:32 -07:00
Daco Harkes 9ba8f89598 [record_use] Const instances loading units
Before this CL, we were only recording constants once, in the first
loading unit that they were found. Now, we record them in all loading
units.

The different backends have different behavior, so for now this CL
special cases some of the test expectations. It would be better to
write these tests in a different way: For example reading the json
file and seeing that we find at least two different loading units.

Also, the implementation uses the fact that we're not using source
information anymore. We should consider simply removing it from the
dart2js backend.

Bug: https://github.com/dart-lang/native/issues/3184

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: If4c474d5bb65b58181d76904f5c7c1e7147c79ac
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485860
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2026-03-11 01:06:45 -07:00
Daco Harkes e20b9a490a [record_use] Default argument values
Record non-supplied arguments as their default values consistently
across all compilers and various language features.

Closes: https://github.com/dart-lang/native/issues/3166

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: I4aa0626964b907438ff7a2a0647dd20cfbacf75a
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485760
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2026-03-11 01:06:45 -07:00
Ben Konyi f7a049dfb4 [ Service ] Initial implementation of VM Service based on package:dart_runtime_service
This change includes an initial implementation of the new VM service
implementation based on `package:dart_runtime_service`, along with the
necessary plumbing to start it in place of the legacy VM service
implementation.

The entrypoint for the new VM service implementation is located in
dart_runtime_service_vm/bin/vm_service_entrypoint.dart, which is
compiled into AppJIT and AOT snapshots when the
`--include-experimental-vm-service` flag is provided to `build.py`. To run
the VM with the new VM service implementation, the
`--experimental-vm-service` flag must be provided.

Currently, the experimental VM service implementation supports:

  - User specified ports
  - Authentication code flags
  - Enabling the HTTP server via SIGQUIT
  - Some service protocol RPCs that don't require an isolate ID (e.g.,
    `getVM`)

See go/dart-runtime-services-unification for more details.

TEST=Manual

CoreLibraryReviewExempt: dart:_vmservice is private
Change-Id: I4a58cd1fa0a386313baa3d5c5345720231279123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/484820
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2026-03-10 13:27:01 -07:00
Tess Strickland db8563d4d6 [vm,dyn_modules] Recognize the vm:invisible pragma.
Adds a new isInvisible flag for both FunctionDeclarations and
ClosureDeclarations and sets it if the function or closure declaration
is annotated with @pragma('vm:invisible'). This way, function visibility
is appropriately recorded even if options.emitAnnotations is false.

The bytecode reader checks for the isInvisible flag when reading
FunctionDeclarations and ClosureDeclarations and appropriately
sets the is_visible flag for the Function object accordingly.

TEST=pkg/dart2bytecode/test/bytecode_generator_test
     vm/dart/invisible_function_pragma_test

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try
Change-Id: If435afbe5e74adc022ce064784b6b3e5e8a88164
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486381
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-03-09 10:16:02 -07:00
Daco Harkes cd55f11e3a [record_use] Symbol constants
Closes: https://github.com/dart-lang/native/issues/3053

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: If9cce49bfd31d9bf1222aca6c3d0aef0a590758d
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485522
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2026-03-09 10:04:45 -07:00
Daco Harkes a158789f96 [record_use] Constructor invocations via typedefs
Closes: https://github.com/dart-lang/native/issues/2907

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: If87b16d314474256ce225d71af771393ebb7d1c7
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485420
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2026-03-09 10:04:45 -07:00
Daco Harkes e4547cbdfb [record_use] More test coverage
A bunch of more language features, they all seem to work correctly
already.

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: I6645efc41ba91319811cb4ff521ce18c6cdb0e75
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485520
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-03-06 07:13:57 -08:00
Daco Harkes 3794f6bc69 [record_use] Disallow recording factories
Factories are slightly more involved than static calls, because they
can have redirecting factories point to them. So let's disallow them
for now.

Bug: https://github.com/dart-lang/native/issues/3192

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: Ib8354e1d8cd1aa83e55acfa82f8bd4e13ddbc91a
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485041
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-03-06 05:57:53 -08:00
Daco Harkes 3def27f16d [record_use] Test coverage getters and setters
Bug: https://github.com/dart-lang/native/issues/3062

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: Ic8be9d5674e0ff206af94803d661894c9b61dd8f
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485081
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
2026-03-06 05:57:53 -08:00
Daco Harkes 3df571a282 [record_use] Mixin static members
Bug: https://github.com/dart-lang/native/issues/3062

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: I442f2c6d0287319c4edf435faa4d307514d545e7
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485180
Reviewed-by: Michael Goderbauer <goderbauer@google.com>
2026-03-06 05:57:53 -08:00
Daco Harkes eb7ed24c1b [record_use] Redirecting factory tearoffs
Bug: https://github.com/dart-lang/native/issues/2907

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: I99c9d21c0135492d570588e826dd50549ba5b5af
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485080
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-03-06 05:57:53 -08:00
Nate Biggs 44a049c082 [dynamic_modules] Add support for deduplicating library prefixes to dart2wasm
Change-Id: I325e4e1e3aff25c4e894bc2f3f23fcf02f15da16
Fixes: https://github.com/dart-lang/sdk/issues/62828
Tested: Dynamic module tests.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485980
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Nate Biggs <natebiggs@google.com>
2026-03-06 05:39:21 -08:00
Chloe Stefantsova 64797f76c9 [vm] Use new variables in sync part of for-in lowering
The lowering is used by both the VM and the bytecode generator, and this
CL is a part of the work to migrate the bytecode generator to the new
variable model of the CFE. The migration is done in such a way that both
the old and the new variable models are supported by the transformation.

Part of https://github.com/dart-lang/sdk/issues/61572

TEST=existing

Change-Id: I2c9117ab2d79f6dd9dba80384f30f02c7691f74a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485821
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-03-06 03:01:27 -08:00