Commit graph

81700 commits

Author SHA1 Message Date
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
Konstantin Shcheglov
79950b989f Remove ExperimentStatus.testingSdkLanguageVersion
Change-Id: Ia8993c3ca29c79ede835db46fe5e1d660a3621d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213104
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-10 19:22:57 +00:00
pq
b2eb0c5eb2 skip result use checking in comments
Fixes: https://github.com/dart-lang/sdk/issues/47181

Change-Id: I1761b600d3a8b94551f853896544b64f590af0b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213102
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-09-10 19:13:27 +00:00
Konstantin Shcheglov
ce46e99e3d Include Annotation.typeArguments in AstTextPrinter.
Change-Id: Id1ee5cac6b0b84fe153d0e21554e381d34d8b5bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-10 18:00:47 +00:00
Alexander Markov
28532bae7a [vm/aot/tfa] Cleanup support for non-constant annotations
This change removes handling of StaticGet and ConstructorInvocation
nodes in annotations. This code became redundant since constant
evaluation was moved into the front-end.

TEST=ci

Change-Id: Idfa16624d28cdf73da09b52aec429d881e43a36e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212871
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-10 16:50:27 +00:00
Lasse R.H. Nielsen
64f06ac544 Fix bug in Duration.toString().
The `toString` called `(-this).toString()` recursively
for negative durations.
If instantiated with the minimal integer on native,
that call would recurse infinitely.

The code has been wrong since we removed arbitrary precision integers.

TEST= Add test for regression case, otherwise covered by existing tests.

Change-Id: Ifb58bbc5aee38ef760f9352aede1694b79bae931
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212300
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-09-10 14:58:47 +00:00
Nate Bosch
828d1904e5 Rephrase bool getter doc
We want to avoid the "Returns" phrasing for getters.

Change-Id: Ia738c1566f720200a7b65a4ff441e1196129a6f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210286
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-09-10 14:35:28 +00:00
Sam Rawlins
a3a7e2786c analyzer: Allow function tearoffs in const context
`typeInstantiate` is a new "operation" in const expressions. It doesn't
do much, but does find the correct staticElement to be used in the
FunctionState.

Instantiated static type is necessary on a FunctionMember.

Change-Id: I15b72c870ce9bfc2b8b1fc592553c988e9cc243c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212604
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-10 14:28:18 +00:00
Sigurd Meldgaard
7e07452cc6 Bump pub_semver
git log --oneline baeea5ac3503546269d25c66523d4334c784a4f9..a43ad72fb6b7869607581b5fedcb186d1e74276a
a43ad72 Add `Version.canonicalizedVersion` to help scrub leading zeros. (#50)
205db1d Annotate `Version` with `@sealed`. (#49)

Change-Id: Id1f9788b37731cb474110a6d1bcf65fa975380dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213044
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-09-10 13:51:57 +00:00
Martin Kustermann
260eac5f80 [gardening] Give vm/dart{,_2}/use_strip_flag_test more time in TSAN mode
Issue https://github.com/dart-lang/sdk/issues/42986

TEST=Updating status file

Change-Id: I30a6cbb2926145e393287fbc684615fa00911bb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213045
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-09-10 13:34:29 +00:00
Johnni Winther
0214c5873d [cfe] Add test for issue 47154
Closes #47154

Change-Id: I23ad2582a2f90c081066870bcd64890c71c5b421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213040
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-10 13:10:47 +00:00