Commit graph

89115 commits

Author SHA1 Message Date
Joshua Litt 2248e04f8d [dart2wasm] Fix minor bug in run_dart2wasm_d8.
Change-Id: I2e6b45d206ea5c60adefe05203dca1579991d6ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278801
Auto-Submit: Joshua Litt <joshualitt@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-01-10 17:50:12 +00:00
Ryan Macnak ab287309e5 [vm] Don't wait for the idle timeout when the thread pool is shutting down.
TEST=time taskset --cpu-list 0 dart hello.dart
Bug: https://github.com/dart-lang/sdk/issues/47448
Change-Id: Iae3e8861bae4466d0f1aad7cf45707356ff7b98e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278665
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-01-10 17:46:38 +00:00
Brian Quinlan c7eb34d6aa [doc/io] Add a RawDatagramSocket example.
Bug: https://github.com/dart-lang/sdk/issues/33721
Change-Id: I503c910f4a854dea0561687a06c760ad11ffc5dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277663
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-01-10 17:28:04 +00:00
Ryan Macnak ef3e0a45a8 Roll Clang from 026df9514ead to ca6196138012.
Fix new -Werror=unused-command-line-argument for -stdlib=libc++.

Change-Id: I7e6056323b7bb6da49b80299380be6ed7b70c582
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278691
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-01-10 17:20:04 +00:00
Johnni Winther deaf9ce16e Revert "[cfe] Support external constructor with final fields"
This reverts commit c70d266270.

Reason for revert: Crash detected

Original change's description:
> [cfe] Support external constructor with final fields
>
> This adds support for having a final field and an external constructor
> without error, assuming that the external constructor initializes the
> final field. This supports the inline class with external members use
> case.
>
> Change-Id: Ie297ccc39b0a0731c146f9ac0698bba3fd83bfeb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278502
> Reviewed-by: Srujan Gaddam <srujzs@google.com>
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I339d9008cb84cda8dc20f29d1e103289bb5596b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278820
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-01-10 17:20:01 +00:00
Ben Konyi 52f62eaea8 [ package:dds ] Add support for registering external DevTools servers with DDS
External DevTools instances can be registered with DDS at runtime, allowing for DDS
to redirect DevTools requests to the external DevTools server.

TEST=pkg/dds/test/external_devtools_instance_test.dart

Change-Id: I0bed34029b6ea7d935f77a031ff99b73b986b068
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278663
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-01-10 16:03:41 +00:00
Ömer Sinan Ağacan 8db3be7557 [dart2wasm] Fix invocation forwarder named argument adjustment
Invocation forwarders currently cannot distinguish a named parameter not
passed from passed as `null`.

Refactor `getNamedParameter` to return nullable index. When the index is
not null it means that the named parameter is present, and its value may
be `null`.

This doesn't fix any of the existing tests so I added a regression test.

(Bug originally discovered and fixed in
https://dart-review.googlesource.com/c/sdk/+/278505)

Change-Id: I960c674073b3d25c37e79f9836647882acaff08b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278745
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2023-01-10 13:37:33 +00:00
Paul Berry 6a4a6a167d Flow analysis: remove logic to handle implicitly declared variables.
The analyzer and CFE now properly declare all variables, so we don't
need this logic anymore.

Change-Id: I8e0075fe78986685f4b3749b3c20d1d3610cc4af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278538
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-01-10 13:24:01 +00:00
Joshua Litt 6d0237a79b [dart2wasm] Generate js runtime at compile time.
This is necessary so we can start specializing JS method trampolines. Specializing JS methods will help reduce polymorphic behavior in JS trampolines for JS interop methods.

In the follow on CL we will start injecting specialized JS method trampolines directly into the runtime.

Change-Id: Ib12fb286f54cfb8a64c9f84e238433e8da2eeaa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272441
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-01-10 13:16:29 +00:00
Paul Berry 46da2f51d0 Flow analysis: add assertions to verify that declare isn't called unnecessarily.
In a follow-up CL I'll be making changes to what code is responsible
for calling `FlowAnalysis.declare`.  This assertion will help make
sure I make those changes correctly.

Change-Id: I8b390e339b45faa8ee46f2db856d9aaa1f9a16c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278649
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-01-10 13:15:58 +00:00
Johnni Winther ec5123ada6 [cfe] Update assert for pattern assignment
Closes #50575

Change-Id: Ifc32663111900b30711fefe607d2ef7328b0561c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278742
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-01-10 09:40:17 +00:00
Ilya Yanok 2d1e6b2708 nnbd: add a repro for https://github.com/dart-lang/sdk/issues/50958
Change-Id: Idc0000fe976f7c60a249c07f255f876fd385fa89
Bug: https://github.com/dart-lang/sdk/issues/50958
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278519
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-01-10 09:26:18 +00:00
Sergey G. Grekhov c14c2365b4 [co19] Roll co19 to 59baa4604be6f08889bb4432a7a300d5c73a6ebd
2023-01-07 asashour@yahoo.com Update test for `CONTINUE_LABEL_INVALID` (dart-lang/co19#1685)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1653. Typos fixed in some patterns tests (dart-lang/co19#1667)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1645. Fix typo in constant_A03_t02.dart test (dart-lang/co19#1649)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1654. Replace || and && by | and & in negative tests (dart-lang/co19#1668)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1655. Fix using of wrong type in list_A01_t04.dart (dart-lang/co19#1669)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1656. Fix a typo in list_A02_t01.dart (dart-lang/co19#1670)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1657. Don't try to test null-check pattern in irrefutable context (dart-lang/co19#1671)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1658. Fix typos in list_A05_t06.dart (dart-lang/co19#1672)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1659. Fix typo in logical_or_A02_t01.dart (dart-lang/co19#1673)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1660. Fix missed compile-time error in logical_or_A04_t03.dart (dart-lang/co19#1674)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1661. Fix logical_or_A05_t02.dart. Add missed constant (dart-lang/co19#1675)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1662. Fix errors in map_A01_t04.dart (dart-lang/co19#1676)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1663. map_A08_t01.dart. Don't use constants in irrefutable context (dart-lang/co19#1677)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1664. Fix object pattern with parenthesized subpattern (dart-lang/co19#1678)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1665. object_A06_t01.dart. Add records experimental flag (dart-lang/co19#1679)
2023-01-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1666. pattern_assignment_A01_t01.dart. Use dynamic instead of Record class (dart-lang/co19#1680)
2023-01-05 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] Switch expression tests (dart-lang/co19#1633)
2023-01-05 sgrekhov22@gmail.com Fixes dart-lang/co19#1644. Use constant object expression in relational pattern tests (dart-lang/co19#1648)
2023-01-05 sgrekhov22@gmail.com Fixes dart-lang/co19#1646. Fix typo in constant_A03_t05.dart test (dart-lang/co19#1650)
2023-01-05 sgrekhov22@gmail.com Fixes dart-lang/co19#1647. Fix typos in variable names in variable_A02_t05.dart test (dart-lang/co19#1651)
2023-01-04 sgrekhov22@gmail.com Fixes dart-lang/co19#1628. [Patterns] Type argument added to fix map pattern tests (dart-lang/co19#1638)
2023-01-04 sgrekhov22@gmail.com Fixes dart-lang/co19#1629. [Patterns] Fix logical_and_A03_t02.dart test (dart-lang/co19#1639)
2023-01-04 sgrekhov22@gmail.com Fixes dart-lang/co19#1634. Fix typo in Records/metadata_annotations_A01_t04.dart (dart-lang/co19#1640)
2023-01-04 sgrekhov22@gmail.com Fixes dart-lang/co19#1635. Fix typos in object pattern tests (dart-lang/co19#1641)
2023-01-04 sgrekhov22@gmail.com Fixes dart-lang/co19#1636. Missed `records` experimental flag added to some patterns tests (dart-lang/co19#1642)
2023-01-04 sgrekhov22@gmail.com Fixes dart-lang/co19#1637. Missed 'const' keywords added to some patterns tests (dart-lang/co19#1643)
2023-01-03 sgrekhov22@gmail.com Fixes dart-lang/co19#1629. [Patterns] Fix logical_and_A01_t02.dart test (dart-lang/co19#1631)
2023-01-03 sgrekhov22@gmail.com dart-lang/co19#1627. [Patterns] Typos in constant pattern tests fixed (dart-lang/co19#1630)
2023-01-03 sgrekhov22@gmail.com Fixes dart-lang/co19#1628. [Patterns] Type argument added to fix list pattern tests (dart-lang/co19#1632)
2022-12-30 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] Switch statement tests (dart-lang/co19#1624)
2022-12-30 sgrekhov22@gmail.com Fixes dart-lang/co19#1625. Records experimental flag added (dart-lang/co19#1626)
2022-12-28 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] More wildcards tests added (dart-lang/co19#1549)
2022-12-28 sgrekhov22@gmail.com Fixes dart-lang/co19#1620. Small fixes in patterns tests (dart-lang/co19#1623)
2022-12-28 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] Pattern assignment tests (dart-lang/co19#1617)
2022-12-27 sgrekhov22@gmail.com Fixes dart-lang/co19#1619. Typos in records tests fixed (dart-lang/co19#1622)
2022-12-27 sgrekhov22@gmail.com Fixes dart-lang/co19#1618. Map pattern tests fixed, new one added (dart-lang/co19#1621)

Change-Id: I3e8f23d1d842e77481ea2edb2027689a0135afdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278511
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-10 08:49:47 +00:00
Johnni Winther f2dc8e1bb3 [cfe] Add examples as tests
Change-Id: I888fc05c21993c6cfe4b7a38476b2f07b53917bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278740
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-01-10 07:42:58 +00:00
Brian Wilkerson 14ff1f2d35 Generate a diagnostic for language overrides prior to 2.12
Change-Id: Ia10cf89443208ef133dd1ce8d68ee7c6b4129fbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276800
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-01-10 05:27:48 +00:00
Alexander Markov 88400bdc42 [vm] Update number of parent function type arguments
Number of parent type arguments in function types is critical
for instantiation and subtype checks when there are nested
generic function types. So it is important to update
number of parent type arguments when parent function type is updated.

This change adds mechanism for updating number of parent
type arguments and uses the new mechanism in 2 cases:

1) When a type parameter is substituted during type instantiation.
   The substituted type can have nested generic function types and
   it should be updated if substituted inside another generic
   function type.

2) When creating a constructor tear-off for a generic class.
   Parameter types of the constructor could have nested generic
   function types and they should be updated as tear-off itself is a
   generic function.

TEST=language/function_subtype/generic_function_type_substitution_test
TEST=language/regress/regress50905_test

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

Change-Id: If13baa420939f5ac002ce32f3909953fb6998bd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278525
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-01-10 03:10:14 +00:00
Robert Nystrom 3157f9ff8d Fix endToken for nullable record types.
This makes the formatter get confused when it tries to find the ","
after the end of a nullable record type in a type argument list, since
the endToken is off by one.

I'll work around it in the formatter for now.

Change-Id: Ib1b7353602b9d0166cfd897718fcc581078769e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278696
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-01-10 01:12:37 +00:00
Kallen Tu 7fa8694c45 [tests] Language tests for 'final' class modifier.
Change-Id: Ia39b96db7470fd9d7bb5f6683262d78a1a08ada7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276769
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-01-10 01:05:14 +00:00
Kallen Tu f3c774c67f [tests] Language tests for 'interface' class modifier.
Change-Id: Ia80f64e61aea46ba1f5fa5223c399f03c458fbec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276840
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-01-10 00:30:15 +00:00
pq fc1ca5c194 linter avoid_field_initializers_in_const_classes cherry-pick
Cherry-picks a fix to `avoid_field_initializers_in_const_classes` (https://github.com/dart-lang/linter/issues/3974).

git log:

commit 8f7b75f8a3501ca2c4d5bbc1f003d90d66447544 (HEAD -> release, origin/release)
Author: Phil Quitslund <pq@users.noreply.github.com>
Date:   Mon Jan 9 09:39:48 2023 -0800

    remove unsafe null-check (#3975)

commit 79b843349deaea4a2455cfa37cc47cbc0e472190
Author: Phil Quitslund <pq@users.noreply.github.com>
Date:   Thu Dec 15 09:50:23 2022 -0800

    1.32.0 (#3916)


------------------------------------------------------------------
------------------------------------------------------------------

Change-Id: I57afab3aadf23da96a2e9f596edfde5db71297ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278685
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-01-10 00:00:07 +00:00
Joshua Litt 0e021b31c4 [dart2wasm] Stop using dart2js stack decoding in tests.
This currently causes stack traces to print twice.

Change-Id: I71c1daa8075635489c241d7913de565a60bff6a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275380
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-01-09 23:09:23 +00:00
Brian Quinlan 6d37a3cddb [doc/io] Add a note about the use of relative paths for Process.(start|run)
Bug:https://github.com/dart-lang/sdk/issues/38974
Change-Id: I0d9bfd5726f8ad2c901e5d42f2bc79b636b9841b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278480
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-01-09 23:01:46 +00:00
Kallen Tu 1e39261b4a [tests] Language tests for 'base' class modifier.
Change-Id: I2b5cf3d2d367d0cfd2d2da60268b36f16225ab1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276762
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-01-09 22:29:14 +00:00
Brian Quinlan f502427120 [io] Fix a bug with HttpRequest.requestedUri with absolute urls
Bug:https://github.com/dart-lang/sdk/issues/50704
Change-Id: I1139f3ab720960d4d2e4d350f0b00f6afd2ed2cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278481
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-01-09 22:11:29 +00:00
Joshua Litt a49849c656 [dart2wasm] Stub out deferred loading.
Change-Id: If5ad3a783beb91bd11068b755974aa078530ac6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275743
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-01-09 21:50:33 +00:00
Ahmed Ashour 9ce724d9a8 [analysis_server] offer fix for always_put_required_named_parameters_first
Fixes #50816

Change-Id: I5a43e01eba3010e220210a28a8b550a156e98f22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277100
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-01-09 21:18:38 +00:00
Joshua Litt 1b59349e61 [dart2wasm] Fix for RegExp error handling.
Change-Id: I9bac9edc4ff35da069767c1576cded9e0b10813e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275784
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-01-09 21:13:14 +00:00
Ahmed Ashour 6ef8df0878 [analysis_server] Add ReplaceWithIsNan fix
Bug #50481

Change-Id: Ibe49ab080263051f8894c27cb0afa5f347d60745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270182
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-01-09 20:42:47 +00:00
Kallen Tu 30b9b20965 [analyzer] Report error if class mixed in outside of its library unless it's a mixin class.
Classes can't be implicitly used as mixins outside of its library unless its in a language version prior to sealed classes.

See: https://github.com/dart-lang/language/blob/master/working/base-interface-final/feature-specification.md#mixin-classes
Change-Id: I77762a1c962e10f89430e2b4c6141d00ace1cb30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274601
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-01-09 20:22:14 +00:00
Konstantin Shcheglov 6a584f3b80 Fix discovering 'patternContext' in map, record, object patterns.
Change-Id: I8964617b9494608d5fc74ee720be00e22961751b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278684
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-01-09 19:58:57 +00:00
Devon Carew 0dd6cb3b9f [deps] rev dartdoc, string_scanner, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (9ed196f..29a1bbf):
  29a1bbf8  2023-01-04  Sam Rawlins  Migrate documentation_comment_test to be reflective (#3288)

string_scanner (6ddab2c..c58618d):
  c58618d  2023-01-06  dependabot[bot]  Bump actions/checkout from 3.2.0 to 3.3.0 (#52)

webdev (8795ca5..49f97b8):
  49f97b8  2023-01-06  Parker Lougheed  Replace deprecated implicit-casts option with strict-casts option (#1863)
  940c0ee  2023-01-06  Elliott Brooks (she/her)  Set a debug key for the injected client and Dart Debug Extension SSE clients (#1872)
  ae3e2ea  2023-01-06  Elliott Brooks (she/her)  [MV3] Dart Debug Extension supports cross-extension communication with AngularDart DevTools  (#1866)
  0662af9  2023-01-06  Anna Gringauze  Fix error message on dds failure2 (#1865)
  4f62035  2023-01-06  Elliott Brooks (she/her)  Can launch embedded Dart Debugger & Flutter Inspector (#1829)
  36fa973  2023-01-05  Elliott Brooks (she/her)  Refactor `TestContext` constructor for clarity (#1844)
  57776a0  2023-01-04  Elliott Brooks (she/her)  Use latest version of `package:sse` in the MV3 Debug Extension (#1859)

Change-Id: Ib97239b4f453238572dcccb9a0f81e4f1e969a04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278683
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-01-09 19:37:35 +00:00
Johnni Winther 28a3c47c4c Revert "[cfe] Support external inline class fields"
This reverts commit 335d3afb78.

Reason for revert: Causes NPE in dart2js

Original change's description:
> [cfe] Support external inline class fields
>
> Change-Id: I0c16dc5c32aa8afb285b425c826eee8b8534c734
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278507
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>

TBR=jensj@google.com,johnniwinther@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I0826daf1ee9f1eb4c1489a239b795b13028e6a11
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278700
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-01-09 18:59:37 +00:00
Paul Berry 5b234e4b0d Flow analysis: properly model if/else nature of switches.
A switch statement like this one:

    switch (E) {
      case P1 when G1:
        S1;
      case P2 when G2:
        S2;
      case P3 when G3:
    }

Is equivalent to an if/else chain like this:

    var tmp = E;
    if (tmp case P1 when G1) {
      S1;
    } else if (tmp case P2 when G2) {
      S2;
    } else if (tmp case P3 when G3) {
      S3;
    }

Therefore, if the failure of a particular pattern/guard combination to
match implies a type promotion, it makes sense for that promotion to
be carried into later cases.  For example:

    int? x = ...;
    switch (E) {
      case _ when x == null:
        break;
      default:
        x.isEven; // OK because `x` known to be non-null.
    }

This enabled some more thorough testing of type promotion in switches,
which then caught a bug introduced in a previous CL: when the switch
scrutinee is a variable reference, and we are trying to determine
whether it is safe for a pattern to promote the scrutinee variable, we
were checking the wrong SSA node to determine whether the variable had
been reassigned.  For example:

    Object x;
    switch (x) {
      case _ when f(x = ...);
        break;
      case int _:
        // `x` is not promoted to `int` because it is no longer the
	// same as the cached scrutinee.
        break;
    }

Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: Ie8d6cf0fc662aa5ef0ac81eb2343952028dd2abb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278533
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-01-09 18:22:51 +00:00
Paul Berry 773bd2f694 Rename TypeAnalyzer.getVariableType's parameter.
The previous name, `node`, was confusing, because the type is
`Variable`, not `Node`.  Although the concrete type used by the CFE
for `Variable` (`VariableDeclaration`) happens to be a type of `Node`,
the same is not true for the analyzer (which uses the type
`PromotableElement`).

Change-Id: Idf3a7c3101786f7d36fa9075053544307ba18519
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278648
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-01-09 18:12:48 +00:00
Paul Berry 8b2d39471e Update CHANGELOG to reflect removal of dart migrate
Bug: https://github.com/dart-lang/sdk/issues/50319
Change-Id: Ic9ff1aa3432f3ec37feaecaf3f35b43363b76003
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278539
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2023-01-09 18:06:16 +00:00
Josh Soref 46ee7eb873 Spelling samples
Closes https://github.com/dart-lang/sdk/pull/50919

TEST=ci

GitOrigin-RevId: 5ac389ee109d6a06f89d405da916945c36e1d24d
Change-Id: Ica078a14e87234459c0703c41c8bae5157132b14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278532
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-01-09 17:44:29 +00:00
Brian Wilkerson 8f4b5a5d89 Support copying the file header in the move to file refactoring
Change-Id: Ic352bd11d1c854976f408e273e63dc497de05811
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278650
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-01-09 17:31:00 +00:00
Danny Tuppeny c09d47e8e9 [analysis_server] Simplify inclusion of default values when writing parameters
Change-Id: I7261318ca05c263727c74744e96e03b237f1f5af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278517
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-01-09 17:17:54 +00:00
Josh Soref aee77b9a33 Spelling tools
Closes https://github.com/dart-lang/sdk/pull/50880

TEST=ci

GitOrigin-RevId: ea8ecf4b7b921de0549df325be1a1f7879e86b72
Change-Id: I39315609a8390b012196a08c9ce4a9a6a50b1558
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278061
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2023-01-09 15:48:57 +00:00
Josh Soref be43ba609b spelling: favorites
Closes https://github.com/dart-lang/sdk/pull/50806

GitOrigin-RevId: 797ea37d9d727ff9db80733e4f5ce2807ace611e
Change-Id: Iee4885232d0874ff7949b96779634943ced3ea35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276773
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-01-09 13:22:09 +00:00
Josh Soref 7a129d6b91 spelling: is_signed
Closes https://github.com/dart-lang/sdk/pull/50808

TEST=ci

GitOrigin-RevId: ea4034173f9028fc4dfe0adb6a3e9bae34027843
Change-Id: I588cfe0765476705d7da8130e6121e25275be7f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276774
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-01-09 13:21:55 +00:00
dependabot[bot] f41de6a6c7 Bump actions/checkout from 3.2.0 to 3.3.0
Closes https://github.com/dart-lang/sdk/pull/50955

GitOrigin-RevId: fc9e530bf0172882182d707abfe7236be7905b8c
Change-Id: I401ad3525b6b983d427f673c8fe90bf5ff9662e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278680
Reviewed-by: Alexander Thomas <athom@google.com>
2023-01-09 13:17:12 +00:00
dependabot[bot] d9d50cf1ac Bump actions/upload-artifact from 3.1.1 to 3.1.2
Closes https://github.com/dart-lang/sdk/pull/50954

GitOrigin-RevId: cd44cde2d34cfbccf9edce8be291196dcc97aea1
Change-Id: I0cf31819b9fde2b15bef4179ef61687e387c1e4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278660
Reviewed-by: Alexander Thomas <athom@google.com>
2023-01-09 13:16:51 +00:00
Lasse R.H. Nielsen 8a891ba869 Deprecate HasNextIterator.
Bug: https://dartbug.com/50883
Change-Id: I983e07072052a0538e4c04cc66e7fd2ad2bc1242
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278121
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-01-09 12:14:33 +00:00
Johnni Winther 54da3e4608 [cfe] Handle named arguments anywhere in static extension method invocation
Closes #50910

Change-Id: I30002ba278a5bc633c17ae424566af16dd5de3f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278509
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-01-09 11:59:36 +00:00
Johnni Winther 77b5d635a7 [cfe] Update tests that no longer crash
Change-Id: I0361a5e030cd8980c95ee3663a747360b54834f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278508
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-01-09 09:53:27 +00:00
Johnni Winther 335d3afb78 [cfe] Support external inline class fields
Change-Id: I0c16dc5c32aa8afb285b425c826eee8b8534c734
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278507
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-01-09 09:53:11 +00:00
dependabot[bot] 0a05e3f999 Bump actions/checkout from 3.1.0 to 3.2.0
Closes https://github.com/dart-lang/sdk/pull/50765

GitOrigin-RevId: 68196af9110bba1c6a428eb345b7061e312e8810
Change-Id: I2dee38763b7fa54a69adb33ac41f9020abcf1421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276380
Reviewed-by: Alexander Thomas <athom@google.com>
2023-01-07 08:48:50 +00:00
dependabot[bot] fc63ebb8a6 Bump github/codeql-action from 2.1.31 to 2.1.37
Closes https://github.com/dart-lang/sdk/pull/50766

GitOrigin-RevId: d740dcb80df9e44eee761c66fb693266a4d0e299
Change-Id: I75ed4937499c83eb21d2c2d18e8b8e24ba894498
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276400
Reviewed-by: Alexander Thomas <athom@google.com>
2023-01-07 08:47:48 +00:00
Konstantin Shcheglov 98b146d881 Use analyzeExpression() in more places, so resolve SwitchExpression.
Change-Id: Ibd715c6a8fbe8aad07daebef42a544629e42fbe0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-01-07 00:18:27 +00:00