Commit graph

99656 commits

Author SHA1 Message Date
Daco Harkes 3d1f22a79b Revert "Roll zlib to 646b7f569718921d7d4b5b8e22572ff6c76f2596."
This reverts commit 2f90c9c8ce.

Reason for revert: Build failures for Android.

```
ERROR at //third_party/zlib/BUILD.gn:349:17: Can't load input file.
      deps += [ "//third_party/cpu_features:ndk_compat" ]
```

Original change's description:
> Roll zlib to 646b7f569718921d7d4b5b8e22572ff6c76f2596.
>
> Change-Id: I5c222fbacce6e89226d450534c7f9400cb6d2164
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352044
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Brian Quinlan <bquinlan@google.com>

Change-Id: I38f345e7576d8a166518ed37a9f32f249e6ca1a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352221
Reviewed-by: Martin Kustermann <kustermann@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-02-13 10:03:56 +00:00
Jens Johansen 35b923f884 [CFE/kernel] Test of relink bug with ExtensionTypeDeclaration
Tests for fix done in
https://dart-review.googlesource.com/c/sdk/+/350801.

Change-Id: I01a6512dc5de3e91f698828d99097a083d392972
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352061
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-02-13 08:42:17 +00:00
Konstantin Shcheglov cd23ab4e59 Fix after merging 2 CLs that touch assertErrorsInFile2() and are not compatible.
Change-Id: I261e5f08ad9af05d7c265948762c391314377d02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352105
Auto-Submit: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jacob Richman <jacobr@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2024-02-13 00:59:00 +00:00
Devon Carew b6799fed19 [deps] rev crypto, dartdoc, ecosystem, lints, native, sse
Revisions updated by `dart tools/rev_sdk_deps.dart`.

crypto (c954015..f059196):
  f059196  2024-02-08  Kevin Moore  Test dart2wasm (dart-lang/crypto#162)

dartdoc (457c34e..f152c01):
  f152c013  2024-02-08  Sam Rawlins  Tidy spacing in templates (dart-lang/dartdoc#3652)
  d0c53b9f  2024-02-07  Sam Rawlins  Change all late final Iterable fields to Lists (dart-lang/dartdoc#3649)
  8c9c7790  2024-02-06  Sam Rawlins  Remove unnecessary ExtensionTarget mixin (dart-lang/dartdoc#3648)
  d2f90c5a  2024-02-06  Sam Rawlins  Fix the 'serve testing-package' task to generate docs (dart-lang/dartdoc#3647)

ecosystem (7d8ec47..3e4f286):
  3e4f286  2024-02-08  Moritz  Add ignore flag for `publish.yaml` (dart-lang/ecosystem#237)

lints (90a61e4..ead7708):
  ead7708  2024-02-08  Devon Carew  add library_annotations; remove package_prefixed_library_names (dart-lang/lints#179)

native (876f9a1..cb9bd7e):
  cb9bd7ef  2024-02-09  Daco Harkes  Build hook spec (dart-lang/native#955)

sse (e483b14..af7d8d0):
  af7d8d0  2024-02-09  Ilya Yanok  Make `SseConnection` extend `StreamChannelMixin<String>` (dart-lang/sse#102)

Change-Id: I2e85dbfae00eea8de7b6f7efce1993bf00e243f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352046
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2024-02-13 00:30:32 +00:00
Jake Macdonald ac10f01147 add default value configuration as well as includeIfNull configuration
Change-Id: Ia5e8e3b6539047087dc2cf79f9375fe4ee58d2fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351280
Reviewed-by: Morgan :) <davidmorgan@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2024-02-13 00:25:47 +00:00
Konstantin Shcheglov a1b4f29413 CQ. Use 'File' for resolveFile() and assertErrorsInFile2()
Replaced a few local helpers with pre-existing global ones.

Change-Id: I40e2955ae353bf0ef7f21388b1f4b06bd08069a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352051
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-12 23:54:29 +00:00
Ryan Macnak 2f90c9c8ce Roll zlib to 646b7f569718921d7d4b5b8e22572ff6c76f2596.
Change-Id: I5c222fbacce6e89226d450534c7f9400cb6d2164
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352044
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2024-02-12 23:45:20 +00:00
pq fcca3f1b62 fix unnecessary_parens overreporting on records missing commas
Fixes: https://github.com/dart-lang/linter/issues/4876

Change-Id: I171709f15b5341e91726024f387d9f842a524b4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352104
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-02-12 23:37:32 +00:00
Konstantin Shcheglov c7793ec97b Macro. Extract _MacroDiagnosticsReporter, _MacroTypeAnnotationLocationConverter.
...and split long methods into smaller ones.

Change-Id: I7bdd5ea7851000ef0fd27735b90eed5199186e13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352101
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-12 23:10:54 +00:00
Konstantin Shcheglov b215e589f7 Augment. Check only declarations for CONFLICTING_GENERIC_INTERFACES.
Change-Id: Ib8b71baf99f7064d9c9b6b988df8647d6485061f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352050
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-12 23:05:02 +00:00
Jake Macdonald 97a3d2a8a9 fix typo
Change-Id: I3ced675679187f2d54d2a7b03532ccc733949365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352160
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-12 23:02:51 +00:00
Paul Berry 3d395d11c9 Remove unnecessary special case from ResolverVisitor.dispatchCollectionElement.
The behavior in the "then" case (calling `dispatchExpression(element,
context?.elementType ?? operations.unknownType)`) was exactly the same
as the behavior of `ExpressionImpl.resolveElement`, so there's no need
for a special case at all; we can simply call `element.resolveElement`
and let virtual dispatch take care of the rest.

Change-Id: I32db32661375846bff5189c6dc95eb1496b34ce1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351801
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-12 22:16:48 +00:00
Paul Berry 4ddc4a9e8d Make use of record type parsing in mini_types_test.dart
Change-Id: Ia6f090bcd5e605f75600389f6b049cfb8590af0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352043
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-12 21:21:27 +00:00
Paul Berry acc74df9f1 Use _ to refer to the unknown type schema in _fe_analyzer_shared.
Change-Id: If06e0bb05e285bd53d924a791c36d461f00750e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352100
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-12 21:21:18 +00:00
Jake Macdonald 05aa6b4c16 Get started on some augmentation library tests.
Bug: https://github.com/dart-lang/sdk/issues/53629
Change-Id: I4f86088b87796a094d49dd5941b167660fab3bab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328600
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2024-02-12 20:28:00 +00:00
Konstantin Shcheglov 716d8ccbf8 Macro. Code optimizer. Enough implementation to handle JsonSerializable result.
Previous attempt to use AST and builder was removed.

Also, after talk with Brian, removed scopes, and replaced with more
course grained, but simpler collision detection. If there is a declaration with the same name as prefixed, the name stays prefixed. Similarly, if there is an unprefixed invocation.


Change-Id: If2b0ce530ac81482e5bfd066d6df43e1a5d34799
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350683
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-12 20:23:20 +00:00
Derek Xu 83ef6bfeff [VM/Service] Add some logging to get_perfetto_cpu_samples_rpc_test
6d623f435d
did not fix the problem
(https://dart-ci.appspot.com/log/any/vm-linux-debug-x64/2320/pkg/vm_service/test/get_perfetto_cpu_samples_rpc_test)
so I'm going to add some logging and see if that reveals anything.

Change-Id: I1a0e100ff5141899a000b09c56f364c7cfc28f69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352140
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-02-12 20:17:00 +00:00
Alexander Markov 3421f48d50 [vm] Cleanup dead code around native closure functions
Closures cannot be declared native, so code which handles the
case of native function being closure function is dead.

TEST=ci

Change-Id: I47e124eecf4e778ad9fd3751a7b62459a032e800
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351560
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-02-12 18:26:00 +00:00
Miguel Flores Ruiz de Eguino d1ba46c05e [inspect] Update Inspect library usage
The new Inspect library uses InspectSink as described in RFC-168 [1].
Additionally it's using the new CPP bindings instead of the deprecated
HLCPP bindings.

[1]: https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0168_exposing_inspect_through_inspectsink?hl=en

TEST=build locally together with the flutter engine and internal code.
Bug: https://g-issues.fuchsia.dev/issues/320785253
Change-Id: Ide167f67217dd964167133c9aafd9e33ec81afc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349220
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Miguel Flores <miguelfrde@google.com>
Auto-Submit: Miguel Flores <miguelfrde@google.com>
2024-02-12 18:18:01 +00:00
Ryan Macnak 9f7dbd6b4d Roll Fuchsia SDK to 18.20240208.2.1.
Sync build setup from Flutter.

Change-Id: Ic7958dc42a79b7d2acd3f5279f816333ca31299e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351242
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-02-12 18:18:01 +00:00
Brian Wilkerson a2574f28d3 Tests to ensure that hovers work with macro generated code
Change-Id: I745ae1b61e3baf6343cff3eda31dfb8159f67579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351700
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-12 18:17:57 +00:00
Polina Cherkasova 47f0541c99 Clean up code.
1. Add '_' to libs that are not exported.
2. Remove references from src to root libs.
3. Remove not used code.

No code changes.

Change-Id: Ie344fb7e41decb0ebf6e50d59dc843fb04ca683b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350692
Commit-Queue: Polina Cherkasova <polinach@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-02-12 17:59:57 +00:00
Alexander Markov 632a8baac5 [vm] Avoid altering static types when removing redundant type casts
VM can use static type of receiver in order to omit parameter
type checks. Removing a redundant AsExpression node can incorrectly
change static type of a receiver and break parameter type checks.

So, instead of removing redundant AsExpression nodes they are now
marked as Unchecked. This turns them into a no-op when building
flow graph, but keeps static type unchanged.

TEST=runtime/tests/vm/dart/regress_53945a_test.dart
Fixes https://github.com/dart-lang/sdk/issues/53945

Change-Id: Ic283158c9b7ba11cb5c140226a6d057e98c8ce77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351621
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-02-12 17:54:32 +00:00
Paul Berry 069e8d02ab Remove unused contextType parameters from ResolverVisitor methods.
Change-Id: Icc9aab866cf6596202e45300257af1c4b791a5d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352041
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-12 17:05:38 +00:00
kzrnm 72aceb7732 dart analyze --format=json print a machine readable output
`dart analyze --format=json` has extra output, which must be removed before it can be read by the machine.


R=dacoharkes@google.com, fishythefish@google.com, scheglov@google.com

Bug: https://github.com/dart-lang/sdk/issues/54877
Change-Id: I8047a987b65eb8309ef33603cdaf401a400d550b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351840
Reviewed-by: Ben Konyi <bkonyi@google.com>
Auto-Submit: Kzrnm <gengesa@gmail.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-12 17:03:31 +00:00
Jake Macdonald b17156df2c start adding some static error tests for the json macro
Change-Id: Id827bbdf4f93bba3cf511a7008626c82a45d8ffe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351760
Reviewed-by: Morgan :) <davidmorgan@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2024-02-12 16:29:37 +00:00
Derek Xu 6d623f435d Make testee pause on exit in get_perfetto_cpu_samples_rpc_test
Since it currently seems like samples are being collected even after
`testeeDo` has finished, we can give this a try and see if it changes
anything.

Change-Id: Id6f95cfb457b033d17e5e32e3fe073a2f2b9a958
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352080
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-02-12 16:14:12 +00:00
Parker Lougheed 78dbc184b1 [sdk/js_interop] Clean up and add a few minimal API docs
CoreLibraryReviewExempt: Only touches JS core library documentation.
Change-Id: I7d7f0a2b646f95de8340e9e77d8207cd99c9a1b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351940
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2024-02-12 14:44:54 +00:00
Martin Kustermann aadac65a2e [dart2wasm] Faster string equality
There should be no need to use polymorphic `.codeUnitAt()` calls in
the common case: comparing OneByteString with OneByteString, etc

This increases e.g. LongStringCompare.* benchmarks by 600+%

Change-Id: I1b7b2b53f35237d1ddc1c177c01728629a4acf40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352020
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-12 14:06:50 +00:00
Martin Kustermann 790297b812 [dart2wasm] Use WasmArray<>s for string interpolation expressions
* Use `WasmArray<>`s in string interoplation expressions
* Use `WasmArray<>`s in string buffer implementation
* Avoid making OneByteString+JSString imply TwoByteString

This also increases performance significantly, e.g.
JsonObjectRoundTrip & StringBuffer by 40% in -O4 and even more
speedup in -O2

Change-Id: I25485a6c532c3afed7d92943b6de4d1452930606
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352000
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-12 14:01:12 +00:00
Jonas Termansen 45a0e4d9f3 [deps] Bump Chrome to 121.0.6167.85.
Bug: b/297175436
Change-Id: Ib0766cd3be8bc48476b7bf52ff1e73563e90c6fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352021
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-02-12 13:16:09 +00:00
Jonas Termansen df473e11cd [deps] Bump Firefox to 122.0.1.
Bug: b/297175436
Change-Id: I43ebc0b20c026cadabff0af591c370a967c6e196
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352060
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Jonas Termansen <sortie@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2024-02-12 13:15:25 +00:00
Martin Kustermann ab09f99638 [dart2wasm] Outline <obj> is/as <type> checks to shared helper functions
This reduces in Flute size of optimized wasm by

  * 1.5% in -O3
  * 0.7% in -O4

We rely on binaryen to inline small enough checks (e.g. `is` check
with a single cid-range)

Change-Id: I8f2c093daebe47d6e066b8681c1e285fa5fa0ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351780
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-12 12:06:07 +00:00
Jens Johansen c906c3a1ed [CFE/kernel] Fix relink bug with ExtensionTypeDeclaration
Over the weekend the flutter-frontend bot started failing.
This was caused by an update on the flutter side, where a dependency
started using extension types, and revealed a bug with relinking on our
side.
This CL fixes the bug which should make the bot succeed again (as well
as, I think, fix a potential leak/failure if rejecting an advanced
invalidated incremental compilation.
I will add tests in an upcoming CL.

Change-Id: I1e73314b5ce5fe70819f921f9b176c7286b31f8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350801
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-02-12 11:08:22 +00:00
Jonas Termansen da512538e5 [deps] Bump d8 to 12.3.150.
Switch to the new secure cipd packages. Temporarily check out all of the
versions in their existing locations to ease this transition as a first
step.

Bug: b/324389547
Change-Id: I6b534da02c87b83bb742a8853d31bcaf796bc537
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350924
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-02-12 10:25:32 +00:00
David Morgan b907893a59 [CFE] Exclude deleted files from presubmit checks.
Otherwise, explicit creation check tries to check moved file in old location and fails.

R=johnniwinther@google.com

Change-Id: I2edfa3f5230045458c2defb310abb475800037ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351481
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-02-12 08:43:58 +00:00
Erik Ernst f9266472c0 Add extension types to the CHANGELOG.
Change-Id: Id3bf8bd8b0a366ce58eb9070f0e2fa15d55bf07d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350002
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2024-02-12 08:20:47 +00:00
Danny Tuppeny 4c8ae57d93 [dap] Restore DAP readme
This was accidentally lost in https://dart-review.googlesource.com/c/sdk/+/344021 after the package moved from pkg to third_party/pkg.

Change-Id: I926c2c439b4015bb4cdb5b5aec12b47d6ecfe6a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350280
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-02-12 07:54:09 +00:00
Matthew Berry 519799a8d8 Add missing closing quotes to examples
Closes https://github.com/dart-lang/sdk/pull/54850

GitOrigin-RevId: 95290859570ee03cb93e6ecace4f05cde1d55dbd
Change-Id: I041ba5b5862db58e19a7d4724222183fb3de803e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350942
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2024-02-11 01:41:02 +00:00
Stephen Adams d8456b7cd8 [dart2js] Take more care generating read-modify-write expressions
Bug: #54823
Change-Id: I97ed64c6b487e989fd95704916af0b3aa4cc1e0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350407
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-02-10 16:39:59 +00:00
Konstantin Shcheglov 23c232e0a3 Macro. Tests for 'typeParameters' in FunctionTypeAnnotation.
Some renames in implementation.

Change-Id: Ib8860d8574061c3d3681f4ff2b6676291a257138
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-10 01:08:28 +00:00
Konstantin Shcheglov 2e7290a727 Macro. Report diagnostics for library directive macro applications.
Change-Id: I7b8e011b3bfd01cd6fb534708e832f834a913091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-10 01:07:39 +00:00
Konstantin Shcheglov 8780e559ec analyzer/test/src/summary/macro_test: Slow, Pass
Change-Id: Ic295fe3c12a7c78723fdc8c308777a6ee547ca68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351681
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-09 23:47:32 +00:00
Brian Wilkerson 2e2aaf0604 Revert "Preserve non-synthetic function types when resolving invocations of functions with type parameters"
This reverts commit 7ad5a57bf2.

Reason for revert:

This breaks tests in Flutter. In particular, it causes the lint `avoid_redundant_argument_values` to start producing diagnostics in places where it wasn't previously able to do so.

The failures can be seen at https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8756630800427013937/+/u/analyze_flutter_flutter/stdout.

In order to re-land this CL we will first need to verify that all of the new reports are valid (that there aren't any false positives), and then fixes will need to land in flutter. After that we can try re-landing this CL.

Original change's description:
> Preserve non-synthetic function types when resolving invocations of functions with type parameters
>
>
> Update existing tests to require existing parameter elements
>
>
> Add tests for staticParameterElement in generic functions
>
> R=leafp@google.com
>
> Bug: https://dartbug.com/54669
> Change-Id: Ie899f58df56ad1a6b49426ca4d7f4e611975b284
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350920
> Auto-Submit: Mylo Fawcett <mylo.fawcett@gmail.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

Bug: https://dartbug.com/54669
Change-Id: I29cade78577eac8442eb53a7d9c38d384e7913c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351682
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2024-02-09 23:42:39 +00:00
Konstantin Shcheglov 3125174cb1 Macro. Add 'correctionMessage' to MacroDiagnostic.
Note, that currently `correctionMessage` is a property of `ErrorCode`,
so we cannot forward from macro diagnostic. Something to discuss.

Change-Id: I6de86f4c16356bbf7bd61c483bad4d039ca67638
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351620
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-09 23:12:10 +00:00
Ben Konyi 670b9ba9cf [ CLI ] Make dart {compile,build} error exit codes consistent on Windows
Setting an error code of -1 on macOS and Linux results in an error code
of 255 being set since negative error codes are subtracted from 256.
However, an error code of -1 on Windows is not converted in the same
way, resulting in a difference of behavior between OSes.

This change updates -1 error codes to be 255 so they're the same on all
OSes.

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

Change-Id: Idcfbfab30d3cc31a9e4ca630b8d94caa03ef07b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351500
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-09 22:47:39 +00:00
Konstantin Shcheglov adee0a2399 Extension type. Implement isIncompatibleWithAwait() predicate, report AWAIT_OF_INCOMPATIBLE_TYPE.
Change-Id: I8f562db3fb3399704369725fdfba49c52bb14ab8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350986
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-02-09 22:11:21 +00:00
Konstantin Shcheglov e7f79cad7c Macro. Report INVALID_MACRO_APPLICATION_TARGET.
Change-Id: I7597d81cb2c9db9488533d6d372b244b74ff97ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350691
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-09 21:54:16 +00:00
Daco Harkes 6547ab18b1 [cfe/ffi] Reformat code
Reformats the code to use more newlines and less long lines.
Landing as a separate CL before refactoring to ease reviewing.

TEST=ffi suite

Change-Id: I018be8f27f19c312d36b112118291016b6be0ff4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351145
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-02-09 21:27:29 +00:00
Daco Harkes ddfc00e773 [vm/ffi] Unify TypedDataBase wrappers
For getting the address of `Struct` fields and `Array` elements
it would be useful to access the `_typedDataBase` field in these
'wrappers' in a unified way.

This CL makes `Array` extend `_Compound`.
Since `Array` is not a `SizedNativeType`, the implements clauses
for `Struct` and `Union` are moved to these classes.

Moreover, any references to 'compound' which only apply to struct or
union are updated.

TEST=test/ffi

Bug: https://github.com/dart-lang/sdk/issues/44589
Bug: https://github.com/dart-lang/sdk/issues/54739
Bug: https://github.com/dart-lang/sdk/issues/41237

CoreLibraryReviewExempt: No API change, only refactoring.
Change-Id: Ib9d8bccd4872df04bcc67731e4052f826ab70af4
Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-release-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350960
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2024-02-09 21:27:29 +00:00