1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-08 20:16:39 +00:00
Commit Graph

87842 Commits

Author SHA1 Message Date
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
Ahmed Ashour
5e75bb14a5 [_fe_analyzer_shared] handle $this in String interpolation
Fixes #50263

Change-Id: I4fdfab69a2d462768848f01aceb450f266e09072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265083
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-24 16:41:13 +00:00
Konstantin Shcheglov
79b11174a2 Stop using AstTestFactory and remove it.
Change-Id: Ic0dd0794c2ed3045149d2605c340852b3f187a28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265184
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-24 16:08:12 +00:00
Kallen Tu
3fe9cb8bae Fix unhandled exception in _HttpClientConnection after removing dynamic.
Change-Id: If838ce8f479986a488eb38b90b381c78956f5f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265188
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-10-24 16:03:39 +00:00
Danny Tuppeny
18acd0e44c [analysis_server] Include target locations in Inlay Hints
Fixes https://github.com/Dart-Code/Dart-Code/issues/4156.

Change-Id: I8713bccbded828d0753c7dd277b3f8da12c0f68e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265340
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-24 15:17:13 +00:00
Daco Harkes
a67c79b017 [analyzer/ffi] Native static checks
Bug: https://github.com/dart-lang/sdk/issues/49803
Bug: https://github.com/dart-lang/sdk/issues/50097

Change-Id: Id5b52be88937bcf9245f98e71afa56f079f288f0
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265085
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-10-24 10:04:34 +00:00
Daco Harkes
ea70de3185 [deps] Bump pub to 6506cc01b1bd17aff782037817d86a88a1c312e8
Changes:
```
git log --format="%C(auto) %h %s" b9afe92..6506cc0
 6506cc01 Support `--source` in kernel compilation commands (#3613)
 eda9b33c Remove support for PUB_ALLOW_PRERELEASE_SDK (#3612)
```

Diff:
https://dart.googlesource.com/pub.git/+/b9afe9270c24d040b8ae465b4b37ba4f7f4b4cc5~..6506cc01b1bd17aff782037817d86a88a1c312e8/
Change-Id: I3633d7997d217155d41a5b611f7acf7a087ddd1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265280
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2022-10-24 08:22:08 +00:00
Sergey G. Grekhov
cd75b47cee [co19] Roll co19 to 0c2b4c60350c7e3239913b8186770e5203c18eb2
2022-10-21 sgrekhov22@gmail.com Fixes dart-lang/co19#1511. [Records] Remove `records` experimental flag from legacy libraries (dart-lang/co19#1512)
2022-10-21 sgrekhov22@gmail.com Fixes dart-lang/co19#1477. [Records] Type inference tests updated (dart-lang/co19#1500)
2022-10-21 sgrekhov22@gmail.com Fixes dart-lang/co19#1505. [Records] Added tests for dynamic access to record fields (dart-lang/co19#1507)
2022-10-19 sgrekhov22@gmail.com dart-lang/co19#1399. [Records] Interaction with legacy tests added (dart-lang/co19#1502)
2022-10-19 sgrekhov22@gmail.com dart-lang/co19#195. Typos fixed (dart-lang/co19#1508)
2022-10-19 sgrekhov22@gmail.com dart-lang/co19#993. [ffi] nullptr test added (dart-lang/co19#1506)
2022-10-14 asashour@yahoo.com Fix typos (dart-lang/co19#1504)
2022-10-12 sgrekhov22@gmail.com Fixes dart-lang/co19#1427. Expando tests added (dart-lang/co19#1479)
2022-10-12 sgrekhov22@gmail.com dart-lang/co19#1399. [Records] More members tests added (dart-lang/co19#1501)
2022-10-12 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 3.0.2 to 3.1.0 (dart-lang/co19#1499)
2022-10-11 sgrekhov22@gmail.com dart-lang/co19#1400. [Views] Syntax tests added (dart-lang/co19#1498)
2022-10-07 sgrekhov22@gmail.com Fixes dart-lang/co19#1491. Use correct record type in 'as' expression (dart-lang/co19#1497)
2022-10-07 sgrekhov22@gmail.com Fixes dart-lang/co19#1489. Don't use '?' in expressions (dart-lang/co19#1495)
2022-10-07 sgrekhov22@gmail.com Fixes dart-lang/co19#1488. Use correct record types (dart-lang/co19#1493)
2022-10-07 sgrekhov22@gmail.com Fixes dart-lang/co19#1490. Missing parameters names added (dart-lang/co19#1496)

Change-Id: I6d26701ee14a0c7820e3c3094d7d850c0f914028
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265087
Reviewed-by: Alexander Thomas <athom@google.com>
2022-10-24 07:07:09 +00:00
Konstantin Shcheglov
1244294c09 Enable overridden_fields in analyzer/.
Change-Id: Ie7dc6d1d8c5347fc38bf271aaa074db2da4d3e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265221
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-21 23:15:08 +00:00
Konstantin Shcheglov
53898496a6 Use named parameters in few AST nodes.
Change-Id: I16a63c7554d63103e05a783e1c11748d9535ca7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 22:43:49 +00:00
Konstantin Shcheglov
664c021374 Deprecate xyz2 in elements.
Change-Id: I0dbf25882cf66670ce2d69dd22aceb053be9feb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265182
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-21 22:07:47 +00:00
Konstantin Shcheglov
7840c54107 Report EXPECTED_ONE_LIST_PATTERN_TYPE_ARGUMENTS.
Change-Id: I59f2227dea39f13660e360815b1cf7d60c995a0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 21:52:18 +00:00
Paul Berry
6318d7f2e5 Move "mini-AST" type operations to their own class.
This will allow them to be re-used in other _fe_analyzer_shared test
files.

Change-Id: Ib9c321ba8985241f2ad2c1783e9896f3f1e57408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264960
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 19:58:03 +00:00
Chloe Stefantsova
7179750fae [cfe] Report error on Object member names used as record field names
Part of https://github.com/dart-lang/sdk/issues/50143

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

Change-Id: I3ad99c6bbf27fcb5f4868f74d5005a9483081627
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263740
Auto-Submit: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-10-21 19:49:37 +00:00
Chloe Stefantsova
f0c24c0af6 [cfe] Report errrors on duplicated names in record types
Part of https://github.com/dart-lang/sdk/issues/50143

Change-Id: I8c4acc9e5d36b2d5c7b9dbabbe4433d7e5efb4a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263400
Auto-Submit: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-10-21 19:11:51 +00:00
Kallen Tu
a5ad599cf0 Reland "Cast errors to HttpExceptions and add lint to convert to tidy up dynamic calls in core libraries."
`catchError` in http_impl also handles SocketExceptions.

Change-Id: I865bdd6bde4272f6cb657a86a1c78734e4ee331c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263183
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-10-21 18:28:23 +00:00
Konstantin Shcheglov
30c4cb00b8 Add a few more tests for PART_OF_DIFFERENT_LIBRARY.
Change-Id: I685874502d49e4a6b4164bb25cf449423659514a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 18:25:08 +00:00
Devon Carew
90dac14e8f [deps] rev args, async, lints, usage, webdev
args (80d4abb..aaf671c):
  aaf671c  2022-10-20  Kevin Moore  Require Dart 2.18, update lints, update CI, add dependabot (#222)

async (f3ed5f6..18a780e):
  18a780e  2022-10-20  Kevin Moore  Nit: fix analysis_options (#224)
  b6e7885  2022-10-20  Kevin Moore  Require Dart 2.18, latest lints, latest CI bits (#223)

lints (8294e56..16bdefe):
  16bdefe  2022-10-20  dependabot[bot]  Bump actions/checkout from 3.0.2 to 3.1.0 (#89)
  0fae4ee  2022-10-20  Devon Carew  update lint files docs (#88)

usage (9a98c89..fee1d9d):
  fee1d9d  2022-10-20  dependabot[bot]  Bump actions/checkout from 3.0.2 to 3.1.0 (#184)

webdev (a02f073..81c5384):
  81c5384  2022-10-20  Nate Bosch  Migrate webdev tests to null safety (#1761)

Change-Id: I238d46cb5b24d64788862f06dc903a2cd2312725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265140
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-10-21 18:09:12 +00:00
Joshua Litt
a73e8c2cf2 [dart2wasm] Support unmodifiable typed data views.
Also wires up a couple of missing APIs for some of the simd lists.

Change-Id: I9da5be59bc3b4553cb27c570f9d7c0b98b10409b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264890
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-10-21 17:28:35 +00:00
Danny Tuppeny
27d417dc09 [analyzer] Fix setter in test
Change-Id: Ie5d31dcf300936690d9cf476bed64b8615474e8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265090
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 17:15:36 +00:00
Ahmed Ashour
3817a4ab66 [analysis_server] TransformSetManager to use cache
Fixes #50252

Change-Id: I0e29af6d5e718459c8dbf6bbce81a1652c1b51bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-21 17:04:05 +00:00
Konstantin Shcheglov
671bb192ab Remove domain 'kythe' from DAS.
Change-Id: I66f0e538dce6eead6ba1c98b9cf0e3d747450130
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264895
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-21 17:03:29 +00:00
Danny Tuppeny
3e587da7f0 [analyzer] Add the ability to locate an Element from an ElementLocation
Change-Id: If2f3bfcdaa330dc1bcb9c1078500e982660ae8c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-21 15:26:46 +00:00
Johnni Winther
8995807b2b [cfe] Create various matcher in the body builder
This add the Expression-, Binary-, Cast-, NullAssert-, NullCheck-, List-
and RelationalMatcher and creates these during body building. The
IfCaseStatement is added to support propagation of these to the
inference visitor.

Change-Id: Ia9add15e504cb06af711efc1697a00b8e235e1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263128
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-10-21 14:01:02 +00:00
Sam Rawlins
e7c590b137 Make some bool fields in nullability_node non-nullable
Change-Id: If50538f4e4c189d45af0a2c22e7a6a19a29c7f68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265080
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2022-10-21 13:23:57 +00:00
Sergey G. Grekhov
e20d10ea38 [co19] Roll co19_2 to 6dc80bd1ff15d0854eaba0c7e5d606ec0ad6b3db
2022-10-20 sgrekhov22@gmail.com dart-lang/co19#1509. Platform.executableArguments added to the tests that run process (dart-lang/co19#1510)
2022-10-11 sgrekhov22@gmail.com dart-lang/co19#1430. For HashSet don't run tests that checks iteration order (dart-lang/co19#1475)

Change-Id: Ia9e2d215a742cf2d8aef5f936ad30decf961528b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265082
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-10-21 11:29:42 +00:00
Konstantin Shcheglov
6c60f506c8 Resolve RecordPattern(s).
Change-Id: I229efb591cbb2d6cfe77b38155526f881fee7dbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264891
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 09:10:27 +00:00
Stephen Adams
b03b9c3712 Redo "[kernel] Create Source.sourceCode as view of the binary bytes"
Retrying now that https://github.com/dart-lang/sdk/issues/50206 is fixed.

Change-Id: I2612e53c845b2e906ab51bfe39db2fe775e10bca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264602
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-10-21 01:11:47 +00:00
Stephen Adams
a4294c354c Benchmark for comparing reading Uint8List vs UnmodifiableUint8ListView
The benchmark reports per-element times for summing the elements of a typed-data List.

----

The VM implementation is quite good but it looks like there is still a little room for improvement since the views are 2x slower than a simple array.

dart compile exe:

TypedDataPoly.mono.array.2(RunTime): 1.9670880036279512 ns.
TypedDataPoly.A_V.array.2(RunTime): 4.392355 ns.
TypedDataPoly.A_V.view.2(RunTime): 5.730097499999999 ns.
TypedDataPoly.A_UV.array.2(RunTime): 4.455393750000001 ns.
TypedDataPoly.A_UV.view.2(RunTime): 5.811122500000001 ns.
TypedDataPoly.A_VUV.array.2(RunTime): 4.386336250000001 ns.
TypedDataPoly.A_VUV.view.2(RunTime): 5.7639675 ns.
TypedDataPoly.A_UVx5.array.2(RunTime): 4.62768 ns.
TypedDataPoly.A_UVx5.view.2(RunTime): 5.7099649999999995 ns.
TypedDataPoly.mega.array.2(RunTime): 5.272632499999999 ns.
TypedDataPoly.mega.mixed.2(RunTime): 5.62861 ns.

TypedDataPoly.mono.array.100(RunTime): 0.6455633088733822 ns.
TypedDataPoly.A_V.array.100(RunTime): 3.1558100965636964 ns.
TypedDataPoly.A_V.view.100(RunTime): 4.476973567105732 ns.
TypedDataPoly.A_UV.array.100(RunTime): 3.149724878714137 ns.
TypedDataPoly.A_UV.view.100(RunTime): 4.500062299750802 ns.
TypedDataPoly.A_VUV.array.100(RunTime): 3.1438380581862146 ns.
TypedDataPoly.A_VUV.view.100(RunTime): 4.499246259421757 ns.
TypedDataPoly.A_UVx5.array.100(RunTime): 3.1570175999999996 ns.
TypedDataPoly.A_UVx5.view.100(RunTime): 4.482889818440727 ns.
TypedDataPoly.mega.array.100(RunTime): 3.649420567570034 ns.
TypedDataPoly.mega.mixed.100(RunTime): 4.068594455581881 ns.


On the other hand, there is a massive performance tax for using UnmodifiableUint8ListView on the web, especially views of views.
https://github.com/dart-lang/sdk/issues/50255 discusses how this might be fixed.

compile js -O3:

TypedDataPoly.mono.array.2(RunTime): 2.209502118308509 ns.
TypedDataPoly.A_V.array.2(RunTime): 2.58625 ns.
TypedDataPoly.A_V.view.2(RunTime): 2.32 ns.
TypedDataPoly.A_UV.array.2(RunTime): 51.633530557495135 ns.
TypedDataPoly.A_UV.view.2(RunTime): 302.4986387561256 ns.
TypedDataPoly.A_VUV.array.2(RunTime): 52.19476512355694 ns.
TypedDataPoly.A_VUV.view.2(RunTime): 302.84394312113756 ns.
TypedDataPoly.A_UVx5.array.2(RunTime): 55.649763488505165 ns.
TypedDataPoly.A_UVx5.view.2(RunTime): 849.458699173131 ns.
TypedDataPoly.mega.array.2(RunTime): 59.75952192382461 ns.
TypedDataPoly.mega.mixed.2(RunTime): 142.7126082991336 ns.

TypedDataPoly.mono.array.100(RunTime): 0.9815000000000002 ns.
TypedDataPoly.A_V.array.100(RunTime): 1.1626947678735444 ns.
TypedDataPoly.A_V.view.100(RunTime): 1.2075 ns.
TypedDataPoly.A_UV.array.100(RunTime): 17.17602868362643 ns.
TypedDataPoly.A_UV.view.100(RunTime): 231.5 ns.
TypedDataPoly.A_VUV.array.100(RunTime): 16.85678073510773 ns.
TypedDataPoly.A_VUV.view.100(RunTime): 229.7 ns.
TypedDataPoly.A_UVx5.array.100(RunTime): 17.01657458563536 ns.
TypedDataPoly.A_UVx5.view.100(RunTime): 697.5524475524476 ns.
TypedDataPoly.mega.array.100(RunTime): 22.770700636942674 ns.
TypedDataPoly.mega.mixed.100(RunTime): 94.4 ns.

Change-Id: If8878efd4c57bbd87effcd1d3f1339bc0cffbd75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264897
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-21 00:53:59 +00:00