Commit Graph

222 Commits

Author SHA1 Message Date
Ryan Macnak ecfce50b5d [infra] Remove IA32 from dartfuzz, GCC and MSVC testing.
Bug: https://github.com/dart-lang/sdk/issues/49969
Cq-Include-Trybots: luci.dart.try:vm-gcc-linux-try,vm-msvc-windows-try
Change-Id: Idf24c48fee5fc5bb757b49bd8941573822496090
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429223
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-05-19 10:28:00 -07:00
Ryan Macnak e45f0dff73 [dartfuzz] Fix flag fuzzer to account for removed serial scavenge and marking.
TEST=dartfuzz
Bug: https://github.com/dart-lang/sdk/issues/60681
Change-Id: I469123c6bacb1c1c084286951022ffe8bfbeddc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426981
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-05-06 11:24:10 -07:00
Robert Nystrom 11b81715ad Reformat runtime/ using the 3.8 formatter style.
Change-Id: I7b5e5dd768c87f28848ee02050582d23f3604cb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426286
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2025-05-03 12:54:15 -07:00
Kevin Moore 67a24ea983 [pkg] drop lints already covered by the included lint file
Change-Id: I84fdee27e3e28576187896502e5ffed487ee232f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425408
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
2025-04-30 11:58:24 -07:00
Konstantin Shcheglov 6e88d87c02 Elements. Migrate runtime/tools/dartfuzz/
Change-Id: I9ec2bbcbe47573a0f4bac1f56019708048fcfc8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422900
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-16 17:28:11 -07:00
Ryan Macnak 4617198d58 [vm] Add option for GC at [re]throw.
Add a reduced test for crash / false ConcurrentModificationError observed by the isolate stress test.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/60017
Change-Id: I665a7ec48c150d270e751ab13393384613d44674
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408201
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-02-05 14:24:32 -08:00
Tess Strickland 45d5b483da [dartfuzz] Handle more types in minimized literal generation.
Previously, the minimizer only handled a small, handpicked set of types
when replacing expressions with minimized literals of the expression's
type. This CL adds minimal literal generation for any type that has a
known constructor and generalizes handling of lists, sets, and maps.

TEST=dartfuzz

Change-Id: Ifeaacfd4dec1ba8f66f4fee9cf8c7fb74193b0d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403861
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-01-14 03:20:44 -08:00
Ben Konyi 5fd70fe681 [ dartfuzz ] Update dartfuzz to use dartaotruntime instead of dart_precompiled_runtime
Related to 8b2b6b2440

Fixes https://github.com/dart-lang/sdk/issues/57066

TEST=N/A

Change-Id: If0505b38ad7d29444721fc58de9293e242a1beab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394520
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-11-11 16:20:16 +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
Tess Strickland d06d627c79 [vm] Remove --[no-]lazy-dispatchers flag.
No client of the VM uses this flag, only tests, and this flag was always
set to false in AOT mode. Thus, remove uses of this flag and instead
always lazily create dispatchers as needed when resolving method names
in JIT mode.

Remove the implicit value of `allow_add` for some Resolver
static methods. For callers that previously depended on the implicit
`true` value (which includes the AOT precompilier), pass `true` for
uses in the compiler and pass `!FLAG_precompiled_mode` for uses in the
runtime. Assert that `allow_add` is false when these methods are invoked
from the precompiled runtime.

Remove Resolver static methods that are no longer used.

TEST=ci

Change-Id: Ib6a7354f7a859e86743c381513a4129c14895753
Cq-Include-Trybots: luci.dart.try:vm-linux-debug-x64-try,vm-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-mac-debug-arm64-try,vm-mac-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366668
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2024-06-06 10:56:12 +00:00
Ryan Macnak 40655e56f0 [dartfuzz] Set dart:io's exitCode, not the shadowing local.
Change-Id: Ib13d004a4290279204b61f0b9aef754ff90c219d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365485
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-05-06 21:22:28 +00:00
Ryan Macnak 3bba14e56e [dartfuzz] Avoid LUCI's I/O timeout.
Print the number of pending task every 5 minutes to avoid getting killed by the 20 minute I/O timeout. We'll still get killed if we exceed the 50 minute step timeout.

Change-Id: I0bc12c5b78176303432d35fc6107b669ed7c6a82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365282
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-05-02 19:36:09 +00:00
Ryan Macnak be210a8e76 [dartfuzz] Also stress test using dart2js with various GC and compiler flags.
TEST=dartf
Change-Id: I03fde5903159eeabe6df12513ca491844b0e8fec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364962
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-04-30 21:43:38 +00:00
William Hesse 662f12a03c Remove use of deprecated analyzer field in dart fuzzer
The PropertyAccessorElement variable field was deprecated in
https://dart-review.googlesource.com/c/sdk/+/355300

Change-Id: I9ea406eceb9efd38722ea0b36848276ce0dc6952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360721
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2024-04-09 10:19:16 +00:00
Jacob Richman 933537b66b Trivial cleanup to make VSCode workspace for the SDK
free of diagnostics as long as you filter with "!TODO"

R=athom@google.com, jensj@google.com, natebiggs@google.com

Change-Id: I73cf3c5ef6dab81808330c4eb5f44cb62e753c81
Tested: manually verified that VSCode is warning free. No changes in functionality.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333903
Auto-Submit: Jacob Richman <jacobr@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Jacob Richman <jacobr@google.com>
2023-11-07 17:49:53 +00:00
Daco Harkes 7fdd03271f [tool] Dartfuzz use string matcher to output a diff
Before this CL the fuzzer would give a truncated output of stdout of
both invocations on a divergence.
This was not helpful for cases where the divergence is after the
truncation.

Instead, use package:matcher to report the diff between the strings.

Bug: https://github.com/dart-lang/sdk/issues/53972
Change-Id: I1eb1a5a35b5a5082fdacbca881498a61eb9cca1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334440
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-11-07 09:03:56 +00:00
Konstantin Shcheglov d07ab72fb9 Stop using deprecated 'element2' that will be removed.
See https://dart-review.googlesource.com/c/sdk/+/311461

Change-Id: I7c2b7ff227fef838f10657bdd9f18da98f48f5ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332061
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-25 14:21:42 +00:00
Ryan Macnak 10cb23bc9e [dartfuzz] Include some pragmas in generated programs.
Change-Id: I77d7650ba3e1ace0b8ddaa7333df84be91564b29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328182
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-09-27 20:07:50 +00:00
Sam Rawlins c0dd7a0092 Remove duplicate keys in dartfuzz_api_table
Duplications introduced in
https://github.com/dart-lang/sdk/commit/cfa03ed97198307f265dfd8071190164eeb4bc81

Change-Id: I9720822611aacefb9b1538d9fc59e234f96475bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321842
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-08-21 17:43:28 +00:00
Paul Berry fdc4e301e3 [dartfuzz] Fix trybot breakage
`DartType.VOID` and `DartType.VOID_NULLABLE` are the same constant,
therefore only one of them should be listed in
`DartLib.typeToLibraryMethods`, to avoid an `equal_keys_in_map`
warning.

Change-Id: I65beef01f8a810af96be5e458eeecef7a7acff01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
2023-08-21 15:18:24 +00:00
Ryan Macnak cfa03ed971 [dartfuzz] Don't try to instantiate Record.
Regenerate API and type tables.

Change-Id: I3fe630764edf774059c24cff645041452768a5db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321745
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-08-18 23:56:49 +00:00
Natsu 7c6f6d6232 Update dartfuzz code to remove generation of old super-mixins
Closes https://github.com/dart-lang/sdk/pull/51682

GitOrigin-RevId: 1bd06789a88d381d817c45b8cc74de34f8753a8b
Change-Id: I32c409e1b277fad98db6b4450adc22fa60973c04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287780
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-03-23 22:44:33 +00:00
Sam Rawlins c761de6e3e [analyzer] Move 3 more HintCodes to be WarningCodes, UNNECESSARY_N*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I04e8428a45428c02a05e8370a6cb1e9c4cf8030c
TEST=trybots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289029
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-16 18:52:18 +00:00
Jake Macdonald 0ac2d98e29 prep dart_fuzz for Dart 3.0
see https://github.com/dart-lang/language/blob/master/accepted/future-releases/0546-patterns/feature-specification.md#breaking-existing-switches

Change-Id: I008c280e0b2c453d704dfad7db4c18d39af745f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285720
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-02-27 18:19:28 +00:00
Josh Soref f7a2ea5e06 Spelling
Closes https://github.com/dart-lang/sdk/pull/50922

GitOrigin-RevId: 58fd7cfd5ef470a65a52ea28e0407244d853c917
Change-Id: I2e5a5ed991cb05270170a18b8f0169daa9eabdb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278537
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-24 18:00:25 +00:00
Sam Rawlins 59561320dc [dartfuzz] Remove duplicate map keys
In dartfuzz_api_table.dart, both `DartType.VOID` and `DartType.VOID_NULLABLE` are added to the Map keys. At runtime, the last value for a given key wins, so I removed the `DartType.VOID` key-value pair.

In gen_api_table.dart, both `assertionErrorEncoding` and `errorEncoding` are added to the Map keys. At runtime, the last value for a given key wins, so I removed the `assertionErrorEncoding` key-value pair.

This CL should be a no-op.

Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ifcfeb3e84930267f60efd2eb009a722f8ac2453e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279234
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-01-18 15:57:00 +00:00
Lasse R.H. Nielsen 81b137d8fe [3.0 alpha] Remove deprecated BidirectionalIterator.
Requires releasing `package:quiver` 3.2.0 so Flutter can upgrade to that.


Change-Id: Ibd9acc5fa11a67ca50d06172dfe0f9175b240522
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276741
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-01-02 16:14:08 +00:00
Alexander Markov 51d672e77d [dartfuzz] Regenerate API and types tables
DartFuzz tables were regenerated to pick up the latest core library
additions and removals.

Change-Id: I549715aa5dd36bed7c04ee78e5908c923f1538be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276767
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-12-20 23:09:58 +00:00
Nicholas Shahan 352ba74453 [3.0 alpha][core] Delete NullThrownError
TESTED=Ran CQ dryrun and approved failures for co19 tests that will be updated soon.

Change-Id: Ic0dc5fc084b1d0f3fce80dd88062f879abd7b556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275840
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2022-12-16 17:46:48 +00:00
Alexander Markov 7ebd4dd61c [3.0 alpha] Remove deprecated public class CyclicInitializationError
This deprecated class cannot be removed just yet because
we still need to throw something in case of cyclic initialization
in Dart legacy libraries (which are still supported).

Class CyclicInitializationError is copied for each implementation
(VM, dart2js and DDC) and made private. Each implementation now has
an independent private class which can be removed separately.

TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/49529
Change-Id: I8100bbe16636c12c4cbabbb5fe770f4c648c4249
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275120
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-12-15 11:20:58 +00:00
Lasse R.H. Nielsen 767049139a [3.0 alpha] Remove deprecated dart:core apis
- Remove `proxy` and `Provisional` annotations.
  - Remove `Deprecated.expires` getter.

Change-Id: I4521b48bb92e5f8420c778686f4efa9c6426cebb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258004
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-12-12 11:46:58 +00:00
Konstantin Shcheglov 5a9e007a5a Use DartType.element2 instead of 'element'.
We want to replace it in https://dart-review.googlesource.com/c/sdk/+/243164

Change-Id: If28020581b3e511ceb2bee59cf30d38be7f1308e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255584
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-18 15:56:14 +00:00
Michael Thomsen c34b72482e Remove deprecated APIs from dart:convert
Contributes to bug: https://github.com/dart-lang/sdk/issues/34233

Change-Id: I443fa14342680b61bf7357d40347427200fea29b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247741
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-08-09 10:21:22 +00:00
Ryan Macnak 2d00818aef [dartfuzz] Don't try to use FFI on simriscv.
TEST=dartfuzz
Bug: https://github.com/dart-lang/sdk/issues/49472
Change-Id: Ib3dc89b969197a8d27c330dfbcd4029dbf9dd22e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251848
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-07-25 16:48:13 +00:00
Konstantin Shcheglov 4f787e4a09 Stop using DartType.displayName, regenerate.
Preparation for https://dart-review.googlesource.com/c/sdk/+/251783

Is this tool still used? I noticed that even when I re-generated
with a clean workspace, it still had a lot of changes.

Change-Id: I901ada1e6ad1d989b15882d9cf8ef83762fa8828
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251784
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-07-19 23:50:24 +00:00
Ryan Macnak 89e43f0406 [dartfuzz] Regenerate type and API tables.
This picks up changes to the core libraries since the last time the tables were regenerated.

TEST=dartfuzz
Change-Id: I01a844a53835a9b6ab964f09e28733fc6ee995e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251846
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-07-18 21:22:56 +00:00
Ahmed Ashour 85700570f6 Fix typos
Fixes #49241

TEST=ci

Change-Id: I6117bf816fc8c4613cce66927f952fef75632725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248120
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-15 11:08:28 +00:00
Devon Carew 8cc43aebcb Move runtime/tools/dartfuzz to package:lints.
Change-Id: I55cb7c3a832879202d9be225dcfdce3a12e25487
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241149
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-04-18 22:17:50 +00:00
Konstantin Shcheglov 7039c5dc0c Replace using deprecated CompilationUnit.types with classes.
Change-Id: Ieb95799a0e0afa8d1d2da01e6050d675a2cb92e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235402
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-04 19:18:45 +00:00
Ryan Macnak 04ba20aa98 [vm] Support RISC-V.
Implements a backend targeting RV32GC and RV64GC, based on Linux standardizing around GC. The assembler is written to make it easy to disable usage of C, but because the sizes of some instruction sequences are compile-time constants, an additional build configuration would need to be defined to make use of it.

The assembler and disassembler cover every RV32/64GC instruction. The simulator covers all instructions except accessing CSRs and the floating point state accessible through such, include accrued exceptions and dynamic rounding mode.

Quirks:
  - RISC-V is a compare-and-branch architecture, but some existing "architecture-independent" parts of the Dart compiler assume a condition code architecture. To avoid rewriting these parts, we use a peephole in the assembler to map to compare-and-branch. See Assembler::BranchIf. Luckily nothing depended on taking multiple branches on the same condition code set.
  - There are no hardware overflow checks, so we must use Hacker's Delight style software checks. Often these are very cheap: if the sign of one operand is known, a single branch is needed.
  - The ranges of RISC-V branches and jumps are such that we use 3 levels of generation for forward branches, instead of the 2 levels of near and far branches used on ARM[64]. Nearly all code is handled by the first two levels with 20-bits of range, with enormous regex matchers triggering the third level that uses aupic+jalr to get 32-bits of range.
  - For PC-relative calls in AOT, we always generate auipc+jalr pairs with 32-bits of range, so we never generate trampolines.
  - Only a subset of registers are available in some compressed instructions, so we assign the most popular uses to these registers. In particular, THR, TMP[2], CODE and PP. This has the effect of assigning CODE and PP to volatile registers in the C calling convention, whereas they are assigned preserved registers on the other architectures. As on ARM64, PP is untagged; this is so short indices can be accessed with a compressed instruction.
  - There are no push or pop instructions, so combining pushes and pops is preferred so we can update SP once.
  - The C calling convention has a strongly aligned stack, but unlike on ARM64 we don't need to use an alternate stack pointer. The author ensured language was added to the RISC-V psABI making the OS responsible for realigning the stack pointer for signal handlers, allowing Dart to leave the stack pointer misaligned from the C calling convention's point of view until a foreign call.
  - We don't bother with the link register tracking done on ARM[64]. Instead we make use of an alternate link register to avoid inline spilling in the write barrier.

Unimplemented:
 - non-trivial FFI cases
 - Compressed pointers - No intention to implement.
 - Unboxed SIMD - We might make use of the V extension registers when the V extension is ratified.
 - BigInt intrinsics

TEST=existing tests for IL level, new tests for assembler/disassembler/simulator
Bug: https://github.com/dart-lang/sdk/issues/38587
Bug: https://github.com/dart-lang/sdk/issues/48164
Change-Id: I991d1df4be5bf55efec5371b767b332d37dfa3e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217289
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-20 00:57:57 +00:00
Alexander Markov bd555f2760 Cleanup remaining uses of --no-use-vfp option
This is the follow-up to https://dart-review.googlesource.com/c/sdk/+/223740
where --[no-]use-vfp option was removed.

TEST=ci

Change-Id: Id013d3395374b69cbc7f759bf2a39508aec77be0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225600
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-12-23 16:41:45 +00:00
Konstantin Shcheglov 3f6815a9e6 Stop using getResolvedLibrary2 in dartfuzz.
Change-Id: I1023be7cc595398748a4862f3dc181b32466275a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218584
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-30 01:22:31 +00:00
Robert Nystrom 3ac34f791d Change references to "dartfmt" in runtime and tools to "dart format".
In Dart 2.15, we're removing "dartfmt" in favor of "dart format", so I'm
going through and fixing all the dangling references to the old name.

TEST=Only changing tools

Change-Id: I83a5c00be925fdb536014a47dff2b488ed9f478b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215186
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-10-01 18:16:27 +00:00
Alexander Markov 72ff129797 [vm/dartfuzz] Handle StackOverflowError similarly to OutOfMemoryError
Fixes https://github.com/dart-lang/sdk/issues/47295

Change-Id: I5bd46069aa3d8cb49c9df0a53f1da136019661af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214740
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-27 21:34:53 +00:00
Alexander Aprelev d46f474d79 [dartfuzz] Fix time units in 'Isolate busy' message
Change-Id: I3d14763a2607ef47a51883a2acaf7545e63358ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213964
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-09-20 22:04:15 +00:00
Ryan Macnak 5ac413a05f [dartfuzz] Avoid more compile-time errors.
Avoid `throw null`.
Avoid `map[key] += value`.

Split printing globals into separate statements to make reducing failures easier.

TEST=dartfuzz
Change-Id: I8e2172827439a16c42546df23c7669decff53fa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208481
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-08-31 23:11:26 +00:00