Commit Graph

88085 Commits

Author SHA1 Message Date
Kallen Tu ab217c355f [analyzer/cfe] Add an experiment flag for sealed class.
Have a separate flag from patterns, even though sealed families are to be shipped with patterns -- keep the work separate for now.

Change-Id: Ic3996b81d9a61f2a3b1e5137e7cc32ecc8bdec9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267289
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-11-05 00:20:50 +00:00
Mateus Felipe C. C. Pinto 82143e6c95 [analyzer][meta] Refactor TargetKind to be a class, add a value in TargetKind to represent type parameter
Bug: https://github.com/dart-lang/sdk/issues/49796
Change-Id: Ide144ceb57bae94a71b9d1a7ec841d03363fc121
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258200
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-04 23:38:40 +00:00
Srujan Gaddam 186e4c5c25 [dart2js] Do static interop erasure for both dill and src
This is a reland of https://dart-review.googlesource.com/c/sdk/+/266803.
Performance regressions came from visiting core libraries. To avoid
this, this CL skips all core libraries that aren't in an allowlist.

Change-Id: I68bbf8b8df6863dfc9deeca487a66ff60947b841
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267769
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-04 23:11:41 +00:00
Brian Wilkerson ca7ab1e89d Add documentation on tokens
This was written in response to a question from a contributor.

Change-Id: If689b1a22ac00a6a5a14cc09f47054a88baa4347
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268101
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-04 22:20:49 +00:00
Stephen Adams 238c74cbb8 [dart2js] Migrate ssa/nodes.dart
Migrate the cycle containing the four files nodes.dart, invoke_dynamic_specializers.dart, logging.dart, and validate.dart

Change-Id: I64aa8308e54f980e79e3405d9b751225306e39df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267900
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-11-04 21:56:47 +00:00
Ryan Macnak 48b2d7e0e9 [vm, compiler] Remove surprising truncation from x64's LoadImmediate.
All other architectures have a LoadImmediate that works with any uword, but x64's truncated to 32-bit, causing surprising x64-only failures when LoadImmediate is used from architecture-independent parts of the compiler.

TEST=ci
Change-Id: Ia2b2cfd1df7396833e4508ed21b4995fc9af464b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268040
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-11-04 21:42:27 +00:00
Anna Gringauze cc80ccfaa0 Fix stack overflow in mixin application from separate library
Make sure that calls to super class methods from mixin application
stubs are always generated using `super` and not `this`.

Replacing `super` by `this` should not be used as non-virtual field access optimization in forwarding stubs that intend to redirect to the super class members (using `this` redirects to itself and causes infinite recursion).

Closes: https://github.com/dart-lang/sdk/issues/50119
Change-Id: Ib9c9aebdc88555518998db64aefa1fd0905c5b11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267822
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2022-11-04 21:25:08 +00:00
Joshua Litt d4db1e8f8e [dart2wasm] Disable disallowed external check.
Bug: 50381
Change-Id: I2344a4d5c5b91acc44efb5d0c1ee10386eedd12c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268061
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-11-04 21:17:55 +00:00
Konstantin Shcheglov 303d907237 Add Pattern type variable to TypeAnalyzer.
Change-Id: I3d88b0337689efecffac228c9acf03a5a52229d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267461
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-04 19:23:37 +00:00
Devon Carew 28a77ec566 [deps] rev package:markdown
Change-Id: Id875bf757e5a378cf22d67211d28e9dccfc4a9ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268041
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-11-04 19:14:52 +00:00
DEPS Autoroller cc02e6fecd Roll Clang from f85c1f3b7c0b to bca75abc01f3
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/clang-dart-sdk
Please CC dart-vm-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Clang: https://bugs.fuchsia.dev/p/fuchsia/issues/list?q=component%3AToolchain
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try;luci.dart.try:dart-sdk-mac-try;luci.dart.try:dart-sdk-mac-arm64-try;luci.dart.try:dart-sdk-win-try
Change-Id: I773b966e9779752b3fb2b2561477cbedcc38a0f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267780
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-11-04 17:17:32 +00:00
Nate Biggs 9766e53168 [dart2js] Migrate dump_info.dart to null safety.
Change-Id: I0b6232bb29866777b7048e30bed62abab10016d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267824
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-04 16:39:53 +00:00
Keerti Parthasarathy 81ebaee9a2 Fix for unecessary string escape in a string interpolation
BUG: https://github.com/dart-lang/sdk/issues/50150

Change-Id: Ia3ab2e4cca951cb8006f6b59d5e3bea2c38ef4e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267460
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-04 16:17:30 +00:00
Joshua Litt 84c695a38d Reland "[test] Fix some tests for Dart2Wasm."
This CL cleans up the logic in two tests to better prepare for Dart2Wasm. In addition, env_test has been cleaned up now that the multitest no longer makes sense.

Change-Id: I0a7eabff1e2bfb6ea7aa1078ee85a58db9886e21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267286
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-11-04 16:10:39 +00:00
Sigmund Cherem fbcccdefc9 [dart2js] migrate main_call_stub_generator
Change-Id: I7f8933d9a1de71418f03cf48b4afebfbadc0d0bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267767
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-11-04 15:27:13 +00:00
Sigmund Cherem 53c712e47b [dart2js] migrate interceptor_stub
Change-Id: Id1e75a59b758c979ab8384d0a250ea2aa1df4380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267766
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-11-04 15:27:13 +00:00
Sigmund Cherem 1f8bad1a75 [dart2js] Migrate instantiation_stub
Change-Id: Ib9cce2bb5f2e2787daac390309418d59ac27fd54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267764
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-11-04 15:27:13 +00:00
Sigmund Cherem 3318b5d892 [dart2js] Migrate class_stub_generator
Change-Id: I1461174b57713431b4f8c87aea04d9fc7a83cfa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267763
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-11-04 15:27:13 +00:00
Nate Biggs 1aecd5bcce [dart2js] Migrate serialization/strategies.dart to null safety.
Change-Id: Iad23474f69b78231a6c77da5f5b8b379618f77be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267820
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-11-04 15:11:27 +00:00
Nate Biggs 3ed70b013b [dart2js] Remove JClosedWorld interface and use only implementer, JsClosedWorld, everywhere.
Change-Id: I9641033aa3a93a28ee428ddc63aa7fc337e5468a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267802
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-04 15:11:27 +00:00
Ömer Sinan Ağacan 6cc1c3c23c [dart2wasm] Tweak exception behavior of List.addAll
New passing test: corelib/regress_42011_test

Change-Id: I944858bbeeb828aa01231de2a21e73182cf89989
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267823
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-11-04 13:24:57 +00:00
Aske Simon Christensen ee1487deda [dart2wasm] Change hashCode for int and double to match (32-bit) VM
Fixes https://github.com/dart-lang/sdk/issues/50260

Change-Id: Idaada91924ce069a48204b537935982d8f44719f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266460
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2022-11-04 12:51:34 +00:00
Chloe Stefantsova f01126211f [cfe] Implement the desugaring for NullCheckPattern
Additionally, fix the revealed variable declaration issues of
VariablePattern and change more remnant mentions of Matchers and
Binders.

Part of https://github.com/dart-lang/sdk/issues/49749

Change-Id: I8f31bb1038f29768c82e0cfa4b55bfee3e0e16c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267581
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-11-04 12:40:26 +00:00
Sergey G. Grekhov 340896c41e [co19] Roll co19_2 to cdab7e4e26f3dd534bcb297ff3f9e9aa5c7a04fb
2022-10-27 sgrekhov22@gmail.com dart-lang/co19#1509. Platform.executableArguments added to the tests that run Process (dart-lang/co19#1523)

Change-Id: Ie74ec49e11f25904d78d6200a49c1057a41171d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266041
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-11-04 11:33:28 +00:00
Chloe Stefantsova 51ad58d2fe [cfe] Allow inferred and aliased record types in opted-out libraries
Part of https://github.com/dart-lang/sdk/issues/50317

Change-Id: Icaed6443759a337769c4abaddd09b167f622db07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267363
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-11-04 11:16:25 +00:00
Jens Johansen dda5ed11f9 [CFE] Fix potential null pointer crash in the incremental compiler
Crash seen in https://github.com/flutter/flutter/issues/114672

Change-Id: I647cbc97aefee7702ca5c14f4b8999cfc444db49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267920
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-11-04 11:03:14 +00:00
Chloe Stefantsova 523257ab8a [cfe] Add license headers to the patterns testcaes
Part of https://github.com/dart-lang/sdk/issues/49749

Change-Id: I61cd83124083f2e017101be3ea020e04583023e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267600
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-11-04 09:20:19 +00:00
Joshua Litt d43dd08a26 [dart2wasm] Add regression test for js interop method rename.
Change-Id: I90867d6a3d14e0fb8c2fdbe94ae1390af0544ffd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267880
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-11-04 02:06:49 +00:00
Konstantin Shcheglov 24ffc8838d Issue 50373. Catch InconsistentAnalysisException.
Bug: https://github.com/dart-lang/sdk/issues/50373
Change-Id: I60947122e63e683cb425df91be2e7039f443e957
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-04 00:41:38 +00:00
Srujan Gaddam b597b7571a Revert "[dart2js] Run static interop erasure regardless if from dill or src"
This reverts commit 5d7029e288.

Reason for revert: Increases memory usage in dart2js benchmarks

Original change's description:
> [dart2js] Run static interop erasure regardless if from dill or src
>
> Removes modular transformation as well.
>
> Change-Id: Ib3aafcaf35b72fdb6a93db682dcf8df84842578f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266803
> Reviewed-by: Joshua Litt <joshualitt@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I8c40f16983a3f7e2383dcf3b47c2134c9ecd6746
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267762
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-11-03 23:12:50 +00:00
Joshua Litt 1686e88a31 [dart2wasm] Add regression test for non-external factory constructor.
Change-Id: I1e29f28b98ad360e7cd65703d27fa47e49e339e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267768
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-11-03 22:47:23 +00:00
Vyacheslav Egorov 8de4432f68 [vm] Do not leak string values of flags
Previously repetetively parsing some string valued
flags would cause their values to leak.

This change makes sure that we delete the previous
value when we assign a new one.

vm/cc/ParseFlags is extended to catch this when running
under ASAN.

TEST=tools/test.py -n dartk-asan-linux-release-x64 vm/cc/ParseFlags

Change-Id: I7478cdb48063dcae35d4129a4c9a2829dddae729
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267821
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-11-03 22:41:53 +00:00
Kallen Tu d65a0c2de5 [tests] Language tests for sealed classes.
Basic language tests that test usage in and out of library for sealed classes.

More tests will come later.

Change-Id: I298484d214a5fe7602d14ab1d7915c733ef00c34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265660
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-11-03 22:27:39 +00:00
Joshua Litt 0484b0a183 [dart2wasm] Fix override of JSValue.toString.
Change-Id: Idef9be002c00f15bde0a7b8e7dce9e83bfbe4fcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267765
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-11-03 21:37:26 +00:00
Nate Biggs 902e5d030e [dart2js] Remove isConstructor from entity model in favor of type test.
Change-Id: Id082b573478e3d916bb450b12a9d57f3a852f158
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267800
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-11-03 20:48:12 +00:00
Nate Biggs 863ae7b60e [dart2js] Remove isField from entity model in favor of type test.
Change-Id: I94d854ea34f610f0212bc7b1abeedfa90c67968d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267741
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-03 20:48:12 +00:00
pq eff76309dc validate pubspec screenshot paths
See: https://github.com/dart-lang/sdk/issues/50179

Change-Id: I589809f17d45adfc6f1e3850d2109e58ec47af13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-11-03 20:44:48 +00:00
Devon Carew 93ffc1f590 [deps] rev browser_launcher, dartdoc, http, mime, string_scanner, test, test_process, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

browser_launcher (https://github.com/dart-lang/browser_launcher/compare/981ca88..5fa0bd6):
  5fa0bd6  2022-11-01  Kevin Moore  Update lints, require Dart 2.17, add dependabot (#34)

dartdoc (https://github.com/dart-lang/dartdoc/compare/3273437..179ada0):
  179ada02  2022-11-02  Sam Rawlins  Change _HashableChildLibraryElementVisitor to be a RecursiveElementVisitor (#3242)
  a6e7d908  2022-11-02  Sam Rawlins  Make Inheritable.isOverride late final non-nullable (#3235)
  c4f52cf9  2022-11-02  Sam Rawlins  Test records support in typedefs (#3239)
  f74e129f  2022-11-02  Sam Rawlins  Make Accessor.documentationComment late final non-nullable (#3240)
  ad50bfbc  2022-10-31  dependabot[bot]  Bump github/codeql-action from 2.1.28 to 2.1.29 (#3238)

http (https://github.com/dart-lang/http/compare/738a55b..6339026):
  6339026  2022-11-02  Brian Quinlan  Make timeout and cache controllable per-request. (#815)
  51dbca2  2022-10-31  Brian Quinlan  Add a streaming request example. (#813)

mime (https://github.com/dart-lang/mime/compare/bf041aa..d80f4d0):
  d80f4d0  2022-11-02  Liu YuanYuan  Add .avif to extension map (#70)
  3a6b14e  2022-11-01  dependabot[bot]  Bump actions/checkout from 3.0.2 to 3.1.0 (#72)

string_scanner (https://github.com/dart-lang/string_scanner/compare/10435a4..4a5cbc5):
  4a5cbc5  2022-10-31  Kevin Moore  Make code in readme consistent with example (#49)

test (https://github.com/dart-lang/test/compare/b82fc0b..173a36f):
  173a36f2  2022-11-01  Jacob MacDonald  prep packages to publish (#1780)
  fd8e2b68  2022-10-31  Devon Carew  fix an issue with the github reporter (#1779)

test_process (https://github.com/dart-lang/test_process/compare/068f9f8..1774aa7):
  1774aa7  2022-11-01  dependabot[bot]  Bump actions/checkout from 3.0.2 to 3.1.0 (#36)

webdev (https://github.com/dart-lang/webdev/compare/c350055..069b870):
  069b870  2022-11-01  Elliott Brooks (she/her)  Prepare webdev for release to v.2.7.12 (#1775)
  cb06447  2022-11-01  Elliott Brooks (she/her)  Prep DWDS for release (#1774)
  daa154d  2022-11-01  Elliott Brooks (she/her)  Reset MV3 extension to nice starting point (#1773)
  98a6142  2022-11-01  Jakub Vrána  Remove // ignore: unsafe_html. (#1759)
  939e285  2022-10-31  Elliott Brooks (she/her)  Update documentation for Webdev release process (#1771)
  0428ffb  2022-10-31  Elliott Brooks (she/her)  Update package:file to latest version (#1770)

Change-Id: I5020d718f6c009bca4f9b5e69232dc425b9d3409
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267761
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2022-11-03 19:51:41 +00:00
Paul Berry 402a05de1b Add record type parsing to mini_types.dart.
We now no longer need the `expr2` function to test expressions whose
type is RecordType.

Also added unit tests of the type parser in mini_types.dart (which was
previously tested only by virtue of its use in other tests).

Change-Id: I5d351f3ff924676b4d84e65c8949f42feca0dab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267522
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-11-03 19:41:47 +00:00
Derek Xu 024a4603d1 [VM/Service] Move handling of closures in service to Closure::PrintJSONImpl()
TEST=CI

Change-Id: Iebb568837f5ed00c97eaadf0490a62cfbfb554bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267040
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-11-03 18:08:12 +00:00
Derek Xu d6415b2fe0 [VM/Service] Print Service IDs by default in PrintSharedInstanceJSON()
This CL adds the parameter `bool include_id` to
`PrintSharedInstanceJSON()` and makes it default to true. This CL also
removes `AddServiceId()` calls that are now unnecessary due to this
change.

TEST=CI

Change-Id: Ica53757a7fc23c70946be71f88408963e5aeae04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265041
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-11-03 18:08:12 +00:00
Tess Strickland 9ad1e36b17 [vm] Visit slots in objects with unboxed fields in Pass1Visitor.
In the heap snapshot writer, Pass1Visitor assigns object ids both to
heap objects and to Smis, and Pass2Visitor uses that information when
writing the heap snapshot. However, their logic for visiting slots in an
object with unboxed fields varies slightly. Pass1Visitor does not visit
each individual slot, but Pass2Visitor does. This means that SmiPtrs
that are only reachable via an object with unboxed fields are not added
to the writer in Pass1Visitor, and thus have an object id of 0 during
Pass2Visitor. This CL fixes this difference in visiting behavior.

TEST=vm/dart_2/heap_snapshot_regress_49711_test
     vm/dart_2/heap_snapshot_test

Fixes: https://github.com/dart-lang/sdk/issues/50341
Change-Id: Id238771af18ee098f39e6d1cc80e021dc8e117fe
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267580
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-11-03 17:50:58 +00:00
Paul Berry 941056459a Change NamedType to not extend Type
The NamedType class in mini_types.dart doesn't really represent a type
in the same way that the other subclasses of Type do; it's simply a
pairing of a name and a type.

Change-Id: I20709e66a44da4afbf187984c2032b315c1cc21e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267287
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-11-03 17:35:39 +00:00
Alexander Markov bbf93acbe7 [tests] Cleanup test with absent deferred library
Deferred libraries with sources not available at compile-time
are not supported since Dart 2.
This change cleans up test for such a case.

Change-Id: I7e4abb551a4d9997535b06030e3628aab6655355
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267100
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-11-03 17:06:42 +00:00
Johnni Winther 2794cb9e17 [cfe] Check redirecting factory patches
In response to https://github.com/dart-lang/sdk/issues/49898

Change-Id: Ib87fb7558f85e9d8b956f1946e1e5de062deca4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267500
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-11-03 16:26:44 +00:00
Jonas Termansen 257441230a Launch new cherry-pick workflow.
Update the issue template to require the beta/stable changelist.

Fixes: b/256803045
Change-Id: Ifd605c155d93eea76b673cc5cfcc58a31b670116
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267420
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2022-11-03 16:19:06 +00:00
Nate Biggs beacf3d7bf [dart2js] Migrate inferrer/type_graph_inferrer to null safety.
Change-Id: Ib6f82a9b7fd58d7185f4d3b9997f2c0eacfa33cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267248
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-11-03 16:18:40 +00:00
Nate Biggs 217c18f296 [dart2js] Clean up inferrer/engine migration files.
Change-Id: I22a2b14eee779900881b54c40723e5cc59113d90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267247
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-03 16:18:40 +00:00
Nate Biggs 08c981a387 [dart2js] Migrate inferrer/engine.dart to null safety.
Change-Id: I3eff0355904d5c221946c2ee3549128f771aa731
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267246
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-03 16:18:40 +00:00
Alexander Markov 3afb674e52 [vm] Cleanup kernel format versioning from the VM
TEST=ci

Change-Id: I9116d0e60aa073733fee3ce523fb5cbc2fb692f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267440
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-11-03 15:44:25 +00:00