The front end may desugar some const constructors into procedures, so be
less strict with what is expected in the list of const constructors.
Also updates SourceReport to check all Functions with is_const() true
against the collected const constructor hits and not just Constructors.
TEST=ci
Fixes: https://github.com/dart-lang/sdk/issues/61947
Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: I092938eeeb0459de9b3d95400a538ec6528c43fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462442
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
I want to do some refactoring, and it's easier to manage if everything
isn't in one big file.
No change to functionality in this CL, only moving declarations.
CoreLibraryReviewExempt: No code change, only moved to new part files.
Change-Id: I4b5e244172302b52a04387372738c46a07807a31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462100
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Store the index of the section in the load commands in the section.
Initialize it at the same time as the symbol tables are initialized,
since they are the primary client of this index.
Instead of storing the section index separately in symbols, which
means they must be updated after any reordering, just keep a pointer
to the owning section (or nullptr, if this is a global symbol).
This also allows us to lazily determine the final value written for
section-owned symbols using the owning section's memory address,
so now there is no finalization step needed for symbol tables.
TEST=ci
Cq-Include-Trybots: luci.dart.try:vm-aot-dwarf-linux-product-x64-try,vm-aot-linux-debug-x64-try,vm-aot-mac-debug-arm64-try
Change-Id: I87473a8fedf085e08492db62f133882c886bd9cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460045
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Fix dart_stream_ and service_extension_stream_ appearing after the end-of-accessed-from-generated-code comment.
TEST=ci
Change-Id: I8f10d32b082125d7ed090cd118089309022c0f3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459700
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Rework register allocator to assign safepoints eagerly
as live ranges are being built and safepoint instruction
is being visited instead of doing it post-factum when
each range is being finalized.
Fixes https://github.com/flutter/flutter/issues/176619
TEST=ci, manually tested equivalence of safepoint lists
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-x64-try,vm-aot-mac-debug-x64-try,vm-aot-mac-debug-arm64-try,vm-aot-mac-product-arm64-try,vm-aot-mac-release-arm64-try,vm-aot-linux-debug-x64-try
Change-Id: Ieebda2796c2397a701b9184f6b8675fe6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460100
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Our product builds (used for testing) are setting dart_runtime_mode ==
"release", so we better align behavior of dart_product_config and
dart_maybe_product_config in such case otherwise we create unexpected
skew between artifacts and dartaotruntime which is used to compile them.
In reality we should probably delete Product$ARCH build altogether
because all necessary artifacts are actually part of Relase$ARCH builds
anyway these days.
TEST=Run vm-aot-dyn-linux-product-x64 tests
Change-Id: Ifbc2b9679a666c9f22b289d6eb0b8b836a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460040
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This undoes size regression introduced
commit 489f63a3bd
This also exclude timeline from Dart binaries built
in PRODUCT mode - but not from PRODUCT AOT runtime
built as part of normal SDK.
This CL also fixes the build with DART_DISABLE_TIMELINE.
TEST=manually by building Linux engine
Change-Id: Ie43826ea4150aac6bdb686f37215ba0c6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459600
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Basic support for Unix domain sockets on Windows within
the limitations of the operating system itself: no
support for abstract addresses, datagram or
packet sockets and ancillary data.
This also fixes File::GetType on Windows to correctly
identify reparse points representing AF_UNIX sockets
as such, rather then identify them as links.
Finally, it is worth noting that there is an existing
discrepancy between POSIX OSes and Windows: on POSIX OSes
File(sockPath).existsSync() returns true, but on Windows the
same code returns false because Unix domain sockets are not
considered regular files by stat.
This CL does a bunch of refactoring around RawAddr class which
surves as a wrapper around various structures in sockaddr_* family.
Distinguishing anonymous AF_UNIX address from abstract AF_UNIX
address requires passing around the length of the address
structure. Thus we incorporate this information into
RawAddr. This will also make possible to properly support
full-range of abstract AF_UNIX addresses in the future because
supporting these requires properly handling embedded NUL bytes.
(See https://github.com/dart-lang/sdk/issues/46158).
Fixes https://github.com/dart-lang/sdk/issues/41161
TEST=standalone/io/unix_socket
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try
Change-Id: I016cb33ebdd62f0cac1ae97d822105366a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457720
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
This adds an internal wrapper expression for redirecting factory invocations. This holds a reference to the original redirecting factory constructor along with the resulting invocation of the generative or factory constructor. The node is removed during constant evaluation and only available to backends through the pre-modular transformations.
TEST=existing
Change-Id: I35c19766117ab2942aefddb4ccebcd2df66babf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454820
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Add a check in TryAllocate for whether allocations for the class id
should be traced and, if so, return false so the allocation runtime
entry is called instead.
TEST=pkg/vm_service/test/get_allocation_traces_test
Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: I6107423d099841c321c0eee440bedddddfacaccc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457020
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
This API allows to programmatically generate timeline information
including profiling samples if timeline format supports it.
This change also includes Perfetto timeline writer and profiler
into non-mobile PRODUCT builds. The size of Mac OS X dartaotruntime
has increased by 34352 bytes (0.7%).
This relands commit 553887bc56 with fixes
for Android builds.
TEST=vm/dart/stream_timeline_to_test
CoreLibraryReviewExempt: VM specific dart:developer API.
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-product-arm-try,vm-ffi-android-release-arm-try,vm-aot-android-release-arm64c-try
Change-Id: Ifb7c66982fe9d17d2f5c9acb163a94c56a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457301
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 553887bc56.
Reason for revert: Broken android builds
Original change's description:
> [vm] Add NativeRuntime.streamTimelineTo
>
> This API allows to programmatically generate timeline information
> including profiling samples if timeline format supports it.
>
> This change also includes Perfetto timeline writer and profiler
> into non-mobile PRODUCT builds. The size of Mac OS X dartaotruntime
> has increased by 34352 bytes (0.7%).
>
> TEST=vm/dart/stream_timeline_to_test
>
> CoreLibraryReviewExempt: VM specific dart:developer API.
> Change-Id: I326f5fd29ee82a503160f5f5a2a857a7c55330ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426220
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I583ad74b850514fb47054149da464a07874fc2f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457000
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This API allows to programmatically generate timeline information
including profiling samples if timeline format supports it.
This change also includes Perfetto timeline writer and profiler
into non-mobile PRODUCT builds. The size of Mac OS X dartaotruntime
has increased by 34352 bytes (0.7%).
TEST=vm/dart/stream_timeline_to_test
CoreLibraryReviewExempt: VM specific dart:developer API.
Change-Id: I326f5fd29ee82a503160f5f5a2a857a7c55330ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426220
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>