Commit graph

86158 commits

Author SHA1 Message Date
Ryan Macnak 6e3ef8b9e6 [standalone] Update tcmalloc to 2.10.
Remove some architecture limitations.

TEST=ci
Change-Id: I9703729d3e871687cd4951ec40d3d09ae579871f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247864
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-07-06 17:34:20 +00:00
Danny Tuppeny 83f0bb25a4 [analysis_server] Allow multiple not-imported items in completion if name not already imported
Change-Id: Ie5bfa353d59546518180a08cd4720f793a01ba30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250660
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-06 17:19:40 +00:00
Ahmed Ashour 572f24882f [analyzer_plugin] consistent hashCode for SourceFileEdit
Fixes #49371

Change-Id: I853323df821a9b6481f6fdd190ccecba2c01aa2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250380
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-06 16:03:20 +00:00
Konstantin Shcheglov 7df3cd3cfd Feature sets inconsistency is implemented as INCONSISTENT_LANGUAGE_VERSION_OVERRIDE.
Change-Id: I6eadfcb4706f5739afaac20ca0397f4335a7db96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250443
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-06 15:55:50 +00:00
Alexander Markov 5a067e91bb Describe new async/async*/sync* implementation in CHANGELOG.
Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I0cfff561a06c402603ad4f2b977821b572cb6e21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250408
Reviewed-by: Slava Egorov <vegorov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-07-06 15:17:50 +00:00
DEPS Autoroller 37a105266f Roll Dart Protobuf Support from 66593ca5a4d1 to 585878516d90 (5 revisions)
https://dart.googlesource.com/protobuf/+log/66593ca5a4d1..585878516d90

2022-07-05 omersa@google.com Documentation tweaks
2022-07-05 omersa@google.com Move a test to its test group
2022-07-03 omersa@google.com Move annotations to a new file
2022-07-03 omersa@google.com Update a test (sync from internal)
2022-07-03 omersa@google.com Make `CodedBufferWriter._valueTypeIndex` static

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-protobuf-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Protobuf Support: https://github.com/dart-lang/protobuf/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I474f7b051224fa959f45a15cfd4216e69f7cf749
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250682
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-07-06 14:53:40 +00:00
Vyacheslav Egorov a2ab7ccea4 [vm] Avoid UB in FinalizeHash(hash)
FinalizeHash(hash) was trying to avoid UB in expression 1 << 32
by casting 1 to uintptr_t. This type however is not wide enough
on 32-bit platforms.

Instead just use explicit comparison hashbits < kBitsPerInt32 to
avoid overflow in left shift.

This bug went unnoticed for a while because it the only place
where we call FinalizeHash(hash) is in the snapshot profile
writer code and it only triggers when gen_snapshot is a
32-bit binary - which is only true on Windows, as Mac and Linux
seem to use simarm_x64 configuration instead.

This UB was explicitly affecting the code behavior because C++
compiler would either optimize out or change behavior of any
code that consumed value produced by FinalizeHash(hash).

Fixes https://github.com/flutter/flutter/issues/97764

TEST=vm/cc/DirectChainedHashMap

Change-Id: I39f2b09e7516c875b765e5a065d1c1331f89fa33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250741
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-07-06 12:48:16 +00:00
Daco Harkes 1c7a7d0c41 [vm/ffi] Fix reference in comment
The comment was referencing a non-existent function.

TEST=just a comment update

Change-Id: I516debc58addb42d80775223625b0b2088c230d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250740
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-07-06 12:22:50 +00:00
方哲源 6b04cac19d [vm] Bug fix in dedup optimization when build deferred components.
Closes https://github.com/dart-lang/sdk/pull/49393

TEST=vm/dart{,_2}/regress_49372

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try
GitOrigin-RevId: c6306f96ae2bafa25c45e5c7a818c71eb72d8d12
Bug: https://github.com/dart-lang/sdk/issues/49372
Change-Id: I7ec4b170819321cb74037e475006890259446744
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250720
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-07-06 11:04:10 +00:00
DEPS Autoroller 1b8cae19a6 Roll Dart Documentation Generator from 900432d8cb1e to 21f9341eb662 (4 revisions)
https://dart.googlesource.com/dartdoc/+log/900432d8cb1e..21f9341eb662

2022-07-05 srawlins@google.com Switch to analyzer's updateAnalysisOptions2 (#3068)
2022-07-05 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 1.1.1 to 1.1.2 (#3067)
2022-07-05 michaelgobbers@gmail.com bumped analyzer version to 4.0.0 (#3033)
2022-07-05 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.1.14 to 2.1.15 (#3066)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I6abe8e224af5682f96a7624e5b24a4921bf6c890
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250701
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-07-05 23:05:29 +00:00
Alexander Thomas 5eb920d40f [infra] Optimize shards for the analyzer builders
Fixes: b/237755665
Change-Id: I11c066e8db7665ccd15ee671e2a706759cb1ef5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250386
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-07-05 18:19:49 +00:00
Konstantin Shcheglov bc31ab9e4b Inline FileState.parse2()
Change-Id: I77a8c317bdf4780a3becb4c47d84fcdadfecbea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250486
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-05 16:54:03 +00:00
Emmanuel Pellereau b2f41b63dd [analyzer] Optimize UsedLocalElements.merge().
See b/235079681 (analyzer is slow with many part file).

1. Pre-compute UsedLocalElements.merge() before calling '_computeHints()' on each part files.
2. Optimize HashSet insertion:
   Remove implementation of ParameterMember.hashCode.
   This implementation was not linked to a corresponding '.==' override.
   So, while not wrong, it did cause many collisions not resulting in equality.

Change-Id: I060d62e9e81a7d9b2183306106a16c27a5cbeffe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250520
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-07-05 06:02:19 +00:00
Konstantin Shcheglov 9d1b978319 Fix failing macro tests.
Change-Id: Ie8afccf116badc1c0145b07f2a5782fa41c4a9e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250600
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-05 05:30:52 +00:00
Konstantin Shcheglov 3f5bc18057 Issue 49395. Fix crash for part of not part when running linter.
Bug: https://github.com/dart-lang/sdk/issues/49395
Change-Id: I112a27177df6c3ed0e0b4b99f2c9e634b5208c06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250581
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-07-05 05:30:49 +00:00
Devon Carew 8bd60f4144 [deps] rev deps for http, test
Change-Id: I914830c986c632595949ca08e1b3a27f5136f41f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250410
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2022-07-04 13:59:39 +00:00
Johnni Winther f6846849b9 [cfe] Handle augment super expressions
This adds the generation of access to augmented procedures.

TEST=existing

Change-Id: I5efa9cc541b86c18735bb1f4c51c73976ffa42ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250164
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-07-04 12:37:50 +00:00
Daco Harkes c48f6fea58 [vm] Small fixes
Some small fixes split off from
https://dart-review.googlesource.com/c/sdk/+/246241.

* Print code comments on disassembly if the code object exists.
* Add Struct to the NativeType API.
* Fix typo.
* Add documentation.

TEST=Only cosmetic changes, build/run CI should be enough.

Change-Id: Ie193243573b034c52e41401b4d384d556c212fdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250165
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2022-07-04 07:53:39 +00:00
Konstantin Shcheglov ecba15b641 Add more debug data to LinkedElementFactory.
Change-Id: I9bf172856cd8a3c06388038574890f6ad872572a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250441
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-04 00:10:28 +00:00
Devon Carew 2cd9404f26 [infra] move pkg/ analysis to the pkg- bots and analyze all of pkg/ (and tools/).
Change-Id: I7328a130c629e15695d0d2a1feffe00c50b45249
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250411
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-07-02 23:48:25 +00:00
Alexander Markov 64f3a240fd [tests] Address comments for language/async/await_user_defined_future_soundness_test
This change is a follow-up to https://dart-review.googlesource.com/c/sdk/+/250222.

TEST=language/async/await_user_defined_future_soundness_test

Issue: https://github.com/dart-lang/sdk/issues/49345
Change-Id: I9e486a0a90fbe6df74398bd11a2be805e6d1c0a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250404
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-07-02 10:11:42 +00:00
Sigmund Cherem 245f7a003c [dart2js] Add a couple scripts to aid our migration.
These are simple scripts to count progress and find migration candidates.

Change-Id: I872d85891001349dadbcf1d67e64ab5aa993d2a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250146
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-07-02 04:25:21 +00:00
Konstantin Shcheglov 33d6a341a8 Separate AugmentationImportDirective from ImportDirective.
Change-Id: I202320513390dbb218ec86fed18fc2943b168dd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250413
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-02 03:59:21 +00:00
Konstantin Shcheglov 1ed8748dcd Use ImportDirectiveState and others in LibraryAnalyzer.
Change-Id: I9cdeedcb8f3e9b35814bb457547bb52ac85f7f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250263
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-02 03:06:30 +00:00
Kenzie Schmoll ffb598f3b5 Bump DevTools to version 2.15.0
Change-Id: If91997a7eeef94af777732bb852960a44e5ea508
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250412
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2022-07-01 21:57:25 +00:00
Devon Carew d2a3849f92 [pkg] ignore some intentional analysis issues
Change-Id: I0838cc90113efc8749032e49da70d3ab913112d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249720
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-07-01 20:04:10 +00:00
Nicholas Shahan 624dd76b6f [ddc] Move FutureOr normalization to its own visitor
Will make it easier to reuse the normalization when compiling
with the new runtime type representation.

Change-Id: Ie767a2b676950205b0b50eadac305c29914433f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247420
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-07-01 18:55:50 +00:00
Nicholas Shahan f3daca2ef6 [ddc] Fix cast when retrieving annotation name
Name can be null and cast failures start appearing here when
running with sound null safety.

Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I3d96e80283889915cc28a310a1db940a9c6bcab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250409
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-07-01 18:29:10 +00:00
Devon Carew bc458d5341 Remove the ignore for the top level .packages file.
Change-Id: Iab05d3658f802615c3cfa6ed921ca7296e8343f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249726
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-07-01 18:03:41 +00:00
Janice Collins 822cd1cbd5 Remove dartanalyzer from built SDK.
Bug: https://github.com/dart-lang/sdk/issues/48457
Change-Id: Ic0d038299712989b8445859590ff870ce3bdc13a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249662
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-01 17:43:20 +00:00
Devon Carew bc5a42db54 [deps] update deps for dartdoc, protobuf, test, webdev
Change-Id: I00495a2c46f0ca3543eb1fb73da1a684781f621c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250405
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-07-01 17:26:10 +00:00
Alexander Thomas 81d86a05b2 [testing] Simplify analyzer configurations
Bug: b/237755665
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,analyzer-win-release-try
Change-Id: Ia48331d6fd6bf00df9dbe1b895e157a0957064f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249608
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-07-01 16:16:42 +00:00
Nicholas Shahan 0f2e021da8 [ddc] Fix non-null assertion crash
`VariableDeclaration.name` could be null when the variable
was synthetically introduced by the compiler. In this case the
expression compiler can ignore the variable because it's value
doesn't reflect the value of a variable in the original dart
source code.

Add a regression test for the expression compiler that
ensures code that introduces a synthetic variable will not
cause a crash when you stop at a breakpoint.

Fixes: https://github.com/dart-lang/sdk/issues/49373
Change-Id: Ifc5f72ab4e5733ead17a20889c222bcc46921f6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250343
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-07-01 16:15:53 +00:00
Zach Anderson d7df61e042 Revert "[vm] Generate event ids for synchronous begin and end events."
This reverts commit 7fe44864d6.

Reason for revert: https://github.com/flutter/flutter/issues/106957

Original change's description:
> [vm] Generate event ids for synchronous begin and end events.
>
> os_signposts needs explicit ids to match begin and end events, whereas all other trace systems do this implicitly.
>
> TEST=Instruments
> Bug: https://github.com/dart-lang/sdk/issues/49178
> Change-Id: Ifeeaa1dfe823a0d5668f48b8c584f8bdeef23212
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249951
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,asiva@google.com

Change-Id: Id86959d08b5352b5446b6f294a8302b88b4fa0c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/49178
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250403
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2022-07-01 16:08:40 +00:00
Liam Appelbe f7990bc0da Revert "[vm] Forward dynamic events names to os_signposts as arguments."
This reverts commit 90da09e2db.

Reason for revert: Blocking this revert: https://dart-review.googlesource.com/c/sdk/+/250403

Original change's description:
> [vm] Forward dynamic events names to os_signposts as arguments.
>
> TEST=Instruments
> Bug: https://github.com/dart-lang/sdk/issues/49178
> Change-Id: Ice4a83f03dccb6c7dbd54c229f37d4ea7d0d8051
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250111
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,asiva@google.com

Change-Id: I326fb50ead5c298e62666371adadb2b9f40d69c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/49178
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250407
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2022-07-01 16:07:50 +00:00
Ahmed Ashour c7a02bc43e [_fe_analyzer_shared] fix 4 spaces comments as code block
Fixes #49047

Change-Id: I1aa08fc417365ca894467b15d5094ea203f01940
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-07-01 15:55:00 +00:00
Paul Berry 99919c69ba Flow analysis: Separate variable and type operations.
This change moves the `variableType` method from the class
`TypeOperations` to a new class, `VariableOperations`, which in turn
allows removing the type parameter `Variable` parameter from
`TypeOperations`.  A new class, `Operations`, is introduced to serve
the role served previously by `TypeOperations` for flow analysis
clients (i.e. it is the base class that clients should extend).

This paves the way for a future CL that will remove the type parameter
`Variable` from other classes inside flow analysis.

Bug: https://github.com/dart-lang/language/issues/2020
Change-Id: Ic45d07a0f873b692fda4b6f807c1130ac592b010
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250108
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-07-01 14:13:20 +00:00
Vyacheslav Egorov ec9a660ccc [vm] Avoid clobbering array length in AllocateArray stub on ARM
It was calling EnsureIsNewOrRemembered on the slow path which
was forgetting to preserve registers around a runtime call.

Fixes https://github.com/flutter/flutter/issues/106510

TEST=vm/dart{,_2}/flutter_regress_106510

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm-try
Change-Id: I621e392304fcd1fd643c009fbcde3f88b6f19b7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250168
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-07-01 12:31:47 +00:00
Tess Strickland 1f7c392ee5 [pkg/dart2native] Print signing failure diagnostics to stderr.
When signing a MachO executable fails, print all the diagnostics
to stderr instead of stdout before throwing.

Change-Id: I10cef830f2e1a548250685fbccaf5c9dae63877e
Bug: https://github.com/dart-lang/sdk/issues/49275
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250383
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-07-01 12:25:47 +00:00
Mark Zhou b40969ea57 [dart2js] Adding function kind info to closure call methods
Change-Id: Ibb78a41c8e414c909999591c8d667a7697af32ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250147
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-07-01 00:30:46 +00:00
Nate Biggs c084ebb430 [dart2js] Prepare native_data.dart for nnbd migration
Change-Id: I9179dd5ac7feb6790c7d0fe3e3aab7213d489424
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249960
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-06-30 23:11:03 +00:00
Alexander Markov abedfaf62a [vm] Fix soundness issue when awaiting a user-defined Future
TEST=language/async/await_user_defined_future_soundness_test

Issue: https://github.com/dart-lang/sdk/issues/49345
Change-Id: Ieaaa9baace13dad242c770a710d4d459e135af81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250222
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-06-30 22:53:24 +00:00
Ryan Macnak 4308eb39cf [standalone] Remove RISC-V linker hack.
TEST=ci
Change-Id: I5379bc3f537cab149742df138d76983b4f16a796
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250141
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-06-30 21:16:04 +00:00
Konstantin Shcheglov 0beafc3a6d Move collectTransitive() to FileStateKind.
Change-Id: Ia9254151442cf3f8c9acae19509c94a66c0e933f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-06-30 21:06:24 +00:00
Ryan Macnak 7004b1859f [vm] Account for pool entries that are immediate objects.
Cf. 4c82eb5836

TEST=gallery
Bug: https://github.com/flutter/gallery/issues/545
Change-Id: I90935aba3737f7b6873368e5a8ebf1cc48d34a22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250320
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-06-30 20:32:44 +00:00
Ryan Macnak 90da09e2db [vm] Forward dynamic events names to os_signposts as arguments.
TEST=Instruments
Bug: https://github.com/dart-lang/sdk/issues/49178
Change-Id: Ice4a83f03dccb6c7dbd54c229f37d4ea7d0d8051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250111
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-06-30 20:16:33 +00:00
Konstantin Shcheglov e4f7f9913a URI can be null, extract XyzDirectiveWithUri where it is not null.
Change-Id: I6462e2e040b9bfd31d09f7517af2f6ebf8023ec4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250323
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-06-30 20:05:53 +00:00
William Hesse 132810f343 [testing] Fix failure in test runner's batch compilation while deflaking tests.
All subclasses of Command must override indexedCopy.
A @subClassMustOverride annotation could have caught this problem.

Bug: https://github.com/dart-lang/sdk/issues/30175
Change-Id: I836cf58ae2233e3b2a5c7a494461e570aad5ffb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250300
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-06-30 20:01:21 +00:00
Srujan Gaddam 0036dc7c57 [CFE] Add constant replacer
Adds a replacement visitor for Constant types using null as a
sentinel value for whether a subnode has changed or not (except
in the case of TreeNodes in order to match existing Visitor
semantics).

Change-Id: Iaaab1b1c608af07f36ece08071b3d703884cd91b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248944
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-06-30 18:13:46 +00:00
Nate Biggs 837bb22581 [dart2js] Fix unordered index for codegen sharded mode
Index cache maps should be copied instead of used directly. And the set of indices (DataSourceIndices.caches) needs to be copied as well since we alter it when reading each shard.

Change-Id: If7a640ead07a54e3cb6003eee89c44db8f449812
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250202
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-06-30 17:16:26 +00:00