Commit graph

88762 commits

Author SHA1 Message Date
Paul Berry 87f2429051 Shared patterns analysis: make TypeAnalyzer.flow non-nullable.
This simplifies the shared TypeAnalyzer code by avoiding a lot of null
checks.

This required modifying a few analyzer code paths that didn't
previously initialize FlowAnalysis so that they now do.

Change-Id: Ie306d3ac94c4ca00d211e9cd038fb0b001996747
Bug: https://github.com/dart-lang/sdk/issues/50419
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-13 13:10:08 +00:00
Erik Ernst ba5f8da95d Update Dart.g to match the current pattern feature spec
This CL changes the Dart grammar in Dart.g such that it contains all
the grammar changes applied to the patterns proposal since the previous
update of Dart.g.

Change-Id: I9b5f0d9a092d30ce0055db99da5fdbe3b9b1d5dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275002
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2022-12-13 12:56:01 +00:00
Brian Wilkerson 9488163d7e Add a flag to temporarily allow pre-null-safe code to be analyzed
Change-Id: I89e3d1cbdc47d2a7c5c9e7e04d1dd5ab1855e8c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275140
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-13 01:07:35 +00:00
Joshua Litt 220bb44c55 [dart2wasm] Implement leaking Expando.
Change-Id: I14b92315c32eb9930fa852a424646fc2d0f0c0a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274820
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-12-13 00:27:59 +00:00
Nate Biggs 750b684cf9 [dart2js] Fix small bug in linearization.
Change-Id: Icc8c91131eaf8f1a7d10482f8549aa522552d05f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274960
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-12-12 23:48:53 +00:00
Ryan Macnak de310a0c7b [vm, compiler] Fix address encoding limit when loading type arguments.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/50671
Change-Id: I3a5ab9492d74fa770efd8e4c7cf90002a3793b9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275081
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-12-12 23:23:53 +00:00
pq 331185dbef fix generator script
Change-Id: I1b0ce85aff6d80608d9ad1de90923bff59c686bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-12-12 23:06:06 +00:00
Johnni Winther aa51913101 Rename 'views' experimental flag to 'inline-class'
This feature is about to be renamed from Views to Inline Classes and
we adjust the flag name accordingly. The rename PR hasn't landed yet,
but we update the flag now to unblock work on co19 tests.

Change-Id: Ib6981b99f8541ed75f3315059a8bbca02f3a4579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275000
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2022-12-12 22:22:39 +00:00
Johnni Winther 783642d594 [3.0 alpha][vm] Remove transformation of List default constructor
In preparation for removal of the List default constructor from
dart:core. See https://github.com/dart-lang/sdk/issues/49529

TEST=existing

Change-Id: I68cd8097ed33c0b0d91a75cd890f53fd1ea1ed09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273723
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-12-12 22:11:28 +00:00
Paul Berry a7907254ad Flow analysis: move _unmatched to _FlowAnalysisImpl.
This will allow me to push additional pattern contexts to represent
subpatterns, while still accumulating the "unmatched" flows for the
pattern as a whole.

Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: I8a7b1255abeda1cd07d82828057c81f45954d173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-12 20:28:29 +00:00
Sigmund Cherem 2d282a65ea [dart2js] hide "invoke from" console message.
This message was meant to be presented as an extra diagnostic message when the
compiler was running with the verbose flag, but it was accidentally
presented in the help message when running 'dart compile js -h -v'.

Change-Id: Ic2e76fc117bfd76f071756cc48ee6ce28d0f0391
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275042
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-12-12 20:18:53 +00:00
Danny Tuppeny ef2c7916f5 [analysis_server] Exclude instrumentation log file from logged watch events to prevent loops
Fixes https://github.com/dart-lang/sdk/issues/48885.

Change-Id: Idebfd9d4f2867b3053c0ece49b300926956fab2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275061
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-12-12 20:09:36 +00:00
Brian Wilkerson e113df3da5 Remove some unnecessary ignore comments in vm_service
Change-Id: I9b869a82932bf242c7df3045ca4ca888c2fb3fbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274732
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-12 20:03:59 +00:00
Ben Konyi e3ab2fc4bd [ CLI ] Update dart create templates to support SDK version >=3.0.0-dev < 4.0.0
Fixes https://github.com/dart-lang/sdk/issues/50635

Change-Id: I7a0fcc95220a7402ff9462d9837e93a2e21f4688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275040
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-12-12 19:56:16 +00:00
Paul Berry 1859824f74 Shared patterns analysis: Separate handling of logical and/or.
As I'm beginning to work on flow analysis for logical and/or patterns
I'm realizing that the shared analysis methods for handling
logical-and and logical-or patterns are going to need to have
different parameters, so it makes sense to separate them.

This makes the code clearer anyhow, since they weren't sharing any
functionality.

Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: I17b0ad53f916f48ee02ccb1c9c23488261a6a1b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-12 19:55:56 +00:00
Nicholas Shahan 0b3533aa95 [ddc] Fix unsound await expressions
Some expressions have a static type that can lead to a possible
soundness issue when awaited. For those expressions an additional
runtime check is performed.

Issue: https://github.com/dart-lang/sdk/issues/49396
Fixes: https://github.com/dart-lang/sdk/issues/50602
Change-Id: Ief25fbe8c38330cca0c17be4d411780a20ab87a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274729
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-12-12 19:43:55 +00:00
Paul Berry 3a1cc9faf6 Flow analysis: update exhaustiveness logic for patterns.
When patterns support is disabled, flow analysis considers a switch
statement to be exhaustive if it has a `default` clause or if the
scrutinee type was an enum and all enum cases were covered (this
matches the behaviour of previous releases of Dart).

When patterns support is enabled, flow analysis considers a switch
statement to be exhaustive if it has a `default` clause or if the
scrutinee type is an "exhaustive type" (as defined in the patterns
spec).  A later stage of analysis will check that such switch
statements truly are exhaustive, and issue a compile-time error if
they aren't.

Note that as part of this change I've modified the analyzer so that it
only attempts to track whether all enum cases are covered if patterns
support is disabled.  I didn't make a corresponding change to the CFE
because the CFE stores exhaustiveness information in the kernel output
(`SwitchStatement.isExplicitlyExhaustive`) and I didn't want to break
that.

Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: Ib2e51971a1b814c003401b3d54d41f7a9ef9f59a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-12 19:15:53 +00:00
Brian Wilkerson 1e0091aae0 Remove some unnecessary ignore comments in kernel
Change-Id: I6362107efe058c2a4465ff17e57edae18562e0fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274730
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-12-12 18:46:15 +00:00
Brian Wilkerson b9de2e1a72 Remove some unnecessary ignore comments in frontend_server
Change-Id: If1123901019c5fe83f232ba34b8c3d7f58dce448
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274728
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-12 18:40:40 +00:00
Brian Wilkerson 8e22dd6c95 Remove some unnecessary ignore comments in dart2wasm
Change-Id: I5c7a8c9a4533e2fed5c5a35acf4b461bed912d36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274725
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-12 18:38:12 +00:00
Brian Wilkerson 8e03a148ae Remove some unnecessary ignore comments in test_runner
Change-Id: Ic4dd24a689d6832e4bfe6f1f42abd0c81bcd42e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274731
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-12 18:21:00 +00:00
Nate Bosch c58297b756 More consistently use parent in zone.fork doc
The doc refers to the `this` as "this", "parent", "current zone", and
"forking zone". Fix a typo "current's zone" -> "parent zone's".

Change-Id: I6d61ad5c69c2cc415ce7271831c7a364715b0652
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274280
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-12-12 18:13:53 +00:00
Brian Wilkerson 2fbb93fc11 Do not apply the fix for avoid_function_literals_in_foreach_calls when body is not sync
Change-Id: I0482c0d35a01afffd26073383b137697b829249c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274943
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-12 18:12:57 +00:00
Derek Xu c09f790d37 [VM/CLI] Remove dartdev.dill
Incompatible VM flags will no longer break the CLI when running from an
AppJIT snapshot, so the fallback logic is no longer required. This CL
thus removes dartdev.dill and the fallback logic.

Relevant past CLs: https://dart-review.googlesource.com/c/sdk/+/157601
and https://dart-review.googlesource.com/c/sdk/+/178300

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

TEST=I tried running `out/ReleaseX64/dart --observe --sound-null-safety test.dart`
and `out/ReleaseX64/dart --observe --no-sound-null-safety test.dart` and
both worked.

Change-Id: I5cdcfbccf71ec557964014fdb80733b4a7c76b4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274520
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2022-12-12 18:02:47 +00:00
Ömer Sinan Ağacan 001433992c [dart2wasm] Fix isNegative on NaN values
New passing tests:

- co19/LibTest/core/double/isNegative_A01_t01
- corelib/nan_infinity_test/01
- corelib/nan_infinity_test/none
- language/unsorted/intrinsified_methods_test

Change-Id: I379525fe0da36d6fc365d275ded9370f2b5b4812
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274541
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-12-12 17:09:00 +00:00
Paul Berry 1495d298f4 Flow analysis: add assertions to AssignedVariables.declare.
These assertions verify that the client doesn't try to call `declare`
more than once on the same variable.  They should help avoid bugs as I
work on integrating the logic for variable patterns more deeply with
flow analyis.

Change-Id: Ic7ffec8bd5f542cef0067a5308d86de6e48ec8ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274521
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-12-12 17:05:23 +00:00
Paul Berry 3e8b72cfbf Flow analysis: fix bogus comment formatting.
Change-Id: I2524ca8a476bdff3ff58b92a99c34d51fdee49e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274981
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-12 16:10:30 +00:00
Daco Harkes e3e355e16a [vm/ffi] Fix FfiTrampolineData GC bug
This lets the GC visit FfiTrampolineData::c_signature again.

https://dart-review.googlesource.com/c/sdk/+/272201 stopped adding
FfiTrampolineData::c_signature to snapshots. However, instead of
skipping it manually in app_shapshot.cc, we skipped it in
raw_object.h, which also caused the GC to skip it.
This CL adds it back in as we need it in JIT snapshots. This way we
keep it consistent between AOT/JIT snapshots.

TEST=tests/ffi/regress_b_261224444_test.dart

The c signatures of FFI trampolines were not properly traced in the
precompiler, causing us to hit an assert when the classes mentioned in
those types where only referenced from a signature and not retained
for any other reason.

TEST=tests/ffi/native_assets/process_test.dart (dartkp)

Closes: https://github.com/dart-lang/sdk/issues/50678
Bug: b/261224444
Change-Id: I84fc880744c2045ea3e2ef4f37df454b80b2faeb
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,app-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274387
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-12-12 15:46:33 +00:00
Martin Kustermann 14508968f0 [vm] Ensure platform/globals.h is included before using defines
Defines may be defined/modified/cleared in `platform/globals.h`. All VM
sources should directly or indirectly include `platform/globals.h`
before using defines.

TEST=ci

Change-Id: Icf67eddd94a18775d4247259049906c9cc6014cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275020
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-12-12 15:38:30 +00:00
Michael Thomsen 2a0bcaf155 [3.0 alpha] Add onError removal to changelog.
Followup to https://dart-review.googlesource.com/c/sdk/+/259042

Change-Id: I9f21a58fe7baf9e0dc0a9b8b13900c72a07e0805
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275001
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-12-12 11:51:35 +00:00
Lasse R.H. Nielsen 767049139a [3.0 alpha] Remove deprecated dart:core apis
- Remove `proxy` and `Provisional` annotations.
  - Remove `Deprecated.expires` getter.

Change-Id: I4521b48bb92e5f8420c778686f4efa9c6426cebb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258004
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-12-12 11:46:58 +00:00
Dan Chevalier 3ed65601b0 Revert "[ VM Service / DDS ] Add custom service stream support"
This reverts commit 4981cbffe2.

Reason for revert: Mac regression test failed.

Original change's description:
> [ VM Service / DDS ] Add custom service stream support
>
> Setting the `stream` parameter on `developer.postEvent` will now forward those events to a custom stream inside DDS.
>
>
> The first use of this will be for widget inspection. A navigation event will be posted to a custom stream. Our IDE DAP can listen for the Event and react to it by navigating to the desired location in the code.
>
> TEST=Updated observatory tests. Created new developer test to check assertions. Added DDS tests for new custom stream behaviour. Manually tested the postEvent and StreamListen with multiple clients
>
> https://github.com/flutter/devtools/issues/4533
>
> Change-Id: I870dc634c9a9a7d2ee3a6605319c2a18517ad197
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274061
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Dan Chevalier <danchevalier@google.com>

TBR=bkonyi@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com,danchevalier@google.com

Change-Id: Ia1dce25444a6329c0553c931c9a6dbbec65ee583
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274802
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Dan Chevalier <danchevalier@google.com>
2022-12-12 11:24:37 +00:00
Michael Thomsen ef286f6039 [3.0 alpha] Remove dart:developer's deprecated MAX_USER_TAGS
Change-Id: I967974b4295548278400c14fcca7540dfa95fb66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268340
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-12-12 10:49:58 +00:00
Michael Thomsen b3304af17d [3.0 alpha] Remove deprecated onError API on int.parse, double.parse, and num.parse
Change-Id: I9ed24c380bf716cb893b99ba228e34f4671cc8fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259042
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-12-12 09:54:54 +00:00
Michael Thomsen 4028b9b0fe [3.0 alpha] Remove deprecated NoSuchMessageError API
Contributes to https://github.com/dart-lang/sdk/issues/49529

Change-Id: I2cef41b991c59869f606235929347449e17022cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271082
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-12-12 09:48:05 +00:00
Michael Thomsen d6b40b0926 [3.0 alpha] Remove deprecated dart:async APIs
Contributes to https://github.com/dart-lang/sdk/issues/49529

Change-Id: Ib70efd0f388f50686e1745ca5237d06a4538a870
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268460
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-12-12 09:35:29 +00:00
Michael Thomsen e2eb4cf23f [deps] rev intl, test
Revisions updated by `dart tools/rev_sdk_deps.dart`.

intl (a127902..881e53e):
  881e53e  Fri Dec 9 08:01:26 2022 -0800  Copybara-Service  Merge pull request #346 from lukepighetti:patch-1
  e5ca40d  Fri Dec 9 07:00:14 2022 -0800  Copybara-Service  Merge pull request #453 from selcukguvel:doc-fix
  edbfc06  Fri Dec 9 15:34:30 2022 +0100  Moritz  Merge branch 'master' into patch-1
  b489fdd  Fri Dec 9 15:30:23 2022 +0100  Moritz  Merge branch 'master' into doc-fix
  60a0d8c  Fri Dec 9 04:17:04 2022 -0800  Googler  Internal change
  ef953fd  Mon Mar 7 16:30:31 2022 +0300  selcukguvel  Fix NumberFormat document readability issue - Show "var eurosInUSFormat = .." on a new line
  aa98b67  Tue Dec 29 15:31:53 2020 -0500  Luke Pighetti  Remove 7 year old unimplemented fields

test (73cd754..09fb067):
  09fb0679  Thu Dec 8 14:52:33 2022 -0800  Jacob MacDonald  prep packages for publishing (#1814)
  c8ac4382  Thu Dec 8 14:07:05 2022 -0800  Jacob MacDonald  Prepare for Dart 3.0 api removals (#1812)

Change-Id: I9a7caed3165d3b65e96001aa029602a09355bce8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274542
Auto-Submit: Michael Thomsen <mit@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-12-12 08:15:17 +00:00
Chloe Stefantsova a46de1c30c [cfe] Add implicit null-check on throw
Throwing `null` is not supported in sound null safety. This change
inserts an implicit `as Object` cast that result in a TypeError, rather
than a NullThrownError, in sound mode.

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

TEST=Covered by the existing tests

Change-Id: I041baf95becd2df1b940fdff7cde398a4e391ee7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247546
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-12-12 00:48:13 +00:00
Alexander Aprelev e07321ec9d [vm] Factor StringEqual out of platform-specific intrinsifiers into single asm_intrinsifier.
TEST=ci
Change-Id: Iaab92c4a4c5a04355778c17ce564672c1e97814c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272349
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-12-11 02:49:28 +00:00
Sam Rawlins 315ff0b8a2 analysis_server: quick fixes for records
* allow rename_to_camel_case to apply to record type field names
* allow replace_final_with_const to apply to record literals.

Change-Id: Id373180dae9f7a78677e30c4dbc535bbb87ce3f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272486
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-12-10 23:12:23 +00:00
Michael Thomsen c9a3327c26 Tweak experiment wording
Change-Id: Ic86ab50f62d26d42d10cfcb314e06c6f5292747e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273840
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-12-10 12:15:47 +00:00
Brian Wilkerson dfe5194278 Remove some unnecessary ignore comments in tools
Change-Id: I7ee823a38e9fca09f1c2b0e5e77078c21c72251d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274733
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-10 05:01:50 +00:00
Sigmund Cherem 5f765bcf8f [dart2js] fix minified_names_test.
This test broke on a d8 roll back in January, since then other changes in the compiler
made the test drift further away from the original issue

Change-Id: I081dd48ae9eea2aec4117a377805c26675d2e557
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271862
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-12-10 01:24:54 +00:00
Brian Wilkerson bb7e2c9b95 Remove some unnecessary ignores in test code
Change-Id: I55e332132b9f3e435d79dd03a7aa7459d796599a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274800
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-12-10 00:19:30 +00:00
Nicholas Shahan c010e4ffbd [ddc] Add support for new native types
Use the "extension type" class as the interceptor object for the
dart:_rti library. This applies to the new type system for values
that are represented as a native JavaScript type. For example:
Number, bool, String, Array, etc.

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: Ie6214aa897d3ae8abb4f9619cd2be984eeb9c4ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266544
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-12-10 00:07:45 +00:00
Brian Wilkerson 1e4a974a5d Remove some unnecessary ignore comments in compiler
Change-Id: I323c846776637b91922abac73acc2eac6017d4de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274722
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-09 22:54:08 +00:00
Konstantin Shcheglov 78fb91e739 Resolve PatternAssignment and AssignedVariablePattern.
Change-Id: I79a7a3b7f5b5fed349c9d40d61a9e0f0fd3978ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274723
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-12-09 22:46:28 +00:00
Brian Wilkerson de24bf1cce Remove some unnecessary ignore comments in dev_compiler
Change-Id: Ibb901e1e9d02d0480721240d4d5ecef070364135
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274726
Commit-Queue: Leon Senft <leonsenft@google.com>
Reviewed-by: Leon Senft <leonsenft@google.com>
2022-12-09 22:45:58 +00:00
Ryan Macnak a429d2ff91 [vm, gc] Remove dead code from weak handle visitors.
TEST=ci
Change-Id: I10619b7970de19047c9af77fc82dc9d3009f34f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274801
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-12-09 22:22:28 +00:00
Brian Wilkerson d9482e35ce Remove some unnecessary ignore comments in analyzer packages
Change-Id: I578285132f0d3f200cb2e9069750a1391940711d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-09 21:33:18 +00:00