Commit graph

44997 commits

Author SHA1 Message Date
pq 66569eb894 share options with a common context root
Lays the stage to acquire options from files during error verification.

Change-Id: I3b715a93e99fc3bc6f33f736e8b38c06b8c1cd4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-11-01 22:03:21 +00:00
Brian Wilkerson 8de066a4b0 Share the visibility tracker and suggest local functions
Sharing the visibility tracker this way prevents shadowed elements from
being suggested and improves performance.

Most of these changes can be reverted once the local reference
contributor has been removed.

Change-Id: Ib156ae56455e8d85a31163f9e59ce4dd93f5920b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333124
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-11-01 16:21:19 +00:00
Chloe Stefantsova 3c4a74bc38 [cfe] Separate inference and error reporting in super parameters of extension type constructors
This is a follow-up to
https://dart-review.googlesource.com/c/sdk/+/331048/comment/fbe89f66_bcf80d94/

Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: I989cc3d3031e0bc4e66be1e28454443f918d20e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333003
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-11-01 12:52:30 +00:00
Chloe Stefantsova 8b01baab71 [cfe] Perform checks on factories of extension type declarations
Closes https://github.com/dart-lang/sdk/issues/53209
Closes https://github.com/dart-lang/sdk/issues/53140
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: Ia94b1e85d6775efc23bf732441fa66d4de1de515
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332403
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-11-01 10:14:49 +00:00
Chloe Stefantsova dd3705d5e8 [cfe] Allow extension types implement Object
This is a prerequisite to the implementation of
https://github.com/dart-lang/language/pull/3434

Closes https://github.com/dart-lang/sdk/issues/53840
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: Ib3bb5961cd8c4919cbc8c8ba37ac4d76fb72a3de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333000
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-11-01 09:26:30 +00:00
pq e2aa60ddf3 context_builder refactoring copies
Copies of context building bits for context creation refactoring work.

Change-Id: I2ee8d7e03a33bb6f450c190ad59459bbf87cef62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333122
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-11-01 04:17:41 +00:00
Konstantin Shcheglov 0544ecba9a Macro. Support for mixins.
Change-Id: Icab52054c230ab97c3129b0bb32ed3ad55740fbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333046
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-31 23:54:49 +00:00
Johnni Winther 72f1591f29 [cfe] Use getTypeAsInstanceOf instead of getInterfaceTypeAsInstanceOfClass
The changes calls to getInterfaceTypeAsInstanceOfClass (et al.) to
getTypeAsInstanceOf to ensure that we take extension types into account.

Change-Id: I7d732cdae8494002b44561cb02c49d58dd0ba67b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332920
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-10-31 22:30:50 +00:00
Ben Konyi 8b3d93234d [ package:vm_service ] Migrate Observatory HTTP service invocation tests
Also adds READMEs to some test sub-directories.

Change-Id: Ibf48654bcb43d7d52bd3bc0d2ab6afabc1ea3df6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333100
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-10-31 19:54:28 +00:00
Ben Konyi 94f8809607 [ package:vm_service ] Migrate more Observatory tests
Change-Id: I2d653fcc98087feaff79fa1adb2e4293085e959c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332642
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-10-31 19:49:42 +00:00
Danny Tuppeny 939e081d43 [analysis_server] Include inlay hints for type arguments in "if case"
Previously we only added the type args in constructor invocations, this changes to any named type without explicit type args.

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

Change-Id: I11a6a96bf34c7e4acff93607a922401d2f0eed83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332960
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-10-31 17:46:58 +00:00
Ryan Macnak 573fad4ff0 [test] Cleanup building Fuchsia packages/components.
Build one package with three elf_test_runner components: one for each of the binaries that the test harness invokes on the target. (Though currently only tests that use "dart" are setup.)

Create includable CML shards for the capabilites required by the AOT and JIT VMs.

Fold test_runner's fuchsia_cfv2.dart back into fuchsia.dart.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/38752
Change-Id: I7bd8d43d184cbcb11903c7aed77ce31fb30cb894
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332451
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zijie He <zijiehe@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-31 17:11:51 +00:00
pq 2e723075b8 + analysis options map
A simple (if provisional) implementation of an analysis options map.

🚧 Datastructure, API and implementation all subject to change.

Change-Id: I94d311d17df3f60b6e36437d37df84ce5091e0fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332369
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-31 16:30:41 +00:00
Jake Macdonald 26d4251bff handle org-dartlang-augmentation uris
Bug: https://github.com/dart-lang/sdk/issues/53913
Change-Id: I40a1bba7a303977ddb6b47c2c7725895858e69b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333060
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-10-31 16:10:38 +00:00
Konstantin Shcheglov 3e7f464778 Macro. Test some of the required application order rules.
Change-Id: Iab1e9b8769d2f95a1e06926f86e95d2735fc6837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-31 15:54:30 +00:00
Ben Konyi 290a675add [ package:vm_service ] Migrate service extension tests
Change-Id: If589d96d7d9549456f43fc9ed96a692737a711fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332501
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-10-31 15:53:44 +00:00
Alexander Markov f54ecbdf31 [vm,dart2wasm] Fix tree shaking of extension types used only in type literals
TEST=pkg/vm/testcases/transformations/type_flow/transformer/extension_type.dart
TEST=co19/LanguageFeatures/Extension-types/superinterfaces_of_extension_type_A08_t02

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

Issue: https://github.com/dart-lang/sdk/issues/49737
Change-Id: I80237a1240905a52805f5b3e7bd857ed96773609
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332450
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-10-31 14:59:29 +00:00
Chloe Stefantsova c688bc8e6d [cfe] Implement relaxed rule on representation/implemented types
Closes https://github.com/dart-lang/sdk/issues/53867
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: I1a286a8f507e92f85a79acb18d124d3322e1daa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332961
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-10-31 13:17:58 +00:00
Ömer Sinan Ağacan 9ed368c2e1 [dart2wasm] Use only JS strings in JSCM
Refactor libraries so that JSCM will only use `JSStringImpl` class for
strings.

The goal is to disentangle the native string classes and `JSStringImpl`
and start testing `JSStringImpl` in isolation.

Changes:

- `dart:_string` is no longer available in JSCM.

- Make `int.toString` external to allow patching it differently in JSCM
  and normal modes.

  `toString` implementations are in `boxed_int_to_string.dart` patch
  files.

- `int.parse` now uses JS `parseInt`. However `parseInt` is not
  compatible with Dart's `int.parse` so this will cause some more test
  failures in JSCM for now.

- Any dependencies to `dart:_string` from JSCM `dart:convert` are
  removed. The library implementation now uses JS `TextDecoder` for
  UTF-8 decoding.

  Note: `TextDecoder` is not available on d8, so text decoding tests
  will fail on d8.

  JSON encoding and decoding in `dart:convert` will be updated in a
  follow-up CL.

- Compiler (translator, constant generator, code generator etc.) is
  updated to allocate the `JSStringImpl`s in JSCM.

Initially this will make some JSCM test fail as `int` parsing is not
quite right, those will be fixed in follow-up CLs.

Co-authored-by: Joshua Litt <joshualitt@google.com>
Change-Id: I366e06f44cdc369d28fe47b24015234260304399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332680
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-10-31 12:58:26 +00:00
Johnni Winther 9732bcab6a [cfe] Add ClassMember.memberKind and .getTearOff
This adds the functionality to ClassMember that enables us to
fully compute the ExtensionTypeAccessTarget.

Change-Id: I62dd5e24f664c2edd70c2fe794f66595cc017173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332427
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-10-31 10:07:57 +00:00
Nate Biggs 171c1334cc [dart2js] Add 'main-only' option to dump info diff tool.
Change-Id: Ibabfd4eb9de5820365772c4b75d5ed0624b148a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332640
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-10-30 22:49:09 +00:00
Mayank Patke b034a909a6 [dart2js] Avoid discarding type tests during SSA with
--experiment-null-safety-checks

Change-Id: If3e2465103494d4772b1f8b71e7c57ae83b3e036
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332371
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2023-10-30 22:08:47 +00:00
Paul Berry d8732e9820 When field promotion fails, report all reasons via context messages.
Previously, if field promotion failed both because the language
version was less than 3.2, *and* for some other reason(s), the
analyzer and CFE only reported the other reason(s). The rationale was
that this was better than reporting just that the language version was
less than 3.2, because if a user upgraded their language version to
3.2 in an attempt to get field promotion to work, and *then* found out
that the property in question was unpromotable for some other reason,
that could be quite frustrating.

With this change, if field promotion fails both because the language
version is less than 3.2 and for some other reason, the analyzer and
CFE report *all* the reasons.

Change-Id: Ib5d3a4621273c1e80d66b66b456119f9053e18b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332485
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-30 21:31:51 +00:00
Konstantin Shcheglov 8d51998088 Issue 53839. Clear cached priority results during _clearLibraryContextAfterException().
Bug: https://github.com/dart-lang/sdk/issues/53839
Change-Id: I7de4e5b518b51239d4bd0251286960e619e6bc6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332747
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-30 20:13:20 +00:00
Ryan Macnak 4fa5cadb36 [test] Switch Fuchsia testing to CFv2.
Bug: https://github.com/dart-lang/sdk/issues/38752
Change-Id: Id6519937cfa8430249d576c99aeb6bdb9f97dbb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332481
Reviewed-by: Zijie He <zijiehe@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-30 20:03:40 +00:00
Keerti Parthasarathy 25002f0f01 MissingDependencyValidator: Do not generate error for package self import.
Change-Id: I40f248698d2348492fc3def783d0fbb26e84119f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-10-30 19:04:39 +00:00
Daco Harkes 14d0c0e7c5 [cfe/ffi] Test _nativeEffect for @Natives
In a follow up, we will remove the transform from `@Native` to
`_asFunctionInternal`. However, we need to ensure that we keep
emitting `_nativeEffect` for struct return values classes if
`@Native`s are the only place instances are created.

The follow up CL will change the expect files.

TEST=pkg/vm/test/transformations/ffi_test

Bug: https://github.com/dart-lang/sdk/issues/47625
Change-Id: I1685683f48f1d16d6d10606f541f13e17d8583fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332800
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2023-10-30 18:51:21 +00:00
Daco Harkes f5983e4214 [ffi] Update some FfiNative docs to Native
The old FfiNatives have been deprecated for a while.

TEST=Only comments updated.

Change-Id: Ideb6e904841e5162d30df479e83b463b94682afe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332780
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-10-30 18:43:14 +00:00
Konstantin Shcheglov 2cc328db0b Increment DATA_VERSION after https://dart-review.googlesource.com/c/sdk/+/332370
Bug: https://github.com/flutter/flutter/issues/137540
Change-Id: I1a32c36fb492325ae35445c0d4fee889c4a90db9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332446
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-30 17:55:55 +00:00
Nate Biggs 991f1aa248 [cfe] Add offset serialization to remaining Expression nodes without them.
Expressions missing offsets were:
- LogicalExpression
- ConditionalExpression
- Not
- BlockExpression
- Instantiation
- TypedefTearOff*

* I'm not sure how TypedefTearOff is actually being used, I don't see reference to it in the VM runtime. Unless the CFE lowers it before the VM gets it.

I also added a test on `binary.md` that ensures all expressions include a file offset in their serialized format. This can be expanded to statements if offsets are added to the remaining statement nodes without offsets.

TEST=Added binary_md_git_test.dart to ensure all expressions contain offset data going forward.


Change-Id: Ieaf80545f388b209f76be44db86ef07e80c8ad66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331540
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-10-30 16:05:27 +00:00
Daco Harkes 3283d4e2cb [test] Delete merge conflict files
Introduced in https://dart-review.googlesource.com/c/sdk/+/290760.

Change-Id: Ibea3d1147e30d040cbf828c20ffe3bee69380a05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332682
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2023-10-30 12:36:38 +00:00
Ilya Yanok 8c55f3eb0b Revert "[analyzer] simplify the libraries.dart file"
This reverts commit 29979649bd.

Reason for revert: makes `promiseToFuture` not exported from `dart:html`, see b/295129286

Original change's description:
> [analyzer] simplify the libraries.dart file
>
> Cleanup and re-landing of https://dart-review.googlesource.com/c/sdk/+/317803.
>
> Change-Id: I9fd679fdb111895ce662ecbe6d0fc5844909c3bc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332441
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

Change-Id: Id93b4a1d4bdea706ae10cfb089319514a0238a7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332683
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-10-30 11:22:27 +00:00
Johnni Winther f900eb95b7 Enable extension types in package:web and dart:js_interop
This uses the allowed_experiments.json to opt package:web and
dart:js_interop in to the inline-class experiment (the extension
types feature) for early access and development.

Change-Id: Ieb828b654f2320b147a3c48bbb4a142da1c18380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332421
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-10-30 10:58:45 +00:00
Nate Biggs 5403dc4927 [dart2js] Remove unused NonConstantValue.
The only constructor invocation of `NonConstantValue` is in the deserializer. Which means we're never creating any of these objects to serialize.

Also remove unused `handleClosureCall` method in `pkg/compiler/lib/src/inferrer/builder.dart`

Change-Id: I04e492bc4824795dd8fc109ee7464be56b27cb93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332500
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-10-28 04:17:16 +00:00
Konstantin Shcheglov 4cf31f03b3 Macro. Use TreeStringSink similar to the one in the analyzer.
But not the identical, because introspection is async.

Change-Id: I245db88449379cd5eeb563f37fa022461b94ad81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332624
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-10-28 01:40:27 +00:00
Konstantin Shcheglov 289302b270 Macro. Execute applications in order.
For now only during the types phase, but I think this is extendable
to the declarations phase, in a follow-up CLs.

Change-Id: Ib436cba3e821e84bea498b40703f40533e545f6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332166
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-27 22:41:22 +00:00
Keerti Parthasarathy ed56ca29a6 Add a test to move top level to file for Extension Types
Change-Id: Ie21a2d5f47a612d519480fe17bb2d25aba69f2dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-10-27 20:43:09 +00:00
Konstantin Shcheglov 03e0e6d18a Extension type. Issue 53865. Don't consider combined signatures to be extension type members.
Bug: https://github.com/dart-lang/sdk/issues/53865
Change-Id: I7db856c4760f40479f2b8471730d7dc8a58fa492
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332370
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-27 19:47:28 +00:00
Kallen Tu 7a248040c8 [analyzer] Issue 53793: Resolve enum arguments even if the constant is non-serializable.
The analyzer used to crash when there's a non-serializable constant enum.
The issue was that we would not resolve any of its arguments if we find that it's non-serializable.

This change resolves the enum arguments, regardless.

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

Bug: https://github.com/dart-lang/sdk/issues/53793
Change-Id: I67508a9d76cce385533c963dabf7a20d9559d9ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331747
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-10-27 19:18:58 +00:00
Paul Berry e7c88f127d Flow analysis: fix capitalization convention.
Both letters of `OK` should be capitalized, in accordance with
https://dart.dev/effective-dart/style#do-capitalize-acronyms-and-abbreviations-longer-than-two-letters-like-words.

Change-Id: I920436d373d1a597244e5592e568a19d0f22fa86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332065
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-10-27 17:52:39 +00:00
Paul Berry d42390d7c1 Clean up enable/disable logic for flow analysis and type inference tests.
Previously, the logic for enabling and disabling language features in
flow analysis and type inference tests relied on setters in the
`Harness` class that (a) were mostly unmatched with getters, and (b)
were almost exclusively used in just a single one direction
(e.g. `Harness.legacy` defaulted to `true`, so it was only ever set to
`false`).

Cleaned up so that there are explicit `enable` and `disable` methods
in the `Harness` class to cover all the use cases.

Change-Id: I5ccc8585f803fec634cad1472395ea0d135c87c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332064
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-10-27 17:51:44 +00:00
Alexander Aprelev 6a464c9dee Revert "Expire 3.0.0 experiment flags."
This reverts commit 6f29e7fce4.

Reason for revert: broke g3 bot

Original change's description:
> Expire 3.0.0 experiment flags.
>
> TEST=Existing tests covers.
> Change-Id: I161eefdc28c74f63ba1ee926800a01eea03d9930
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331960
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Change-Id: Ied6f612dc922824ffdadc4660898f3b859922ff5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332582
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-10-27 16:50:09 +00:00
Paul Berry 83af09021f Front end: Fix field promotion for extension type representation variable.
Update the type inference algorithm so that `FlowAnalysis.propertyGet`
is appropriately called when analyzing code that refers to the
representation variable of an extension type.

Flow analysis requires an arbitrary `Object` to represent the property
in question; this is later passed to
`OperationsCfe.isPropertyPromotable`. We use the synthetic
"representation field" (which is actually a `Procedure`) for this
purpose
(`ExtensionTypeRepresentationAccessTarget.representationField`).

Representation variables are considered promotable if they are public
(see
https://github.com/dart-lang/language/pull/3411). `OperationsCfe.isPropertyPromotable`
can tell if the representation variable is public by checking the name
of the synthetic representation field.

Fixes #53439.

Bug: https://github.com/dart-lang/sdk/issues/53439
Change-Id: I8f7ff8fcd8e5a43de419b8441951b52a555fda1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332480
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-10-27 16:34:30 +00:00
Jake Macdonald 24936fecb9 [macros] ensure we close the socket if the process fails to start
Change-Id: I29a9583080d27ce286d0c2f9f7dfa2d267b60b9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332600
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2023-10-27 16:32:35 +00:00
Lasse R.H. Nielsen 6f29e7fce4 Expire 3.0.0 experiment flags.
TEST=Existing tests covers.
Change-Id: I161eefdc28c74f63ba1ee926800a01eea03d9930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331960
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-27 13:57:00 +00:00
Ömer Sinan Ağacan 3a8d3cdf2f [dart2wasm] Don't generate duplicate selectors for dynamic calls
Change-Id: I8c41e8289400c4673d1268826bfe1cbc161a4d90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332402
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-10-27 12:31:23 +00:00
Johnni Winther 219711e6ac [cfe] Use extension type members hierarchy to lookup members
Change-Id: Ife78479add65488f79c5c949a7472e9d7ea22928
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332401
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-10-27 12:23:20 +00:00
Stephen Adams cb52932c72 [tests, dart2js] Fix test using minified type names
1. Add `Object` and `Map` to the very short list of names that are
unminified in the app.

2. Tweak test to avoid testing minified name.

Change-Id: Ide0cedc2950b5392eb6963403a48c0f89cd1b50a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332368
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-10-27 01:36:28 +00:00
Konstantin Shcheglov 335aec593f Extension type. Issue 53868. Report an error when inherit a method and setter.
Bug: https://github.com/dart-lang/sdk/issues/53868
Change-Id: I5e79cef42453647797a89bed21cac46a318a0f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332443
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-26 22:13:22 +00:00
Ben Konyi 5b390028f6 [ package:vm_service ] Migrate most of the Observatory expression evaluation tests
Change-Id: I2375d829aa8505dc0b69e5ce676dc9d983267bc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332122
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-10-26 21:43:48 +00:00