Commit graph

87701 commits

Author SHA1 Message Date
Konstantin Shcheglov cf61632921 Use named parameters in few AST nodes.
Change-Id: Ib9d59d762dc4dc58c66808864cf553c213857e0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263145
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-08 16:21:20 +00:00
Kallen Tu 7e1890d78b Revert "Cast errors to HttpExceptions and add lint to convert to tidy up dynamic calls in core libraries."
This reverts commit 5b7bd563d3.

Reason for revert: Broke VM tests, not always HttpException.

Original change's description:
> Cast errors to HttpExceptions and add lint to convert to tidy up dynamic calls in core libraries.
>
> Change-Id: I7ea73b232d13baf84e834d742ebc16f2a081e727
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262626
> Commit-Queue: Kallen Tu <kallentu@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=lrn@google.com,leafp@google.com,kallentu@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I1777750c07b84b267d0b62dbfe93d54a6bfee7ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263180
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-10-07 20:11:57 +00:00
Konstantin Shcheglov c8799b3e44 More tests in ConstantPatternResolutionTest.
Change-Id: Id91f9da9cd1c4f36738030fae66e2e6fbbd7d31c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263040
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-07 19:32:32 +00:00
Stephen Adams fe98a5642e [dart2js] migrate ssa/types.dart
Change-Id: I721f584c61ff40863d4e9461330bb0d1db11d0d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263080
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-10-07 18:50:17 +00:00
Konstantin Shcheglov 8d1297628a More tests for ExtractorPattern resolution, report errors.
Change-Id: I800f909a1d58e8bebcbfa30e52f09a16906b1e07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-07 18:35:35 +00:00
pq 2458c36b22 remove redundant lints
(These are defined in the core lint set.)

Change-Id: I194dba3ea91e6cee6a75ea0fc59a8be0f2a1101f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263143
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-10-07 18:24:58 +00:00
Kallen Tu 5b7bd563d3 Cast errors to HttpExceptions and add lint to convert to tidy up dynamic calls in core libraries.
Change-Id: I7ea73b232d13baf84e834d742ebc16f2a081e727
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262626
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-10-07 18:12:28 +00:00
Ahmed Ashour a4ba584510 [analyzer] enable VerifyDiagnosticsTest on Windows
Fixes #50155

Change-Id: I48fcf7adbdd822f8640a9c2650c61392f9227d5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263121
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-07 15:05:43 +00:00
Konstantin Shcheglov f07b293ab8 Basic resolution for ExtractorPattern.
Change-Id: Id129aa245ec792a169d43e9658f1531ffd1e67a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263044
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-07 14:56:08 +00:00
Johnni Winther 51cf541243 [vm,wasm] Share more patch libraries
This shares patch libraries between vm and wasm.

The shared libraries are those previously shared as parts which
need private access to other patch libraries.

TEST=existing

Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Change-Id: I750a20de5a78362e84b87b2bfe1e5395ca4d3769
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262341
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-10-07 13:19:19 +00:00
Sergey G. Grekhov dc35793b32 [co19] Roll co19 to 83feddb44881181ad8f2487080dafe0909517b09
2022-10-06 sgrekhov22@gmail.com Fixes dart-lang/co19#1486. Replace empty records by ones with named fields (dart-lang/co19#1492)
2022-10-04 sgrekhov22@gmail.com dart-lang/co19#1428.Generated Subtyping tests refactored (dart-lang/co19#1471)
2022-10-04 sgrekhov22@gmail.com dart-lang/co19#1429. Remove obsolete experimental flags: named-arguments-anywhere (dart-lang/co19#1441)
2022-10-03 sgrekhov22@gmail.com dart-lang/co19#1399.[Records] `Records.empty` replaced by `()` (dart-lang/co19#1481)
2022-10-03 sgrekhov22@gmail.com Fixes dart-lang/co19#1472. Fix comparison of collections in records tests (dart-lang/co19#1474)
2022-09-30 sgrekhov22@gmail.com dart-lang/co19#1430. Don't run tests that checks iteration order for HasSet (dart-lang/co19#1476)

Change-Id: I2dcc4e0e9247d1b7db2b3929bd162e5dae727f83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263120
Reviewed-by: Alexander Thomas <athom@google.com>
2022-10-07 10:42:45 +00:00
Jens Johansen c784cc7500 [parser] Don't always parse question as part of record type
Change-Id: I48468c2531e01a9f535e9d973c57911c28967bcb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262605
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-10-07 10:11:34 +00:00
Johnni Winther 49b0503702 [cfe] Reinstate access full access to Record when enabled by default
This reinstate the support for access Record from all libraries, opt-in
_and_ opt-out, when 'records' is enabled by default. This was wrongfully
removed in a previous CL.

Change-Id: Iede9257302754ca862edb5573203a251cb7bac9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261647
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-10-07 10:06:28 +00:00
Tess Strickland 9df6656aa9 [build] Re-add linker flags to create empty section in AOT runtime.
To avoid these flags being applied to unexpected build rules, we
separate them out into a separate config that is then pulled in
explicitly in the `dart_precompiled_runtime{,_product}` executable
rules. Only those two executables need the additional empty section:
the product version because it becomes `dartaotruntime` in the SDK
bundle, and the non-product version because some of our tests build
standalone executables using it.

The linker flags were originally removed due to
https://github.com/flutter/flutter/issues/112687.
With the recent removal of bitcode support from Flutter (see
https://github.com/flutter/flutter/issues/107883), I can build
the `ios_release` target locally without any issue.

This also reverts the clang DEPS changes from CL 256208 (again).

TEST=pkg/dartdev/test/commands/compile_test

Bug: https://github.com/dart-lang/sdk/issues/49783
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,pkg-mac-release-arm64-try,pkg-mac-release-try,vm-kernel-precomp-mac-product-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
Change-Id: Ie46402ec2eeda23109247eb9d7a64935ec2052cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262429
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-10-07 09:26:18 +00:00
Jens Johansen 97cdb043da [parser] Parse record type return type for operators
Change-Id: I23b5ef38a9bfd58c327303198e59d9b50ace323b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262681
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-07 08:59:39 +00:00
Jens Johansen 575ae24207 [parser] Parse record type question after modifier
Change-Id: If2dd018a79719bd0f5a9a44f46fb102c3595d08e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261644
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-07 08:52:04 +00:00
Sergey G. Grekhov 6524b31967 [co19] Roll co19_2 to 17f2b4079f55bb5beb8f8301970089c290590ae4
2022-10-04 sgrekhov22@gmail.com Fixes dart-lang/co19#1483. Removed static analysis warnings for different parameter override value (dart-lang/co19#1484)
2022-10-03 sgrekhov22@gmail.com dart-lang/co19#195. Don't use nnbd syntax in pre-nnbd tests (dart-lang/co19#1482)

Change-Id: I1dd7734649dc545cc92e5c3edb000466cb211082
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263100
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-10-07 08:23:04 +00:00
Jens Johansen af2f4e2d29 [parser] Parse record type used in optional and named parameters
Fixes https://github.com/dart-lang/sdk/issues/50136

Change-Id: If02c0d86244ef9cd3685256e583b987d438307d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262961
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-10-07 06:39:08 +00:00
Jens Johansen eb80f37103 [parser] Parse record type in for in
Change-Id: I96773ecf597685bd6cdfe7da9971b42aea1488e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262940
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-07 06:37:42 +00:00
Jackson Gardner 47dd60fed0 Refactor run_wasm.js into an ESM module that is reusable in the browser.
Change-Id: I1566febad2b4e1399f50bb923ad0596f04aa1a40
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262268
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-10-07 03:09:39 +00:00
Konstantin Shcheglov 5ef329cf74 Report CompileTimeErrorCode.DUPLICATE_VARIABLE_PATTERN
Change-Id: I07cb697c9c517f0d4eb67100f0ae134aa821d25d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263002
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-07 00:16:27 +00:00
Nate Bosch 79b66e79ba Mention tools/manage_deps in DEPS file
Improve discoverability of the tool, since it's an easier way to change
DEPS and it automates a useful CL description.

Change-Id: I0402126d11764bb56f9cef0cb2ec6fd54378b1e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262848
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-10-07 00:04:56 +00:00
Nate Biggs 1e6aa3fcbe [dart2js] Migrate inferrer/types.dart to null safety.
Change-Id: I39774c2a0875be6519c8bc95808a0fc76a27421b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263060
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-10-06 22:58:48 +00:00
Devon Carew 0c7df00e5a [deps] rev convert, dartdoc, markdown, and webkit_inspection_protocol
convert (11d191e..f0acc6b):
  f0acc6b  2022-10-06  Devon Carew  update the CI configuration (#67)

dartdoc (9908cf8..c2f66ec):
  c2f66ecf  2022-10-06  dependabot[bot]  Bump ossf/scorecard-action from 2.0.3 to 2.0.4 (#3205)
  479f27ba  2022-10-06  Sam Rawlins  Deprecate src/model/model.dart as public API (#3208)

markdown (e7915ed..f387340):
  f387340  2022-10-06  Zhiguang Chen  Fix unicode case folding (#465)

webkit_inspection_protocol (4e5eb8d..b825c8f):
  b825c8f  2022-10-05  Devon Carew  Ci updates (#93)

Change-Id: Ia68ad07c0046603ea17485db7ddb9744cfa970e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263043
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2022-10-06 22:11:58 +00:00
Ahmed Ashour a1eec6be31 [analysis_server] RemoveLeadingUnderscore to handle conflicting names
Fixes #50142

Change-Id: I68c225e0528c643a29f2454607464d3896f25d36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262606
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-06 19:29:24 +00:00
Ryan Macnak 5b119191a5 [test] Add missing architectures when skipping tests using FFI on simulators.
Bug: https://github.com/dart-lang/sdk/issues/37299
Change-Id: If4553d20ca13bdc3191cad19a987c875c1c88d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262849
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-10-06 19:24:08 +00:00
Ryan Macnak 904c6fd6fa [vm] Add Dart_NotifyDetach.
TEST=ci
Change-Id: I86776f93f5b1aedb205a62822a25d7a4697f73cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262520
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-10-06 19:00:37 +00:00
Kallen Tu b3e57bd2f7 Remove dynamic call in _JsonMap.
Change-Id: I73297a65a59aeefee9f170aa640b9d5d20e7bf9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262271
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-10-06 18:12:02 +00:00
Konstantin Shcheglov e664ee9bb7 Test for resolving empty record literals.
Change-Id: I776a8ccb30e7b83cae79f7d6975ea8932a9363c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263001
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-06 17:41:32 +00:00
Konstantin Shcheglov 975f25ba39 Account for class Record in constraint gathering.
Change-Id: Iae20d430dec385dd42cd37617c2abebf7b841087
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263000
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-06 17:40:37 +00:00
Konstantin Shcheglov 57a619bcb7 Report diagnostics for relational patterns.
Change-Id: I1a3e02e36679599e0240f74108a5e91db6269b1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-06 16:33:41 +00:00
Danny Tuppeny ad334d85e1 [analysis_server] Don't allow Extract Method on directives
Fixes https://github.com/Dart-Code/Dart-Code/issues/4202.

Change-Id: I273d88f3dc5cfd76f01f268485c06916bbd74e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262430
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-06 15:39:15 +00:00
Erik Ernst d2911decfb Adjust rules recordLiteralNoConst and recordType to include ()
This change is needed as a consequence of
https://github.com/dart-lang/language/pull/2422
where `()` was introduced as the syntax for the empty record as well
as the empty record type.

Change-Id: Ia8b3f590361343ca14355043c5898e7bd084c04e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261645
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2022-10-06 15:10:57 +00:00
Chloe Stefantsova fb0b4a80e6 [cfe] Allow records on the RHS of typedefs
Part of https://github.com/dart-lang/sdk/issues/49713

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

Change-Id: I482280599487a3539f88c715e5a92e78f810b264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262962
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-10-06 15:03:00 +00:00
Sam Rawlins 682567fe14 Bump dart_style to support unnamed-libraries
Change-Id: I982b0f8db7609fce737db79524802b11c886af9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262847
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-10-06 14:40:10 +00:00
Ömer Sinan Ağacan 113f249e06 [dart2wasm] Implement null instance tear-offs
Fixes https://github.com/dart-lang/sdk/issues/50111

These tests now pass:

corelib/null_closurized_method_tostring_test
corelib/null_test
language/nnbd/static_errors/unchecked_use_of_nullable_cascaded_test/10
language/nnbd/static_errors/unchecked_use_of_nullable_test/14
language/nnbd/static_errors/unchecked_use_of_nullable_test/15
language/null/to_string2_test
language/null/to_string_test

Change-Id: Iba5152aa986df24cc96ee81854d9a538aa839e74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262601
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-10-06 12:54:53 +00:00
Michael Thomsen 64add14a45 Roll pub semver pkg
Change-Id: I376e14f83738c8979a76cc29c316122801095f51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262428
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2022-10-06 12:53:49 +00:00
Johnni Winther c3de385658 [cfe] Unify handling of 'resolveTypeParameterType'.
We had multiple implementations of this logic and with the introduction
of IntersectionType some where not updated. Instead, this is now added
as a property of `DartType`.

Closes #50112

Change-Id: I2d7a3943b0577d905a1861aa35b0552578766993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262960
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-10-06 10:38:39 +00:00
Tess Strickland 3b2c41d789 [vm] Make symbol names more user-readable.
Instead of trying to make names assembler-friendly, instead just
quote the symbols names in the assembly output and use user visible
names for function and object symbols.

More specifically:

* This CL changes the symbol name from an assembler-safe version of the
  scrubbed name to an assembler-unsafe version of the user visible name
  that is then quoted when used in assembly output.

* For code symbols, regular stubs are prefixed with `stub`, allocation
  stubs are prefixed with `new` and type testing stubs are prefixed with
  `assert type is` (e.g., `stub Await`, `new RegExp`,
  `assert type is List<Int>`). Function symbols have no prefix.

* Readonly data symbols begin with the type of the readonly data. If
  there's any additional information (e.g., the function name for
  objects like `PcDescriptors` when `SNAPSHOT_BACKTRACE` is defined),
  that follows the type in parentheses.

* For direct-to-ELF snapshots, we allow symbols to have duplicate names.
  Thus, internally we create unique ids for all created symbols and
  refactor the ELF and DWARF subsystems to pass and store these ids
  instead of the symbol names.

* For assembly output, symbols must have unique names. The namer now
  has a `CStringIntMap` that keeps counts of the number of times a
  given symbol name has been generated for assembly output. If the
  symbol name is in the `CStringIntMap`, then the new count in the map
  is added as a suffix to ensure uniqueness.

  For example, the first symbol created using the name `_StringBase.[]`
  has no suffix. If a second symbol is created using the same name,
  the second symbol is instead named `_StringBase.[] (#2)`.

  This also happens for read-only objects with additional information if
  that additional information is not sufficient to make it unique, and
  is added separately from that additional information.

* A further restriction for assembly output is that symbols that begin
  with 'L' have special meaning to the assembler. Thus, we keep the
  old system of prepending such symbol names with an underscore to
  avoid this behavior.

TEST=vm/dart{,_2}/use_add_readonly_data_symbol_flag

Bug: b/248012965
Change-Id: I1b6e876f4fb4f42f4a3b90e03110a34a87a03a7c
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-mac-product-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262242
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-10-06 10:33:09 +00:00
Chloe Stefantsova e77f2ee5ff [cfe] Account for class Record in constraint gathering
Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: Idfcc304c8da8bb1a6cd887de707ddfd060934543
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262427
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-10-06 08:21:38 +00:00
Jens Johansen e860cf241b [parser] Empty record
https://github.com/dart-lang/language/pull/2535

Change-Id: I8241119ee858ce39673472056b88c9393799e1a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262600
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-10-06 06:34:58 +00:00
Jens Johansen 4d9bbde5ce [kernel] AST-to-Text for records works as expected
For whatever reason https://dart-review.googlesource.com/c/sdk/+/257203
didn't follow normal textual output and would for instance output

constants  {
  #C1 = 1
  #C2 = 2
const (#C1, #C2)
const ({a:#C1, b:#C2})
const ({a:#C3, b:#C4})
const (#C5, #C3)
}

instead of something like

constants  {
  #C1 = 1
  #C2 = 2
  #C3 = (#C1, #C2)
  #C4 = ({a:#C1, b:#C2})
  #C5 = ({a:#C3, b:#C4})
  #C6 = (#C5, #C3)
}

Change-Id: I9a8d515694d3486ffbb38fdc0d1986d41d053103
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262800
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-10-06 06:32:31 +00:00
Konstantin Shcheglov 341a4ab8e5 Resolve ListPattern.
Change-Id: Ic54996113a73facecc2481d2b6677d11d38dc84f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-06 01:05:37 +00:00
Ryan Macnak 28c4d87b34 [vm, gc] Extend alignment helpers to work with alignment offsets.
TEST=ci
Change-Id: I02bad1feba3a16360aa52414c94cdef81b158ed6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262000
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-10-06 00:50:45 +00:00
Konstantin Shcheglov 7de6c03e57 Update a few pattern tests that can resolve now.
Change-Id: I7d19dfde6a5d15e88f0d72f032734fc0686395f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-10-05 22:25:42 +00:00
Sam Rawlins 641110ec38 Remove unused TopLevelInferenceErrorKinds
These fields were not used.

One field was verified in the element model, but no error was ever
derived from it. The error that maybe once was reported from it is now
reported as `INVALID_OVERRIDE`.

Change-Id: I19c57310d39142333cd3c3af9780f28789d56ab5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262846
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-10-05 22:21:00 +00:00
Stephen Adams aaed0ce048 [dart2js] Add subtyping of record types against Record interface
- Fix bug with nullable record type, e.g. `(int,int)?`.

Change-Id: Ie8006e8ec3a9ffd675519df2ab7b4d101d8d5dcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262843
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-10-05 21:56:07 +00:00
Konstantin Shcheglov ca709d09db Resolve RelationalPattern.
Change-Id: Ic390c0c760fbcfb91384bf4c9d5a0981483b0f27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262844
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-05 21:51:38 +00:00
Konstantin Shcheglov b704bbad7c Use AstNodeImpl for a few NodeList(s).
Change-Id: I2a078c35458ffc509e93108bd189aa29de7a6b7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-05 21:10:07 +00:00
Danny Tuppeny d485d1a3aa [analysis_server] Allow clients to tell server which refactor field kinds they support prompting for
Change-Id: Idcd79cb36344b95904184ca8c61be15cf1d2e3a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262604
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-05 21:08:42 +00:00