Commit graph

99835 commits

Author SHA1 Message Date
Ryan Macnak d67f159332 [vm] Fix using GCC with the sanitizers.
TEST=local
Change-Id: Icb47e2c68e55ae14f806cb421b8d860cda4d1f1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350647
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-02-21 20:15:15 +00:00
Keerti Parthasarathy 233de26ab4 Add test for augmentations to Type Hierarchy legacy protocol
Change-Id: Ib76f9ec23b0d2270aef5c0b85b7ac72d8cc528e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353580
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-21 20:11:59 +00:00
Devon Carew 7c223d8312 [deps] rev async, browser_launcher, dartdoc, http, markdown, protobuf, sse, stream_channel, tools, vector_math, web, webdev, yaml_edit
Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (24266ca..6cdbc41):
  6cdbc41  2024-02-15  Kevin Moore  Update to latest lints, require Dart 3.2 (dart-lang/async#267)

browser_launcher (74a0efe..7956230):
  7956230  2024-02-16  sigmundch  Add extra flags to disable throttling behavior. (dart-lang/browser_launcher#55)

dartdoc (7e171fc..7a9df65):
  7a9df65f  2024-02-20  Parker Lougheed  Add fallback text for sidebar failing to load (dart-lang/dartdoc#3643)
  9bcabb50  2024-02-20  Parker Lougheed  Fix missing left sidebar on extension type pages (dart-lang/dartdoc#3662)
  e8b8faa2  2024-02-16  Sam Rawlins  Include extension types in 'implementers' list (dart-lang/dartdoc#3658)

http (6d9f9ef..ce0de37):
  ce0de37  2024-02-21  Derek Xu  Populate package:http_profile (dart-lang/http#1046)
  75e01f4  2024-02-20  Brian Quinlan  Create a simple WebSocket interface (dart-lang/http#1128)

markdown (c2b8429..d735b0b):
  d735b0b  2024-02-21  Tom Yeh  Fix `#578`: list with checkbox mixed with empty lines (dart-lang/markdown#583)
  6efe141  2024-02-14  Kevin Moore  Migrate example to pkg:web, update minimum required Dart version (dart-lang/markdown#582)

protobuf (a293fb9..f085bfd):
  f085bfd  2024-02-20  Ömer Sinan Ağacan  Fix message_set.dart copyright year (dart-lang/protobuf#912)

sse (af7d8d0..13ec752):
  13ec752  2024-02-20  Kevin Moore  blast_repo fixes (dart-lang/sse#104)
  2830dc9  2024-02-16  Kevin Moore  Support the latest pkg:web, require Dart 3.3 (dart-lang/sse#103)

stream_channel (851336f..e02a5dd):
  e02a5dd  2024-02-16  Kevin Moore  Require Dart 3.3, update and fix lints (dart-lang/stream_channel#100)
  e62706e  2024-02-16  Kevin Moore  blast_repo fixes (dart-lang/stream_channel#101)

tools (2ef7673..9f4e6a4):
  9f4e6a4  2024-02-16  Elias Yishak  Helper to resolve dart version for clients of analytics (dart-lang/tools#233)
  8323b21  2024-02-13  Elias Yishak  New event added for sending analytics within package on errors (dart-lang/tools#229)

vector_math (cb976c7..3706feb):
  3706feb  2024-02-18  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (google/vector_math.dart#313)

web (a54a1f0..975e55c):
  975e55c  2024-02-15  Kevin Moore  Add TrustedTypes (dart-lang/web#173)
  0447807  2024-02-15  Srujan Gaddam  Add info on generation conventions (dart-lang/web#171)

webdev (629c632..51b5484):
  51b54843  2024-02-14  Elliott Brooks  Implement `setFlag` for 'pause_isolates_on_start' (dart-lang/webdev#2373)

yaml_edit (2a9a11b..82ab64d):
  82ab64d  2024-02-21  Danny Tuppeny  Fix line endings for inserted maps on Windows (dart-lang/yaml_edit#66)
  6906ac4  2024-02-20  Devon Carew  update the publish workflow (dart-lang/yaml_edit#67)

Change-Id: I246c393586e3d6239925ac3cf3a6a245d86a2bf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353581
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-02-21 20:04:59 +00:00
Konstantin Shcheglov e0c0cab514 Macro. Code optimizer. Update initializers of final fields, when has const constructor.
Change-Id: I7a0097e240c2e54c47e6a24cb07054f656950ea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353582
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-21 19:55:37 +00:00
Alexander Aprelev 35c6cc6234 Reapply "[vm/win] Use wide-character api for local hostname on Windows."
This relands a fix for looking up hostname on Windows in utf8-aware fashion.
Previously this was reverted because the API was only introduced in Windows 8,
making this use of Windows API fail on Windows 7.
With Windows 7 no longer being a target, original fix can be relanded.

BUG=https://github.com/dart-lang/sdk/issues/52701
TEST=manually

Change-Id: I330048c8b92ce805b7bb7e3fa05c88fefe3a30b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353500
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2024-02-21 19:31:58 +00:00
Dan Chevalier ec4dd93848 Fix DTD examples and add specs to ensure their continued function.
Change-Id: Iade096c5d1c619a903a6bca44750e9c0264b74dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352920
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2024-02-21 19:05:36 +00:00
Sam Rawlins 692fd4ebb8 linter: Remove unused ConditionScopeVisitor
Change-Id: Ie002ffb6bdaffd8ec3b6332c692b4304bc39cfe6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353060
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-21 18:43:17 +00:00
Ryan Macnak eb62be49a6 [vm, io] Assume ProcThreadAttrList functions are available on Windows.
The VM has required Vista since at least cb522bfcd2.

TEST=ci
Change-Id: I6b6d293f1e2821c441482745fef38a07aacf528c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353231
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-02-21 18:27:41 +00:00
Konstantin Shcheglov d5cf9dfa99 Augment. Create ConstFieldElementImpl for any 'final' instance fields in classes.
We don't know if there is a 'const' constructor, so we do it for all fields.
If there is no 'const' constructor, we clear 'constantInitializer's.

Change-Id: I123fe318497f074a449dae4e857889989a2563ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353230
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-21 17:34:50 +00:00
Sergey G. Grekhov 5e83b53f97 [co19] Roll co19 to 867d139b3169fc131488e893ec1133dc98cc3aa0
2024-02-20 sgrekhov22@gmail.com dart-lang/co19#2496. Add missing part file (dart-lang/co19#2552)
2024-02-20 sgrekhov22@gmail.com dart-lang/co19#2549. Update built-in identifier tests. Add missing ones. Part 2 (dart-lang/co19#2551)
2024-02-20 sgrekhov22@gmail.com dart-lang/co19#2549. Update built-in identifier tests. Add missing ones. Part 1 (dart-lang/co19#2550)
2024-02-19 sgrekhov22@gmail.com Fix dart-lang/co19#2546. Add constant context tests (dart-lang/co19#2547)
2024-02-15 sgrekhov22@gmail.com Fixes dart-lang/co19#2496. Fix co19 tests that became failing after test runner update (dart-lang/co19#2497)
2024-02-14 sgrekhov22@gmail.com dart-lang/co19#1400. Add cascade operator test and more constants tests (dart-lang/co19#2545)
2024-02-14 sgrekhov22@gmail.com dart-lang/co19#2350. Add more factory constructor tests (dart-lang/co19#2543)
2024-02-14 sgrekhov22@gmail.com dart-lang/co19#1400. Add representation variable initialization test (dart-lang/co19#2544)
2024-02-13 sgrekhov22@gmail.com dart-lang/co19#2119. Remove unsupported element from Stream.first/lastWhere tests description (dart-lang/co19#2540)
2024-02-13 sgrekhov22@gmail.com dart-lang/co19#2119. Remove unsupported element from ReceivePort.first/lastWhere tests description (dart-lang/co19#2541)
2024-02-13 sgrekhov22@gmail.com dart-lang/co19#2339. Add more tests for the extension method with the name `type` (dart-lang/co19#2542)
2024-02-12 sgrekhov22@gmail.com Fix dart-lang/co19#2535. Add patterns constants tests for extension types (dart-lang/co19#2539)
2024-02-12 sgrekhov22@gmail.com Fix dart-lang/co19#2485. Update`as` and `is` expressions tests with a function type (dart-lang/co19#2538)
2024-02-12 sgrekhov22@gmail.com Fix dart-lang/co19#2536. Fix use of HINT.UNREACHABLE_SWITCH_CASE (dart-lang/co19#2537)
2024-02-09 sgrekhov22@gmail.com dart-lang/co19#2119. Remove unused code, add issues numbers (dart-lang/co19#2534)
2024-02-09 sgrekhov22@gmail.com dart-lang/co19#2529. Fix failing API core tests (dart-lang/co19#2533)
2024-02-09 sgrekhov22@gmail.com dart-lang/co19#2529. Delete API tests with compile-time errors (dart-lang/co19#2531)
2024-02-09 sgrekhov22@gmail.com dart-lang/co19#2529. Fix and enable Iterable/forEach_A03_t01 (dart-lang/co19#2532)

Change-Id: I03e721d3871d5bf2b9773fbf7ebadb2a1804a111
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353260
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-02-21 15:56:27 +00:00
Chloe Stefantsova ec597188e5 [cfe] Address more cases of declaredNullability being overridden
This is a follow-up to https://dart-review.googlesource.com/c/sdk/+/350323

This CL addresses more of the cases where the `declaredNullability` of a type
object is overridden by the overall `nullability`, introducing unexpected
values to the field.

TEST=existing

Change-Id: I4830cd8113604dcc38a01ff09a9c1b2f50e091ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351141
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-02-21 15:37:11 +00:00
Paul Berry 4d1c8b09cb Fix context for the RHS of the invocation of an extension setter to match analyzer.
This looks like it was an oversight--previous to this change, there
was zero test coverage for this case.

Change-Id: I4301a3ba90aedce3b0fcd901649c370cba522f4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353280
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-02-21 15:10:18 +00:00
Ömer Sinan Ağacan 2da70a8d9e [dart2wasm] Improve closure hash codes
Currently hash code for a closure is the hash code of it's runtime type.

This causes a lot hash collisions in some apps and cause performance
issues.

With this patch we now use captured objects in closures when calculating
hash codes.

The hash codes are now:

- For tear-offs:

    mix(receiver hash, closure runtime type hash)

- For instantiations:

    mix(instantiated closure hash,
        hashes of captured types)

  Note that an instantiation can be of a tear-off, in which case
  "instantiated closure hash" will calculate the tear-off hash as above.

- For others (function literals, static functions), the hash is the
  identity hash.

Fixes #54912.

CoreLibraryReviewExempt: Mark private corelib function as entry-point in Wasm
Change-Id: I6a123fdc690237f543bb8bf832f0f8119d013a55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353162
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-02-21 14:44:20 +00:00
Sergey G. Grekhov 3b52517bca [test] Add support of dart2wasm.status in co19 tests
Fixes: #54971

Change-Id: I033c8ba78e6cdcf26dce9cae8998308a595a37e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353262
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-02-21 14:03:23 +00:00
Johnni Winther d7c868f6a7 [DEPS] Update checked-in SDK
This update the checked-in SDK to a version that includes
fe52b9bfe5
which adds support for `dart:_macros` and `package:macros`.
This is needed in order to move shared macro code from to
pkg/_fe_analyzer_shared/ (a temporary location) to `dart:_macros` and
used from the CFE and analyzer through `package:macros`.

Change-Id: Icba4e19ff654b8a664269c12ac555912eccf42bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353401
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-02-21 13:29:20 +00:00
Paul Berry fa38f392fa Fix context for null-aware extension method invocations to match analyzer.
This looks like it was an oversight--previous to this change, there
was zero test coverage for this case.

Change-Id: Icba1381c389af37ab4fe38f345cc78fe6c01d7f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353226
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-02-21 13:13:07 +00:00
Lasse R.H. Nielsen e86b08e5bb Forwards ignore bit to chained-to _Future.
If a target `_Future` is chained to another source `_Future`,
then it's because the target will complete with the same
result as the source future. Instead of keeping both
alive with a listener on the source which completes the target,
instead the target moves all its listeners to be directly on
the source, and keeps a link to the source in case more listeners
are added later.
The idea is that most futures are unreferenced after they have
had their first listener, so the target future has a chance
to be GC'ed.

If the target future has `.ignore()` called, and has no listener,
then the source completing with an error should not cause the
error to be uncaught. Without the optimization, the source would
have had a listener, and the target would ignore the error.

To simulate that, the source now gets a copy of the target's
`_ignoreUnhandledErrors` flag.

This is still not precisely the same as it would be without the
optimization. If *two* target futures are chained to the same source,
and only one of targes has `.ignore()` called, then this
implementation will make the uncaught error not be reported,
where it technically should.

(An alternative would be to *not* use chaining for futures
with `ignore()` called on them. But those are precisely futures
that are likely to be GC'able, because someone has already said
that they don't care if the future complete with errors.)

Fixes #54943

Bug: https://github.com/dart-lang/sdk/issues/54943
Change-Id: I0dbb4919ce2ea612d66539862fa0eb188aab8287
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352908
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2024-02-21 13:05:56 +00:00
Jens Johansen 8a6b48f596 [CFE] First pass at coverage tool
* Added tests for compiling the platform with coverage information
* Patched all CFE suites to be able to capture coverage information
  (e.g. via
  `out/ReleaseX64/dart pkg/front_end/test/fasta/strong_suite.dart \
  --coverage=coverage/` and then merging and showing via
  `out/ReleaseX64/dart pkg/front_end/tool/coverage_merger.dart \
  --coverage=coverage/`)
* Added "meta test" that runs all of the cfe et al tests and captures
  coverage information at the end.
* Patched the bulk compiler to be able to capture coverage information
  (likely only works in non-Windows as it has to hook into signaling to
  be able to capture data as the process is being killed by the test.py
  script).
* Tool for combining the dumped coverage information.
* Meta test that executes everything and combines the result
  (run via e.g. `out/ReleaseX64/dart-sdk/bin/dart \
  pkg/front_end/test/run_all_coverage.dart`)

Initially I wanted to (for language tests) have per-test coverage,
changed the test.py scripts to run the tests through a special tool that
then captured coverage information for the kernel_service isolate which
worked well for tests that compiles without error, but doesn't work when
there are compile time errors (because dart terminates before coverage
can be captured). So the solution - at least for now - was to hook into
the batch compilation.

The "visualization" of the result currently isn't very good -- mostly
just a list of not covered positions -- but the hope is that everything
that should be covered (eventually) will be covered, so maybe it's not a
big deal.

Also still to do is being able to - probably via comments in the covered
code - say "this isn't expected to be covered", so we can work towards
expecting all (or certain) files to be 100% covered (modulo those
comments), e.g. when running the thing on the weekly bot.

Change-Id: I6f885f4a9c04fb52a65797a9de790e1e5eacecf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353103
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-02-21 12:40:01 +00:00
Jake Macdonald 123e680534 update public macro apis in dart:_macros
Change-Id: Ic27669dee0bbaa96a362e5ecc5fecdd9bb86b693
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353321
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-02-21 12:06:09 +00:00
Chloe Stefantsova 91c54ff06a [analyzer,cfe] Share classes representing type constraints
Part of https://github.com/dart-lang/sdk/issues/54902

Change-Id: Ic441a582bcc43fb5d909ca70f101160512f11afe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352222
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-02-21 12:03:14 +00:00
Chloe Stefantsova 1f299666e9 [cfe] Use argument original order for downcasts from dynamic
Closes https://github.com/dart-lang/sdk/issues/54935

Change-Id: Id9e579ba015d19a5fab709e60dfbae77b0980dd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353402
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-02-21 11:27:23 +00:00
David Morgan cccde729eb [test_runner] Fix static_error_test on Windows.
The path separator in the expect makes it fail; shorten the path, there
is no need for a separator in the test case.

R=whesse@google.com

Change-Id: Ief6078828daa18e1bf552e62ea0d3d4dee70ec84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353400
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2024-02-21 09:46:42 +00:00
Johnni Winther 460e003cac [cfe] Use generateKernelInternal in fasta compile
Change-Id: I578406cd8878778f15f77c33e0d17784f62ea841
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353180
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-02-21 09:14:39 +00:00
Sam Rawlins 967d13fb95 frontend: prepare for curly_braces lint change
This aligns this code better with Effective Dart and prepares for the
upcoming lint rule change at https://dart-review.googlesource.com/c/sdk/+/353140.

Change-Id: I4a419c50b851680150d4f17941bc0f94a98cb148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353221
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-02-21 07:28:59 +00:00
Keerti Parthasarathy 249895f979 Add type hierarchy tests for augmentations for LSP protocol.
Change-Id: Ie6358f4908e988b89afea44b663d03c042346e1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353204
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-21 01:04:03 +00:00
Mayank Patke 69df740ea9 [dart2js] Assorted TODO cleanup, bump pubspecs to 3.3.0
Change-Id: I621ac252c5d6f3b157a2f194b7f0b7ad85874e4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352990
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-02-21 00:02:13 +00:00
Srujan Gaddam e9678f72de [dart2js] Handle object literal constructors with no library @JS annotation
Fixes https://github.com/dart-lang/sdk/issues/54801

Object literal constructors need to be explicitly handled when
determining a member is JS interop or not in dart2js as it does
not require any @JS annotations.

Change-Id: Iee99375439057844485aa3f5cd88f85f5d03ae06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349840
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-02-20 23:59:24 +00:00
Vyacheslav Egorov 9fe6571a75 [vm/compiler] Let Parameter carry its location
Previously we would specify parameter offset and base register and
use SpecialParameter instruction to represent values passed in
registers.

This CL simplifies and merges these concepts: now every Parameter
instruction simply carries around its Location.

This CL also tweaks printing of stack slot locations so that they
are easier to read: `S+1` becomes `fp[1]` or `sp[1]` depending on the
base register, DS+1 becomes `dword fp[1]` / `dword sp[1]` and `QS+1`
expands to `qword fp[1]`/`qword sp[1]`.

Additionally we clean `BlockBuilder` API a bit - instead of
passing `with_frame` to `AddParameter` we make this the
property of the builder itself, set at construction time.

Issue https://github.com/dart-lang/sdk/issues/54955
Closes https://github.com/dart-lang/sdk/issues/31956

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-ffi-qemu-linux-release-arm-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-product-x64-try,vm-aot-mac-release-x64-try
Change-Id: Ie24dc6b6c47b3a45db722813218bc53c3a06c91d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353081
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-02-20 23:54:08 +00:00
asiva ac39be3eed [VM/Service] Define vmservice entry points only under non product mode
TEST=ci

Change-Id: I2d72d4c786e3725434c552a317da6b50a08646c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353228
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-02-20 22:48:47 +00:00
Mayank Patke 0d9d7f4e75 Clean up TODOs in TryConstantEvaluator.
Issue: #48820
Change-Id: I01a9c7b1de3697afc2d643a5a1c7aaa26532ea70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352974
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-02-20 21:46:43 +00:00
Mayank Patke 2fc877a09a [dart2js] Use new method encoding in runtime type analysis.
Change-Id: I41e6b6314266203e37badcb084becd95894bdf6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352966
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-02-20 21:42:19 +00:00
pq 3f5a96bbf4 don't overreport prefer_void_to_null in augmentations
See: https://github.com/dart-lang/linter/issues/4890

Change-Id: Ie2f3364e781c5b62cbea252460b28ba48482a552
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353203
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-02-20 21:01:50 +00:00
Mayank Patke b0a96bf950 [dart2js] Clean up handling of missing super methods.
Issue: #47406
Issue: #48820
Change-Id: I19de399c4670f9866cffceae3bc3ce19201d1ed3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352963
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-02-20 21:01:14 +00:00
Devon Carew 3722837cec Bump http to 6d9f9efe04886d9685fbfb1a76ba24a71b6c951c
Changes:
```
> git log --format="%C(auto) %h %s" f0a02f9..6d9f9ef
 https://dart.googlesource.com/http.git/+/6d9f9ef blast repo changes: auto-publish, github-actions, no-response (1133)
 https://dart.googlesource.com/http.git/+/d8b237d [http] Migrate to the latest pkg:web, require Dart 3.3 (1132)
 https://dart.googlesource.com/http.git/+/5179d1c Bump actions/cache from 3.3.2 to 4.0.0 (1125)
 https://dart.googlesource.com/http.git/+/0b803e8 Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (1124)
 https://dart.googlesource.com/http.git/+/82e0424 Use preferred flutter version constraints (1119)
 https://dart.googlesource.com/http.git/+/ccefa7c Support `BaseResponseWithUrl` in `package:cupertino_http` and `package:cronet_http` (1110)
 https://dart.googlesource.com/http.git/+/e7a8e25 Add `BaseResponseWithUrl.url` (1109)
 https://dart.googlesource.com/http.git/+/c8f17a6 Add a contributing guide (1115)
 https://dart.googlesource.com/http.git/+/ebd86b9 Add the ability to get response headers as a `Map<String, List<String>>` (1114)
 https://dart.googlesource.com/http.git/+/5c75da6 Add tests for sending "cookie" and receiving "set-cookie" headers (1113)
 https://dart.googlesource.com/http.git/+/c2a6d64 [cronet_http] ⬇️ Downgrade `minSdkVersion` to 21 (1104)
 https://dart.googlesource.com/http.git/+/661f5d6 Use `package:http_image_provider` in all `Client` implementation examples (1089)
 https://dart.googlesource.com/http.git/+/473a892 Remove the "play-services-cronet" dependency in the example app when building `package:cronet_http_embedded` (1103)
 https://dart.googlesource.com/http.git/+/e79ebe1 Fix `labeler.yml` (1099)
 https://dart.googlesource.com/http.git/+/73b0b1c Bump actions/labeler from 4.3.0 to 5.0.0 (1096)
 https://dart.googlesource.com/http.git/+/15ec3ba Prepare to publish `package:cronet_http` as 1.0.0 (1087)
 https://dart.googlesource.com/http.git/+/26e55c3 cronet_http: require android API level 28 (1088)
 https://dart.googlesource.com/http.git/+/b10f448 [cronet_http] Enables CI for `cronet_http_embedded` (1070)
 https://dart.googlesource.com/http.git/+/a5b8eec Prepare to publish cupertino 1.2.0 (1080)
 https://dart.googlesource.com/http.git/+/c114aa0 Add a fake response for PNG images (1081)
 https://dart.googlesource.com/http.git/+/db2cb76 Run web tests with wasm with dev Dart sdk (1078)
 https://dart.googlesource.com/http.git/+/36f98e9 Fix a bug where BrowserClient was listed as requiring Flutter (1077)
 https://dart.googlesource.com/http.git/+/db7f165 Provide an example of configuring IOClient with an HttpClient. (1074)
 https://dart.googlesource.com/http.git/+/cd748b6 Document that runWithClient must be called for every isolate (1069)
 https://dart.googlesource.com/http.git/+/f585947 Test persistentConnection with large request bodies (984)
 https://dart.googlesource.com/http.git/+/7c05dde Add documentation for "no_default_http_client" (1068)
 https://dart.googlesource.com/http.git/+/d8983fa Add support for setting headers for all requests (1060)
 https://dart.googlesource.com/http.git/+/c90496e Document how to use replacement `Client` implementations (1063)
 https://dart.googlesource.com/http.git/+/c8536e4 [http_client_conformance_tests] Updates to support wasm compilation (1064)
 https://dart.googlesource.com/http.git/+/5dd5140 Bump actions/setup-java from 3 to 4 (1065)
 https://dart.googlesource.com/http.git/+/064f510 misc cleanup of yaml files (1061)
 https://dart.googlesource.com/http.git/+/22f52e2 Update pubspec.yaml to 0.4.2 (1059)
 https://dart.googlesource.com/http.git/+/40a46d8 Fix a bug where cronet_http sends incorrect HTTP request methods (1058)
 https://dart.googlesource.com/http.git/+/c125ed5 [http] Allow pkg:web v0.3.0 (1055)
 https://dart.googlesource.com/http.git/+/9fb4cfa Update lints to latest, etc (1048)
 https://dart.googlesource.com/http.git/+/5e84d9f Update platform-specific imports for wasm (1051)
 https://dart.googlesource.com/http.git/+/8c9feb5 [http] Fix type cast for dart2wasm (1050)
 https://dart.googlesource.com/http.git/+/a2f0b25 [http] use pkg:web, require Dart 3.2 (1049)

```

Diff: https://dart.googlesource.com/http.git/+/f0a02f98f7c921e86ecc81c70f38bb6fbccc81b9..6d9f9efe04886d9685fbfb1a76ba24a71b6c951c/
Change-Id: Ic67698b3c808f4fc550cd3c59dc8efdf508384df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353202
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2024-02-20 20:53:18 +00:00
Paul Berry 32ab547688 Fix analyzer handling of record literal type inference.
This CL contains several small bug fixes:

- The context is only used for type inference if it is a record type
  with the same shape as the record literal. Previously, if the
  context was a record type with a different shape than the record
  literal, the analyzer would attempt to do an approximate match
  (using the context from any matching named fields, and from all the
  positional fields that were in common between the context and the
  literal). At first glance, it might seem like this would only matter
  for erroneous code (since record shape mismatches typically lead to
  compile-time errors). But if the context arises from a local
  variable promotion, then a mismatch doesn't lead to a compile-time
  error; it simply leads to a demotion. So the difference is
  observable for non-erroneous code.

- If one of the fields is implicitly downcast from `dynamic`, the
  static type of the field's expression remains `dynamic`. This makes
  the behavior of dynamic downcasts inside field literals consistent
  with all other implicit dynamic downcasts.

- If one of the fields is implicitly downcast from `dynamic`, the
  downcast is made to the greatest closure of the context. Previously,
  the downcast was made to the context itself, which meant that it was
  possible to create static types containing the unknown type,
  violating one of the key assumptions of the Dart type system.

- If one of the fields has a static type of `dynamic`, and `dynamic`
  is a subtype of the greatest closure of the context (e.g. because
  the context is `Object?`), no dynamic downcast is
  performed. Previously, a dynamic downcast _was_ performed, meaning
  that the static type of the resulting record literal would have
  `dynamic` in a spot where `Object?` should be.

This brings the analyzer behavior into line with the spec and the
front end, with one minor exception:

- When the front end uses the greatest closure of the context to
  implicitly downcast a field from dynamic, it uses a modified
  greatest closure algorithm where covariant instances of `_` are
  replaced with `dynamic` instead of `Object?`.

The front end's behavior in this rare case doesn't agree with the
spec; I'll address this in a future CL.

Change-Id: Ib1ab7ee4d0f63a152480704e2c0d5332446a613c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350983
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2024-02-20 20:21:48 +00:00
Ryan Macnak cfe4462b28 [vm] Add some warnings to Dart_RecordTimelineEvent.
TEST=no
Change-Id: I448901c2767c48e931dc492e000d2f01e5194ed8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353225
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-02-20 20:18:09 +00:00
Dan Chevalier 952e3b718f Add --unrestricted to DTD command.
NOTE: the tests view better if you turn off whitespaces on the diff.

This command will start a DTD instance that has the FileSystem service restrictions disabled. Which can be used in development environments.

Bug: https://github.com/dart-lang/sdk/issues/54762
Change-Id: I829f83d7c7afc7dd83732fc8a600cb41ffe36f63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352921
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2024-02-20 20:08:57 +00:00
Danny Tuppeny 30b9238561 [dds/dap] Increase number of toStrings() per evaluation from 11 to 100
This was an apparently error when moving to the SDK DAPs. The original DAPs performed 100 toStrings() (and 100 is the batch size for VS Code, so the user wouldn't usually see the limit) but we'd done 10 (actually 11) here.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4995

Change-Id: Ie3ca74c9189a725adb971646db2defaf1ffa9627
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353104
Reviewed-by: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-20 19:24:12 +00:00
asiva 6ee5474a62 [dartdev/tests] Fix racy tests.
Fix vm service tests which are racy as dds is spawned as an external
process and the testee process might have exited before dds
connects to it.

Change-Id: I514e20c84c6041cb1b65854494698911a34eb50e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352464
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-02-20 19:14:44 +00:00
Sam Rawlins 6ff4673225 build_integration: prepare for stricter implementation_imports check
As an oversight, this lint rule doesn't currently check non-lib directories. It
will in https://dart-review.googlesource.com/c/sdk/+/351160.

Change-Id: I6881a2224a2f3689e84bba36b331184fef497239
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353223
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-02-20 18:47:41 +00:00
Derek Xu 391c0fb6c0 [VM] Remove deprecated Dart_TimelineEvent embedder API
TEST=CI

Change-Id: I094c32ec44a886a8154692de22b6575661918d29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353240
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-02-20 18:18:30 +00:00
Paul Berry 8047862840 Change a HACK to a TODO
The analyzer team has decided to adopt the convention of using `TODO`
comments to document long term issues that should persist in the
codebase, and `FIXME` comments to document short term issues that need
immediate attention (see
https://dart-review.googlesource.com/c/sdk/+/295662).  They may even
consider adding a presubmit hook to ensure that `FIXME` comments are
only used during local development.

We didn't consider `HACK` comments at the time, but IMHO it makes
sense to treat them the same as `FIXME` comments; that is, as a rule
we don't include them in checked in code.

This change restores the analysis server to a state of having a clean
"problems" view when edited using Visual Studio code.

Change-Id: Icd6079cb1eb47e02d9084332d0bad0e3afa04177
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2024-02-20 18:15:11 +00:00
Sam Rawlins 35075c1c22 modular_test: prepare for curly_braces lint change
This aligns this code better with Effective Dart and prepares for the
upcoming lint rule change at https://dart-review.googlesource.com/c/sdk/+/353140.

Change-Id: Ibfb4736ae01a6e2d843f9faf19eba08c16ff6c92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353222
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-02-20 17:56:29 +00:00
pq 22520f43f9 mixin support for camel_case_types
Fixes: https://github.com/dart-lang/linter/issues/2532

Change-Id: Icbc5c9ae4bd8b50c1a4471424bd9ae3d95299257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352976
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-02-20 16:59:03 +00:00
pq c55a99c855 non_constant_identifier_names support for augmentations
See: https://github.com/dart-lang/linter/issues/4883

Change-Id: Ia83e8a6e8e726bc3ef83ccbc5c0106f9698e4d4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352978
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-02-20 16:57:54 +00:00
osaxma a3cb1f6bdc Fix issue where invalid analysis options file is produced for some tests
R=brianwilkerson@google.com

fixes: https://github.com/dart-lang/sdk/issues/54921
Change-Id: Ib1d7fa2400ea587ff66568efdaec67559cad1e6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352866
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Osama Alraddadi <osama.alraddadi@gmail.com>
2024-02-20 16:51:00 +00:00
Erik Ernst bf17088787 Add test about types being incompatible with await
PR https://github.com/dart-lang/language/pull/3560 and
https://github.com/dart-lang/language/pull/3598 updated the feature
specification of extension types to define a notion of types being
'incompatible with await'. This CL adds a test to verify that various
types are being classified correctly, and errors are hence reported
as expected for expressions of the form `await e`.

Change-Id: I39e992b4317ef49fbc2267819481d71d87b56aca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351143
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2024-02-20 16:49:49 +00:00
Sam Rawlins e61f2a0d89 dart2wasm: prepare for curly_braces lint change
This aligns this code better with Effective Dart and prepares for the
upcoming lint rule change at https://dart-review.googlesource.com/c/sdk/+/353140.

Change-Id: I96e77d5c49c17fe0dfcbef7e997cb9d634f1e648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353201
Reviewed-by: Ömer Ağacan <omersa@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-02-20 16:35:28 +00:00
Sam Rawlins cda9755918 dev_compiler: prepare for curly_braces lint change
This aligns this code better with Effective Dart and prepares for the
upcoming lint rule change at https://dart-review.googlesource.com/c/sdk/+/353140.

Change-Id: I1b3ff4a4f85ec2182d06a67acf0e43fbc45129f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353220
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-02-20 16:04:30 +00:00
David Morgan 93b7791c0c [macros] Fix flakiness on Windows related to add during flush and timeouts.
R=jakemac@google.com

Change-Id: I48f5829613ca2999caf23a485648054b920596a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352907
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2024-02-20 15:47:10 +00:00