Commit graph

88980 commits

Author SHA1 Message Date
Vyacheslav Egorov 2f117ba43c [vm/aot] Fix ProgramElementKeyValueTrait::Hash.
It was returning library's index which is an unstable
value. This instability could cause `Precompiler::HasApiUse`
to stop returning `true` after `Precompiler::DropLibraries` even
if library was added to the `api_uses_` set. This in turn could cause
`Precompiler::PruneDictionaries` to drop library entries it should
not have dropped.

TEST=added assertion that verifies stability of the set

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try
Change-Id: I0685bd75562f83e2b9d8b3a03fa410ba218df2ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275241
Reviewed-by: Tess Strickland <sstrickl@google.com>
Auto-Submit: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-12-13 19:46:41 +00:00
Alexander Markov c673119d9e [benchmarks] Add benchmark for lists/maps/sets of records
Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I1cb36cc4e690ef463c26c8aa58a2186dfe3290e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273823
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-12-13 19:38:56 +00:00
Johnni Winther e742ecfa9e [parser] Parse 'inline' instead of 'view'
Change-Id: I2ec0553fccf6caa3aa93275955c9e8e2213ee7f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-12-13 19:38:38 +00:00
Ryan Macnak fa2e1c70ca [vm] Fix various scaling limitations.
- Quadratic behavior recording field guards
 - Quadratic behavior looking up dynamic invocation forwarders
 - Incorrect limit generating allocation stubs

TEST=class with 64k fields
Change-Id: I7a9aba617e71eff9b28711e99c689cb04be0dde7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273285
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-12-13 19:28:37 +00:00
Kallen Tu 93c3737674 [tests] Allow using classes as mixins within the same library and update a few language tests.
Change-Id: I4488b3ee7d04fe3a9c34ee3046f96e73984c0541
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274602
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2022-12-13 18:29:58 +00:00
Sam Rawlins 35f0bb8187 Stop using strong-mode options in dart2js_runtime_metrics and scrape
Change-Id: I89347335d14ecf539fc7ea7fc44bd31680dbc458
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275302
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-12-13 18:27:22 +00:00
Sam Rawlins fdf59ad1eb Remove all support for super-mixins option
Bug: https://github.com/dart-lang/sdk/issues/50680
Change-Id: I96409d02e64d3e198e0fae4a55f58f871ce2aeac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275142
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-12-13 18:13:37 +00:00
Devon Carew 0f0e19c49e Bump dartdoc to eb90a44c54fa01f0d501bf6e861a34857d843cea
Changes:
```
> git log --format="%C(auto) %h %s" f2bb6e9..eb90a44
 https://dart.googlesource.com/dartdoc.git/+/eb90a44c Remove annotations from the features section of each element (3268)
 https://dart.googlesource.com/dartdoc.git/+/16126376 Don't show null in search results when no description (3273)
 https://dart.googlesource.com/dartdoc.git/+/3ff7aa75 Fix search arrows by using a flat list of suggestions (3271)
 https://dart.googlesource.com/dartdoc.git/+/90264fb4 Bump github/codeql-action from 2.1.35 to 2.1.36 (3270)
 https://dart.googlesource.com/dartdoc.git/+/bede500d Fix remote linking in 2.18 and 3.0.0 (3267)

```

Diff: https://dart.googlesource.com/dartdoc.git/+/f2bb6e92aa4fa76a409f301773d5be6bfda897dc~..eb90a44c54fa01f0d501bf6e861a34857d843cea/
Change-Id: I588c7858493c2f5202d552a83505c585e57416b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275300
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-12-13 18:06:49 +00:00
Devon Carew a3b7a76f8a Bump intl to 234b291aee7c23c9ffc9748fd6532d37553f609b
Changes:
```
> git log --format="%C(auto) %h %s" 881e53e..234b291
 https://dart.googlesource.com/intl.git/+/234b291 Add issue templates (519)
 https://dart.googlesource.com/intl.git/+/45a6df6 Merge pull request 356 from ZainUrRehmanKhan:Wrong_example_of_format_pattern_in_api_documentation
 https://dart.googlesource.com/intl.git/+/ef7ba54 Merge branch 'master' into Wrong_example_of_format_pattern_in_api_documentation
 https://dart.googlesource.com/intl.git/+/255a26e Example of format pattern fixed

```

Diff: https://dart.googlesource.com/intl.git/+/881e53e921e23bdcc2fb9d51b0a9cba769c8f75f~..234b291aee7c23c9ffc9748fd6532d37553f609b/
Change-Id: I25c8a09816d280d3e29638fa721e410345d073f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275301
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
2022-12-13 17:35:05 +00:00
Johnni Winther e6d59342ff [cfe] Build PatternVariableDeclaration in BodyBuilder
Change-Id: Ic55dbc03bf2cf4865275b186266c0f420263d406
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273744
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-12-13 17:03:13 +00:00
Tess Strickland e44cece2ca [CFE] Fix compileSdk check in CompilerOptions.equivalent.
Change-Id: I3c8e7917e45d441f712c5643a6ecba4ece6450f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275242
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-12-13 16:51:51 +00:00
Daco Harkes c3fce2f559 [test/ffi] Free pointer allocated via malloc
Closes: https://github.com/dart-lang/sdk/issues/50705
Change-Id: I96d0bdf5e7fe95b8841d9c7ba3db8e785574222e
Cq-Include-Trybots: luci.dart.try:vm-kernel-asan-linux-release-x64-try,vm-kernel-precomp-asan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275260
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-12-13 16:41:47 +00:00
Dan Chevalier fd6fa010ec [ VM Service / DDS ] Add custom service stream support (Revised)
NOTES:
Original CL: https://dart-review.googlesource.com/c/sdk/+/274061
Revert CL: https://dart-review.googlesource.com/c/sdk/+/274802

Regression tests that failed after merging Original CL:
- https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/pkg-mac-release/24046/overview
- https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/pkg-mac-release-arm64/5999/overview

----------
DESCRIPTION:
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=Made sure that regression from original PR could be reproduced, and then resolved by applying this change. 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: I2b04a84b4daf11dd9d72f899928b5e1f62a5ae02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275121
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-12-13 16:31:37 +00:00
Erik Ernst 010b3dff91 Update type variable cases in the regression_49396_test
The definition of flatten was adjusted in
https://github.com/dart-lang/language/pull/2696
such that it better preserves the type information when the type of `e`
in `await e` is a type variable. This CL changes the test to expect
the behavior of the newly specified flatten.

The test has been renamed to 'await_flatten_test.dart'.

Change-Id: Iaf67a53cd3cd181bcb3eb6e85beca7cc1af4d34a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274682
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-12-13 15:39:40 +00:00
Derek Xu 53d859f6b9 Revert "[VM/CLI] Remove dartdev.dill"
This reverts commit c09f790d37.

Reason for revert: CI failures

Original change's description:
> [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>

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

Change-Id: I5117f990dfabf93f5a9bae56098831280845e84e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275181
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2022-12-13 15:28:19 +00:00
Paul Berry c430a3b4aa Patterns flow analysis: fix handling of empty exhaustive switch statements.
I previously thought that the only possible situation where a switch
statement over a valid type could be exhaustive without containing any
cases was if the scrutinee type was the empty record type (`()`).  But
that isn't true at all:

- The empty record type is inhabited by empty record objects, so such
  a switch statement would not be exhaustive after all.

- It is possible for the user to create a type that can be
  exhaustively switched over with zero cases: by creating an abstract
  sealed class without any subclasses.

In the latter case, I think it makes the most sense to treat the code
after the switch as unreachable, because that's the normal behaviour
of a switch over an exhaustive type with no `break`s.  It is sound to
do so because the type is uninhabited, therefore the body of the
switch statement itself will never be reached.

Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: Ibc0a21226f25ae155db994343874354d5b8e4f7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274621
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-13 14:36:57 +00:00
Paul Berry 9169abc8f4 Add SwitchStatementTypeAnalysisResult.requiresExhaustivenessValidation.
This boolean tells the analyzer and front end whether it is required
to run the exhaustiness algorithm on the switch statement (and to
report an error if the switch isn't exhaustive).

Bug: https://github.com/dart-lang/sdk/issues/50585
Change-Id: I8c95e563bd59a83cf5e1b94170af5c4f8b5c6496
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274925
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-13 14:35:37 +00:00
Paul Berry a29cd031d3 Analyzer: fix dead code detection in top level declarations.
Fixes #49701.

Bug: https://github.com/dart-lang/sdk/issues/49701
Change-Id: I77fa7faf1dbfcda04a73eedcf0614c2f852b1dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275041
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-13 14:13:18 +00:00
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