Commit graph

83886 commits

Author SHA1 Message Date
Brian Wilkerson a4b3b8edec Add an assist to convert a normal parameter to a super initializing parameter
Change-Id: Icf5d44a3a155e67f76165eca711094d368cdca64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-04 01:03:36 +00:00
Stephen Adams be5198d524 [benchmarks] Add benchmark for basic collection Iterables
Change-Id: Ic4a85ed10fbb1ac789433a2347688f89c44b1654
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231186
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-02-04 00:30:56 +00:00
Konstantin Shcheglov 206e46a011 Test for enum values evaluation.
Change-Id: Ib4d120530a44d099d90e674930f94e7af08371f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231534
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-04 00:18:56 +00:00
Ryan Macnak 172dad5375 [vm] Fix double and mint to inherit the PostLoad for instances.
Cf. ab3aab760e.

TEST=ci, aot
Change-Id: Ia1d0b5776d9714bde94f3372824f94dd70a7ae23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231532
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-04 00:10:47 +00:00
Konstantin Shcheglov 1e66a8a079 Report more hierarchy diagnostics for enums.
Change-Id: If2c4ef3604fadfaa6d3d5af992f61a6a819a5b01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231528
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-03 23:39:26 +00:00
Konstantin Shcheglov ddff5ac88c Tests for completion in NamedExpression.
Change-Id: I5a7ba57a1279797f7e625890a64c42091708f60e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-03 22:24:16 +00:00
Ryan Macnak 33a1117d62 [vm] Add missing opt-out of C instructions to vm/cc/LoadWordUnsigned_0.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/38587
Change-Id: I15460a970522044b50f98922fad559d26c5813ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231524
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-03 21:52:56 +00:00
Michael Thomsen e69217fe28 Add CVE-2022-0451 to changelog
Change-Id: I6fffab997fbd1b63c54cfc883e10280c97a6366a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231560
Auto-Submit: Michael Thomsen <mit@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2022-02-03 21:25:39 +00:00
Joshua Litt 58e577da15 [dart2js] Move common_elements.dart to common/elements.dart.
Change-Id: Idaed02bb747670413f63e7f7b0797eb591e12f57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231523
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-03 21:21:39 +00:00
Brian Wilkerson 17422f82b2 Remove an unnecessary shared name from a message
Change-Id: I0569bd99620f2b276f9cc1510a4641bbe0cb7182
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231522
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-03 21:18:48 +00:00
Ryan Macnak ab3aab760e [vm] Remove special cases for canonicalizing doubles and mints.
dart_precompiled_runtime -7k

TEST=ci
Change-Id: I22c8254b08d9f68be02f7210aa60f7cc728f8b9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231324
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-03 21:13:36 +00:00
Ryan Macnak 4faf01a66c [vm] Cleanup workarounds for removed flag --throw_on_javascript_int_overflow.
TEST=ci
Change-Id: I65936b5cd6e5933eadc37f3cd6bba1f0fa1b81a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231328
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-03 21:10:46 +00:00
Ryan Macnak b6ab7350be [test] Inform status files about the new simulated architectures.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/37299
Bug: https://github.com/dart-lang/sdk/issues/38587
Change-Id: I6f1a749690b894b14f465d608f37acf62568cdef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231521
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-03 20:32:16 +00:00
Joshua Litt 848e106346 [Dart2js] Remove unnecessary abstract interface on Enqueuer.
Change-Id: Ia9c2e329fb83eeb77f399c43ae5725ccb9b602c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231381
Auto-Submit: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-02-03 18:55:47 +00:00
Nicholas Shahan e44af61dd1 [ddc] Update warning message with dwds version
Change-Id: I26b5393256506f4ca1773baea15e71bee4b54683
Issue: https://github.com/dart-lang/sdk/issues/48103
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226964
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-02-03 18:51:16 +00:00
Daco Harkes eacd2b3e3e [vm] WeakReference check target type
Closes: https://github.com/dart-lang/sdk/issues/48264

TEST=runtime/tests/vm/dart/finalizer/weak_reference_run_gc_test.dart

Change-Id: I16d9d9768bcef3c832960f0cd33ba54a0b689ed2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231481
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-02-03 18:29:46 +00:00
Kenzie Schmoll a1f0f497a4 Add a script to serve a local DevTools build
Change-Id: I499b45830bacf8899c5db8d776f7a6c3a47e53b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231362
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie (Schmoll) Davisson <kenzieschmoll@google.com>
2022-02-03 18:03:18 +00:00
Joshua Litt 6a4cb1a3a7 [dart2js] Move native_basic_data.dart into its own library.
Change-Id: I2aa257cb6b53d7e3cbf32efdfd0605df6fe4021e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231382
Auto-Submit: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-02-03 17:58:06 +00:00
Ryan Macnak f3996e4e96 [vm] Remove some dead error entry points.
TEST=ci
Change-Id: I78e13654ba4425e07e92a5a879595cae2045ea99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231360
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-03 17:55:16 +00:00
Danny Tuppeny 692f9c28eb [dds] Ensure thread startup is not handled twice in DAP when attaching
Should fix the flakes seen in https://github.com/dart-lang/sdk/issues/48274 caused by Isolate PauseStart events arriving during initialization but being delayed until initialization complete, and then auto-resuming isolates that ere deliberately being left paused.

Change-Id: Iee32731b92fe96b6b41e7e78c01af2f5e843ea92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231460
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-03 17:41:46 +00:00
Danny Tuppeny ddadc8d7e4 [dds] Improve DAP test cleanup by retrying deletes where Windows may still have files locked
Fixes at least part of https://github.com/dart-lang/sdk/issues/48274.

Change-Id: I3a31f8149d00729afe4d3c86ee38892ce90625c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231240
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-03 17:41:26 +00:00
Johnni Winther 0fda2bfdaa [cfe] Perform precompilation
Initial support for performing precompilations based on the computation
of [NeededPrecompilations].

Currently this requires the caller to supply a `macroSerializer` that
can convert a [Component] into a [Uri] that can be passed to the macro
executor.

Also, the caller needs to supply a `macroTarget` used for the
precompilation. This is done to avoid (for now) a dependency of the VM
target inside the CFE itself.

Change-Id: I50cc25fe6632a25c0c1a8a1ac019e6d9e35ab4f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231443
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-03 16:56:36 +00:00
fredbroz d48a637bf5 [Analyzer] Add fix for use_raw_strings lint
Closes https://github.com/dart-lang/sdk/issues/47955

Bug: https://github.com/dart-lang/sdk/issues/47955
Change-Id: If321097598fcdcd79c246032f64332e91ee7f57c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-03 15:55:56 +00:00
Johnni Winther bede5c8df3 [cfe] Handle named arguments anywhere in enhanced enums
The arguments synthesized for enhanced enums didn't ensure correct
setup of `ArgumentsImpl.argumentsOriginalOrder` needed for the
named-arguments-anywhere feature.

The CL also handles local initializers as part of constants, as needed
when combining the two features.

Included is a fix in adding synthesized enum arguments to redirecting
initializers. This was accidentally done on all classes (not just enum
classes) when enhanced enums was enabled.

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

Change-Id: If911e57bb338a50f2cee1721b4e43ff343685933
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231440
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-03 15:44:36 +00:00
Vyacheslav Egorov aeb3e1d73b [vm] Avoid creating unnecessary SafepointPosition's
Register allocator does not need to associate always-calls
safepoints with live ranges of constant values because
constant values are never actually spilled and are rematerialized
instead.

@alexmarkov has observed that SafepointPosition objects for
constants account for large chunk of the total memory eaten by
the register allocation pass and this change addresses this issue.

With this change the total memory consumed by the register allocator
decreases from 21 Gb to 8.6 Gb on one of the examples
in https://github.com/flutter/flutter/issues/94461.

TEST=ci

Change-Id: I245f2678bc6f5c1d63fd282812d1df2b2958512f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231442
Auto-Submit: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-02-03 15:39:06 +00:00
Daco Harkes 33e170ed56 [vm] Map key and value iterator speedup
Duplicates `_CompactIterable` and `_CompactIterator` to
`_CompactIterableImmutable` and `_CompactIteratorImmutable` to prevent
the `_data` field to store both modifiable and unmodifiable lists.

This speeds up iteration by about 20% (more info on the bug).

Does not use mixins for code sharing, because all the fields need to be
in the concrete classes anyway.

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

TEST=existing lib tests

Change-Id: I514d058d02ef3b26b475000daea3afc12f37c566
Cq-Include-Trybots: luci.dart.try:analyzer-nnbd-linux-release-try,app-kernel-linux-debug-x64-try,dart-sdk-linux-try,front-end-nnbd-linux-release-x64-try,pkg-linux-debug-try,vm-canary-linux-debug-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-checked-linux-release-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-tsan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231243
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-02-03 14:35:56 +00:00
Johnni Winther 9df38b50da [cfe] Add support for all declarations in macro applications
This CL adds support for macro application on all library
and class members.

Change-Id: I792837be5c73a5353f565528b8a6dcff3e28a3d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231244
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-03 08:14:56 +00:00
Nate Bosch 5e8e68c2c8 Remove more reference to .packages
Towards #48275

Change-Id: Idfe1de48b7f292b6c89e5b904f74c37232380c6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231065
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2022-02-03 01:08:34 +00:00
Ryan Macnak 08164f88c9 [vm] Add missing safepoint transition when updating or deleting API handles.
TEST=tsan, iso-stress
Change-Id: I82f8fb8ef3bbedf510e34488fdaa7d8af5902830
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231332
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-03 00:41:07 +00:00
Alexander Markov 3d977bc191 [vm/test] Fix memory leak in ffi/regress_flutter97301_test
TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/48283

Change-Id: I22d9ebac3240e9ca84fec833340d71b58d01119d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231335
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-02-03 00:28:55 +00:00
Konstantin Shcheglov 8f2a27f940 Report ENUM_MIXIN_WITH_INSTANCE_VARIABLE
Change-Id: Idc15ea010fc0b7d7f4b551a2a4b8731bcfc74ad7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231325
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-03 00:03:49 +00:00
Nate Bosch bc40873f98 Use package_config.json over .packages in DDC
Towards #48275

Change-Id: Ie4fe50d0d5afb04d4d3e7dde55c441e952218cc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231184
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-02-02 23:56:45 +00:00
Devon Carew cc019ea118 [dartdev] have the 'doc' command default to documenting the cwd
Change-Id: Id1d0394f6ecc300d100d0269a8df4d1a519422cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-02-02 23:55:46 +00:00
Ryan Macnak 3d2371180f [infra] Add missing out directories to vm-kernel fileset.
Change-Id: I41e34cd88084b057225fac33baf1e7160e0a8afa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231281
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-02 23:00:16 +00:00
Srujan Gaddam f392f31a13 [dart:html] Add Element.scrollIntoViewIfNeeded to CHANGELOG
Change-Id: Ic7c2b3cffa62b66d5c66713958e3626fa67e1945
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231331
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2022-02-02 22:08:35 +00:00
Srujan Gaddam 0ec4c3a1b5 [dart:html] Expose scrollIntoViewIfNeeded
`scrollIntoViewIfNeeded` is nested within `scrollIntoView`. The latter
method is outdated and the way to access the different ways to call
`scrollIntoViewIfNeeded`. Instead of using that method, this CL
directly exposes `scrollIntoViewIfNeeded`.

Change-Id: I38d7876a7923768ae165c29a98e514e90182b77e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231047
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-02-02 20:46:59 +00:00
Konstantin Shcheglov 33b3c1d6c6 Report ILLEGAL_LANGUAGE_VERSION_OVERRIDE, when 'sourceLanguageConstraint' is set.
Change-Id: Ibbd786090a5a1a61da11f1e9de754202bdc454d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231322
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-02 20:20:39 +00:00
Konstantin Shcheglov f2740bd3b6 Create an implicit enum constructor even if there is a named factory constructor.
Change-Id: Iace1d803c5330b32c2856edfb3c1da14f461cff3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231283
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-02 19:27:30 +00:00
Paul Berry 9fa75965e3 In FunctionExpressionImpl, keep track of whether a function type was supplied via context.
This avoids the need to refer to context types after resolution is
complete.

This is part of a larger effort to elimiate the use of
InferenceContext.getContext and InferenceContext.setType entirely.

Change-Id: Ia3f15080ad8b6f90525577694fefc172faa93286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-02 18:59:09 +00:00
Konstantin Shcheglov 80230eedcd Support for 'sound_null_safety' in BazelWorkspacePackage.
Change-Id: I22e5b9ea64b52922394be892663acff0e7def016
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231188
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-02 18:29:10 +00:00
Konstantin Shcheglov f5acc570e8 Fix CompletionDriver tests on Windows.
Change-Id: I43bf2c80b244906c2568e05fd24d4dd49953feb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-02 18:28:25 +00:00
Danny Tuppeny 0a5da6814d [dds] Enable verbose output in DAP integration tests
See https://github.com/dart-lang/sdk/issues/48274.

Change-Id: Ia2c0bed90e9f31b99a7074f397fc508abcf49071
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231301
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-02-02 17:54:10 +00:00
Sam Rawlins b9b1252752 For existing fixes, add super-parameter and named-args-anywhere tests
Bug: https://github.com/dart-lang/sdk/issues/48067, https://github.com/dart-lang/sdk/issues/47578
Change-Id: Iaef317459c7e6901296475163959ad92a6c880b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231070
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-02-02 17:47:49 +00:00
Konstantin Shcheglov 64001abe3e Add ConstructorElement.isGenerative and ClassElement.isDartCoreEnum
Change-Id: I0d7391fe02e450cb3ac33fd6abbe33a3561243ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-02 17:32:19 +00:00
Danny Tuppeny 4a5b0b3030 [analysis_server] Fix slash direction in auto-import details for LSP completions
Fixes some failing tests on the Windows bots that were getting backslashes but expecting forward.

Change-Id: Idd89a45d7be87385d497e221a1941e4c48d597af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-02 17:26:09 +00:00
Ryan Macnak e32d98cd06 [tools] Replace the Chromium binary size tool, which no longer works.
Change-Id: Id84717e21a129a392d3bc4e9b4cce84dfb4771e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231066
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-02-02 17:22:38 +00:00
Paul Berry bf51e35c46 Consolidate remaining calls to InferenceContext.setType.
Now that we only use InferenceContext.setType for expressions, this
change consolidates all the call sites to just two places:

- The method ResolverVisitor.analyzeExpression, which is used when
  recursively analyzing subexpressions inside expressions and
  statements.

- The method InferenceContext.setTypeFromNode, which is used during
  AST rewrites to transfer context information from the original node
  to the rewritten node.

This is part of a larger effort to elimiate the use of
InferenceContext.getContext and InferenceContext.setType entirely.

Change-Id: Id236bcb1247c09b740bbbad41cb74ecda301cc86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231181
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-02 16:54:00 +00:00
Paul Berry 541b9a86e9 Clean up handling of for-statement and for-element bodies.
Change-Id: I10f3545a84a3b128e6c3587ff04d4d069383dd04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231183
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-02 16:34:49 +00:00
Alexander Markov 45f42d0be8 [vm] Refactor duplicated slots and rename offsets
This change removes distinct Slots for the same field:

PointerBase_data_field -> PointerBase_data
Pointer_data_field -> PointerBase_data
TypedDataBase_data_field -> PointerBase_data

Also, the following slot is renamed to match field name:

TypedDataView_data -> TypedDataView_typed_data

The following offsets are renamed to match field names /
declarations in Untagged* classes:

PointerBase::data_field_offset -> PointerBase::data_offset
TypedData::data_offset -> TypedData::payload_offset
TypedDataView::data_offset -> TypedDataView::typed_data_offset


TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/48273

Change-Id: I602545fc43018494bcb24d8692292fdbc6a8f3e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231160
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-02-02 16:30:50 +00:00
Paul Berry 58a42b5cfc Stop storing contextual information on FunctionBody nodes.
Instead of using InferenceContext.getContext and
InferenceContext.setType to associate type inference information with
VariableDeclaration nodes, we pass the information on the stack using
a new FunctionBodyImpl.resolve method.  This should be more efficient
for two reasons: it avoids a map lookup, and it avoids the double
dispatch traditionally associated with calling a visitor.  It should
also make the code easier to reason about (since it makes the flow of
data in the type inference process more explicit).

This is part of a larger effort to elimiate the use of
InferenceContext.getContext and InferenceContext.setType entirely.

Change-Id: I8a3f3be940acdcd0a2c4ad8ec37b41bafe25c952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230948
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-02 16:04:39 +00:00