Commit graph

85353 commits

Author SHA1 Message Date
Alexander Thomas c0c51c2279 [infra] Upgrade checked-in SDKs to 2.17.0
Change-Id: Ife8719b42c561ff3883287b31401e86267c40c46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244622
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-05-12 12:25:56 +00:00
Sigurd Meldgaard 28e8202c14 Bump pub to 1e3c17ea871e6a80c720aa998f37cbd3913bc287
Changes:
```
> git log --format="%C(auto) %h %s" 6068f47..1e3c17e
 https://dart.googlesource.com/pub.git/+/1e3c17ea dependency_services: use revisions as versions for git deps. (#3383)
 https://dart.googlesource.com/pub.git/+/9ecdd6b1 show discontinued in pub outdated (#3399)
 https://dart.googlesource.com/pub.git/+/c8fdf231 Bump analyzer from 3.4.1 to 4.0.0 (#3412)

```

Diff: https://dart.googlesource.com/pub.git/+/6068f47c264ef790e16411b31b2c94ad6beb1ab6~..1e3c17ea871e6a80c720aa998f37cbd3913bc287/
Change-Id: Idb9484e36d03001039e9f7e5447c659b85bd093f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244621
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2022-05-12 12:06:45 +00:00
Nate Bosch 4c8654eb10 Revert "Sync packages from shelf mono repo"
This reverts commit 243ac04dbf.

Reason for revert: Breaks roll to flutter engine still.

Original change's description:
> Sync packages from shelf mono repo
>
> Keep the DEPS entries and directories for the old locations for these
> packages, but ignore them in `generate_package_config`. Removing the
> hashes and directories would invalidate the DEPS file in the flutter
> engine repository.
>
> Add the `shelf` repository to the specially handled directories with
> nested packages in `generate_package_config`.
>
> Update path dependencies in pubspecs to the new location.
>
> Reland of https://dart-review.googlesource.com/c/sdk/+/243929
> without the removal of the old directory locations.
>
> R=​devoncarew@google.com
>
> Change-Id: I3d3b3eb0722f3eba518a6a1034ed9c24f83c70f0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244300
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Commit-Queue: Nate Bosch <nbosch@google.com>

TBR=devoncarew@google.com,nbosch@google.com

Change-Id: Ied6d9aa685208eddea6d82d04ca8876937651051
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244302
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-05-12 00:00:34 +00:00
Mayank Patke 4ea2b74256 [dart2js] Initialize all primitive constants in field allocators.
Change-Id: I6e1c3618758b1a569ee6d5d6c21520571d3234fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244361
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-05-11 23:37:44 +00:00
Mark Zhou 143c6df41b [ddc] Stubbing package:dart2js_runtime_metrics
This allows the package to be discoverable across web backends

Change-Id: I7d870a7232543d3b719d47de1424017d7f578434
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244261
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-05-11 22:31:45 +00:00
Mayank Patke 41ba014616 [dart2js] Clean up .isXXX members on ConstantValue.
Bug: #48974
Change-Id: If70fac64e69f60fb5228492eac5591d620f25f77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244360
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-05-11 20:25:44 +00:00
Ryan Macnak f7c7076fe8 [vm, compiler] Fix annotating pool references in gen_snapshot.
This was broken by the move to the global object pool.

TEST=--disassemble
Change-Id: I2cbff1e2fa1a56d8d4d98d447a5726c0764e1a0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244460
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-05-11 19:52:45 +00:00
Ryan Macnak 47db18a2da [vm] Fix default log filtering to include the vm-service.
This was probably broken by some refactoring related to isolate groups.

TEST=--disassemble-stubs
Change-Id: If46259836d2276d50fefc5598f8370bf935ec95e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244481
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-05-11 19:31:04 +00:00
Ahmed Ashour 3c10e484c9 Flutter Widget Key to be nullable
Fixes #46913

Change-Id: Id2d72ce497eaa1512c2bb95f023c9ff0160c5005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210128
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-11 19:20:24 +00:00
Danny Tuppeny a93a648e7f [analysis_server] Rename some LSP spec classes to match upcoming JSON models
Change-Id: Icbb071762ca86fd0ba75e4653e80ae480ce3e1a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244406
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-05-11 19:06:04 +00:00
Nate Bosch 3c231e4f57 Read package_config.json in more tests
Towards #48275

R=mit@google.com

Change-Id: I38cc986937543c5e4d1f2a2cd4c7804d180a2741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244304
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2022-05-11 18:58:44 +00:00
Parker Lougheed ba05fc9f1d Moves linter 1.23.0 changelog entry to 2.18
Change-Id: I686fd2c6a35be1205cc2c5161dd8f8fcc4b1bb7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244305
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2022-05-11 18:46:44 +00:00
Alexander Aprelev 1e5d063b21 [vm/sim/simd] Fix vmin/vmax implementation on simulator.
minss/maxss used by simulator 0.0==-0.0, which is inconsistent with arm native instructions.

Fixes https://github.com/dart-lang/sdk/issues/48988
Addresses https://github.com/dart-lang/sdk/issues/40426
TEST=ci

Change-Id: I9d88d89e342bb543b1e90fdbe3c7aa8303353dab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244320
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-05-11 16:59:24 +00:00
Ben Konyi 95e7890d02 [ CLI ] Fix broken test
Change-Id: I3292d8b90c4f2ea147243cadfb6776aca5a47d31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244480
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
2022-05-11 16:33:30 +00:00
Konstantin Shcheglov f3ac80c753 Add LibraryAugmentationDirective and parsing for it.
Change-Id: I64e19bcd8f1f57c558237562deabc024fad84163
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-11 16:26:34 +00:00
Konstantin Shcheglov e59c04ff55 Use package:package_config to parse 'package_config.json'.
We used our implementation because package:package_config was not ready.
But it is now, and long time so, I guess :-)

Change-Id: Icdc30be682ac3b2330b67a43b7e5854e6c99b5d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-11 16:03:34 +00:00
Konstantin Shcheglov 85615ce2e8 Fix override suggestions with protocol2, a few tests.
Change-Id: I0f49c01d68abdf695cc08a466495f7754c6eb91f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244363
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-11 16:02:34 +00:00
Ben Konyi cae2f4e874 [ CLI ] Add additional logging to create_integration_test
We've seen runtime errors due to non-zero exit codes when running this
suite of tests, but it's difficult to tell at which command we've
failed. This adds logging to help narrow down which command is causing
the issues.

Related issue: https://github.com/dart-lang/sdk/issues/48992

Change-Id: Ice0ff2ef87c806d108e907bcac84e5cc09b176f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244366
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-05-11 15:54:48 +00:00
Danny Tuppeny b4ed709482 [analysis_server] Sort fields in generated LSP types consistently
This simplifies an upcoming change switching from parsing LSP TypeScript definitions to using a new JSON definition (where items are not all in the same order).

Change-Id: I33672d645a8a96702dbfcbf1c090dfc8f5254960
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244404
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-05-11 15:36:34 +00:00
Danny Tuppeny cd71694342 [analysis_server] Sort types in LSP Unions consistently
This simplifies an upcoming change switching from parsing LSP TypeScript definitions to using a new JSON definition (where items are not all in the same order).

Change-Id: I773ce9ab174288ef5226b5f82f8ad7b8fb5f3693
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244245
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-11 15:36:34 +00:00
Danny Tuppeny 80fb1a56db [analysis_server] Add shared protocol.dart file for LSP
In an upcoming change some types will between these files. To reduce the size of that (already very large) CL and because the distinction between spec-generated/custom-generated types was unnecessary anyway, this adds a single import for LSP protocol-related types.

Change-Id: I322447d6c979538c12014d87875176e1bf2adca7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244244
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-11 15:28:35 +00:00
Nate Bosch 243ac04dbf Sync packages from shelf mono repo
Keep the DEPS entries and directories for the old locations for these
packages, but ignore them in `generate_package_config`. Removing the
hashes and directories would invalidate the DEPS file in the flutter
engine repository.

Add the `shelf` repository to the specially handled directories with
nested packages in `generate_package_config`.

Update path dependencies in pubspecs to the new location.

Reland of https://dart-review.googlesource.com/c/sdk/+/243929
without the removal of the old directory locations.

R=devoncarew@google.com

Change-Id: I3d3b3eb0722f3eba518a6a1034ed9c24f83c70f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244300
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-05-11 15:10:14 +00:00
Lasse R.H. Nielsen 21378579fe Remove internal classes in zone.dart.
These classes were introduced only because `_ZoneFunction`
could not take a generic type argument at the time.
It can now.

Change-Id: Id8dd75946176ef19350b33df905288a851982d3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244400
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Lasse Nielsen <lrn@google.com>
2022-05-11 15:08:54 +00:00
Konstantin Shcheglov b5241f8c4f Use 'parsedUnit' of the file as a starting point for the completion.
When we start identifying this synthetic `FieldDeclaration` with code `fo;`
as something that needs resolution (actually enclosing nodes require
declared elements), and use this `FieldDeclaration` as a starting point to
find the `CompletionTarget.entity`, we find the `VariableDeclaration` `fo`.
But if we start with `CompilationUnit` (as we used to), we find
`FieldDeclaration` `fo;`. Which gives different starting points for
contributors, and changes the resulting suggestions.

So, for  now I will switch to using the whole parsed unit.

Change-Id: I153ae4de9faad2f8147f413b36dd8f2dd7bc5a6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-11 14:16:44 +00:00
Aske Simon Christensen de3cec3a47 Make hashcode override test throw instead of looping indefinitely.
This achieves the same thing (test that `hashCode` is not called), but
avoids a costly timeout on failure. This drastically cuts down the total
testing time for the language and corelib suites for dart2wasm (which
intends not to implement a special case here, since it is going to be
illegal in the future anyway).

Change-Id: I040925ebd8271a5816c81bc16484c0a96626857d
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244061
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-05-11 11:48:26 +00:00
Chloe Stefantsova aa9b83eefc [cfe] Require a non-null name for mixin supertypes
The function types are given an empty name in that case. Those types
are further discarded and can have any intermediary name.

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

Change-Id: I57d223ee7914d0227baa3a4ef5733bb8055fa2c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244240
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-05-11 09:27:45 +00:00
Nate Bosch c54ade0cce Use package config in more test runner config
Change-Id: I7ac7c619be321c8e63d6b95537d68f7b8617da0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244046
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-05-11 08:58:04 +00:00
Michael Thomsen 0baa3c1e62 Discontinue .packages file
Contributes to https://github.com/dart-lang/sdk/issues/48275

Change-Id: I3acb90b91b9b206b69ca0ae311aa43f5954c29a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243625
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-05-11 08:50:45 +00:00
Clement Skau 4258a59789 [vm][ffi] Passes FFI handles on stack.
Passing handles in FFI calls has significant overhead due to
how each handle requires a runtime entry to allocate in the
handle scope.

This change removes that runtime entry by relying on the
register allocator to allocate all handle arguments on the stack,
so that we don't need to allocate them separately.
To pass the stack handles to the native call we then pass a pointer
to the stack slot as the native argument.

Testing:
- We already have comprehensive tests for correctness in the form
  of the FFI tests. These make calls with various combinations of
  Handle and non-handle arguments.
- Correct GC behaviour is likewise covered in
  `vmspecific_handle_test.dart` which makes calls with handles
  arguments and triggers GC in-flight.
  In case we do not correctly pass the handles on the stack, the
  GC will trash them during the call.

TEST=Existing.
Bug: https://github.com/dart-lang/sdk/issues/47624
Change-Id: Ic837bad5484daaa5534b7c2e8707ac2c5dfa480f
Cq-Include-Trybots: luci.dart.try:vm-kernel-gcc-linux-try,vm-kernel-linux-debug-simriscv64-try,vm-kernel-nnbd-mac-release-arm64-try,vm-kernel-precomp-android-release-arm64c-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-simriscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243320
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2022-05-11 06:43:14 +00:00
Nicholas Shahan 112cba1957 [ddc] Add flag to use the new runtime type system
Currently the flag does nothing. Follow up changes will add support
incrementally.

Add a `--canary` flag to DDC that will enable all features in
development to simplify use in tests and benchmarks.

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

Change-Id: I4878c771bdb4f4c6e8b8cd618737009268b02cbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237602
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-05-10 23:47:04 +00:00
Mayank Patke 34ebfc6594 [dart2js] Add regression test for https://dart-review.googlesource.com/c/sdk/+/225320
Change-Id: Iff348b9ce13ea249b8c63f8c0952cd446ad5cb7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243528
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-05-10 22:56:23 +00:00
Mayank Patke e5498bcd40 [dart2js] Clean up some file paths.
* The wrapped abstract value domain is moved out of the powersets folder
  since they're unrelated.
* {inferrer,ssa}/builder_kernel.dart renamed to just builder.dart since
  we only operate on kernel.
* inferrer/inferrer_engine.dart renamed to engine.dart since it was
  redundant.

Change-Id: I355e626431d8a49e9a944341360b2d6401895929
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243645
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-05-10 21:36:13 +00:00
Ryan Macnak 4ee35ee998 [vm, compiler] Load unboxed doubles directly from the literal pool.
TEST=ci
Change-Id: I4f881bc3e29059bce09eb0aa0ba99928e7fb10a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244120
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-05-10 21:31:40 +00:00
Konstantin Shcheglov 34bca35835 Update packages files in analyzer_cli to package_config.json format.
We need this for https://dart-review.googlesource.com/c/sdk/+/238181

Bug: https://github.com/dart-lang/sdk/issues/48272
Change-Id: I8dffd0d5bb9bc635dd60a690466b89ace25b9a71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244283
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-10 20:48:53 +00:00
pq b0f9470a83 test to validate deferred elements can't be used in constant contexts
Change-Id: Iadc534f9f99943e60966e18867010a56df9065d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244281
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-05-10 20:16:43 +00:00
Ahmed Ashour e630a3adef [analyzer] fix for use_key_in_widget_constructors should use super parameters when possible.
Fixes #48946

Change-Id: I45afc5717eb17845f50ef4aa77fb554fb88e2ec6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-05-10 18:20:33 +00:00
Liam Appelbe a8a29cffbb [ VM / Service ] Add libraryFilters to getSourceReport RPC
Bug: https://github.com/dart-lang/sdk/issues/48754
Change-Id: I42519d7dd751aa024860f940cbf51d2e38f7ea69
Tested: CI and new integration test
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241180
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2022-05-10 18:08:43 +00:00
Danny Tuppeny 6b6a199806 [analysis_server] Switch to LSP v3.17 spec + regenerate types
Change-Id: I6e1b79f3e814c44784dbf37d859ae46d303db2dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-05-10 18:08:35 +00:00
Devon Carew 063ee76dc7 [pkg/dart2native] address several lint issues
Change-Id: I3414710e504e1c63a9689028bbcca066f913d7b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243923
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2022-05-10 16:50:13 +00:00
Konstantin Shcheglov c40fe123f9 Thread OperationPerformance through link() and macro applications.
So, I can see the performance statistics during tests, but in the
future it could be possible to connect it to the analysis operations
tree.

Change-Id: I56ee80e92427f53471e062824467f8572341a851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244185
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-10 16:15:13 +00:00
Ryan Macnak 3c01efcbb0 Reland "[build] Fix Android build for ARM64 Mac."
Account for simarm_x64 in TargetCpuForArch.

TEST=local
Bug: https://github.com/dart-lang/sdk/issues/48792
Change-Id: I820cb49ee8925c50196cb2472266f9e248c9089d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243642
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-05-10 16:11:53 +00:00
Paul Berry 0d636e5543 Ensure that partial inference results aren't refined by later partial inference stages.
As part of the implementation of
https://github.com/dart-lang/language/issues/731 (improved inference
for fold etc.), I expanded the front end's type inference logic so
that instead of just having a downward phase and an upward phase, it
could have 3 or more phases.  The function that previously did
downward inference became repurposed to do "partial inference" (which
could either be the first, downward stage, or a later, horizontal
stage).  However, I failed to generalize the logic that prevents types
assigned by one inference stage from being refined by later
stages--previously this logic was only needed for upward inference,
but now it's needed for horizontal inference stages as well.  (This
logic is needed because of Dart's "runtime checked covariance"
behavior--it means that we want to stick with the type from downward
inference, even if a later horizontal inference stage is able to find
a more precise type, because that more precise type may lead to
runtime failures).

As part of this change I've re-architected the inference methods so
that they are responsible for creating and returning the list of
inferred types.  This makes the inference logic more similar between
the front end and analyzer, and is easier to read IMHO.  The total
number of list allocations is the same as before.

Change-Id: I19bfcede9c2968e50f110b571164549f16495217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243707
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-05-10 15:10:44 +00:00
Paul Berry 51d578cf91 Fix horizontal inference logic for extension method invocations.
The front end desugars extension methods by inserting a synthetic
`this` argument before all other arguments.  But this synthetic
argument isn't included in the `formalTypes` and `actualTypes` arrays.
So when recording a value into
`_DeferredParamInfo.evaluationOrderIndex` we may need to subtract 1 in
order to ensure that later logic will find the correct argument.

Fixes a corner case of https://github.com/dart-lang/language/issues/731.

Change-Id: Idbf136195e40555199f7c5b61a575a430f6ec6bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243854
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-05-10 14:54:53 +00:00
Ahmed Ashour a67c07c40f Fix for use_key_in_widget_constructors to add key at the end
Fixes #48917

Change-Id: Ie9a1e06188ad958ba89cd7b37081878211b3e90b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243905
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-05-10 14:15:43 +00:00
William Hesse 542aee1e51 [co19] Roll co19 to 9849573cd1b8317e58247b8c1672e89b1cd842e2
2022-05-09 stereotype441@gmail.com Fix type of onError. (dart-lang/co19#1339)

Change-Id: I78b2c218acb97881b9feb05e74c9775a2f6cd360
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244102
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-05-10 13:06:24 +00:00
Jonas Termansen 5eb2734296 [infra] Remove .packages from filesets.
.dart_tool/package_config.json is already present in each fileset.

Bug: https://github.com/dart-lang/sdk/issues/48275
Change-Id: Ib75fd91060f0b9eaeb1446cf65cb8678b2ddc63c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240842
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-05-10 11:34:15 +00:00
Aske Simon Christensen 6c7604291c [dart2wasm] Build platform dill and compile dart2wasm to AOT snapshots
This adds a --platform= option to dart2wasm to read the SDK libraries
from that dill file instead of compiling them from source every time.
If the option is not given, the SDK libraries are compiled, like before.

Also adds a "dart2wasm" build target, which will build the dart2wasm
platform dill and compile dart2wasm to two AOT snapshots (with and
without asserts). The dart2wasm scripts in sdk/bin are updated to run
via these snapshots and use this platform dill.

This speeds up test runs for the dart2wasm-hostasserts-linux-x64-d8
configuration by approximately 45x.

Change-Id: If2c7750a6eb39725310745f887792784d0dfc583
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243624
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-05-10 10:06:06 +00:00
Alexander Aprelev 2a12dd3315 [vm/simd] Add Float64x2 clamp simd implementation
Fixes https://github.com/dart-lang/sdk/issues/40427

TEST=ci, float64x2_clamp_test

Change-Id: I12618c37135feecffb115ce4aca02af1ecb03167
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243848
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-05-10 04:56:25 +00:00
Joshua Litt 2783cca57d [dart2js] Fix bug in impact data serialization.
Change-Id: I1e4915624b609aafa9392fc651f5935bf658a71b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244184
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-05-10 03:34:13 +00:00
Mark Zhou f5f26c9c61 Revert "[dart2js] Exporting as package: to allow non-SDK usage"
This reverts commit 8aeeffb848.

Reason for revert: Bad fix. Doesn't resolve underlying bug

Original change's description:
> [dart2js] Exporting as package: to allow non-SDK usage
>
> Change-Id: I0235f524904a1a4c54c83161eb51ab0277473d1e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244180
> Reviewed-by: Joshua Litt <joshualitt@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

TBR=markzipan@google.com,joshualitt@google.com

Change-Id: I0e2f8ff70c86ff1e69608f715fa5545419e63314
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244182
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Mark Zhou <markzipan@google.com>
2022-05-10 02:54:34 +00:00