Commit graph

81710 commits

Author SHA1 Message Date
Konstantin Shcheglov 7262decaea Remove WithNonFunctionTypeAliasesMixin and WithNullSafetyMixin from analyzer_plugin tests.
So, consistently with analyzer/, by default enable everything, and
disable with WithoutNullSafetyMixin as necessary.

Change-Id: I89079d3c1122a14ad338aa8f0d8008086a1fcb89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213295
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:57:45 +00:00
Konstantin Shcheglov 33c6606085 Merge NonNullableSubtypingCompoundTest into SubtypingCompoundTest.
Change-Id: I00b833b409b0c888a91a43654bad1dac4d644824
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213294
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:49:45 +00:00
Konstantin Shcheglov a4b3ae735a Don't use ElementsTypesMixin in resolution tests.
Change-Id: Ia4a8ebf9f31e22958ff63d7ce02f1ef76bb560aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213320
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:49:42 +00:00
Konstantin Shcheglov 9dd6854112 Rename id tests configs, all features are enabled by default.
Change-Id: Iea3739c2be173847a49d8838f399ebfd751b9713
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:41:41 +00:00
Konstantin Shcheglov c68d2c3919 Replace more ElementsTypesMixin with AbstractTypeSystemTest.
Change-Id: Ifa0601ba5181189ef17a35e4a9ba2118d213eb53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213291
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:41:40 +00:00
Sigurd Meldgaard b4c19b93c9 Bump package:usage.
Most of these are from a single PR that did not get squashed.

Running `git log --format=%C(auto) %h %s e0780cd8b2f8af69a28dc52678ffe8492da27d06..016dd302b494e4ff70a7850957ec895eced9d220` in third_party/pkg/usage ✓
 016dd30 Prepare release (#160)
 076c653 Merge pull request #152 from sigurdm/batching
 1d6b343 Remove debug print
 c073fb7 Use correct limit for bytes
 1d89875 Send batch early if full
 2896a85 Update README.md
 da20fab Delete travis.sh
 7c351a3 Merge
 0424091 Update build.yaml (#159)
 4f2a050 Use a Duration for batching delay
 aa3f3ce address review
 318ebe5 Fix
 71ddec1 Send remaining hits on waitForLastPing
 1c895a7 Parametrize client-id in test
 0ae7733 Fix pubspec
 2255b3d Merge remote-tracking branch 'origin/master' into batching
 14d3702 Merge remote-tracking branch 'origin/master' into batching
 1c3393d Handle batching implicit waiting for a 'batchDelay' future
 219b764 TODO about size of payloads
 aaee6d9 Fix AnalyticsMock
 a8ec5b4 Remove mockito as dep - didn't use it
 e26fcce Allow batching of hits

Change-Id: I801c0d9114fb90e1dc94c3e2552c1cd90a8f0c18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213349
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-09-14 16:22:16 +00:00
Ryan Macnak b32bde155d [vm] Label virtual memory allocations on Android.
TEST=examine /proc/pid/smaps and Observatory's "process memory" page
Change-Id: I03922c9c604ceef8901a8946481d0ccc31110b72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213289
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-09-14 16:10:10 +00:00
Sigurd Meldgaard d787e78d21 Bump pub
New commits in this revision:

git log --format=%C(auto) %h %s cafadd17ba285dad9ebe6d34c617bc0d70d096b3..98a01e1cdbf441f030f1be76417860b6b372663d ✓
 cafadd17 Don't use null safety (yet) (#3112)
 98a01e1c Store credentials in a config directory (#3092)
 4ee280b7 Fixed messages (#3110)
 bbdac802 Third party hosted pub registry authentication (#3007)
 b1bedc53 `--examples` for get/upgrade/downgrade/add/remove (#2857)

Change-Id: Ibf6ffe33820c97114958c1564a7c22a46ff73d9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213348
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2021-09-14 16:05:00 +00:00
Riley Porter 0dd3c97147 Optimize js_util callConstructor for 0-4 arguments.
Some usages of `callConstructor` will have unnecessary checks
removed, when checks on the arguments can be elided. The
compilers will optimize further if they can.

Example optimizations: https://paste.googleplex.com/4594240957972480

Change-Id: I0e6e7e4d1268580cbfab84599b1c9da6fc64e7c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213114
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-09-13 22:43:10 +00:00
Mayank Patke 14940d1c9c Reland "[dart2js] Enable by default and remove the --experiment-late-instance-variables flag."
This is a reland of 681e292b02

Original change's description:
> [dart2js] Enable by default and remove the
> --experiment-late-instance-variables flag.
>
> Change-Id: Ibb3cfa6d7b02883c82909930f7eb1142803dbc0f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200902
> Commit-Queue: Mayank Patke <fishythefish@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>

Change-Id: If4d3c12e7f6a71d2c305283597b679e8b925493c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206980
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-13 21:59:20 +00:00
Mayank Patke a6c90f1601 [dart2js] Fix some unnecessary bailouts in inference.
Change-Id: If60fe11871da062c52265d821cbf0d7a1185e643
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209845
Reviewed-by: Stephen Adams <sra@google.com>
2021-09-13 21:59:20 +00:00
Mayank Patke f5b8cc2c76 [dart2js] Improve type inference for createSentinel.
Treating createSentinel as returning a value of type Never caused issues
whenever its result flowed into a union, since the union would just
simplify to its other component. This meant that if a late field started
out uninitialized and was later initialized to a constant, we would see
it as only ever having the constant value. This caused isSentinel to
always return false even if the field hadn't been initialized yet.

Instead, we support a late sentinel value in the abstract value domain
and use this value as the return type of createSentinel during
inference. Additionally, inference treats _lateReadCheck as a simple
narrowing to exclude the late sentinel value.

Change-Id: I086bfd77576930e3ca2a4cfc9bd63476b6636685
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210646
Reviewed-by: Stephen Adams <sra@google.com>
2021-09-13 21:59:20 +00:00
Mayank Patke 93164ae2a6 [dart2js] Add failing tests for b/192964907.
Change-Id: I67228672db2ab603cc0b174f0c28fe0a2d972916
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206944
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-13 21:59:20 +00:00
Mayank Patke 39fd70e816 [dart2js] Refactor typemasks.
Change-Id: I13886baba98f70614cd05e6ee5cb38421264b537
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210645
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-13 21:59:20 +00:00
Alexander Markov 4744f66f6f [vm/compiler] Minor improvements for AOT compilation time
* When testing for pragmas in the inliner, call function.has_pragma()
  early to avoid more expensive Library::FindPragma query.

* When scanning through object pool entries in
  Precompiler::AddCalleesOfHelper, skip over OneByteString and null
  objects quickly. They are leaf and there could be a huge number of
  those objects.

AOT gen_snapshot time of a large Flutter application built in
flutter/release mode for arm64 (best of 5 runs):
Before: 81.589s
After:  74.415s (-8.79%)

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/43299
Change-Id: I960451c73b42dab9845f0e0eafacaa9bb23720e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213288
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-13 21:25:30 +00:00
Danny Tuppeny f9512796e2 [analysis_server] Prevent duplicate LSP completion registrations for Dart
... when using plugins that register for Dart files.

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

Change-Id: Idadcda0b04f86eb40d11a69e8eadc7120c873ae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213266
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-13 21:14:00 +00:00
Ahmed Ashour c1f63c05b8 Remove unnecessary raw string from protocol_generated
Fixes #47146

Change-Id: I6710a8bb32e5ec770e570c93612f44a9ce63bc3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212744
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-13 21:10:40 +00:00
Nicholas Shahan 58416605e2 [ddc] Add types to super.method tearoffs
Helper methods for locations in constructors (`super` not available)
were missing type information for the tearoff. This replaces the use
of a helper that would itself would be torn off.

Added a new form of helper method that performs the tearoff and
binds the type. NOTE: Generic type arguments are still applied
outside of the helper.

Change-Id: I8dafe0d8357ecc9e1d070046a82e9e83e1a16ed9
Fixes: https://github.com/dart-lang/sdk/issues/47175
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212861
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2021-09-13 19:50:59 +00:00
Ryan Macnak 700969604a [vm] Require C11 thread_local support.
Thus requiring iOS 9+.

TEST=build
Change-Id: I40062753ae030231d4e4ae428c9145f4370cb9a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213283
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
2021-09-13 19:30:30 +00:00
Ryan Macnak ebb1a53a44 [infra] Add missing out directories for Android with compressed pointers.
Change-Id: I5c14fa58ee282b824d1eefee04301f4206aab2f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213286
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-09-13 19:22:50 +00:00
Stephen Adams 089bebcae7 Tweak Duration.toString to be more web-friendly
Change-Id: I588e089124d5c2fc62caa19cc2206c81666d6e8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213183
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-13 18:19:00 +00:00
Konstantin Shcheglov 8c9dcc92f5 Issue 46850. Allow 'super' in instance late field initializers.
Bug: https://github.com/dart-lang/sdk/issues/46850
Change-Id: I90560e7e9d75ef450b47d584e0fa0f35123e0e61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213029
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-13 18:02:09 +00:00
Alexander Markov 125482c0c6 [vm/compiler] Skip AOT unit test vm/cc/TypePropagator_NonNullableLoadStaticField on ia32
TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/47183

Change-Id: I775f4a60debef5856e273f284b9a0f236b03f24d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213103
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-13 17:59:29 +00:00
Paul Berry fcf15f69fc Run code generator for syntactic_errors.g.dart.
It appears that this code generation step got out of date because
there's no test verifying that code generation has been run (see
https://github.com/dart-lang/sdk/issues/44888).  I will follow up with
a unit test to make sure that it doesn't fall out of date again.

Change-Id: I695897eb24af4f632fbcf917d888d3aca5e0abba
Bug: https://github.com/dart-lang/sdk/issues/44888
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213280
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-13 17:50:10 +00:00
Alexander Markov 30abce99f3 [vm] Treat static final fields with trivial initializers as const
When loading a value of a static final field with trivial initializer
generate a Constant instruction instead of LoadStaticField.

Initializer of a static field is considered trivial if it is null, int,
double, String or bool literal.

TEST=vm/cc/StreamingFlowGraphBuilder_StaticGetFinalFieldWithTrivialInitializer
Fixes https://github.com/dart-lang/sdk/issues/47120

Change-Id: Id2bfc3da8c14376f7f1ef829265cca29a018bad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212873
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-13 16:51:59 +00:00
Konstantin Shcheglov 1d6f4c742f Rename subtypes of AbstractTypeSystem[WithoutNullSafety]Test
Change-Id: I2ab8a19a5bae165b4904e412f783b69e11344cc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213120
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-13 16:05:09 +00:00
Sam Rawlins 02afb5a7f5 Analyzer: tidy function reference parsing.
Check for odd case of attempting to type instantiate an extension (it's not supported).

Re-write some TODOs as comments.

Change-Id: I14fd2a4e21139939ca60e415be9ac31b93ea50ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-13 15:29:39 +00:00
Danny Tuppeny d74199de8f [analysis_server] Add support for new TEAR_OFF highlight kinds to LSP
Change-Id: I924037e639a8f37df085a7831f970ebc5334ba16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213263
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-13 15:15:00 +00:00
Chloe Stefantsova 2048ab37f1 [cfe] Add shown and hidden elements to Extension Kernel node
TEST=existing

Change-Id: I8271cb7f4731dea289c855b0c5384f8e181530c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212761
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-13 13:18:19 +00:00
Sigurd Meldgaard a7041168e7 Roll pub
New commits in this version:

git -C third_party/pkg/pub log --oneline cd7a43f2109f7e5eb22e73c7f4e15d25fd57598e..d95c5713dda518ed53ada70e00789e6aadbfbe48
d95c5713 (HEAD, origin/master, origin/HEAD) Remove duplicate global invocation on Windows (#3055)
4c5198df master->main (#3101)
e793fd52 More tool/test.dart tweaks (#3097)
1b228edd Report retracted packages (#3093)
4fedb6c5 Tweak strict dependencies error message for `_validateBenchmarkTestTool` (#3087)
e608ab6e Improve test script (#3091)
abf702c4 Detect potential leaks in `dart pub publish`. (#3049)
9941c1f9 Fix broken simplification of prerelease constraints (#3078)
f0cdfa27 format (#3086)
5a1242c6 Fix unicode terminal detection windows (#2933)
58e2296d Dart format (#3084)
1426601c use incremental compilation in the tool/test.dart script (#3075)
9954f851 Fix a typo (#3062)
44489b31 Use relative import for path.dart (#2959)
77702ab1 Always precompile scripts before running them (#3074)

Change-Id: I913ab9e3b5bc7181d483a2de96ec4ad917028b75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213262
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-09-13 11:02:19 +00:00
Jens Johansen e47850a197 [CFE] Reproduce issue 47176
This CL reproduces - but does not fix - issue #47176
(https://github.com/dart-lang/sdk/issues/47176)

Change-Id: I03384a6933a6f8181e909d8b6bc812e5550f903f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213261
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-13 09:32:59 +00:00
Clement Skau 7d467e8933 [vm] Adds args_n to FFI resolver.
This makes it more closely mirror the Dart_NativeEntryResolver,
and acts as an extra sanity check that signatures (roughly)
align between the FfiNative decl. and the native function.

TEST=Updated runtime/vm/dart_api_impl_test.cc

Change-Id: I40799dc583ec14db14dc453afed4e2d1eb06fced
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212566
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-09-13 07:57:00 +00:00
Murtaza Raja 7c7f6623a9 typo: patter -> pattern in lib/core/pattern.dart
Closes https://github.com/dart-lang/sdk/pull/47198
https://github.com/dart-lang/sdk/pull/47198

GitOrigin-RevId: 647929b9ed24826261d37f60bd2180d79917e954
Change-Id: Ic857fffa8232e29f8ae5248bc7c4ce9264a090b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213220
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-09-12 18:23:08 +00:00
Stephen Adams 763988d7f4 [dart2js] Rename Setlet/Maplet.from to .of for consistency with Set/Map
Modernize setlet and maplet unit tests.

Change-Id: I8508e9e48dc80e1a00b984c7ac82e1d57278ad6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212872
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-12 07:52:19 +00:00
Konstantin Shcheglov dea3861e5f Stop using FeatureSet.forTesting() in analyzer/.
Change-Id: Ic4de7d6bcb3397aaa86ff6d82cce1531afbffa50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213118
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-11 18:46:27 +00:00
Konstantin Shcheglov ddce4b3535 Rename AbstractTypeSystemTest -> AbstractTypeSystemWithoutNullSafetyTest, AbstractTypeSystemNullSafetyTest -> AbstractTypeSystemTest.
There are a few subclasses that could be renamed to be more consistent,
will do this in a separate CL.

R=brianwilkerson@google.com

Change-Id: I3adccf32e463b4c622a08d206d2ec0d9e49e72cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213117
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-11 01:17:26 +00:00
Konstantin Shcheglov 289cadb70a Remove explicit EnableString.non_nullable in BazelWorkspacePackage.
It is already enabled by default in the latest language version.

Change-Id: I91feabd596c35410890601ae82c446be5ea6ad3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213116
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-11 00:28:37 +00:00
Konstantin Shcheglov a512845350 Use AbstractTypeSystemNullSafetyTest in more places.
R=brianwilkerson@google.com

Change-Id: Idcba60ab93ff4783a35da3c009e63094eb09e3d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213111
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-11 00:15:46 +00:00
Konstantin Shcheglov d793ef9bcf Support for ConstructorReference and FunctionReference in AstTextPrinter.
R=brianwilkerson@google.com

Change-Id: I1fecf2a9fd63e6abb5b0ebf1b0c7b818b4d49520
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213113
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-10 23:34:16 +00:00
Konstantin Shcheglov e5efe55d4a Change how FeatureSet is created in nnbd_migration.
Change-Id: I0fd902b4e1b6cc0d59dc6a136d1312ec60511169
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213109
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-10 22:45:46 +00:00
Ryan Macnak f51fe8fca4 [vm] Reimplement BaseDirectChainedHashMap to use less memory.
gen_snapshot dart2js.dill ...
Maximum resident set size (kbytes): 432920 -> 412908 (-4.6%)

gen_snapshot dart2js.dill --write-v8-snapshot-profile-to=...
Maximum resident set size (kbytes): 904756 -> 662024 (-26.8%)

Also shrinks the VM's binary size by ~100k.

TEST=ci
Bug: b/196510517
Change-Id: I73ea0f87b75e3c1dacb5f31a687effe293e5a350
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212920
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-09-10 22:21:36 +00:00
asiva c8040131c6 [VM/Runtime] - Switch DartInitializationState to use atomic operations instead of mutex/condition variables
TEST=ci

Change-Id: Ifbcbfdba4874930e83e17de4882b535dc3e76a7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212865
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-09-10 22:18:20 +00:00
Ryan Macnak 802dfdfd62 [vm, compiler] Restore the performance of LoadUniqueObject.
The purpose of LoadUniqueObject (77c206f231) is to avoid the cost searching for matching object pool entries. Pass kPatchable to AddObject to skip the work of inserting / rehashing. This also fixes incorrect use of DirectChainedHashMap::Insert with an already-present key.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/23249
Bug: https://github.com/dart-lang/sdk/issues/38018
Change-Id: I30cc3212720d3ddfc9bc515b092a4cd6f6879b8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213027
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-09-10 21:53:26 +00:00
Sam Rawlins 8132940357 Support function types in const is checks
Fixes https://github.com/dart-lang/sdk/issues/47161

Change-Id: Ibe39331217c88bccc331d4d569f469905c70c66e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212867
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-10 21:46:49 +00:00
Konstantin Shcheglov b3590baf88 Stop using FeatureSet.forTesting() in analysis_server.
Change-Id: Icdc454107d2f63fde7ac906cb459d861e426631d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213110
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-10 21:39:36 +00:00
Konstantin Shcheglov 143adf7dbf Replace ExperimentStatus.latestSdkLanguageVersion with 'currentVersion' and remove it.
Change-Id: I9094aa712e2c6c6ec5c68cd81a6e5515dc52fde2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213108
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-10 21:38:47 +00:00
Srujan Gaddam b1d4b29faf [dart:html] Await completer future instead in js_interop_1_test
js_interop_1_test awaits the completer itself instead of the
future which is triggered when the completer completes.

Change-Id: I6a784ced7caaade457cd444823e8cd21d338b9b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213025
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2021-09-10 21:17:26 +00:00
Sam Rawlins 1122440fc7 Fix accidentally commented tests
Change-Id: I7dc14ea10f769dd36ff15f3ee9ffc40ce78cf4bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213105
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-10 20:11:17 +00:00
Konstantin Shcheglov 78c09bcc38 Update latestSdkLanguageVersion to 2.14
Eventually we will remove it completely, but for now let's make it
more correct.

Change-Id: I09c338bcf2e12aecb75b5b9646104e97cf35705c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213030
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-10 20:01:47 +00:00
Nate Bosch 9b7af67da3 Update to the latest package:async
Change-Id: Ie097d1c49ac0f27f0d9afbc8f8fa01e1bd4f07c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213106
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2021-09-10 19:58:38 +00:00