Commit graph

99684 commits

Author SHA1 Message Date
Alexander Markov
9d6b79749b [vm] Remove core-jit snapshots
Core-jit snapshots are no longer used.

TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/47463

Change-Id: Ifadd6e8d913794f3e70cd4dfdc1758b0cd45f3ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352382
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-02-14 00:08:30 +00:00
Jake Macdonald
2624743bdd handle deserializing metadata diagnostic targets
Change-Id: I47f747baf48d6fc3a0e04871990d0743dbbb41e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352560
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2024-02-14 00:03:35 +00:00
Ryan Macnak
48cbd9b322 [vm] Identify the vm isolate etc by construction not by name.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/54855
Change-Id: I31699c4343822e99a8fa275ba00dcdfa51cdd06b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351220
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-02-13 23:32:01 +00:00
Paul Berry
0ae2ac1277 Language test of record demotion behavior.
When a local variable is promoted to a record type, and then an
assignment statement is used to assign a record literal to that local
variable, if the fields of the new record literal are not assignable
to the fields of the promoted record type, that's not a problem; both
the analyzer and front end agree that the local variable is simply
demoted.

But the spec implies that if the old and new record _shapes_ are the
same, then a compile-time error will occur instead of a demotion. I've
created https://github.com/dart-lang/language/pull/3613 to bring the
spec in line with the implementations. This test demonstrates the
current behavior of the implementations, and makes sure that it
doesn't regress.

Change-Id: I0eacd7ca7f6579a35dbc34687113a2112418f368
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352462
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2024-02-13 23:28:19 +00:00
Paul Berry
c9e2b012b1 Make the type schema for null-aware spread operations consistent.
Prior to this CL, the CFE used a nullable type schema for null-aware
spread operators in list literals, but a non-nullable type schema for
null-aware spread operators in set and map literals. This was clearly
an oversight; a nullable type schema should be used for for null-aware
spread operators in all kinds of collection literals.

This change brings the CFE into alignment with the analyzer.

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

Change-Id: I0d5aa128656c22211228f0dd35ccee40925b4ef0
Bug: https://github.com/dart-lang/sdk/issues/54828
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349921
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-02-13 22:25:41 +00:00
Martin Kustermann
385ab26022 [dart2wasm] Use identity hashmap for allowInterop closure map
This significantly speeds up certain operations as it avoids calling
complex closure equality logic in the hashmap operations.

See also [0] regarding us leaking those closures.

[0] https://github.com/dart-lang/sdk/issues/54908

Change-Id: I046063884b88fbe53bc3cb397b0087693c9b928a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352520
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-13 21:49:58 +00:00
Srujan Gaddam
ecec70c6f2 Update web DEPS to use extension types and generics
This will be paired with a hotfix to land in google3. Updating the
DEPS to use the latest version of package:web will be done in a
future commit.

Change-Id: Ia09b34e14250c9b2c2586d1dc369e9ccbab8b331
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349960
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-02-13 21:43:59 +00:00
Nate Biggs
1c5eccdd2b [dart2js] Make KernelImpactConverter state settable.
By making `_impactBuilder` a settable field, it simplifies conditional impact registration.

Change-Id: Icf684f1def18532755218e893bb3037d49de1490
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352181
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2024-02-13 21:26:46 +00:00
Brian Wilkerson
156eda1723 Verify that outlines work in generated code
Change-Id: I0f8797634bce12943dbb739b7d3904f7cfaa3d39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352102
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-13 20:35:19 +00:00
Nate Biggs
aead743863 [dart2js] Fix protobuf shaking algorithm.
- Reorganize conditional impacts/uses so that unused impacts only overwrite nodes that no other member condition is satisfying.
- Use `isMemberProcessed` instead of `isLiveInstanceMember` since some member conditions might be static members.
- Update deferred load algorithm to account for conditional uses.

Change-Id: I53ce6d283c5b79e0a7c9e7562fdcfe744e37bbc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352180
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2024-02-13 20:18:01 +00:00
Sigmund Cherem
955c8d63f6 [ddc] shard runtime_debugger_api_test.
This test appears to be timing out consistently in windows.

We split the test in two shards (sound vs unsound null safety)
as an attempt to address this issue.

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

Change-Id: I2230be95b1685ef1e5656eae2e740a94a0eeb320
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352049
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2024-02-13 20:10:17 +00:00
Nicholas Shahan
30a94fceaf Reland "[ddc] Fix running d8 with test.py"
This is a reland of commit 244f8cee87
with fixes for the file URIs passed on the command line.

Original change's description:
> [ddc] Fix running d8 with test.py
>
> - Add build targets to compile .dill outlines for common test 
>   dependencies using kernel_worker.dart.
> - Build ddc modules for common test dependencies and move amd versions
>   to a separate subdirectory.
>
> Change-Id: I126b5821f6aea00b753d83560c76f00c6c5edc61
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350081
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Nicholas Shahan <nshahan@google.com>

Change-Id: I5a77512984fda1d91c812f1e240e9c10609914f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351622
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-02-13 20:09:58 +00:00
Keerti Parthasarathy
3904a92c40 Add call hierarchy tests for augmentations
Change-Id: I5078dc604f1c5368fde708cd95033d3b134874d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-02-13 20:00:13 +00:00
Konstantin Shcheglov
de6d8cb813 Use File instead of String path in AnalysisHoverTest.
Change-Id: I945aef29b2f4284ba47597c13a718ea998f535c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-02-13 19:44:20 +00:00
Brian Quinlan
9967075787 [io] Fix a bug where Process.stdin.add exceptions could not be caught
Change-Id: I2383a74bfa6950ab8f8934087fb68218f06dd681
Bug:https://github.com/dart-lang/sdk/issues/48501
Tested: Unit test
CoreLibraryReviewExempt: dart:io only
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351380
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2024-02-13 18:26:49 +00:00
Derek Xu
6ca01d0854 [package:dds] Prepare to publish v3.2.0
Change-Id: Ife473a673b673ec982ee339242235807530b04fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352340
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-02-13 18:21:35 +00:00
Brian Wilkerson
2a4d527633 Attempt to fix a failure on the windows bot
Change-Id: Icd170157c9b9db4965c47f7540ae80535f572c35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352400
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-13 18:05:29 +00:00
Devon Carew
55f5cd67eb Bump webdev to 629c63214466a77d0994e9b8003120f48af9ef1d
Changes:
```
> git log --format="%C(auto) %h %s" 2539d54..629c632
 https://dart.googlesource.com/webdev.git/+/629c6321 Renaming "legacy" paths and DDC modules to "DDC" paths and modules. (2360)
 https://dart.googlesource.com/webdev.git/+/a67291db Fix failing record kind test (2366)
 https://dart.googlesource.com/webdev.git/+/d9cb5769 Bump actions/cache from 3.3.2 to 4.0.0 (2368)
 https://dart.googlesource.com/webdev.git/+/603ddf0f Bump actions/stale from 8.0.0 to 9.0.0 (2369)
 https://dart.googlesource.com/webdev.git/+/0b5c2090 Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (2367)

```

Diff: https://dart.googlesource.com/webdev.git/+/2539d54bca7143a2dd1a1ec5d55fa38ca481639c..629c63214466a77d0994e9b8003120f48af9ef1d/
Change-Id: I9595962423d95364890df3370df18e702b1213c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352047
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-02-13 17:39:54 +00:00
Ryan Macnak
448b9ef989 [vm] Don't unnecessarily extend lifetime of KernelLoader handles.
ZoneHandles out-live the HANDLESCOPE for class finalization, and can accumulate a lot of objects during FinalizeAllClasses.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/54886
Change-Id: Ia1330e0f27770c1a786a1b70e56881127cd936b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352052
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-02-13 17:30:29 +00:00
Konstantin Shcheglov
106db0d7b4 CQ. ErrorReporter, use atElement() instead of reportErrorForElement()
Change-Id: Ife5f6d04ee7c15e7703db3ad81eb7707c7f00ceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352053
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-13 17:16:07 +00:00
Brian Wilkerson
e349b3faef Address a review comment that keeps getting missed
Change-Id: I74b0b77da6524300ee3cd4c6a32ce0b225391eab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352048
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-02-13 17:11:29 +00:00
Dan Chevalier
03f797a85a Solidify dtd lifecycle
- devtools server can now take the dtd uri as a parameter on startup
   - dtdUri is passed to the server handler so that devtools can request it.
- FileService is implemented inside the Dart Tooling Daemon (dtd_impl)
    - Added FileService.setProjectRoots
    - Added unit tests and rpc exceptions
- on startup dtd now prints { uri, secret } so that the caller has the secret that allows them to call FileService.setProjectRoots

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

Change-Id: I7a66aca2f8f06f6a611a46c727a9d5c2485fbe3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346922
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2024-02-13 16:17:18 +00:00
Lasse R.H. Nielsen
712df96202 Avoid type checks in Future.wait
CoreLibraryReviewExempt: Bypassing because Wasm-approver is OOO.
Change-Id: I484e900c14f181f56083b6e90a0d1f34546c85e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341504
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2024-02-13 16:07:12 +00:00
Alexander Markov
a261196ea7 [vm] Remove context allocations for tear-offs
Previously, when taking a tear-off, a separate Context object was
allocated in order to capture receiver. Now, receiver is stored directly
in the Closure object in the 'context' field. This saves 1 object
allocation per tear-off and makes tear-offs cheaper compared to
explicit closures which can share context with other closures.

Benchmarks in AOT mode:

x64:
TearOff.NotInlined +40%
TearOff.NotInlined.InTry +43%
TearOff.Inlined.InTry +47%

arm64:
TearOff.NotInlined +27-43%
TearOff.NotInlined.InTry +29-43%
TearOff.Inlined.InTry +58-94%

arm64c:
TearOff.NotInlined +71%
TearOff.NotInlined.InTry +72%
TearOff.Inlined.InTry +96%

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/54808
Change-Id: I3ad95e8a8a4fc23f856bbc0fe238da58a9d25b8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350945
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-02-13 15:33:38 +00:00
Morgan :)
6d57fe5a1c Revert "[macros] Tweak diagnostic for unexpected macro implementation exception."
This reverts commit 093271880a.

Reason for revert: Breaks some analyzer tests.

Original change's description:
> [macros] Tweak diagnostic for unexpected macro implementation exception.
>
> The only expected exceptions at this point are DiagnosticException and MacroException subtypes; everything else is a bug in the implementation.
>
> Tweak the diagnostic to explain that it's due to a bug in the macro. Add the exception message and stack trace as a context message, and a fix hint to contact the author.
>
> Add a language test.
>
> R=jakemac@google.com
>
> Change-Id: Ieaa6bedb3bc1646e4be61b384619152cc173b7e0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351040
> Auto-Submit: Morgan :) <davidmorgan@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>
> Commit-Queue: Morgan :) <davidmorgan@google.com>
> Reviewed-by: Jake Macdonald <jakemac@google.com>

Change-Id: Ia64c112aad79fdcdd1f6e1a4b800616632107fc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352260
Auto-Submit: Morgan :) <davidmorgan@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-02-13 12:38:14 +00:00
Martin Kustermann
c0371169b0 Cleanup some code regarding deprecated native syntax
The VM target no longer supports the `foo() native "foo";` syntax. See
final removal in [0].

Dart2Wasm has never really been using it.

* In the sdk dart2wasm uses `external` functions with
  recognizion in the compiler based on the name of the method.
* JS interop is using `@JS` based mechanism.
* Wasm to Wasm interop is based on `@Native<>()` annotations.

This means that only dart2js/ddc are remaining users of the
`foo() native;` syntax (without following string).

So we can clean up some code.

[0] https://dart-review.googlesource.com/c/sdk/+/266387

Issue https://github.com/dart-lang/sdk/issues/28791
TEST=ci

Change-Id: I929789f7a1ea5ed5423b0db0c6a306406e2db2af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351083
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-13 10:41:32 +00:00
David Morgan
093271880a [macros] Tweak diagnostic for unexpected macro implementation exception.
The only expected exceptions at this point are DiagnosticException and MacroException subtypes; everything else is a bug in the implementation.

Tweak the diagnostic to explain that it's due to a bug in the macro. Add the exception message and stack trace as a context message, and a fix hint to contact the author.

Add a language test.

R=jakemac@google.com

Change-Id: Ieaa6bedb3bc1646e4be61b384619152cc173b7e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351040
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2024-02-13 10:31:11 +00:00
Jens Johansen
b2815eeb60 [CFE et al] Presubmit should give details of unexpected results
For instance before this CL one might just be told

```
1 failed:
lint/front_end/lib/src/fasta/type_inference/type_constraint_gatherer/ExplicitType: Fail
```

which isn't very actionable.

With this CL it will also print the error, giving something like

```
[...]/pkg/front_end/lib/src/fasta/type_inference/type_constraint_gatherer.dart:136:5: No explicit type.
    var isMatch = _isNullabilityObliviousSubtypeMatch(subtype, supertype);
    ^^^
1 failed:
lint/front_end/lib/src/fasta/type_inference/type_constraint_gatherer/ExplicitType: Fail
```

which is actually actionable.

Change-Id: I1e906a899b14678ae4f8625da6dc32d295a32ec6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352223
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-02-13 10:08:17 +00:00
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