Commit graph

92643 commits

Author SHA1 Message Date
Alexander Thomas 9a741507d1 [infra] Add missing build targets to windows arm64 AOT builders
Change-Id: I995d739948858473d8213262509910b158c04ef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312985
Reviewed-by: William Hesse <whesse@google.com>
2023-07-11 10:58:42 +00:00
Tess Strickland 2f63acea22 [vm] Attempt to avoid allocating non-Ptr fields with Object::null().
There have been multiple cases in the past where using Object::null()
as the initializer, even for non-Ptr fields, has caused nondeterministic
snapshot creation. In particular, this can happen if a non-Ptr field
is only used in some versions of an object but not others, and thus
there is no reason to worry about what the value of the field is during
runtime. Only when snapshotting can it become relevant that the field
value is a portion of the address of Object::null(), which can vary
over different runs.

Instead of initializing the entirety of allocated objects (outside
of a few rare cases) with Object::null(), only initialize the portion
of the object corresponding to object pointer fields (in most cases,
between from() and to() inclusively) to Object::null() and initialize
the rest of the object to 0.

With this change, the only special casing in Object::InitializeObject
that remains is to skip initialization for TypedData and Arrays when
the memory is guaranteed to be zero initialized and to initialize the
contents of Instructions objects with the break instruction, not 0.

Note that this behavior does not occur in the following cases, which
all involve copying an arbitrary object:

* Object::Clone(), which zero-initializes the contents of the object
  in all cases. However, the contents of the original object are then
  copied over before the thread can reach a safepoint.
* Inside the ObjectGraphCopier, which uses the old initialization
  behavior. This is safe, as any GC-important fields are immediately
  copied over, and the rest of the contents are eventually copied over
  before the caller receives the root of the copied object graph.

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/52876
Change-Id: Ib09fc562a8b6af97b509b493eb2d64109230ec35
Cq-Include-Trybots: luci.dart.try:vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-linux-release-x64-try,vm-aot-linux-product-x64-try,vm-aot-linux-release-x64-try,vm-aot-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312900
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-07-11 10:15:58 +00:00
M. Javad Pourqavam a0392698bf Fix docs of DateTime.from constructors
Closes https://github.com/dart-lang/sdk/pull/52866

GitOrigin-RevId: bbc99c5f36dde2e53cc68aa3d8a5acfd5dd0fbb2
Change-Id: I9a5cf4b2a9d67fc3567af0f839272a104bf9edc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312760
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-07-11 10:03:48 +00:00
Martin Kustermann 81df36216f Make utf8.encode() have Uint8List return type
Right now `utf8.encode()` has a static return type of `List<int>`
due to extending `Encoding` (which extends `Codec<String, List<int>>`).

We cannot easily change `Encoding` to extend `Codec<String, Uint8List>`
because that would also change `utf8.decode()` to require `Uint8List`
which would be a breaking change.

So instead we override `utf8.encode()` to have more precise return type.

Some parts of our SDK are run using the checked-in SDK, so it cannot
rely on the changed return type yet (until checked-in SDK is rolled).

So we use `const Utf8Encoder().convert()` as a temporary change, as
that already has `Uint8List` return type.

Issue https://github.com/dart-lang/sdk/issues/52801

TEST=ci

CoreLibraryReviewExempt: More precise return type for existing API
Change-Id: I2861d1f0eb3d292d8e3ec8437c0d441a2d2bd193
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254903
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-07-11 08:54:33 +00:00
Daco Harkes e1c12b3ab2 [cfe/ffi] Fix Finalizable non-nullable variables
TEST=pkg/vm/test/transformations/ffi_test.dart
TEST=pkg/vm/testcases/transformations/ffi/regress_52596.dart
Contains
`throw "Attempt to execute code removed by Dart AOT compiler (TFA)";`
without the fix.

Closes:https://github.com/dart-lang/sdk/issues/52596
Change-Id: I5de819afcf6f70be037b60432ea016bc281b742e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312909
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2023-07-11 07:53:47 +00:00
Konstantin Shcheglov 2c97bd7801 Remove duplicate getters from ClassDeclaration and MixinDeclaration.
Change-Id: I69440dd7b1911db6616dc500d82b7b9c3e996529
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313083
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-11 05:47:30 +00:00
Konstantin Shcheglov 7a258fa43b Add NotAugmentedXyzElementImpl implements AugmentedXyzElement.
So, that we don't have to copy all class members for 99% cases when
there are no augmentaitons.

Change-Id: I5c225905a0460ce5162543553e207a2d4412ecb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313082
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-07-11 02:22:35 +00:00
Kallen Tu 8be3439ce3 [analyzer] Make InstanceCreationEvaluatorTest consistent with other const tests.
Print type in `dart_object_printer.dart`.
Use `assertDartObjectText` instead of whatever was being used before.

Change-Id: Ifdfb6343013bb5fe654bcff870a9ff83b155402f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312885
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-10 22:20:22 +00:00
Ryan Macnak b050ec9449 [vm, compiler] Honor --no_inline_alloc in suspend state and record stubs.
TEST=ci
Change-Id: Iae70a0edd776d88f2e26783d7348f2e5daf25ad9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312080
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-07-10 22:03:08 +00:00
Helin Shiah 2094a733aa Add URI converter method that can be overridden
This is for an internal debug adapter to extend the test debug adapter and provide a custom URI converter to provide internal local paths during breakpoints.

Change-Id: I3b61b70fe07e14f08ff37443ef87facc523bf7fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313000
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2023-07-10 21:30:51 +00:00
Devon Carew 5dd2326a80 [deps] rev args, async, bazel_worker, benchmark_harness, boolean_selector, browser_launcher, characters, cli_util, clock, collection, convert, crypto, csslib, dartdoc, ecosystem, ffi, fixnum, glob, html, http, http_multi_server, http_parser, json_rpc_2, leak_tracker, lints, logging, markdown, matcher, mime, mockito, native, package_config, path, pool, protobuf, pub_semver, shelf, source_map_stack_trace, source_maps, source_span, sse, stack_trace, stream_channel, string_scanner, term_glyph, test, test_descriptor, test_process, test_reflective_loader, tools, typed_data, usage, watcher, web_socket_channel, webdev, yaml
Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (a9543c0..da56b18):
  da56b18  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#249)

async (a506993..b65622a):
  b65622a  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#247)

bazel_worker (f7b714e..c29d162):
  c29d162  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#77)

benchmark_harness (e717ad4..fde73cb):
  fde73cb  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#91)

boolean_selector (3a1c982..303635d):
  303635d  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#49)

browser_launcher (40e4315..27ec600):
  27ec600  2023-07-05  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#46)
  dd8df9c  2023-07-05  Devon Carew  update formatting for recent lints (#47)

characters (3ef8883..ec844db):
  ec844db  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#84)

cli_util (5a49947..9b7ce78):
  9b7ce78  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#84)

clock (21caac1..263e508):
  263e508  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#54)

collection (a37bd51..db343da):
  db343da  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#295)

convert (9a387f0..79ee174):
  79ee174  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#84)

crypto (216931a..8b704c6):
  8b704c6  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#150)

csslib (be2e11e..7e91228):
  7e91228  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#187)

dartdoc (c2ed703..2522559):
  25225596  2023-06-29  Sam Rawlins  Migrate some simple tasks to a simple package:args command (#3456)

ecosystem (19fa443..b34db4f):
  b34db4f  2023-07-10  Moritz  Allow empty coverage (#128)
  5944328  2023-07-04  Moritz  Prepare for publish (#127)
  c0701c9  2023-07-04  dependabot[bot]  Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (#122)
  9bf3a10  2023-07-03  Moritz  Fix bug by switching `reduce` to `fold` (#126)
  fdfa528  2023-07-01  dependabot[bot]  Bump actions/cache from 3.2.6 to 3.3.1 (#121)
  238444c  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.3.0 to 3.5.3 (#123)
  ca1e1ae  2023-06-30  Moritz  Add coverage workflow (#119)
  cf02b4a  2023-06-30  Lasse R.H. Nielsen  Make Changelog class eagerly load and parse file. (#120)

ffi (f582ca0..f01dfca):
  f01dfca  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#199)

fixnum (d9b9a2a..00fa120):
  00fa120  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#113)

glob (109121d..5b24393):
  5b24393  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#79)

html (b3b820b..4060496):
  4060496  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#218)
  8cb99e4  2023-07-01  Devon Carew  address new analysis issues (#219)

http (d68081f..c148a3a):
  c148a3a  2023-07-07  Alex James  Java http BaseClient implementation (#980)
  474999f  2023-07-05  Brian Quinlan  Document that the network entitlement is required when running in the macOS sandbox (#979)
  98e4112  2023-07-05  Brian Quinlan  Fix a bug where ...WebSocketClosed had two different initializer signatures (#981)
  9833a20  2023-07-05  Brian Quinlan  Support Steam<List<int>> as a provider of request data (#975)
  d3e78a0  2023-07-01  dependabot[bot]  Bump actions/labeler from 4.0.4 to 4.2.0 (#976)

http_multi_server (a209cd5..aa128cf):
  aa128cf  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#56)

http_parser (19466c0..c14fbf6):
  c14fbf6  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#75)

json_rpc_2 (73467f3..509f71e):
  509f71e  2023-07-05  Nate Bosch  Fix the example to act as a server (#100)
  d80cbd0  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#99)

leak_tracker (c75b0a7..85bd7fb):
  85bd7fb  2023-07-05  Polina Cherkasova  - (#87)

lints (89f9519..e03dc04):
  e03dc04  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#138)

logging (f2fe2ac..5214987):
  5214987  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#144)

markdown (4674d09..b4bdde2):
  b4bdde2  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#549)

matcher (7e10117..ce8f409):
  ce8f409  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#225)

mime (2444840..bdb66bd):
  bdb66bd  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#99)

mockito (974226e..451f756):
  451f756  2023-07-10  Nate Bosch  Add example of mocking callbacks
  c13496c  2023-07-05  Googler  Rollback of "Use `FunctionTypedElement.type` while generating method overrides"
  60e619a  2023-07-05  Ilya Yanok  Use `FunctionTypedElement.type` while generating method overrides
  93b69ef  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#669)
  a926a63  2023-06-30  Ilya Yanok  Add a note on only running codegen on files under `test/` by default
  9f40189  2023-06-30  Ilya Yanok  Require analyzer 5.12.0

native (e12d3e6..de1b0cc):
  de1b0cc  2023-07-10  Daco Harkes  [c_compiler] Pass the correct SDK for iOS simulator builds (#77)
  21d7270  2023-07-01  dependabot[bot]  Bump coverallsapp/github-action from 2.1.2 to 2.2.0 (#72)
  23a9b62  2023-07-01  dependabot[bot]  Bump nttld/setup-ndk (#74)
  44073a8  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#75)
  6f01604  2023-07-01  dependabot[bot]  Bump actions/labeler from 4.0.4 to 4.2.0 (#73)

package_config (203de20..be0c441):
  be0c441  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#138)

path (592505f..282dd18):
  282dd18  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#147)

pool (c6b1b2c..7700102):
  7700102  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#72)

protobuf (7bebbc6..a912f76):
  a912f76  2023-07-04  Ömer Sinan Ağacan  Add more message set tests, fix a bug (#859)

pub_semver (3930557..028b435):
  028b435  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#90)

shelf (ce379aa..bd59ead):
  bd59ead  2023-07-06  Kevin Moore  router_generator: allow latest pkg:analyzer, request Dart 3 (#368)
  bebc801  2023-07-06  Jonas Finnemann Jensen  Fix 244 (#268)
  1617efa  2023-07-02  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#366)
  c037bb6  2023-07-02  dependabot[bot]  Bump actions/labeler from 4.0.4 to 4.2.0 (#365)
  1ae4d4e  2023-07-01  Devon Carew  address a new lint (#367)

source_map_stack_trace (b83af01..16e54fd):
  16e54fd  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#40)

source_maps (58eef30..97c4833):
  97c4833  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#80)

source_span (4dc78fb..37735ae):
  37735ae  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#99)

sse (bfcbcd7..e241085):
  e241085  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#85)

stack_trace (8b2046e..4ddd86d):
  4ddd86d  2023-07-05  Slava Egorov  Prepare 1.11.1 release (#137)
  d3e4c4d  2023-07-04  Slava Egorov  Use awaiter-link pragma to guide VM's builtin awaiter stack unwinding (#135)
  44aafa3  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#136)

stream_channel (34804a1..e54234f):
  e54234f  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#93)

string_scanner (6bb314f..35657e2):
  35657e2  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#59)

term_glyph (4daa34e..423700a):
  423700a  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#40)

test (021667a..3429712):
  3429712b  2023-07-06  Nate Bosch  Drop usage of window.testRunner (#2059)
  dc6b8236  2023-06-29  dependabot[bot]  Bump actions/checkout from 3.1.0 to 3.5.3 (#2051)
  b6dc3f8d  2023-06-29  dependabot[bot]  Bump dart-lang/setup-dart from 1.3.0 to 1.5.0 (#2052)
  5fa2572f  2023-06-29  Jacob MacDonald  regenerate mono_repo with the latest (#2055)
  56584627  2023-06-29  dependabot[bot]  Bump github/codeql-action from 2.3.5 to 2.20.1 (#2053)
  050fe2d6  2023-06-29  dependabot[bot]  Bump ossf/scorecard-action from 2.1.3 to 2.2.0 (#2054)
  ba6ccfc2  2023-06-29  Devon Carew  config dependabot to send daily PRs for major version bumps (#2050)

test_descriptor (be7ce07..54a4c59):
  54a4c59  2023-07-03  Devon Carew  update formatting for recent lints (#54)

test_process (5ff2122..b360784):
  b360784  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#46)

test_reflective_loader (40d61b1..0bfaad9):
  0bfaad9  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#50)

tools (8db0aa1..af38b2b):
  af38b2b  2023-07-02  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#119)
  8b8ccab  2023-07-01  Devon Carew  update formatting based on the recent lints (#121)
  30b50ff  2023-07-01  dependabot[bot]  Bump coverallsapp/github-action from 2.1.2 to 2.2.0 (#118)
  74979c1  2023-07-01  dependabot[bot]  Bump actions/labeler from 4.0.4 to 4.2.0 (#120)

typed_data (8d29573..a20be90):
  a20be90  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#69)

usage (6ee0908..09bb847):
  09bb847  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#196)

watcher (3f17faa..7457413):
  7457413  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#148)

web_socket_channel (7fb82f2..7ae4d0f):
  7ae4d0f  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#274)

webdev (8360d50..f0ba743):
  f0ba7438  2023-07-07  Elliott Brooks  Reset webdev to version 3.0.7-wip (#2170)
  2fcc1ba9  2023-07-06  Anna Gringauze  Add option of running frontend server tests in canary mode (#2169)
  632763a5  2023-07-06  Elliott Brooks  Prepare webdev for release to 3.0.6 (#2167)
  fa7b6d44  2023-07-05  dependabot[bot]  Bump actions/checkout from 3.5.0 to 3.5.3 (#2163)
  2a6a457b  2023-07-05  Devon Carew  regenerate from the latest mono_repo (#2165)
  cbb0d76a  2023-07-05  Anna Gringauze  Run instance tests with frontend server (#2160)
  b672e98a  2023-07-05  Elliott Brooks  Reset DWDS after release (#2168)
  8ef92d71  2023-07-05  Elliott Brooks  Prepare DWDS for release to version 19.0.2 (#2166)
  77e5b373  2023-07-05  Elliott Brooks  Handle potential `null` value in `setUpChromeConsoleListeners` (#2162)
  5081dff0  2023-07-01  dependabot[bot]  Bump actions/labeler from 4.0.4 to 4.2.0 (#2164)

yaml (0b9041d..7930148):
  7930148  2023-07-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#148)

Change-Id: I095a2479946e13d8499f1b3a58dc5a82688063f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-07-10 21:00:32 +00:00
Konstantin Shcheglov 3bb4d7d0d4 Parse mixin augmentations, build element model.
Change-Id: Ie1bdb6d47b31c527546f62abf65d19a4a4e50ee7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-10 20:48:32 +00:00
Derek Xu f0310b5b7c [VM/Timeline] Change locking scheme used by TimelineEventRingRecorder to prevent races
TEST=Loaded the timeline in DevTools on a debug build with the recorder
set to ring, endless, and startup. Recorded traces on a debug build with
the recorder set to systrace, file, and perfettofile. Ran the
vm/cc/TimelineRingRecorderRace test on ASAN and TSAN.

Issue: https://github.com/flutter/flutter/issues/129258
Change-Id: I39920ac3e4a70e5714915fcd554ae171ed82504a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312721
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-07-10 20:33:33 +00:00
Derek Xu 3cb3e9a49e [VM/Timeline] Delete unsafe versions of Clear() and ReclaimCachedBlocksFromThreads()
TEST=Recorded traces using the file recorder on ASAN and TSAN builds.

Change-Id: I2251a8373d952d6e3ef1803e9a79de85522f518a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312720
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-07-10 20:33:33 +00:00
Danny Tuppeny 95e6f1e110 [dds/dap] Use Isolate numbers as DAP thread IDs
We used to generate our own thread ID starting at 1 and counting up. There was always a 1:1 mapping from a DAP thread to a VM Isolate. With this change, we always use the Isolate number as the thread ID which makes it easier for tools using both VM Service and DAP at the same time.

Change-Id: Id8d82f6fd5134987f2ecfeaa761765d55999405d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312906
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-07-10 20:14:58 +00:00
Brian Wilkerson edb8d33c8e Start converting portions of the KeywordContributor
Change-Id: I9423ae6e50eec95ba3e5212529f4f3635d2f76d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312940
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-07-10 19:51:33 +00:00
Joshua Litt 50c810e12c [js|dart2wasm] Add JS backed subtypes of Dart typed array classes.
Change-Id: I19a6d47bf857969abe2205e6b505b3a1dead5e3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310480
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-07-10 18:11:02 +00:00
Srujan Gaddam e25cd7c182 [dart2wasm] Throw error in JSExportedDartFunction.toDart if not JS function
Currently this throws a Wasm RuntimeError, which is difficult to
recover from.

Change-Id: I747682d6959b19746d6c98f2ea1b3fefd1ed2d03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312891
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-07-10 17:50:07 +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
asiva abcbcd42cb [Status Files] Update status files to account for the following
- https://github.com/dart-lang/sdk/issues/45128 - test computes the
  script url incorrectly when run in an app-jit scenario

- https://github.com/dart-lang/sdk/issues/51304 - test has some long
  iterations (1000 x 1000) and takes longer on the simulator
  architectures causing timeouts

TEST=ci

Change-Id: Iebde161177a442a2288ccc5d879139099c241a4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312888
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2023-07-10 17:42:04 +00:00
Sam Rawlins fab30a7a73 Bump linter to e8c878360595c1d268d93f54c09bc843815a42d7
Change-Id: I8ab5b3de76d2e498185135660aae1875326f8a8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312961
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-07-10 16:20:18 +00:00
Jess Lally 185f08f606 [dart2wasm] Fix implementation of modulo and remainder for doubles
Change-Id: I6dc8a41da2088a256fde668718e9599b5aed80d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312804
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Jess Lally <jessicalally@google.com>
2023-07-10 14:30:32 +00:00
Kyle Turney e826300560 add fix for removing the leading underscore from local function names
Closes https://github.com/dart-lang/sdk/pull/52822

GitOrigin-RevId: 1e97f3fde70079ea47a4bb8f8f58db341ae26fdc
Change-Id: Iec46cca3532789b4fb338d73cdbb946a0d383845
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-07-10 14:18:08 +00:00
Derek Xu 6022e0eee6 [VM/Service] Fix service_2/causal_async_star_stack_contents_test
TEST=service_2/causal_async_star_stack_contents_test

Fixes: https://github.com/dart-lang/sdk/issues/52856
Change-Id: I9e03fdefb6df1498b7d19d365c3673218ec9fe5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312722
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-07-10 14:02:50 +00:00
Daco Harkes b3cc093e4c [vm/ffi] Fix native assets resolution in iOS release
TEST=Manually tested in local engine build for Flutter.

Bug: https://github.com/dart-lang/sdk/issues/50565
Change-Id: I281f2e3b2fb65091a73fc33d01c0e5e7f79beac3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312908
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Hossein Yousefi <yousefi@google.com>
2023-07-10 12:23:15 +00:00
Martin Kustermann daa35fd4fd [gardening] Restore timout multiplier in test runner for linux-arm64
The timeout multipiler for linux-arm64 was originally 4, then lowered to
1 (see [0]), then increased again to 2 (see [1]).

Though it seems that service tests are still flakily timing out, so
let's try restoring the original multilier.

[0] https://dart-review.googlesource.com/c/sdk/+/306662
[1] https://dart-review.googlesource.com/c/sdk/+/307972

Also special case `ia32` in timeout calculations due to not using
an AppJIT trained `kernel-isolate` snapshot and therefore being
very slow, especially in ia32-debug mode.

Issue https://github.com/dart-lang/sdk/issues/52589
TEST=ci

Change-Id: Iab8c768866aec9e77bb83c7a3242cc5de8fb4e2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312905
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-07-10 12:02:16 +00:00
Jake Macdonald 1a13ea6c05 Add a disposeMacro api, with TODOs in the implementations to call it.
Change-Id: I38049ca8b851c2203ddaaa729ef651e7802a1d2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312860
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-07-10 12:01:49 +00:00
Martin Kustermann 389aab624d [vm] Allow non-TSAN gen_snapshot target TSAN AOT runtime
This is a revert of b6bbfff8c0c6c44cdab0d7d78 which temporarily disabled
this.

Turns out that a non-TSAN gen_snapshot would - when emitting code via
`Assembler::TsanLoadAcquire` - use an incorrect `Thread`-offset:

It calculated the offset via `Thread::OffsetFromThread`. That function
took a `dart::RuntimeEntry*` and tried to find its offset.

We happen to have the following leaf runtime entries:

  #define LEAF_RUNTIME_ENTRY_LIST(V)
      ...
      V(void, MsanUnpoison, void*, size_t)
      V(void, MsanUnpoisonParam, size_t)
      V(void, TsanLoadAcquire, void*)
      V(void, TsanStoreRelease, void*)
      ...

It loops over all runtime entries and finds the first one that has the
identical `dart::RuntimeEntry::function_` pointer.

Though all 4 of them are `nullptr` at `gen_snapshot` time, so when
searching for offset for

  `Thread::OffsetFromThread(kTsanLoadAcquireRuntimeEntry)`

it looked for the first runtime entry with `nullptr` function pointer -
which turned out to be `MsanUnpoison` (instead of `TsanLoadAcquire`).

=> The obvious fix is to use the `dart::RuntimeEntry*` pointer for
comparison instead of it's `function_` member.

TEST=ci
Issue b/287638965

Change-Id: I85c06674927978ef8561e9e7bdfab4823c0a8e1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312902
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-07-10 11:53:58 +00:00
Johnni Winther 911b376f7e [cfe] Handle inline class representation field in object pattern
Closes #52667

Change-Id: I9c6d51597ff27ae3a7cdeed29d75755c18a2d530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311742
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-07-10 11:02:50 +00:00
Martin Kustermann 9b9a8cf042 [gardening] SkipSlow dart/regress_52703_test in hot-reload test mode
The test is flakily timing out in hot-reload test mode.

Issue https://github.com/dart-lang/sdk/issues/52784

TEST=ci

Change-Id: I466e1997aa691921d38a672f293b2a7e97df36aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312904
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-07-10 10:14:07 +00:00
dependabot[bot] 99c9408188 Bump ossf/scorecard-action from 2.1.3 to 2.2.0
Closes https://github.com/dart-lang/sdk/pull/52783

GitOrigin-RevId: 8fb776aa1f2a3b63e8c4d810bfea185aa1c79aa8
Change-Id: I447561e3ccccce9cef6abc7138f134d1a058d601
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311360
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-07-10 10:03:28 +00:00
Chloe Stefantsova b36fbaef2c [cfe] Update both sides of intersection types in GUB
In computation of GUB both the left-hand and the right-hand sides of
the intersection should be updated as nullable when the other operator
to GUB is Null.

Closes https://github.com/dart-lang/sdk/issues/50431

Change-Id: I4b616a94a3e7bf149205ba1b90732453c19ace47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311845
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-07-10 09:51:56 +00:00
Vyacheslav Egorov 44230dce94 [vm/compiler] Remove assertion from inliner
This assertion hits flakily due to races between compilers
(e.g. mutator vs background compiler or multiple mutators racing
with itself).

The discovered races are benign, so we just going to remove
the assertion.

Closes https://github.com/dart-lang/sdk/issues/52806

TEST=ci
R=kustermann@google.com

Change-Id: I8c4202bd76acea0fbf3724f19dbbc69958937afc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312903
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-07-10 09:50:54 +00:00
Liam Appelbe f4eb5392e5 Refactor vmspecific_static_checks_test
Bug: https://github.com/dart-lang/sdk/issues/52754
Change-Id: I13d729f0caf61fa0ef261ffd1c382177a4115d8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312342
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-07-10 00:07:28 +00:00
Konstantin Shcheglov 4d4eefa956 Compute 'mixins' and 'interfaces' for ClassElement.augmented
Change-Id: I7514576ada4a5dcd048a2c399d5bfe11169f3394
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312887
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-07 21:39:41 +00:00
Alexander Aprelev e800d945c7 Revert "[gardening] Populate legacy patched_class_ link."
This reverts commit 83616c9b56 as it was
not needed for flutter roll, which landed anyway.

TEST=ci
Change-Id: I38a85ab117cabd98420bc88e698a481b094d7345
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312886
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Auto-Submit: Alexander Aprelev <aam@google.com>
2023-07-07 21:27:56 +00:00
Konstantin Shcheglov 884116a83b Move 'constructors' getter into NamedInstanceOrAugmentationElementMixin.
Remove extra looping detection.

Change-Id: Ifdd7f4729930b3022a8b04f8143d714298acf8dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312884
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-07 20:34:39 +00:00
Martin Kustermann 2cb0882a2d [vm] Unblock dart->g3 roll
The adjustments to g3 build rules that allow running non-TSAN
gen_snapshot targeting TSAN AOT runtime aren't quite fleshed out yet.

So we temporarily let `gen_snapshot` detect whether to target TSAN by
whether it is itself compiled in TSAN (instead of via
`-DTARGET_USES_THREAD_SANITIZER`)

TEST=ci
Issue b/287638965

Change-Id: I2cd744f959d8302ba81cb1feceedee2756e02656
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312901
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-07-07 19:28:58 +00:00
Konstantin Shcheglov aad361b31e Link augmentations and targets during building.
We walk augmentations in the right order, so can update update
necessary data structures as we go.

Change-Id: Ibf3409658009b82a960caaacd538fcd6c779b007
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-07 19:14:25 +00:00
Konstantin Shcheglov 553c804eb5 Don't use LinkedData type parameter.
Change-Id: I2afa126856f05072cb5e796b4f47d64e61284b96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-07 18:29:37 +00:00
Konstantin Shcheglov ac0fc3c11c Print augmentation libraries after the defining unit.
So, we can read it more naturally, first the declaration, then its
augmentations.

Change-Id: I21805969bff6874660500d4477b39ce5aba7484a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-07 17:08:54 +00:00
pq ff8963d1be fix make_final to properly update for loop patterns
Fixes: https://github.com/dart-lang/sdk/issues/52820

Change-Id: If94b56f034bc8c28087251aada59433578ed7a2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312702
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-07 16:23:59 +00:00
Danny Tuppeny 201fb68e64 [analysis_server] Update remaining CodeActions tests to use new expectation format
This is a continuation of a previous change that stops tests from verifying only individual files modified via a `WorkspaceEdit`. All verifications of these edits are done via a single string that includes all changes, with annotations for creates/deletes/renames.

Additionally, it migrates some additional tests to use TestCode instead of the old markers, and removes some extra indenting these tests had.

It also starts changing how capabilities are set for tests from having to nest function calls in `initialize()` calls to instead calling simple helpers prior to initialization.

Change-Id: I35d16a296c2125ab830685437e14eb3b29ea4704
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-07-07 16:15:24 +00:00
pq b05282a1e9 @useResult support for pattern variable declarations
Fixes: https://github.com/dart-lang/sdk/issues/52841

Change-Id: I0ce4e8bc7771808fcaacfbfc2b591ab805c74ff4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312711
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-07-07 15:56:28 +00:00
Konstantin Shcheglov fc0e656868 Build ClassAugmentationElementImpl, basic linking.
Change-Id: I18bd3d97ad9fe661d14e3d3d006219ffceedcfc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312349
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-07-07 14:55:38 +00:00
Martin Kustermann 9d876d12b2 [vm] Rename kUsingThreadSanitizer->kTargetUsesThreadSanitizer, include tsan in snapshot flags
TEST=ci
Issue b/287638965

Change-Id: I649b28ac0181761d0927e80b8eff7c8af5fe305a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312840
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-07-07 14:42:22 +00:00
Tess Strickland 1bdbafff49 [pkg/vm_snapshot_analysis] Allow old 'patched_class_' field.
While in more recent SDK versions the 'patched_class_' field has
been replaced with 'wrapped_class_', this package can still be
used with the earlier SDK versions if we fall back to checking it.

Issue: https://github.com/flutter/flutter/issues/130009
Change-Id: Ifb1250393b72e58bbdc0764c7e2ce96269e659ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312802
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-07-07 11:36:59 +00:00
Tess Strickland 1133598168 [pkg/vm_snapshot_analysis] Don't assume Code objects have an owner.
For regular stubs, the owner will be null.

Issue: https://github.com/flutter/flutter/issues/130009
Change-Id: I8c85e3130128af79c596f381869d61631221cf9e
Cq-Include-Trybots: luci.dart.try:pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312660
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-07-07 09:52:50 +00:00
Martin Kustermann 82577191ec [vm] Allow build rules to pass TARGET_USES_THREAD_SANITIZER in any configuration
This may simplify some g3 build rules as it allows passing this define
whenever we compile under TSAN - instead currently it can only be passed
if DART_PRECOPMILER is also passed.

TEST=ci

Change-Id: I73e51243716373cdeca7559b344408bb206e22ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312801
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-07-07 09:02:32 +00:00
Sergey G. Grekhov e0493a5467 [co19] Roll co19 to 48d7f551cbc64b452c625351ab212180d3a2721c
2023-07-06 sgrekhov22@gmail.com Fixes dart-lang/co19#2115. Fix roll failures (mixin tests) (dart-lang/co19#2116)
2023-07-06 sgrekhov22@gmail.com dart-lang/co19#2112. Add missing tests for mixins. Part 1 (dart-lang/co19#2114)
2023-07-04 sgrekhov22@gmail.com dart-lang/co19#1400. Add test for implementing an inline class from another library (dart-lang/co19#2113)
2023-07-04 sgrekhov22@gmail.com dart-lang/co19#2094. Move and rename mixin tests to follow the current spec structure (dart-lang/co19#2108)
2023-07-03 sgrekhov22@gmail.com dart-lang/co19#1361. Add SDK issue numbers to the failing tests (dart-lang/co19#2110)
2023-07-03 sgrekhov22@gmail.com Fixes dart-lang/co19#2109. Add tests checking type parameters scope (dart-lang/co19#2111)
2023-07-01 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 3.5.2 to 3.5.3 (dart-lang/co19#2107)
2023-07-01 sgrekhov22@gmail.com Fixes dart-lang/co19#2105. Add missed error expectation (dart-lang/co19#2106)
2023-06-30 sgrekhov22@gmail.com dart-lang/co19#2094. Remove mixin-related TODO and @dart=2.19 (dart-lang/co19#2104)
2023-06-29 sgrekhov22@gmail.com dart-lang/co19#2094. Remove TODO, update assertions in Language/Mixin tests (dart-lang/co19#2103)
2023-06-28 sgrekhov22@gmail.com Fixes dart-lang/co19#2073. Add combined member signature tests (dart-lang/co19#2101)

Change-Id: If6dd674f5e3cba8be232cb1e06da434b7277acbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312620
Reviewed-by: Alexander Thomas <athom@google.com>
2023-07-07 08:30:31 +00:00