Commit graph

87870 commits

Author SHA1 Message Date
Joshua Litt 1a7df42224 [dart2wasm] Trivial fix for safeToString.
Change-Id: I286b821dbe2a2a406263bfeed4036070c0af0d00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265580
Reviewed-by: Ömer Ağacan <omersa@google.com>
Auto-Submit: Joshua Litt <joshualitt@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-10-26 08:03:20 +00:00
Ömer Sinan Ağacan b048fa3cfb [dart2wasm] Simplify a null check
Change-Id: I556cbbdc6aaa806e769af6fc2c7b45f5fa05d88d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265323
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-10-26 07:39:25 +00:00
Joshua Litt 97bcffb7c7 [dart2wasm] Fix string fromCharCodes for some unicode surrogate pairs.
Change-Id: Id6ceb12057a1e5a419eb7fc30b6995aed8159321
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265620
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2022-10-26 07:36:50 +00:00
DEPS Autoroller 79405df629 Roll Dart Documentation Generator from 8878245e0766 to 4902beaa24bd (1 revision)
https://dart.googlesource.com/dartdoc/+log/8878245e0766..4902beaa24bd

2022-10-26 srawlins@google.com Bump to analyzer 5.2.0 (#3230)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
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

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I573435527dc26c37e535921131c8242b43bf5b23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265642
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-10-26 04:12:39 +00:00
Konstantin Shcheglov 9f35115b90 Use FooImpl in BarImpl getters/setters, property related.
I think we might get away with this now, because we don't let users
create elements manually.

Presubmit in google3 looks green.
https://fusion2.corp.google.com/presubmit/tap/483535261/OCL:483535261:BASE:483575659:1666678949553:5d26313d/targets

Change-Id: Id9618e2d8a15ab98c5919750461c508e87f76c7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265405
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-26 03:49:43 +00:00
Nicholas Shahan 5f063cb155 [ddc] Update number classes
- Add two new number classes that are used to represent the internal
  runtime type of number values.
- Update the peer interface for the native number type so that is type
  tags get applied for both int and double. This requires a few tweaks
  to satisfy the Dart type checking of the library at compile time.

Change-Id: I913963a0763c46fb161eb0d599602c874c823b43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265581
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-10-26 01:21:57 +00:00
Kevin Moore e70ebf27f9 pkg:js - Update changelog and SDK constraint
Change-Id: I3b518169293f000cc4a1665c54d155dc4b33b070
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265640
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2022-10-26 00:24:38 +00:00
Nicholas Shahan 9d53b451ed [ddc] Add types to tearoffs in dart:async patch
These functions were never tagged with types but they do get used
in type tests. Adding the types ensures they work correctly in the
new runtime type system.

Change-Id: I01a2716504072c0b2148ba13167da9814253e9bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265566
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-10-25 21:55:27 +00:00
Sam Rawlins 9896f1c647 Enable the unnamed-libraries experiment by default in 2.19.0
TEST=tests/language/library/unnamed_library_test.dart

Bug: https://github.com/dart-lang/language/issues/1073
Change-Id: I1c7fa7b4ee4450e344a7613525765e4ab590cc8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265381
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-10-25 21:10:57 +00:00
Konstantin Shcheglov f282fcfa35 Prepare to publish analyzer 5.2.0 and _fe_analyzer_shared 50.0.0
Change-Id: Iebf909af9e62322d898d6db79ee5fa6f8bfe3899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-25 21:03:37 +00:00
Brian Wilkerson 87185a7e83 Extend change builder to support imports with a prefix
Change-Id: I7735ca52e7d34e876608460141e94693f3910f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265582
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-25 20:59:45 +00:00
Sam Rawlins 13529cac21 Add a few items to analyzer's 2.19 CHANGELOG entry
Change-Id: I71dadebcffed30331027ad9c4ba250d3103dcc62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-10-25 20:04:28 +00:00
Nicholas Shahan 1e9445060a [test_runner] Use constructor to detect async main
This is needed to avoid the dependency on the current runtime
type representation. This is still not an ideal solution and should
be moved into a logic that DDC controls.

Issue: https://github.com/dart-lang/sdk/issues/46377
Change-Id: I6418bff546e63b01059841c1128b4ebeeacdcc39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265564
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-10-25 19:33:38 +00:00
Mayank Patke 278815b192 [dart2js] Add abstract value domain to distinguish uncomputed values.
Normal dart2js invocations will continue using the existing abstract
value domains with `emptyType` as the initial type for type graph nodes.

When an appropriate debug flag is passed, all abstract values will be
wrapped so that the underlying empty type is only used when a value is
known to be empty. Abstract values which have not yet been computed will
print as "[uncomputed]" in order to aid in debugging but will otherwise
behave like the empty type during type graph construction.

Change-Id: I1ec41e42e8b566a0a6bfe969c2ff96f4e53d5f4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243844
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-10-25 19:24:19 +00:00
DEPS Autoroller 053c633d0b Roll Dart Documentation Generator from 51464a30fad5 to 8878245e0766 (4 revisions)
https://dart.googlesource.com/dartdoc/+log/51464a30fad5..8878245e0766

2022-10-25 49699333+dependabot[bot]@users.noreply.github.com Bump actions/upload-artifact from 3.1.0 to 3.1.1 (#3228)
2022-10-25 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 2.0.4 to 2.0.6 (#3227)
2022-10-25 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.1.26 to 2.1.28 (#3226)
2022-10-24 srawlins@google.com Switch all references from pub.dartlang.org to pub.dev (#3229)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
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

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I9f5b0f17075866c5416bf042013f7576d3c3308a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265365
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-10-25 17:53:07 +00:00
Alexander Markov 6897b9e331 [benchmarks] Micro-benchmark for multiple returns
The new micro-benchmark measures performance of returning 2 values
via list, dedicated class, record and a record with named fields.
Requires '--enable-experiment=records' flag to run.

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I895d955efb2fc4f1c04b31b113cd8e01db47132a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265121
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-10-25 17:02:21 +00:00
Kallen Tu 5caa8da9c4 Refactor event handlers in socket_patch to avoid dynamic calls.
Change-Id: I704da875a956cbf80793c7d4f9a755e718446cb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264896
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-10-25 17:00:46 +00:00
Sigmund Cherem fa4851cd4e [dart2js] prepare additional files in inferrer folder (part 2)
This now breaks the cycle in this folder, so all libraries can be migrated in a
specific order.

Change-Id: Ib76d813804e2d0eac485bbeb84a1e0aac0027e7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264360
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-10-25 16:42:16 +00:00
Sigmund Cherem ab0da67708 [dart2js] prepare inferrer folder for migration (part 1)
Change-Id: Ifd52acd8786f4b817158f569622b1333c48fe57d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264345
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-10-25 16:42:16 +00:00
Sigmund Cherem 04239b784f [dart2js] migrate runtime_types.dart
Change-Id: Ide7ac30296612be3b4208267dc9135f3361b5cf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264344
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-10-25 16:42:16 +00:00
Danny Tuppeny 77a480ca49 [analysis_server] Handle type arguments on named type references for initial Call Hierarchy item
Change-Id: I5e30c808ddda7ff7817f7be7dd0ecff9a725854c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265501
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-25 16:31:10 +00:00
Konstantin Shcheglov b848f4df59 Make most Token fields in AST final.
Change-Id: If3eb33ed2e0d92f94e9152524231975ab6c47a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265440
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-25 16:28:17 +00:00
Ryan Macnak 419d6381bb [graphexplorer] Use an explicit stack in forest compression to prevent JS stack overflow.
Compare Observatory's object_graph.dart.

TEST=load a large snapshot, such as from dart2js
Change-Id: Ifea2ff4c06f5103d6f1f709fa79183398df90687
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265404
Reviewed-by: Derek Xu <derekx@google.com>
2022-10-25 16:15:48 +00:00
Devon Carew 2e13c36077 [deps] rev boolean_selector, dartdoc, glob, oauth2
Revisions updated by `dart tools/rev_sdk_deps.dart`.

boolean_selector (1d3565e..ea0ad27):
  ea0ad27  2022-10-25  Devon Carew  use lints 2.0.0; prep for publishing (#39)

dartdoc (51464a3..8878245):
  8878245e  2022-10-24  dependabot[bot]  Bump actions/upload-artifact from 3.1.0 to 3.1.1 (#3228)
  85cfed81  2022-10-24  dependabot[bot]  Bump ossf/scorecard-action from 2.0.4 to 2.0.6 (#3227)
  d152444e  2022-10-24  dependabot[bot]  Bump github/codeql-action from 2.1.26 to 2.1.28 (#3226)
  46f5f0d8  2022-10-24  Sam Rawlins  Switch all references from pub.dartlang.org to pub.dev (#3229)

glob (ee81279..073007c):
  073007c  2022-10-24  Kevin Moore  Merge branch 'v1_x'
  5d3d512  2022-10-24  Kevin Moore  drop author field from pubspec
  5345d2e  2022-10-24  Rob Becker  Add empty list_local_fs.dart for 1.2.1 (#64)

oauth2 (199ebf1..ee5c9b1):
  ee5c9b1  2022-10-24  dependabot[bot]  Bump actions/checkout from 3.0.2 to 3.1.0 (#135)
  4172ae5  2022-10-25  Devon Carew  use package:lints; rev pubspec version (#134)

Change-Id: I7fb7e92445645281a854cc188bdfda65679d1e7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265540
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-10-25 16:02:19 +00:00
Danny Tuppeny 27ba8fce6c [analysis_server] Include type arguments in Type Hierarchy
Fixes https://github.com/Dart-Code/Dart-Code/issues/4217.

Change-Id: I8b8dec4ad25a9eb4a4f80dd036e8a9b61bb012d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-25 16:00:41 +00:00
Danny Tuppeny 96294014e3 [dds/dap] Allow debug adapters to override the org-dartlang-sdk URI for the Dart SDK
Change-Id: I74432315d4bfa8e9890e0bd86fa0fa67d591f7fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265322
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-10-25 14:03:29 +00:00
Daco Harkes 762c507553 [vm/ffi] Outlining state transitions in AOT
For single argument FFI calls:
- reduces trampoline size significantly (up to 50%, 150-170 bytes),
- reduces the compressed size of GPay by 2.5kb on arm64,
- regresses performance on arm64 (up to 2.5%).
For more arguments, percentage-wise size gains and speed regressions
are smaller.

Only applied on arm and arm64, we care about code size for these.

Note: On Raspberry Pie (arm), the performance regression on single-
argument calls regresses up to 30%.

TEST=tests/ffi/*

Design doc: https://go/dart-ffi-outline-state-transitions
Closes: https://github.com/dart-lang/sdk/issues/50094
Change-Id: I8b8d7da45f69be6ac1432b11b695de71e56acfd1
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-kernel-nnbd-mac-debug-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262343
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-10-25 13:07:34 +00:00
Lasse R.H. Nielsen c13676f2b7 Deprecate FallThroughError.
The error has not been thrown since Dart 2.0,
where being able to reach the end of a switch case
became a compile-time error.

TEST=Removes tests depending on discontinued behavior.

Change-Id: I76292e7c73f2b3aaf071bbb290e97db493b75477
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261860
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Auto-Submit: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2022-10-25 12:25:35 +00:00
Daco Harkes f524ec74ce [vm/ffi] FfiNative process lookup
This CL makes `FfiNative`s use `DynamicLibrary.process()` lookup if
resolving with the resolver set by `Dart_SetFfiNativeResolver` fails.

Also moves the implementation over from ffi.cc to
ffi_dynamic_library.cc so the implementation can be shared with
`DynamicLibrary.process()`.

Moves the implementation behind non-simulator and non-precompiler.
However, the implementation is tested in vm/cc tests which are in
precompiler mode. So enables the implementation if TESTED is defined.

This CL massages the build files so that TESTED is properly
defined when compiling the runtime for the vm/cc tests, and links
the ole32 symbols on windows for vm/cc tests.

(And some unrelated small cleanup changes here and there.)

TEST=tests/ffi/native_assets/process_test.dart

Change-Id: I25395d381db1d9b4b7a5759171a798a1140a6140
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-debug-x64c-try,vm-kernel-win-debug-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-precomp-win-debug-x64c-try,dart-sdk-win-try,vm-kernel-win-release-x64-try,vm-kernel-win-release-ia32-try,vm-kernel-precomp-win-product-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264982
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-10-25 10:57:07 +00:00
Daco Harkes 89d769765a Revert "[tools] verify_docs don't error on library annotations"
This reverts commit 97eaded1ed.

Reason for revert: It was not erroring on the annotation on the
library, but on the implicit import statement above it due to
template:top.

https://github.com/dart-lang/sdk/issues/50291#issuecomment-1290158070

Original change's description:
> [tools] `verify_docs` don't error on library annotations
>
> Dartdoc code snippets should be able to have annotations before the
> `library` keyword.
>
> Bug: https://github.com/dart-lang/sdk/issues/49803#issuecomment-1287044157
>
> Change-Id: I7ec0b6db296274a1173d10d900f7af38a1f2b552
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265321
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Auto-Submit: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

TBR=lrn@google.com,devoncarew@google.com,dacoharkes@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I379a1871a1acd4d1c66804c3948f38e45691fd55
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/49803#issuecomment-1287044157
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265324
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-10-25 09:35:18 +00:00
Joshua Litt bd75b2c9e1 [dart2wasm] Minor fixes for double string functions.
Change-Id: Ia5165712ee8469699a7c9bf58b0fe86417b1b3d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265406
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2022-10-25 07:06:38 +00:00
Alexander Markov e70dec4e82 [vm] Allocation sinking of records
This change adds all necessary support for allocation sinking and
materialization of record instances.

TEST=vm/cc/AllocationSinking_Records

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I040ce8b1ed3220f87a767b590050de3e50573170
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265380
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-10-24 23:00:47 +00:00
Konstantin Shcheglov 0ad53cbc7b Update all AST nodes setters to require XyzImpl values.
Change-Id: Iaabe077a27a3d7c1dd4660b5d4b3bb9ccb746b0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265408
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-24 22:40:47 +00:00
Konstantin Shcheglov afb9609261 Deprecate buildSdkSummary2(), use buildSdkSummary() instead.
Change-Id: Iaceb38251047ba4d2cb3e051c096f148b810fbb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265407
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-24 22:32:48 +00:00
Konstantin Shcheglov e46bade3d0 Remove a few 'is! MixinElement'.
MixinElement does not implement ClassElement anymore.

Change-Id: I0c05f8720b202ad79f3105a4638d8d3d4ff7a404
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265403
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-24 21:33:37 +00:00
Brian Wilkerson 8d925319ca Copy the file header comment when creating a new file
Change-Id: I5d864c0d138f6d9389c56a312c111da1f9671081
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265186
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-10-24 21:14:22 +00:00
Konstantin Shcheglov b8ffc08d5b Add AnalysisDriverForPackageBuild.sdkLibraryUris
https://github.com/dart-lang/build/pull/3389

Change-Id: Ib54ba5d5411fc6213ecf1733dd056f9347f27462
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265401
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-24 21:06:27 +00:00
Konstantin Shcheglov 8c1b05cd8e Create CommentImpl directly, without AstFactory.
Change-Id: I61293105570affe50340382bae250892ccfc9180
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265400
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-10-24 20:13:57 +00:00
DEPS Autoroller 8d1dfbeac7 Roll Dart Documentation Generator from 3cd12f981c58 to 51464a30fad5 (1 revision)
https://dart.googlesource.com/dartdoc/+log/3cd12f981c58..51464a30fad5

2022-10-24 srawlins@google.com Refactor ModelElement.element to be a getter; subclasses provide the field (#3217)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
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

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I2d4a398a84d4a3d780a929801050a092ff06e620
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265360
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-10-24 19:21:57 +00:00
Daco Harkes 359dca76ad [tools] rev_sdk_deps.dart output commit message
This CL changes the output of the tool to have the desired commit
message, including title and reference to the script.

Also scan repos in parallel, reducing execution time from 19 to 4
seconds on my machine.

Change-Id: Ia5fe75c21dd3b217038337e31161d2b88d22026c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265282
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-10-24 18:06:19 +00:00
Daco Harkes 97eaded1ed [tools] verify_docs don't error on library annotations
Dartdoc code snippets should be able to have annotations before the
`library` keyword.

Bug: https://github.com/dart-lang/sdk/issues/49803#issuecomment-1287044157

Change-Id: I7ec0b6db296274a1173d10d900f7af38a1f2b552
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265321
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-10-24 18:01:55 +00:00
Ryan Macnak 9319d07e11 [vm] Fill in ArgumentValue.invalidObject when objects are rejected in isolate messages.
TEST=ci
Change-Id: I5a2816ce7fd40463aaffd971d867955a7b2bd7e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265043
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-10-24 17:49:29 +00:00
Srujan Gaddam dbb793a330 [pkg:js] Refactor createStaticInteropMock tests to account for new changes
Change-Id: I4de0c94bf1f00336432d61b174703fde9476545a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262863
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-10-24 17:37:09 +00:00
Srujan Gaddam 8c62ad7596 [pkg:js] Validate createStaticInteropMock
This revisits the validation after the redesign. The changes from
before the redesign include:
- Accounting for multiple extensions on @staticInterop classes
- Users can implement any of the extension members for a given
export name, with the exception that if there is a getter/setter
pair, both should be implemented if any one of them are
- Since this validation goes on top of exports, the Dart class
needs not be processed, and we use the same export creation process
to create the mock

Change-Id: I05a7cff765d6d37d3955dd93676e2d55d2b201b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262862
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-24 17:37:09 +00:00
Srujan Gaddam 316031d501 [pkg:js] Test export creation
While export creation covers both exports and mocks, we only test
createDartExport here.

Change-Id: I85bd65193644930768fdab7dfae9d54cf5ad2e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261765
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-24 17:37:09 +00:00
Srujan Gaddam d67104c37c [pkg:js] Refactor mock creation to export creation
Instead of relying on descriptors, we now just take in an export
map that was already precomputed for a given class. This map is
then used to create an object literal that maps property names to
their Dart targets.

Change-Id: I431cbfb3978eb41543bb46859612e13da7637e79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261764
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-24 17:37:09 +00:00
Srujan Gaddam 9453ff5273 [pkg:js] Add tests for export validation
Tests the various checks needed for @JSExport and createDartExport,
with and without inheritance. Also renames the mock directory to export.

Change-Id: Iae0233f1080a2f12f20b46ba1a6b30aeb36843a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260743
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-24 17:37:09 +00:00
Srujan Gaddam 7f93985005 [pkg:js] Add validation for @JSExport and createDartExport
Creates an external createDartExport function in js_util.

Adds a number of checks for the annotation:
- Classes with the annotation should not have value in the annotation
- Classes with the annotation should have at least one instance member
somewhere in the hierarchy
- There are no export name collisions that are unresolvable accounting
for overrides
- Members with this annotation are instance members with a body only

Also adds checks to createDartExport:
- Checks that the type is a Dart class
- Checks that the type is marked as exportable

Change-Id: I52f27275966e9603e88921ce7897b7615178c4d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259511
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-24 17:37:09 +00:00
Srujan Gaddam 877713882c [pkg:js] Add @JSExport annotation
For use with createDartExport. Adds comments describing the basic
use of this annotation.

Change-Id: I7744b6732054e845bf405c2d64e7e458c36deab7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260742
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2022-10-24 17:37:09 +00:00
Ryan Macnak 578b602dec [vm] Remove dead code from the message serializer.
Intra-group messages are now always handled by the copier instead of the serializer, so the serializer no longer needs to handle all types.

TEST=ci
Change-Id: Iabe3e464cc2a5bc9e3296660a5d15124fbede3bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265160
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-10-24 17:24:55 +00:00