Commit Graph

1614 Commits

Author SHA1 Message Date
Alexander Markov 849998846b [dyn_modules] Remove ability to specify library wildcards in dynamic_interface.yaml files
In future this would allow us to automatically include libraries
specified in dynamic_interface.yaml into the compilation set as if
they were imported from Dart code.

Bug: b/452833638
TEST=ci

CoreLibraryReviewExempt: no API changes, only pragmas
Change-Id: If5705159148cd48f49f21485550747db1365767c
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,vm-dyn-mac-debug-arm64-try,vm-ffi-dyn-mac-debug-simarm64_arm64-try,vm-ffi-dyn-mac-release-simarm64_arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456401
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2025-10-22 07:48:30 -07:00
asiva ab44b20ab8 Reapply "[VM/dartdev] Switch dartdev to use an AOT runtime." and
Add the fixes that were done after original CL landed.

This reverts commit 97bc401163.

TEST=ci

Change-Id: I26373aecc325e4c0c379c92e779aa301e3a58c5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441700
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-07-24 14:48:03 -07:00
asiva 97bc401163 Revert "[VM/dartdev] Switch dartdev to use an AOT runtime."
This reverts commit 5399dbf6f6.

Reason for revert : Flutter rolls are failing

TEST=ci

Change-Id: I76fede849705514496adbc2ab7f6c262de4103ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439661
Reviewed-by: Jason Simmons <jsimmons@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-07-09 23:08:28 -07:00
Siva Annamalai 51311c365c Revert "Add back dart2js_aot rule which is used by golem."
This reverts commit 80e1664bf8.

Reason for revert: Flutter rolls are failing.

Original change's description:
> Add back dart2js_aot rule which is used by golem.
>
> Change-Id: I74b5acb7c3f67f4936bd2b6dfe0c46d20b82026d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439020
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I051a3c914b29d34971a8023c66423cd24094c7b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439543
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-07-09 14:04:47 -07:00
asiva 80e1664bf8 Add back dart2js_aot rule which is used by golem.
Change-Id: I74b5acb7c3f67f4936bd2b6dfe0c46d20b82026d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439020
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-07-07 11:20:57 -07:00
asiva 5399dbf6f6 [VM/dartdev] Switch dartdev to use an AOT runtime.
- split the Dart CLI tool out of the VM into it's own embedder which
  runs in AOT mode. The pure Dart VM executable is called 'dartvm' and
  has no Dart CLI functionality in it
- the Dart CLI executable parses the CLI commands and invokes the rest
  of the AOT tools in the same process, for the 'run' and 'test'
  commands it execs a process which runs 'dartvm' to run
- 'dart hello.dart' execs the 'dartvm' process and runs 'hello.dart'
- the Dart CLI is not generated for ia32 as we are not shipping a
  Dart SDK for ia32 anymore (support to execute the 'dartvm' for ia32
  architecture is retained)
- the Dart CLI tool is not built in the internal Dart SDK builds

TEST=ci

Some performance improvement numbers
'dart format pkg/dartdev' goes from 1.17 secs to 0.22 secs
'dart doc pkg/dartdev' goes from 100.2 secs to 66.6 secs
'dart fix pkg/dartdev' goes from 19.3 secs to 14.5 secs

Change-Id: I66984a26cb2ab014b34dc1873f1f3d2884e13518
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364202
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-07-04 13:22:13 -07:00
Nicholas Shahan 51fee27069 [ddc] Update DDC snapshot training target
Specify package_config.json when running DDC JIT snapshot training.
This allows the build to succeed in environments where the running
compiler would go searching for the package_config.json and find
one in some parent directory. This should fix local web engine
builds in Flutter which likely broke when the repo was migrated to a
pub workspace.

Change-Id: Ifb5b6357cbf40f04069020ab1b4aee099d0945ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/438602
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2025-07-02 16:29:44 -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
Ivan Inozemtsev 0aa01cf395 Add pubspecs to Dart tests and scripts executed by checked in SDK
Without their own pubspecs, they belong to `_` project from the root
`pubspec.yaml`. As a result, once we bump the SDK version, these
scripts cannot be executed with the checked in sdk.

Note: when we bump the SDK version we also must bump the version in
the root pubspec, otherwise unreleased language experiments break.
Change-Id: Ie2ec35865a5966d6801de832a4b6ad312a24d277
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436901
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-06-25 08:00:10 -07:00
Alexander Markov 05c2f3b0b1 [vm,dyn_modules] Hook interpreter to the standalone VM
When dynamic modules are enabled, standalone VM can now run bytecode
binaries directly. Also, if --interpreter flag is specified, Dart
source is compiled to bytecode and interpreter is used to run it.

This will allow us to test VM service capabilities including
debugging and hot reload against the interpreter.

TEST=manual

Change-Id: Ibb5a67f4844485c4ed90b8a7568dc42fa552fcac
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/+/436421
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-06-24 05:59:21 -07:00
Vyacheslav Egorov 077e1be29c [gn] Fix precompile_tools=True (attempt 2)
Turns out that dart compile exe --depfile produces
depfile which does not work with ninja because
it uses absolute path to the output file
instead of using relative path.

So we can't use it directly and need to fix
depfile.

TEST=manually

Change-Id: I1aadfd5079cc38d392933f9afe333f63407bb295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435680
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-06-23 14:54:04 -07:00
Vyacheslav Egorov b0f933facc [gn] Fix precompile_tools=true
gn_dart_compile_exe.py wrapper stopped working because we rearranged
something in the prebuilt SDK. However we no longer need it because
we can ask `compile exe` itself to produce the depfile.

TEST=manually
R=kustermann@google.com

Change-Id: If5e64ede08b4e146a7bf033e7ef2d1809f40de1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435500
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-06-18 07:18:22 -07:00
Ryan Macnak ab4f9351b1 Rename vm_platform_strong.dill to vm_platform.dill.
The name has always been annoying because it did not add strong typing. And now there aren't variants of the VM platform to distinguish.

Leave a copy at the old name to not immediately break illegal uses.

TEST=ci
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,flutter-frontend-try,flutter-linux-try
Change-Id: Ie76fa7f16940aa1ba8d582eb5197f0ae55dc8938
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429828
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-16 18:33:38 -07:00
Ryan Macnak 6a24c60627 [build] Fix incorrect output path in ddc's package_kernel_outline template.
Change-Id: I6c2f03c21437c2068c3ca36dbcc7a5bfd7e5f494
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433860
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2025-06-10 11:13:58 -07:00
Jake Macdonald d828c36cec Add a dart mcp-server command per go/dart-mcp-server-release-plan.
- Adds `dart_mcp` and `dart_mcp_server` as DEPS
- Build an AOT snapshot for the dart_mcp_server executable
- Add top level `mcp-server` command to dartdev (hidden).
- I also did add an `--experimental-mcp-server` flag which is required for this command to actually work. We had initially discussed not doing this due to complexity but I was able to keep it completely scoped to just this command. I can remove it if there are strong opinions though.

Change-Id: I737a5625507f69a904ccd1012682764eb360a2c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430900
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2025-05-27 10:14:26 -07:00
Ivan Inozemtsev 29e33b00d0 Reland "watchOS target os"
This is a reland of commit 7ae1d75869

TEST=manual, no watchOS SDK on bots yet.

Original change's description:
> watchOS target os
>
> - add support for --os=watchos | --os=watchos_simulator
> - do not depend on perfetto if dart_support_perfetto is false
> - change the default value for dart_support_perfetto to !is_watchos
>
> To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.
>
> TEST=manual, no watchOS SDK on bots yet.
>
> Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
> Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>

Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
Change-Id: I2b50f7eb4da173627aeb4833b88a08712b278d9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425523
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-05-05 06:40:30 -07:00
Sam Rawlins 060e4e208c dartdev: Support running the AOT analyis_server snapshot for analyze command
The `dart analyze` command is quite separate from the `dart language-server` command. This CL adds support for `dart analyze`.

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

Change-Id: I60a846ae5d3452c2bb050bd07502084ff44b82c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425188
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2025-05-02 11:49:21 -07:00
Robert Nystrom e5194dae87 Reformat tools/ and utils/ using the 3.8 style.
Change-Id: I7b28583eb928f60a45d1f476194d197b4df88062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425184
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2025-04-29 10:40:59 -07:00
Ivan Inozemtsev 10c579c7e8 Revert "watchOS target os"
This reverts commit 7ae1d75869.

Reason for revert: breaks flutter build

Original change's description:
> watchOS target os
>
> - add support for --os=watchos | --os=watchos_simulator
> - do not depend on perfetto if dart_support_perfetto is false
> - change the default value for dart_support_perfetto to !is_watchos
>
> To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.
>
> TEST=manual, no watchOS SDK on bots yet.
>
> Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
> Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>

Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I4bede9ede04ac3c533b8ff7ae2f1adbd84eb2397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425262
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-29 03:21:37 -07:00
Ivan Inozemtsev 7ae1d75869 watchOS target os
- add support for --os=watchos | --os=watchos_simulator
- do not depend on perfetto if dart_support_perfetto is false
- change the default value for dart_support_perfetto to !is_watchos

To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.

TEST=manual, no watchOS SDK on bots yet.

Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-04-29 02:28:52 -07:00
Sam Rawlins 8d62a1f104 Support the analysis server compiled as AOT.
This change adds a build target (see utils/analysis_server/BUILD.gn)
called 'analysis_server_aot'. This new target is _not_ included in the
Dart SDK (the create_sdk target). It's "opt-in" "for development."

The name of the new output file matches that of other snapshots (see
the dartdevc snapshots).

Then we do special work in the plugin manager if "we are AOT." An
analysis server running as AOT cannot spawn Isolates from a dart
source files; we must first compile a dart source file to AOT as well,
then we can spawn an Isolate to that AOT file.

_Then_ when we run pub, we can no longer rely on using
`Platform.executable`. `dartaotruntime pub get` is not a thing. We
must instead find the `dart` tool on disk. To do that, we copy some
complex discovery code from dartdev.

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

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

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

Manually tested:

* [+] analysis_server JIT snapshot works in IDE.
* [+] analysis_server JIT snapshot works in IDE, with a legacy
      plugin (custom_lint).
* [+] analysis_server JIT snapshot works at commandline.
* [+] analysis_server AOT snapshot works in IDE.
* [x] analysis_server AOT snapshot works in IDE, with a legacy
      plugin (custom_lint) - BROKEN. Need similar work that is done
      for new plugins.
* [x] analysis_server AOT snapshot works at commandline - BROKEN.
      I think a fair bit of refactoring is required in dartdev
      lib/src/analysis_server.dart to use `VmInteropHandler.run` or
      similar.

Change-Id: I53173c716fa2a763331ef524a96304f62165810e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417942
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2025-04-23 11:45:19 -07:00
Ryan Macnak 42a55d9d79 [build] Remove unneeded deps from dartdev snapshot generation.
Makes the build a bit more parallel.

Change-Id: I946e9ff3d0d80b84ac6e7eea4fed38df9f2d3190
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422581
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-04-16 10:04:17 -07:00
Alexander Markov 733ca506c1 [dynamic modules] Add pragmas to core library classes and members used to implement language features
This change adds pragmas which can be used in dart:* libraries to
specify classes and members which are used by the compiler
to implement certain language features. Compiler can insert
references to those classes and members when desugaring language
constructs, so dynamic module code can use these classes and members
implicitly even if they are private.

Previously, we required to specify these members in the
dynamic_interface.yaml before dynamic modules could use them.
However, this is cumbersome and error-prone.

Now, the following pragmas are recognized:

@pragma('dyn-module:language-impl:extendable')
@pragma('dyn-module:language-impl:can-be-overridden')
@pragma('dyn-module:language-impl:callable')

If dynamic interface yaml file is specified during compilation,
then classes/members annotated with these pragmas are treated as if
they are used in corresponding sections of dynamic_interface.yaml.

If dynamic interface yaml file is not specified, these pragmas
are ignored.

Bug: b/395992622

TEST=existing
CoreLibraryReviewExempt: no API changes, only adding pragmas.
Change-Id: I6606467fc5e5264a2565d7eb8e8baccc2eebea84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/418663
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2025-03-31 11:33:50 -07:00
Nate Biggs 31e8fe78bf [vm] Mark _List and _GrowableList factories as dynamic module callable.
Currently this test is failing on other backends because they do not have matching members in the SDK.

TEST=Existing dynamic module tests.

Change-Id: I4b66f3fa046c973ae14868e024395cbcab3b7709
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416760
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-03-21 09:38:24 -07:00
Lasse R.H. Nielsen 8d46b7cd81 Remove references to .packages from build scripts.
It's just names and comments, they already used
`package_config.json` as the package configuration.

Change-Id: Icd421ed99079fa9058426e1536565658938252ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414100
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2025-03-11 03:37:14 -07:00
Johnni Winther 0060b0f665 [cfe] Remove nnbd mode
TEST=existing

Change-Id: I30bbadb74e81c7f4aaa444d1e2f6f5ffc2005d4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412881
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-03-04 01:46:51 -08:00
Mayank Patke 0c55c7e573 Remove unsound web configurations from test matrix.
This CL also removes references to unsound .dill files from the test
matrix and other build scripts and disables some of the option handling
that would lead to requiring unsound .dill files.

Change-Id: I89f701f8f5e1168bf974b5b44bfbafd5a39954fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412401
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2025-02-26 15:57:55 -08:00
asiva 1e148e651b Fix issue that was found with the flutter rolls (unable to locate
the dds snapshot)


Reland "[SDK] Switch dds and dtd to use an AOT snapshot"

This reverts commit 11ab2dfe2f.

Reason for revert: Fixes the problem that is causing Flutter G3 roll to fail.

TEST=ci

Original change's description:
> Revert "[SDK] Switch dds and dtd to use an AOT snapshot"
>
> This reverts commit 6450d76f1f.
>
> Reason for revert: Breaking Flutter G3 roll
>
> Original change's description:
> > [SDK] Switch dds and dtd to use an AOT snapshot
> >
> > TEST=ci
> >
> > Change-Id: Ib65ca1d1a05d3bc7b5f5cab25d90fc459ec8d853
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387133
> > Reviewed-by: Ben Konyi <bkonyi@google.com>
> > Commit-Queue: Siva Annamalai <asiva@google.com>
>
> Change-Id: I9985919063cacfc8673b3e2946eaa163e90c9cc3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411200
> Auto-Submit: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I5ec8e58f905b4ad1d22d507acd8e22e676dc5532
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410921
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2025-02-25 14:32:41 -08:00
Ben Konyi 11ab2dfe2f Revert "[SDK] Switch dds and dtd to use an AOT snapshot"
This reverts commit 6450d76f1f.

Reason for revert: Breaking Flutter G3 roll

Original change's description:
> [SDK] Switch dds and dtd to use an AOT snapshot
>
> TEST=ci
>
> Change-Id: Ib65ca1d1a05d3bc7b5f5cab25d90fc459ec8d853
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387133
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I9985919063cacfc8673b3e2946eaa163e90c9cc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411200
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-02-20 15:17:16 -08:00
asiva 6450d76f1f [SDK] Switch dds and dtd to use an AOT snapshot
TEST=ci

Change-Id: Ib65ca1d1a05d3bc7b5f5cab25d90fc459ec8d853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387133
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-02-13 09:11:38 -08:00
Ivan Inozemtsev e534983216 Linkable AOT snapshots on macOS
Update `aot_snapshot` template to optionally build a shared library
from `app-aot-assembly` sanpshot.

Change-Id: Ifb7cee65b5699099fa676312fff7d687cfb52d98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407060
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-02-03 23:31:21 -08:00
Nicholas Shahan c1ce43fd83 [ddc] Remove unsound dart2js dependency
DDC does not depend on the stack trace mapper application being built
with unsound null safety so the unsound .dill files are unused.

Add the unsound .dill files to the `dart2js_bot` target because they
are dependencies of the `dart2js-hostasserts-linux-unsound` and
`dart2js-unit-linux-x64-release` configurations.

Update build step of `front-end-linux-release-x64` configuraton to
build the dart2js_bot target instead of relying on the unsound
dart2js .dill files through the `ddc_stable_test` target.

Change-Id: Ia29740b60f93d1d0b4a978ff5e37080e537401a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403382
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2025-01-08 15:10:26 -08:00
Mayank Patke 017bda44cf [dart2js] Enable core lints.
Change-Id: Id5a14797e3e5eb8b68bd009d65b474748902fbe0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400162
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-12-13 11:24:50 -08:00
Johnni Winther 808fa4ca8b [cfe] Move tool/_fasta/ to tool/
Change-Id: I5b7348fb4adb4e7f4039c91d54d712c1eb131ecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395002
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-11-18 07:49:01 +00:00
asiva 8b2b6b2440 Reland ""[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory""
This reverts commit 74c5aa3a7a.

Reason for revert: Fix golem breakage by not changing the script dart_precompiled_runtime2

TEST=ci

Original change's description:
> Revert ""[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory""
>
> This reverts commit f81a402aa1.
>
> Reason for revert: golem benchmarks are failing to run
>
> TEST=ci
>
> Original change's description:
> > "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
> >
> > Fixed golem breakage by temporarily copying dartaotruntime to dart_precompiled_runtime
> >
> > This reverts commit 75e6a748f7.
> >
> > TEST=ci
> >

Change-Id: I9efe40643c59bc617f6fb484b89b038deaffbb93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393941
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-11-08 04:36:23 +00:00
Siva Annamalai 74c5aa3a7a Revert ""[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory""
This reverts commit f81a402aa1.

Reason for revert: golem benchmarks are failing to run

TEST=ci

Original change's description:
> "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
>
> Fixed golem breakage by temporarily copying dartaotruntime to dart_precompiled_runtime
>
> This reverts commit 75e6a748f7.
>
> TEST=ci
>
> Original change's description:
> > Revert "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
> >
> > This reverts commit 1b331d05c2.
> >
> > Reason for revert: golem builds are failing
> >
> > Original change's description:
> > > [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
> > >
> > > TEST=ci
> > >
>
> Change-Id: Id0f383eabb496c06c0acebc639c8e3b056ba82d0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393781
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

Change-Id: Iec494940412aa31dbefdc5280e35ae99e8cecb26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393764
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-11-06 05:37:46 +00:00
asiva f81a402aa1 "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
Fixed golem breakage by temporarily copying dartaotruntime to dart_precompiled_runtime

This reverts commit 75e6a748f7.

TEST=ci

Original change's description:
> Revert "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
>
> This reverts commit 1b331d05c2.
>
> Reason for revert: golem builds are failing
>
> Original change's description:
> > [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
> >
> > TEST=ci
> >

Change-Id: Id0f383eabb496c06c0acebc639c8e3b056ba82d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393781
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-11-06 03:10:31 +00:00
Siva Annamalai 75e6a748f7 Revert "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
This reverts commit 1b331d05c2.

Reason for revert: golem builds are failing

Original change's description:
> [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
>
> TEST=ci
>
> Change-Id: I96ed52994e0d955300c18026032e68003504666d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389760
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Change-Id: I5dc14973f4ee4e577b2c996839d5e497c97fb440
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393761
Commit-Queue: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-11-05 21:58:09 +00:00
asiva 1b331d05c2 [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
TEST=ci

Change-Id: I96ed52994e0d955300c18026032e68003504666d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389760
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-11-05 20:39:15 +00:00
asiva da14b16ef3 [Web/DDC] - Convert the kernel_worker and dartdevc snapshots to an AOT snapshot
Converts kernel_worker.dart.snapshot and dartdevc.dart.snapshot to
 AOT snapshots. Fixes tests and paths in the code accordingly.

TESTS=ci

Change-Id: Ib99b2a3343e23252c3a6b5295b0d20f0f486aede
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381388
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-22 17:39:27 +00:00
Siva Annamalai 1e624b8122 Reland "[SDK] Reland : Switch dart2js to an AOT snapshot."
This reverts commit ceba7a5e65.

Reason for revert: Flutter tools has been fixed to use 'compile js' option instead of directly naming the snapshot.

Original change's description:
> Revert "[SDK] Reland : Switch dart2js to an AOT snapshot."
>
> This reverts commit 9fec00aeed.
>
> Reason for revert: flutter tools needs an update to use the 'compile js' command instead of reaching into the dart-sdk and using snapshot names (see https://github.com/flutter/flutter/issues/156654)
>
> Original change's description:
> > [SDK] Reland : Switch dart2js to an AOT snapshot.
> >
> > TESTS=ci
> >
> > Change-Id: I8c9f9d01cb462d1027c7a6a6521f40946fc7638b
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388071
> > Reviewed-by: Ben Konyi <bkonyi@google.com>
> > Commit-Queue: Siva Annamalai <asiva@google.com>
>
> Change-Id: I72bd9ad731b2b60d154c1e6477cce913d72acec4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390020
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I15a9dc3092e436cdcb0fa84c8e7ddd1dac195074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390620
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-16 20:05:10 +00:00
Siva Annamalai ceba7a5e65 Revert "[SDK] Reland : Switch dart2js to an AOT snapshot."
This reverts commit 9fec00aeed.

Reason for revert: flutter tools needs an update to use the 'compile js' command instead of reaching into the dart-sdk and using snapshot names (see https://github.com/flutter/flutter/issues/156654)

Original change's description:
> [SDK] Reland : Switch dart2js to an AOT snapshot.
>
> TESTS=ci
>
> Change-Id: I8c9f9d01cb462d1027c7a6a6521f40946fc7638b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388071
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I72bd9ad731b2b60d154c1e6477cce913d72acec4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390020
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-14 17:34:49 +00:00
Lasse R.H. Nielsen f8086c81ae Collect all test-related files in package:expect.
Collects files from `package:async_helper` and `tests/language`
that are generally useful, so that all test-related helpers are
in `package:expect`.

Moves the two libraries from `package:async_helper` into `package:expect`,
and the `tests/language/static_type_helper.dart` file too.

Deprecates `async_minitest.dart`, to follow `minitest.dart`,
expecting the Flutter use of it to have been fixed to not break
on deprecation (I believe Flutter no longer breaks builds on deprecations at all).

Patch 1 is the actual change.
Patch 2+4+8 is changing all existing references to the files.
Patch 6 ignores deprecation in files still using `async_minitest.dart`.

3+5+7+9 are updating this text to make the numbers match.
Then it's just test-expectations and small tweaks from there.

Change-Id: I1b665135b5fef9b9a0c3b340ffe9daf874d0174c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373120
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-10-11 16:53:52 +00:00
asiva 9fec00aeed [SDK] Reland : Switch dart2js to an AOT snapshot.
TESTS=ci

Change-Id: I8c9f9d01cb462d1027c7a6a6521f40946fc7638b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388071
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-08 17:49:34 +00:00
Siva Annamalai 947639d496 Revert "[SDK] Switch dart2js to an AOT snapshot."
This reverts commit ff2d1a277f.

Reason for revert: golem benachmark build needs some tweaking, webdev dart2js build tests

Original change's description:
> [SDK] Switch dart2js to an AOT snapshot.
>
> TESTS=ci
>
> Change-Id: I1e4fa050652786367e6410fedbceca4e32121aa5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386660
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I221a81274725bd562c4cafcf0db413cef1ac9d75
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388261
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2024-10-04 00:39:56 +00:00
asiva ff2d1a277f [SDK] Switch dart2js to an AOT snapshot.
TESTS=ci

Change-Id: I1e4fa050652786367e6410fedbceca4e32121aa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386660
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-03 19:55:10 +00:00
Ömer Sinan Ağacan 0e58775986 [dart2wasm] Small improvements in FFI native tests:
- Document which target needs to be built for the test
  `web/wasm/ffi/ffi_native`.

- Add tests that passes and expects `double` and `float`s.
  (The `sqrt` native function was previous unused)

- Define inputs in `wasm_module` gn template so that the
  `ffi_native_test_wasm_module` target will rebuild the Wasm file when
  `tests/web/wasm/ffi/ffi_native_test_module.c` changes.

Change-Id: Iff642ff2cdee48a617e8f2cf4cca4053122a7e05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384263
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-09-10 09:51:41 +00:00
Alexander Markov a17bc048b4 [dart2bytecode, vm/interpreter] Late final fields and variables
* Also, add implicitly overridden _Enum._enumToString to dynamic
  interface.

TEST=ci (vm-aot-dyn-linux-debug-x64)

Change-Id: I9d9d368715d0837d8b1039a46451152e03be7eec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383024
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-09-04 14:18:09 +00:00
Alexander Markov a3b7c9fb5a [dart2bytecode, vm/interpreter] Small fixes
* Use AllocateClosure instruction for closure instantiations in order
  to initialize closure entry point.

* Fix null handling in operator== to be before argument type checks.

* Add _InvocationMirror._withType to dynamic interface as it is
  implicitly used by noSuchMethod forwarders.

* Fix AssertAssignable for null objects.

TEST=language tests in vm-aot-dyn-linux-debug-x64 configuration

Change-Id: I7b1a037d4fde4d22ed32969e0f099b31ea4432ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382500
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-08-29 14:28:40 +00:00
Alexander Markov 062b0738e3 [dart2bytecode, vm/interpreter] await/yield/yield*
TEST=language tests in vm-aot-dyn-linux-debug-x64 configuration

Change-Id: I205bec19c2072fe9ac11a3211123bba43cb99d5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381945
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-08-26 20:35:18 +00:00