Commit Graph

209 Commits

Author SHA1 Message Date
Ryan Macnak b0a82e98d5 [build, mac] Sign shared libraries and fix incremental build for changes to signing script or entitlement files.
TEST=ci
Change-Id: Ied90ee7b81a23de266d6f7dc5e642a820dac9248
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506341
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-27 06:34:31 -07:00
Ryan Macnak 25a757da3e Reland "[build] Generate AOT snapshots in the SDK as dylibs on Mac."
Also apply code signing like we do for C++ binaries.

Cq-Include-Trybots: luci.dart.try:dart-sdk-mac-try,dart-sdk-mac-arm64-try
Change-Id: If2a379c0cde556ad3198cafc5b53a386bd265197
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504721
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-20 11:33:39 -07:00
Ryan Macnak 1b850ae2be Revert "[build] Generate AOT snapshots in the SDK as dylibs on Mac."
This reverts commit 7cc84b94b3.

Reason for revert: fail to launch, need to setup code signing

Original change's description:
> [build] Generate AOT snapshots in the SDK as dylibs on Mac.
>
> Change-Id: I95efe7342e595b44bfce1a15229b926a721aea82
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499480
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

Change-Id: I4a2742ddc4a39166ea4b642ee12661a8217e7417
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504681
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
2026-05-19 11:10:25 -07:00
Ryan Macnak 7cc84b94b3 [build] Generate AOT snapshots in the SDK as dylibs on Mac.
Change-Id: I95efe7342e595b44bfce1a15229b926a721aea82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499480
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-12 09:14:03 -07:00
Alexander Markov 2a7b2fa0cb [gardening] Increase test case timeout in samples/ffi/http/test/http_test
Fixes https://github.com/dart-lang/sdk/issues/62228

Change-Id: I1ea25a7440a3920acfd07fa4c91b86ab62b0081d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467640
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-12-11 10:59:18 -08:00
Alexander Aprelev 5f9911bdfe [gardening] Mark samples/ffi/http/test_http_test extra slow.
Fixes https://github.com/dart-lang/sdk/issues/61583
TEST=ci

Change-Id: Ib9c484787e0665cc60bf63c693b5e7458b211eea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454401
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-10-10 15:16:09 -07:00
Liam Appelbe 4c80dd1815 [test] Mark FFI fake HTTP test as slow
Fixes https://github.com/dart-lang/sdk/issues/61583

Change-Id: Ia91c28692fd0b07af0674db654b0ee2d9409fbe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452980
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-10-01 18:59:13 -07:00
Alexander Aprelev 11399713c5 [ffi/samples] Fix samples/ffi/http so it passes under tsan.
Before this fix running under tsan produces following warning:
```
00:00 +0: httpGet

00:03 +1: httpServe

00:04 +2: All tests passed!

/usr/bin/addr2line: DWARF error: mangled line number section (bad file number)
/usr/bin/addr2line: DWARF error: mangled line number section (bad file number)
/usr/bin/addr2line: DWARF error: mangled line number section (bad file number)
/usr/bin/addr2line: DWARF error: mangled line number section (bad file number)
/usr/bin/addr2line: DWARF error: mangled line number section (bad file number)
==================
WARNING: ThreadSanitizer: signal-unsafe call inside of a signal (pid=145964)
    #0 malloc ../../../../../../llvm-llvm-project/../../../../../../llvm-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:676 (dartvm+0x21c9330) (BuildId: d195bc5e9885ab144039c676e433289217750aec)
    #1 __dcigettext intl/./intl/dcigettext.c:621 (libc.so.6+0x39f23) (BuildId: 4a95b54430cb5a2c68c1812f1738222660dec6d1)
    #2 __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, int, __sanitizer::__sanitizer_siginfo*, void*) ../../../../../../llvm-llvm-project/../../../../../../llvm-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:2149 (dartvm+0x21d34af) (BuildId: d195bc5e9885ab144039c676e433289217750aec)

SUMMARY: ThreadSanitizer: signal-unsafe call inside of a signal intl/./intl/dcigettext.c:621 in __dcigettext
==================
ThreadSanitizer: reported 1 warnings
```

TEST=samples/ffi/http

Change-Id: I4cd1b62d30cde3ff0d4cd5f6a23c33e36491884a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445284
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2025-08-14 19:22:50 -07:00
Alexander Aprelev 828eb40b37 [ffi/samples] Avoid using mismatched strdup/CoTaskMemFree on Windows.
Fixes https://github.com/dart-lang/sdk/issues/61307
TEST=samples/ffi/http on windows

Change-Id: Ibc900896ccb0ea1472b4360cfb7b615fc06efd87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445108
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2025-08-14 07:57:39 -07:00
Alexander Aprelev 1499a30cd5 [gardening] Fix httpIG sample test, update new isolate_group_bound test status on fuchsia.
Fix failures https://dart-ci.appspot.com/log/vm-linux-release-x64/vm-linux-release-x64/6082/samples/ffi/httpIG/test/http_test

Lift .status-file constraints on where http and httpIG samples can run.

Follow-up to b759d096cb
TEST=ci

Change-Id: Icc71d6407e910d30f6ff028830550a05b179f1da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444927
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-08-13 12:27:40 -07:00
Alexander Aprelev 333460ead4 [gardening] Fix httpIG samples - ensure only shareable vars are captured.
Fixes https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-linux-release-x64/6047

Follow-up to 650ed9cde1.
TEST=samples/ffi/httpIG/test/http_test

Change-Id: I435f1be6dbcf17fb16fbd589a52ad1fcd38971c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444102
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-08-06 11:06:30 -07:00
Alexander Aprelev a36f38b10a [vm/shared] Rename IsolateGroupShared to IsolateGroupBound.
TEST=ci

CoreLibraryReviewExempt: vm-only change
Change-Id: If9c8bbd0e90e4ec1f70742c704ad31fce5681ec1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441063
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-07-29 12:03:37 -07:00
asiva 251ca0b688 Fix msvc compilation error.
TEST=ci

Change-Id: I496f368ae513d5d84f7ec6eccb7b1fa219658c81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441834
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-07-23 16:13:29 -07:00
Ivan Inozemtsev 15c58a889f Add static variants of Dart engine library and update samples
Fixes https://github.com/dart-lang/sdk/issues/60799

Change-Id: I16a8dd2c854ed6915f14e1b71547879f50f2de0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/432920
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-06-06 04:00:45 -07:00
Jake Macdonald c21beef54e remove unused import
Change-Id: I2337a3ba638f4718bfc71abedf3fae5ae0ebb189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431641
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2025-06-02 02:09:03 -07:00
Alexander Aprelev 3718baa446 [ffi/isolate_group_shared] Keep isolate alive for isolate group shared callback.
To fix encountered tsan race(patchset 3)  split Metadata into MetadataEntry as discussed on https://github.com/dart-lang/sdk/issues/60728#event-17760701621

TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/60728

Change-Id: I9308d6fb6a9b819221f7fe4668aefb3a578fe8a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430122
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-05-22 09:02:01 -07:00
Alexander Aprelev 50e0e0d99d [vm/shared] Introduce NativeCallable.isolateGroupShared
This method allows for synchronous execution of dart callbacks from native code. The execution happens on dart mutator thread, from which dart code can only access isolate-group variables - those which are tagged with .

Bug: https://github.com/dart-lang/sdk/issues/54530
Bug: https://github.com/dart-lang/sdk/issues/56841
Change-Id: Ia1a6b01327be493f003f1eea82e558bb6b147dd3
CoreLibraryReviewExempt: only internal library change
TEST=isolate_group_shared_callback_test
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422920
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-05-06 13:28:44 -07:00
Robert Nystrom 237ba8de01 Reformat samples/ with 3.8 style.
Change-Id: I13ecd6339afd62cb5ebeb29c29d80470bcc22671
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425146
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2025-04-29 07:45:07 -07:00
Daco Harkes 0768228750 [ffi] Format samples and benchmarks with Dart 3.8
Change-Id: I4f8e695ac648becc0de3466b6ba2058cbae7c408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422103
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-04-11 07:53:45 -07:00
Daco Harkes 35c0ef8410 [ffi] Remove deprecated Pointer.elementAt uses
Change-Id: I8ab032442db58f41e474ecfdeace4ff65953c8ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421186
Reviewed-by: Hossein Yousefi <yousefi@google.com>
2025-04-10 11:14:02 -07:00
Alexander Markov 1f90293398 [gardening] Fix gcc build of samples/embedder
GCC doesn't like // comments which are not terminated due to \ at
the end of line.

TEST=ci

Change-Id: I9d6188bf1db9358804b488d73bef88ba5e6b4f39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417220
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2025-03-21 07:40:20 -07:00
Sigurd Meldgaard 2fe05bd568 Reland "Migrate to use pub workspace"
This is a reland of commit b9b77058a9

Original change's description:
> Migrate to use pub workspace
>
> Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.
>
> All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.
>
> All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.
>
> Bug: https://github.com/dart-lang/sdk/issues/56220
> Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
> Tested: relies on CQ of existing tests. Should have no effect on functionality
> CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I29afabade2d2447dea05121cb87ff50bb21a4b76
Cq-Include-Trybots: luci.dart.try:flutter-linux-try,flutter-web-try
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `//
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415561
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-20 06:19:16 -07:00
Tess Strickland acd16c6aa7 [pkg/vm] Add tool for generating DartEngine shims from entry points.
This is an initial cut of a tool for automatically creating shims for
C/C++ programs using the entry point annotations in Dart code. The tool
has two required arguments:

* the .dill file containing the kernel representation of the Dart code
* the base path of the header and implementation files to create

With a base path of 'dir/name', the header file is created as
'dir/name.h' and the implementation file is created as 'dir/name.cc'.
In addition, 'dir/name.h' is used as a basis for creating a
#ifndef/#define/#endif header guard around the header contents.


The created shims are specific to a single package, either

* a user-specified package, provided via '-p'/'--package', or
* the package of the main method

If the user does not specify a package and there is no main method
in the .dill file, the tool fails.


Each shim takes the following arguments in order when applicable:

* the isolate in which to perform the requested operation,
* the instantiated type of the generic class (for invoking, setting, or
  getting constructors, static methods, and static fields)
* the instance (for invoking, getting, or setting instance methods and
  fields)
* the type arguments (for retrieving nullable or non-nullable
  instantiated types of a generic class)
* the arguments (for invoking, setting, or getting constructors,
  methods, and fields)


The generated shims:

* cache the package library, types for non-generic classes, and
  types for generic classes instantiated with default type arguments.
  The cached persistent handles are cleared if any of the methods
  are called with a different isolate from the one used to populate
  the cache.
* automatically handle conversions between C int64_t <=> Dart int
  and C double <=> Dart double.


By default, shims are not created for allocation or initializing
uninitialized instances. To create such shims, use the '-u' command
line argument.


Currently, shims are not created for methods that take optional
or named arguments. To report an error if a shim cannot be created
for any entry points, use the '-e' command line argument.

TEST=tests/standalone/embedder_samples_test

Change-Id: Ibdf3b52d900ba98038528178485f295c5868ac9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410500
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-03-20 03:53:10 -07:00
Sigurd Meldgaard 6c4de1ab7e Revert "Migrate to use pub workspace"
This reverts commit b9b77058a9.


Revert "Add missing sample pubspec to workspace"

This reverts commit 892ea15ac7.


These seem to break the engine.

Change-Id: Ieee26deb7928c3869a1b6265326c3ce568ffe731
Tested: this is a revert.
CoreLibraryReviewExempt: this is a revert
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415582
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 09:08:20 -07:00
Sigurd Meldgaard 892ea15ac7 Add missing sample pubspec to workspace
Follow up to https://dart-review.googlesource.com/c/sdk/+/397164

Change-Id: I6c9197bce858cbb7c5af50cf532b0ff1ae7d6311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415580
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2025-03-14 07:53:00 -07:00
Lasse R.H. Nielsen 7fd5108794 Remove .packages from .gitignore files.
The `.packages` file is no longer a special Dart file,
so any existing file lying around is garbage to be cleaned up.
We shouldn't be hiding it.

Change-Id: I269099bd66e392d630d5b23f4617a705a66a0800
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414101
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-03-14 07:08:55 -07:00
Ryan Macnak 6d37abbee3 [test] Disable embedder futures test on simulated architectures.
The VM's simulator cannot run FFI calls.

Bug: https://github.com/dart-lang/sdk/issues/37299
Change-Id: If481732d715f483454f8426a8bf78967a35b0be2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409520
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-02-12 14:16:49 -08:00
Ivan Inozemtsev 51ea42537a Add support for flushing microtasks in dart_engine.h
Also add a sample for calling Dart functions which return/accept futures.

Change-Id: I932d0577709f4e068ccd3212797751ecb347c4f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408281
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-02-12 11:10:25 -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
Ivan Inozemtsev 6e33c95463 Dart Engine
Adds shared libraries for embedding Dart VM and new API (runtime/engine/include/dart_engine.h).

TEST=tests/standalone/embedder_samples_test.dart

Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-asan-linux-release-x64-try,vm-aot-dwarf-linux-product-x64-try,vm-aot-dyn-linux-debug-x64-try,vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-simriscv32-try,vm-aot-linux-debug-simriscv64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-product-x64-try,vm-aot-linux-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-mac-product-arm64-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-msan-linux-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-tsan-linux-release-x64-try,vm-aot-ubsan-linux-release-x64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-try,vm-aot-win-product-x64-try,vm-aot-win-release-x64-try,vm-appjit-linux-debug-x64-try,vm-appjit-linux-product-x64-try,vm-appjit-linux-release-x64-try,vm-asan-linux-release-arm64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-product-arm-try,vm-ffi-android-product-arm64c-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try,vm-gcc-linux-try,vm-linux-debug-ia32-try,vm-linux-debug-simriscv32-try,vm-linux-debug-simriscv64-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-linux-release-arm64-try,vm-linux-release-ia32-try,vm-linux-release-simarm-try,vm-linux-release-x64-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-mac-release-arm64-try,vm-mac-release-x64-try,vm-msan-linux-release-arm64-try,vm-msan-linux-release-x64-try,vm-msvc-windows-try,vm-reload-linux-debug-x64-try,vm-reload-linux-release-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-reload-rollback-linux-release-x64-try,vm-tsan-linux-release-arm64-try,vm-tsan-linux-release-x64-try,vm-ubsan-linux-release-arm64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-win-release-ia32-try,vm-win-release-x64-try
Change-Id: Ia4e4d1b871ddef515cfb2f4639bdaa9fe3676936
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402860
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-01-28 03:53:40 -08:00
Ivan Inozemtsev 735a73943d Reland "[vm] Turn on entry point checking in JIT mode."
This is a reland of commit 982b9fad44

Original change's description:
> [vm] Turn on entry point checking in JIT mode.
>
> Now that Flutter tests that access entry points from native code
> have been annotated[1], we can turn on entry point checking in JIT
> mode.
>
> This CL also removes the A flag category from flag_list.h and the
> AOT_FLAG_MACRO definitions and uses from flags.[cc,h], as they were
> created as a temporary measure until this flag could be unconditionally
> defaulted to true.
>
> [1] See the following PRs:
> * https://github.com/flutter/engine/pull/57158
> * https://github.com/flutter/flutter/pull/160158
> * https://github.com/flutter/flutter/pull/160421
>
> TEST=vm/dart/entrypoints_verification_test vm/cc/IRTest
>      vm/cc/StreamingFlowGraphBuilder vm/cc/STC vm/cc/TTS
>
> Issue: https://github.com/dart-lang/sdk/issues/50649
> Issue: https://github.com/flutter/flutter/issues/118608
>
> Cq-Include-Trybots: luci.dart.try:vm-aot-linux-product-x64-try,vm-aot-linux-debug-x64-try,vm-aot-mac-release-arm64-try,vm-aot-mac-product-arm64-try,vm-aot-dwarf-linux-product-x64-try,vm-linux-debug-x64-try,vm-linux-release-x64-try,vm-appjit-linux-product-x64-try
> Change-Id: Ibe5b21bb74f1a6fb88824b71ff87b9e555216dbf
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400301
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

TEST=vm/dart/entrypoints_verification_test vm/cc/IRTest
     vm/cc/StreamingFlowGraphBuilder vm/cc/STC vm/cc/TTS

Change-Id: Ibd5f362f908b4aaa68cda870a387c081537bbc16
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-product-x64-try,vm-aot-linux-debug-x64-try,vm-aot-mac-release-arm64-try,vm-aot-mac-product-arm64-try,vm-aot-dwarf-linux-product-x64-try,vm-linux-debug-x64-try,vm-linux-release-x64-try,vm-appjit-linux-product-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403360
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-01-08 00:26:40 -08:00
Alexander Aprelev 3b7716ab00 [gardening] Fix embedder_samples_test leaks, uninitialized variables.
Fixes https://github.com/dart-lang/sdk/issues/59810
TEST=ci

Change-Id: I8dca122538195c8aad98e0d0fb64c7ea8e0d2e1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402421
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2024-12-26 12:28:38 -08:00
Alexander Aprelev 6a29e9f139 [vm/gardening] Fix unused variable warning due to args evaluation ordering
Bug: https://github.com/dart-lang/sdk/issues/59808
Change-Id: Ief330084f7d3782b126d028a34554a01f22db680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402420
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2024-12-26 08:52:28 -08:00
Alexander Thomas 5b1e226fc6 [api.dart.dev] Update incorrect URLs in the Dart SDK sources
The old site supported api.dart.dev/stable/<page in the latest version>
links. These currently don't work, but the correct link omits the
`/stable/` path component.

Even if we add redirects to make the old URLs work, we still want to
update sources with the canonical URLs.

CoreLibraryReviewExempt: Documentation change only.
Fixes: https://github.com/dart-lang/sdk/issues/57110
Change-Id: I0b20bfa875db5ce62362a02e884d7d43b0efc73e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395961
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2024-11-20 09:36:12 +00:00
Ivan Inozemtsev 53ba9af361 Standalone Dart runtime library for embedders
For now we use a static library, but I am planning to add support for a shared library in a follow-up CL.

Tested: locally on macOS and Linux, also ci should at least build samples.
Change-Id: I277239359de226c56633884f350b22a030759ab6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392640
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-11-06 13:11:34 +00:00
Ryan Macnak 06dd95bd8e [infra] Expand sanitizer test coverage.
TEST=ci
Change-Id: I5e7709572f3ea0a16925996be8ab903b6eccc0e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365100
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-05-02 23:31:48 +00:00
Jake Macdonald 5052ab6f34 fix use of deprecated members in ffi samples
Change-Id: Ia0b38bfbdc3c2fe9747d024d05364c8aed4b1909
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349580
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2024-01-31 22:31:59 +00:00
Oleh Prypin 5a1ef6089c Revert "[ffi]: Remove pointer elementAt method."
This reverts commit f706ff4ee2.

Reason for revert: b/321667799 - package:win32 uses this method - https://github.com/dart-windows/win32/blob/a78ff108fbf54927b0334c1bab8f15526c24cbf8/lib/src/com/iapplicationactivationmanager.dart#L46

Original change's description:
> [ffi]: Remove pointer elementAt method.
>
> Closes #54250
>
> TEST=test/ffi
>
> R=dacoharkes@google.com
> Change-Id: I0e88adfcfe3caef0ad3bb6814ad8f27dce5dc7f4
> CoreLibraryReviewExempt: FFI only
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346380
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Auto-Submit: Shikhar <shikharish05@gmail.com>

Change-Id: I1b7a48d14e9b85676a27f76a926e21cac9c76c85
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347600
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-01-22 12:20:48 +00:00
Shikhar Soni f706ff4ee2 [ffi]: Remove pointer elementAt method.
Closes #54250

TEST=test/ffi

R=dacoharkes@google.com
Change-Id: I0e88adfcfe3caef0ad3bb6814ad8f27dce5dc7f4
CoreLibraryReviewExempt: FFI only
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346380
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Shikhar <shikharish05@gmail.com>
2024-01-22 11:34:18 +00:00
Martin Kustermann 85e1bbf45c [gardening] Update samples/ffi/sqlite sdk constraint to ^3.0.0 to enable class modifiers
The test is currently failing due to missing `class-modifiers` language
feature which is only available ^3.0.0

Change-Id: Id896afc70e7cddcdbe6f27fb89a4ed0a773f34ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333820
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-11-03 08:39:48 +00:00
Jake Macdonald 1405695675 Add sample directories to the package config.
This allows the package imports in the tests to resolve.

Change-Id: Idadca8b55516a5b5d1511ebc38c298479aa8eda0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333662
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-11-02 21:00:41 +00:00
Jake Macdonald 3f1e15ab34 fix diagnostics in the FFI sample
Change-Id: I9697c33be3ee1c96c43d382c0925641d91878218
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333560
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-11-02 16:09:58 +00:00
Ryan Macnak 7c5b404eaf [build] Fix Windows linker warning about unrecognized flag.
Change-Id: Iac7536450998f5f841e56ee57e60b36c4e71dabd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332442
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-10-26 19:23:20 +00:00
Liam Appelbe 850bfe016e Fix samples/ffi/http/test/http_test.dart
Bug: https://github.com/dart-lang/sdk/issues/53657
Fixes: https://github.com/dart-lang/sdk/issues/53657
Change-Id: Ib055eca57e6aba9329d94d5113ae59ffbdadf3ae
TEST=samples/ffi/http/test/http_test.dart
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328683
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2023-09-29 20:58:07 +00:00
Liam Appelbe baaf5e1116 [ffi] Reland the iNativeCallable.listener example test.
The documentation changes already relanded. This is just relanding the
example.

Patchset 1 is a pure reland. Other patchsets are fixes.

Original CL:
https://dart-review.googlesource.com/c/sdk/+/326580

Change-Id: I04d24d63f08a351db7a6e43f331904274e28e2d5
Bug: https://github.com/dart-lang/sdk/issues/53435
TEST=samples/ffi/http/test/http_test.dart
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328681
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-09-28 22:41:42 +00:00
Liam Appelbe 18d0afdce1 Revert "[ffi] NativeCallable.listener example."
This reverts commit 5354df624a.

Reason for revert: Broke debian-x64-main bot
https://logs.chromium.org/logs/dart-internal/buildbucket/cr-buildbucket/8769282695204884177/+/u/build/stdout

Original change's description:
> [ffi] NativeCallable.listener example.
>
> Add an example to the NativeCallable.listener documentation.
>
> Bug: https://github.com/dart-lang/sdk/issues/53435
> Change-Id: I4b664b14ca1dbc474913a9e191e38ca6f290350f
> Fixes: https://github.com/dart-lang/sdk/issues/53435
> CoreLibraryReviewExempt: The FFI package is VM-only
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326580
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

Bug: https://github.com/dart-lang/sdk/issues/53435
Change-Id: Id959500df51d0eaa9bd452d3d9d0a8b21191de1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327420
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Auto-Submit: Liam Appelbe <liama@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-09-22 05:15:18 +00:00
Liam Appelbe 5354df624a [ffi] NativeCallable.listener example.
Add an example to the NativeCallable.listener documentation.

Bug: https://github.com/dart-lang/sdk/issues/53435
Change-Id: I4b664b14ca1dbc474913a9e191e38ca6f290350f
Fixes: https://github.com/dart-lang/sdk/issues/53435
CoreLibraryReviewExempt: The FFI package is VM-only
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326580
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2023-09-22 04:02:20 +00:00
Ryan Macnak 99ef36064f [infra] Make the sanitizer a first-class status variable.
Makes the TSAN skips apply to
 `test.py -mrelease --sanitizer=tsan`
and not just
 `test.py -n vm-tsan-linux-release-x64`.

Also makes the timeouts agree.

Change-Id: I10315e754a4ebb3020f3c2f6cecfac6b77e77a9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311828
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-07-10 17:46:31 +00:00
Ryan Macnak 3d8424e9fc [test] Introduce status variable $simulator, and fix some cases missing simarm_x64.
TEST=ci
Change-Id: Ie2a8ac015b2d316527d648956c86d4c7cb319d26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292962
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-04-04 03:10:26 +00:00
Lasse R.H. Nielsen 9e76983782 Reland "Add more interface and final modifiers to dart:core."
This is another reland of 4f8333e80e.
Third time is the charm.

CoreLibraryReviewExempt: Reland of accepted CL.
Change-Id: I4ea8326af91c168b044d252162571d3fe697e4b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289826
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-30 20:34:09 +00:00