Commit graph

91682 commits

Author SHA1 Message Date
Jonas Finnemann Jensen 05e77a934e Document relocation of PUB_CACHE.
See: https://github.com/dart-lang/sdk/issues/52386
Change-Id: I48149aeeea5a78ea2c1d9d7b3b9df8d48ed2310e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303321
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2023-05-15 13:33:41 +00:00
William Hesse 022d92e391 [infra] Fix utility used when bisecting CI failures
The bisection capability for failing builds on the CI is not much
used, and it is failing when updating the build information in Firestore.

A simple error in the script is causing the current error, so
this CL fixes a simple error in tools/bots/update_blamelists.dart.

Bug: https://github.com/dart-lang/sdk/issues/51978
Change-Id: Iba71e6115427145d20458d9e56f4cfa73fa232c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302923
Auto-Submit: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-05-15 11:02:47 +00:00
Johnni Winther 0767670779 [cfe] Don't create tear-offs for sealed class constructors
Closes #52359

Change-Id: Iaa8d64f01978c201165242dd0b0a3b18890de833
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302920
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-05-15 06:32:34 +00:00
Paul Berry 214a98e1dd [flow analysis] clean up public methods that call other public methods.
In a future CL, I plan to introduce some state tracking logic at the
top of each public method in `FlowAnalysisImpl` to verify that the
caller invokes flow analysis API methods in an order that respects
some important invariants. When I do that, it will be confusing if
there are some public methods in `FlowAnalysisImpl` that call other
public methods.

So, to avoid confusion in that future CL, this CL refactors the public
methods `lateInitializer_end` and `functionExpression_end` (which are
functionally equivalent) so that they call a common private method,
rather than one calling the other. Similarly, it refactors the public
methods `parenthesizedExpression` and `forwardExpression` (which are
functionally equivalent) so that they call a common private method,
rather than one calling the other.

Change-Id: I7b6d23f2db409c652575beb73bba2ea11b0fa90b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-05-14 12:27:39 +00:00
Nicholas Shahan d7fc9ca3cc [ddc] Add get and set proto inlined helpers
The helper methods make it easier to call the JS version of
`Object.getPrototypeOf()` and `Object.getPrototypeOf()` from the
SDK libraries. The body gets inlined directly to avoid extra method 
calls in potentially hot code paths.

Start using the setter when setting base and extension classes.

Issue:https://github.com/dart-lang/sdk/issues/52372
Change-Id: I6ca70cbf1936f76f24c8843e51c1c47e9bfe659c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303009
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-12 23:38:38 +00:00
Helin Shiah fd5dd870a9 Add LICENSE for dap package
Change-Id: Ibbfb75cc3c9575047866e7392ce8048cd29e6942
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303080
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
2023-05-12 23:38:03 +00:00
Konstantin Shcheglov 4f77ddf8ce Start 5.13.0-dev, update CHANGELOG.md
There is a demand for a new analyzer version.
https://github.com/dart-lang/sdk/issues/52352#issuecomment-1546214969

I'm not ready to publish yet, lets wait for a couple of days after
landing `InvalidType`. But I'd like to record issues fixed.

Change-Id: I045ba904e3a229939fca5e37d63f16624cff8872
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303012
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-05-12 23:09:28 +00:00
Ryan Macnak 20674eee48 [vm, gc] Force inline VisitPointersNonvirtual.
Avoids some spill overhead in a scavenger hot-path.

TEST=ci
Change-Id: Icdbec3d71f0a833c5005b76815e94091afe79c47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303004
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-12 21:26:07 +00:00
Konstantin Shcheglov f4af6af85d Prepare for removing deprecated methods from ExtensionOverride.
The removal itself will happen in a separate CL, as a breaking change.
But we still had a few places that relied on `SimpleIdentifier` being visited.

Change-Id: I8f554cec77858cb8bc7deb29d98f0d6def8685ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303008
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-05-12 21:24:49 +00:00
Devon Carew eb5102284a [deps] rev browser_launcher, file, http, leak_tracker, logging, matcher, mime, mockito, native, path, test, watcher, webdev, yaml_edit
Revisions updated by `dart tools/rev_sdk_deps.dart`.

browser_launcher (ed11524..551e101):
  551e101  2023-05-11  dependabot[bot]  Bump actions/checkout from 3.5.0 to 3.5.2 (#43)
  29a57a0  2023-05-11  Elliott Brooks  Disable test (#44)

file (b905180..e90e5ed):
  e90e5ed  2023-05-11  Bernardo Ferrari  Migrate to Dart 3 (#210)

http (db84d12..981b63b):
  981b63b  2023-05-11  Brian Quinlan  Support the NSURLSession WebSocket API (#921)

leak_tracker (46a1fa0..bc7f604):
  bc7f604  2023-05-11  Polina Cherkasova  Fix typo. (#61)

logging (4779d7e..b75cba7):
  b75cba7  2023-05-10  Devon Carew  blast_repo fixes (#137)

matcher (5890f2b..4dfd9ad):
  4dfd9ad  2023-05-10  dependabot[bot]  Bump actions/checkout from 3.5.0 to 3.5.2 (#218)

mime (57fbf6e..eb9d54b):
  eb9d54b  2023-05-10  Devon Carew  blast_repo fixes (#95)

mockito (56173fa..51a7728):
  51a7728  2023-05-12  Copybara-Service  Merge pull request #597 from danielgomezrico:feat/returnInOrder
  7a93b61  2023-01-15  Daniel Gomez Rico  Add `returnInOrder` to `Mock`
  34da8da  2023-05-02  Nate Bosch  Import `packge:matcher` directly instead of `test_api`

native (908e61f..64aa5b5):
  64aa5b5  2023-05-12  Daco Harkes  [native_assets_cli] Add `outDirName` (#38)
  fdcd0eb  2023-05-09  Devon Carew  contribute a PR labeler (#37)
  d44eae5  2023-05-08  Daco Harkes  Give tests on MacOS more time (#36)
  3b39e07  2023-05-04  Daco Harkes  [c_compiler] Make `logger` required (#35)

path (1552cfd..f8d15c2):
  f8d15c2  2023-05-10  Devon Carew  blast_repo fixes (#144)

test (0b306dd..931410c):
  931410c8  2023-05-10  Nate Bosch  Fix CI (#2014)

watcher (9430592..1584936):
  1584936  2023-05-12  Brian Quinlan  Update to 1.1.0 in preparation for release. (#145)

webdev (469b105..60616ba):
  60616bac  2023-05-10  Elliott Brooks  Syntax error in DCM workflow file(#2108)

yaml_edit (763ca94..87dcf31):
  87dcf31  2023-05-10  Devon Carew  blast_repo fixes (#53)

Change-Id: I4d25e4ccb60a86a6b5f8a66cfc6ae09f6df0a954
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303005
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-12 20:46:44 +00:00
Alexander Aprelev 1cabe60b14 [vm/gardening] Fix send_unsupported_objects_* tests.
Make sure tests do correct checking of retaining paths, make sure test passes in obufscation mode

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

Change-Id: Id97a1302f151a2f359f34e5def065401a4aa47c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303003
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-05-12 19:42:12 +00:00
Helin Shiah aa9a219266 Add handling for DAP errors with full body
Change-Id: I214d8247bf1115c982912dd3331add5acdcddc3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302850
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2023-05-12 19:35:51 +00:00
Konstantin Shcheglov c0d33e45d1 Issue 52151. Fixes for reachability in switch patterns when unresolved / error type.
Bug: https://github.com/dart-lang/sdk/issues/52151
Change-Id: Ib56df1711cbfb7a593c7b16fd6a67e45baeabc3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302455
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-05-12 19:16:42 +00:00
Paul Berry 8d2b2a197d [parser] Ensure that list and map pattern parsing always makes progress.
In rare circumstances involving syntax errors, the `parsePattern`
method inserts a synthetic token but does not consume any
tokens. Usually when this happens it's not a problem, because whatever
method is calling `parsePattern` consumes some tokens, so the parser
always makes progress. However, when parsing list patterns, after
calling `parsePattern`, the parser would look for a `,`, and if it
didn't find one, it would supply a synthetic `,` and call
`parsePattern` again, resulting in an infinite loop. A similar
situation happened with map patterns, though the situation was more
complex because in between the calls to `parsePattern`, the parser
would also create synthetic key expressions and `:`s.

To fix the problem, when parsing a list or map pattern, after the call
to `parsePattern`, the parser checks whether any tokens were
consumed. If no tokens were consumed, it ignores the next token from
the input stream in order to make progress.

I also investigated whether there were similar issues with
parenthesized/record patterns and switch expressions, since those
constructs also consist of a sequence of patterns separated by tokens
and other things that could in principle be supplied
synthetically. Fortunately, parser recovery doesn't get into an
infinite loop in those cases, so I didn't make any further
changes. But I did include test cases to make sure.

Fixes #52352.

Bug: https://github.com/dart-lang/sdk/issues/52352
Change-Id: Idc8140236f6054deb1fd3c862036fe47dd84f30b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302803
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-05-12 18:43:39 +00:00
Jackson Gardner 48346c458a Static interop stuff might also be in ui_web, so it needs to be added
to the list.

This should fix https://github.com/dart-lang/sdk/issues/52364

Change-Id: Id6ab25ee48da4027adee89e91868bde5b07b4ac2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303002
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Mouad Debbar <mdebbar@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-05-12 18:25:59 +00:00
Brian Wilkerson d40890582c Convert uri completion tests
I am concerned about the tests marked with TODOs because I don't know
why the behavior changed. It's possible that the contributor is still
producing the suggestions but that they're being filtered out later.

I checked using the debugger, and they're not in the list of results
that we're getting back, so it seems likely that they represent real
bugs. If we just weren't detecting the bug before then we're good.

But I can't think how rewriting the tests could effect what the user
is seeing, so I think it's safe to make these changes.

Change-Id: If72042b7ec24b97994a12449c811213b8f708f72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-05-12 18:08:15 +00:00
Mark Zhou 383115fdbf [ddc] Renaming real deferred loading to DDC deferred loading
Change-Id: I9d2848288c76db0cc0427439a0bbc2e291a1df8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303001
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-12 17:54:55 +00:00
Nicholas Shahan f2aa312e17 [ddc] Implement new record types
Update the format of the shape keys to better match the format used in
the dart:_rti library. This change applies to the current runtime type 
system as well.

Change-Id: I87d2af2aaf2b9dbe012fae60a64718d264a3a18c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295721
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-12 17:23:07 +00:00
Konstantin Shcheglov 42c79709a4 Separate isDynamicBounded() and isInvalidBounded().
Also includes https://dart-review.googlesource.com/c/sdk/+/302680
that was reverted because of adding extre diagnostics for Flutter.

Change-Id: I4cf7cedfcb67a5af226e609d279551fea0b0dee1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302844
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-12 15:12:38 +00:00
Konstantin Shcheglov 5e083e7dbc Issue 52360. Don't attempt to serialize PatternAssignment.
Bug: https://github.com/dart-lang/sdk/issues/52360
Change-Id: Iaf6fdbc602bd534147d88882fc39db69c3014585
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302882
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-12 15:02:23 +00:00
Konstantin Shcheglov 7312bf2437 Issue 52362. Fix NPE in AstNodeExtension.nodeCovering()
Bug: https://github.com/dart-lang/sdk/issues/52362
Change-Id: I47db23d809e30e5470f16abe1308bd11e74f3410
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-12 14:59:59 +00:00
Johnni Winther 458ebaf1f1 [cfe] Fix caching of sublist
This cache didn't use the head size as intended.

Closes #52345

Change-Id: I99a3e4fe1664186103d889e0a324b6992947216a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302922
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-05-12 13:31:48 +00:00
Sergey G. Grekhov 57bee2ab35 [co19] Roll co19 to c19f40239d976ab7db825227ac1a230f347f42c0
2023-05-12 sgrekhov22@gmail.com Fixes dart-lang/co19#2046. `records`, `patterns`, `class-modifiers` experimental flags removed (dart-lang/co19#2047)

Change-Id: I1efad98384834ddb5d007b777c4f6893f9fa1635
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302921
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-05-12 10:20:08 +00:00
Ömer Sinan Ağacan 7bbe675971 [dart2wasm] Specify finalizer map concrete type
The map `breakFinalizers` need to have insertion-ordered iteration
otherwise creation of Wasm blocks when compiling try-finally blocks
won't work. Update the map type from `Map` to `LinkedHashMap` to make
this clear.

This doesn't change the concrete map type used as non-constant map
literals are already compiled to `LinkedHashMap`s, just makes the type
more precise for clarity.

Change-Id: Idebffe2f0f75232f5ef41729538ad3d2508c74c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294760
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-05-12 09:31:28 +00:00
Ryan Macnak f97200616a [infra] Remove old configurations for VM in checked mode.
Change-Id: I907345b2bfeedebc87cb79931b5eece38ef0f576
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290611
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-05-12 02:53:21 +00:00
Ryan Macnak 63b72e5357 [infra] Remove vm-aot-mac-release-simarm64 and vm-aot-mac-product-x64.
Change-Id: I061fa10156ec665b9296211588313f45c850cec1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300041
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-12 02:52:08 +00:00
Brian Wilkerson 57b11688ae Convert static member completion tests
I'm becoming concerned that the filtering is making it difficult to
verify the results. We can look at the textual output to see whether all
of the printed suggestions are valid, but we can't know what other
suggestions are being produced and whether they're valid, nor can we be
sure that suggestions that shouldn't be produced are not being produced.

Change-Id: Id131b9b53740b625ba74a9b5bdb690da21fcdbfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302901
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-11 23:28:23 +00:00
Keerti Parthasarathy a071769acc Improve error message for async return type
fixes #33424

Bug: 33424
Change-Id: I8a0b7fb356ded813bf8736f6e52ccd365987e148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302846
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-05-11 23:13:27 +00:00
Nicholas Shahan f469856233 [ddc] Temporarily skip tests that timeout
These tests are flaky or timing out on the stable DDC configurations.
This change adds skips for the canary configurations to avoid crashing
the infra when too many tests that timeout are attempted to be
deflaked.

When the canary mode stabilizes we should manually mark all these
tests as flaky if they are still not passing on the stable DDC
configurations.

Issue: https://github.com/dart-lang/sdk/issues/50666
Change-Id: I9b1cb8fe466624480767fea05610331bf0f4ed87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302843
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-11 23:03:38 +00:00
pq 88a71f7b7b add quick fix for unnecessary_null_checks
Change-Id: Ia51273c3036f627825ae01bb3bb57b1bd5c648b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302902
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-11 23:02:14 +00:00
Ryan Macnak 4641a46077 [vm] Update comment on thread interrupters.
TEST=docs only
Change-Id: Ib2921c485defc232264d0c4f86b783ce33c6eadd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302848
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-11 21:41:01 +00:00
pq b8f28f576c + quick fix for implicit_reopen
Change-Id: If12dc7c079d3024047379453ddfd715e854034e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-05-11 21:18:40 +00:00
Paul Berry 7968ea8b1f Remove unused parameter and return value from handleCaseHead.
These were introduced in
https://dart-review.googlesource.com/c/sdk/+/287601 to allow the
common front end to report back to the shared analysis logic when it
desugars a guard expression, so that flow analysis will properly
account for any promotions made by the guard expression; previously,
if a guard expression got desugared by the front end, promotions
performed by the guard would be lost.

In https://dart-review.googlesource.com/c/sdk/+/298840, we've switched
to a more general technique for ensuring that promotions performed by
the guard will not be lost: now the `dispatchExpression` method uses
`FlowAnalysis.forwardExpression` to compensate for the differences in
the conventions of the CFE and the shared logic, so that the shared
logic no longer needs access to the desugared expression. So the
`head` parameter (and the associated return value) are no longer
needed.

In a future change, I plan to adjust the CFE conventions to match
those of the shared logic, so that `FlowAnalysis.forwardExpression`
won't be needed at all (see
https://github.com/dart-lang/sdk/issues/52189).

Change-Id: I686d1d5b7e4c9db353f583c38792274451f9f8bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302366
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-05-11 20:58:22 +00:00
Ryan Macnak f4bd3590fc [vm, gc] Avoid double-checking when draining work lists.
TEST=ci
Change-Id: Icc1a8e42e58eee967e562e4e0429eaab33dd7fe0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302802
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-11 18:31:30 +00:00
Kallen Tu e155e4d515 [cfe] Add tests for pre-feature and a post-feature declaration interactions.
Just adding a few tests to make sure there's no regressions.

Bug: https://github.com/dart-lang/sdk/issues/52259
Change-Id: I6aad2d0040736462117a0ce60e3001725923e242
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302445
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-05-11 17:44:27 +00:00
Ryan Macnak 13c094e30a [pkg] Support mmap with all the Linux architectures.
TEST=pkg/mmap, local qemu
Bug: https://github.com/dart-lang/sdk/issues/52333
Bug: https://github.com/dart-lang/sdk/issues/51591
Change-Id: I939f225b2e0e08a20a07cd7bf3147b2ad8a737c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302453
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-11 17:15:26 +00:00
Brian Quinlan 04ef7c274c Update package:watcher to 1.1.0-dev
Change-Id: I8c26a1a67a410396dca7d191fb97879c5697574d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302450
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-05-11 16:46:39 +00:00
Lasse R.H. Nielsen a826699931 Have Uri give better error message for invalid Windows path.
CoreLibraryReviewExempt: Trivial change to error path.
Change-Id: Iadfb80eeb1e6c58686ed9741a88f369e130ed9e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302780
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Lasse Nielsen <lrn@google.com>
2023-05-11 16:43:28 +00:00
Danny Tuppeny 2d43bc319d [analysis_server] Fix LSP references on initializing formals
Fixes https://github.com/Dart-Code/Dart-Code/issues/4535.

Change-Id: Id2cfc6abba756afc10d8b67bde86c0aae6ae5659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302786
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-11 15:38:02 +00:00
Daco Harkes 5cbd939dbb [vm/ffi] asTypedList MSAN and UBSAN fixes
Cleanup for https://dart-review.googlesource.com/c/sdk/+/301001.

TEST= ffi/external_typed_data_finalizer_test with sanitizers

Closes: https://github.com/dart-lang/sdk/issues/52349
Change-Id: Iff553c2af7bd61d7d68dbc5a60acbee46e03c17b
Cq-Include-Trybots: luci.dart.try:vm-msan-linux-release-x64-try,vm-aot-msan-linux-release-x64-try,vm-aot-ubsan-linux-release-x64-try,vm-ubsan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302785
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-05-11 14:17:24 +00:00
Emmanuel Pellereau d3c7e183e9 Revert "Issue 35828. Don't report COULD_NOT_INFER when InvalidType, make it a subtype of everything."
This reverts commit 838c926f64.

Reason for revert: breaks google3. See b/281948666

Original change's description:
> Issue 35828. Don't report COULD_NOT_INFER when InvalidType, make it a subtype of everything.
>
> Bug: https://github.com/dart-lang/sdk/issues/35828
> Change-Id: Ie7757cb2e0cbc0cfdd1530b75f34ffb3dd3156dd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302680
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Samuel Rawlins <srawlins@google.com>

Bug: https://github.com/dart-lang/sdk/issues/35828
Change-Id: I05ddcf7657069b1e889b5b0019faaf7301f6643b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302781
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-11 14:00:06 +00:00
Sergey G. Grekhov 375e83d08c [co19] Roll co19 to 29df8c5030f62f8d9e382dd7ff69600f6d5e7bf2
2023-05-11 sgrekhov22@gmail.com Fixes dart-lang/co19#2044. Use `async` closure for async loops (dart-lang/co19#2045)
2023-05-11 sgrekhov22@gmail.com Fixes dart-lang/co19#2042. Replace `extends StreamConsumer` by `implements ...` (dart-lang/co19#2043)
2023-05-10 sgrekhov22@gmail.com dart-lang/co19#1959. Tests for class modifiers restrictions and type aliases (dart-lang/co19#2030)
2023-05-08 sgrekhov22@gmail.com Fixes dart-lang/co19#2039. Add and use asyncThrows method (dart-lang/co19#2040)
2023-05-08 sgrekhov22@gmail.com dart-lang/co19#1401. Async for-in element tests added (dart-lang/co19#2033)

Change-Id: Ic537cbf46cfae9880cc9ef3469c0273798ac26e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302784
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-05-11 13:46:51 +00:00
Tess Strickland 6b922021a1 [platform] Fix include of vm/globals.h instead of platform/globals.h.
TEST=build

Change-Id: If9e88f09268ff9aecd483734924c9c6f6170d4fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302783
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-05-11 11:53:56 +00:00
Chloe Stefantsova e3ba23a5f7 [cfe] Detect usage of type variables in record types in supertypes
Additionally, the CL adds a runtime check for handling all of the type
builder kinds in the function for type variable usage detection.

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

Change-Id: I84c7b53f4f0cfc39a18356d5b35fbdc843bb8a5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302740
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-05-11 10:54:28 +00:00
Alexander Aprelev 3a668dcf03 [vm/win/aot] Provide unwinding information for Windows AOT snapshots.
Fixes https://github.com/dart-lang/sdk/issues/52045
TEST=ffi_induce_a_crash_test

Change-Id: Ic047df10732d6ff8cf695ce098d80ec3a098dbf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302380
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-05-11 03:14:27 +00:00
Konstantin Shcheglov 838c926f64 Issue 35828. Don't report COULD_NOT_INFER when InvalidType, make it a subtype of everything.
Bug: https://github.com/dart-lang/sdk/issues/35828
Change-Id: Ie7757cb2e0cbc0cfdd1530b75f34ffb3dd3156dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302680
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-05-11 01:05:51 +00:00
Konstantin Shcheglov 6c995aab3f Issue 26710. Don't report NON_CONSTANT_DEFAULT_VALUE when InvalidType.
Bug: https://github.com/dart-lang/sdk/issues/26710
Change-Id: I43e68aa46de338c3ebcfafa5eec21eebeab3be54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302660
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-05-11 01:05:47 +00:00
Nate Biggs 776b614018 [dart2js] Add stage flag to Dart2JS.
Maintains functionality of existing '--write-X-uri' and '--read-X-uri' but also introduces new '--stage' flag that indicates which phases of the compiler should run.

Also expands the behavior of the `--output` flag to support taking a file prefix and/or an output directory that files are written out to.

Valid invocations can look like:
`dart2js main.dart --stage=cfe`
`dart2js main.dart --stage=cfe --output=prefix1-`
`dart2js main.dart --stage=cfe --output=/some/path/`


Change-Id: If90fb16f549d35f16f77d660c51f8d28673e454f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300520
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-05-10 22:43:37 +00:00
Nate Biggs 9a25f65eb6 [dart2js] Introduce formalized phases to Dart2JS.
This change locks down the Dart2JS command line API to the few invocation flows we use today:
1) Full compile from Dart sources.
2) Full compile from pre-compiled dill sources (modular CFE).
3) Phased compilation from Dart sources.
4) Phased compilation from pre-compiled dill sources (modular CFE).

It also ensures that each phase is run individually (accounting for sharding in codegen/emitter).

There are already places in the code where we assume that Dart2JS will be invoked in one of these ways so this should codify those assumptions.

Change-Id: I4e2a85d123e0c2ad924e2dd1b230548a995af0da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299760
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-05-10 22:43:37 +00:00
Tess Strickland 4b8aa6a634 [vm] Update assembler to access AbstractType::flags_ as Uint32.
In d592882f, the old uint8_t `type_state_` and `nullability_` fields
in subclasses of `AbstractType` were merged into a single uint32_t
`flags_` field in `AbstractType` itself.

Accessing the nullability information was abstracted into two methods:

* `LoadAbstractTypeNullability`
* `CompareAbstractTypeNullabilityWith`

However, the code from these methods were based off the old
`CompareTypeNullabilityWith` and `CompareFunctionTypeNullabilityWith`
methods that used unsigned byte loads to access the old field, and kept
that even though the new field is now a 32-bit unsigned integer. This
works for now, because the nullability portion of the `flags_` field
happens to be the lowest two bits, but might lead to confusion if
someone attempts to write similar code for accessing the other parts of
the `flags_` field without realizing it's larger than 8 bits.

Thus, this CL does the following:

* Unifies the implementation of both methods across architectures.
* Adds a native slot definition for the `AbstractType::flags_` field
  and uses `LoadFromSlot` to load the `flags_` field instead. Other
  places where the `AbstractType::flags_` field is accessed from the
  assembler are also changed to use `LoadFromSlot` appropriately.

TEST=The existing suite of tests are sufficient.

Change-Id: Ie578e4dddce810223ca9e767403136cb40d340f3
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-x64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-simarm64-try,vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-simriscv64-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-linux-debug-x64c-try,vm-kernel-precomp-linux-release-simarm-try,vm-linux-release-x64-try,vm-linux-release-simarm64-try,vm-linux-release-simarm-try,vm-linux-release-ia32-try,vm-linux-debug-simriscv64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302187
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-05-10 22:40:58 +00:00