Commit graph

82085 commits

Author SHA1 Message Date
Ryan Macnak b8f0c8c917 [vm] Better handle out-of-memory in the compiler.
TEST=run cfe tests with low heap limit
Change-Id: I527e853eeaf9cc810d141581cd623c2cf356df45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214061
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-09-28 18:42:23 +00:00
Ryan Macnak 8e17ac781b [vm, gc] Avoid unnecessary intermediate maps, handles and arrays in setting up a become operation.
TEST=ci
Change-Id: Ib014fc544dcab54258d2102ee87d8f35f609594a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211940
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-09-28 18:30:52 +00:00
Paul Berry fad52e3388 Fix name of ParserErrorCode.TYPE_PARAMETER_ON_OPERATOR
The name being passed to the constructor didn't match the name of the
declaration.  I chose to favor the name of the declaration, since it
more closely matched the similar error
`ParserErrorCode.TYPE_PARAMETER_ON_CONSTRUCTOR`.

Change-Id: I74e3c2a6411db85695ef6d9b4851602a29209a09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-28 18:18:42 +00:00
Nicholas Shahan d6db39ea95 [ddc] Skip async/return_throw_test on firefox
Appears to be consistently failing on all other backends.

Re-enable this test if it is decided that this should be the
correct behavior.

Change-Id: If5016d23954748c0cb193f2f5faedb9f12820b5f
Issue: https://github.com/dart-lang/sdk/issues/44395
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214481
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-09-28 17:58:42 +00:00
Ryan Macnak 41e45e7a1c [build] Detect the host architecture of an ARM64 Mac as ARM64 even through Rosetta.
Lets AppJIT training happen directly, instead of the absurdity of arm64 (hardware) running x64 (Rosetta) running arm64 (VM's simulator).

Change-Id: Idbf82530d946099db80c550070257c4c6ead31e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214763
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-09-28 17:44:32 +00:00
Alexander Aprelev 00c98c7644 [vm/concurrency] Use relaxed store when updating field list_length_offset.
This is to satisfy TSAN where it sees a data race between updating a field on RecordStore and loading the field for cloning. We already use relaxed stores for Field's guarded_cid updates.

Fixes https://github.com/dart-lang/sdk/issues/47188

TEST=ci

Change-Id: I37e1aa4fc6ad8682210b3a76886a84673fb062cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214861
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-09-28 17:29:25 +00:00
Tess Strickland d16ad3d64b [vm/elf] Reorder non-NOBITS sections before NOBITS sections.
This ensures that the relocated addresses of sections with file contents
are contained in the loaded segment.

Fixes https://github.com/dart-lang/sdk/issues/47289

TEST=vm/dart{,_2}/use_save_debugging_info_flag

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I6f7f94900ab1f9f0cb5ead4b0dd63bd2402e5a19
Fixed: 47289
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214800
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-09-28 17:23:32 +00:00
Ahmed Ashour 6ff1f83db6 Add a quick fix for unnecessary_raw_strings
Fixes #47144

Change-Id: I89aba11f2a77e0f87a0ad4f5026c120d16147ccb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212743
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-28 17:02:42 +00:00
Sarah Zakarias 730806b3c7 Bump pub version
Changes:
```
> git log --format="%C(auto) %h %s" 15a46117da29cc572fba620241c83a2117cdae09..a817863ee93241ff36fce6856c6d12fd8fde0907
 a817863e Use pool for file reading (#3156)
 59237e29 Don't ask packageLister for availabe versions (#3151)
 f2f86c01 Fix analyze errors (#3148)
 39c9779c Environment credentials support (#3115)
 f0020823 Improved handling for authentication errors (#3120)
 1bb9f923 Migrate ignore.dart to null-safety (#3142)

```

Change-Id: I01d6637e3de8e523596394383393f5eda1a728c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214804
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2021-09-28 14:23:41 +00:00
Daco Harkes 7487e5ea8b [test/ffi] Fix errors in tests
A cleanup round of our FFI tests.

Change-Id: I3883b9d14785c759c7129c072c9588bfa5a3fba0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214802
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-09-28 13:17:01 +00:00
Daco Harkes e922f3016b [vm/ffi] Mark slow tests
The VMOptions used in these tests make the test run ~30-50 sec when a
machine is not under load, but can push them over ~2min when a lot of
tests are run in parellel.

Bug: https://github.com/dart-lang/sdk/issues/45007
Closes: https://github.com/dart-lang/sdk/issues/47303
Closes: https://github.com/dart-lang/sdk/issues/47304

Change-Id: I6719d644901085a75a1c298f72b96350943baa63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214801
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-09-28 13:14:43 +00:00
Nate Bosch 2ea9ff0b5e Update to the latest package:yaml
Change-Id: Ic1fa3818492cb95fcee9ec82e8a9c7466bb870b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214501
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2021-09-28 11:47:45 +00:00
Alexander Thomas ed100ac354 [infra] Shard dart2js unit tests
Fixes: b/200928253
Change-Id: I12ec3a5cf714b3b0427d3698dcaf02fef7fe15cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214403
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-09-28 10:30:15 +00:00
Erik Ernst 117d1b7564 Adjust test to allow type variable as expression
This CL adjusts the test
language/constants_2018/constant_types_test
such that it expects no error when a type variable is used as a
potentially constant expression.

This feature was added for consistency as part of the constructor-
tearoffs feature bundle (because it can now be expressed anyway).

Change-Id: I5b58f2439699b24e3e3036cb0e3a0fcc9430d4c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214644
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-09-28 10:24:05 +00:00
Stephen Adams 091338d7a3 [dart2js] Use Object.assign for populating mixin application
In a subject app, the 'inheritance' phase of the main unit is reduced
from ~40ms to ~20ms.  This improves the pre-main execution after
'CompileScript' from 133ms to 117ms.

Change-Id: I9b426f030c6759274cd84853b99732f43f0968e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214361
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-28 04:30:05 +00:00
Ryan Macnak 67c1f75d2b [vm] Give a better error if one tries to build simia32 or simx64.
TEST=build
Bug: https://github.com/flutter/flutter/issues/90769
Change-Id: Ib613538efab60f3c688824e939a8f0bc41b83c58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214681
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-09-27 23:45:45 +00:00
Konstantin Shcheglov 9826867fd0 Remove the macro prototype.
Our understanding improved, and out approach changed significantly.
So, this existing implementation is different enough to be not
very useful anymore. And it gets in my way while doing other changes.

Change-Id: If31c20a0a6f86c01a58d16390a989f77962396b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-27 23:07:53 +00:00
Stephen Adams e0846aa5c6 [dart2js] Reduce switches on enums to switches on indexes
Change-Id: Ie000aae837792067eba869e7849d97226ad04503
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214512
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-09-27 22:54:03 +00:00
Ryan Macnak bb21c8c02d [vm] Load canonical sets with spare capacity so a few inserts can happen during startup without trigging a rehash.
TEST=assert
Change-Id: I0cc09604a81fdfcc2bc6cd05c4748a2a8e161262
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214314
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-09-27 22:01:43 +00:00
Konstantin Shcheglov 76d874b171 Cache CompletionSuggestion(s) for Element(s) using Expando.
This improves time to compute suggestions to almost nothing.
Before: <request>: 257, ImportedReferenceContributor: 78, notification: 174
After:  <request>: 191, ImportedReferenceContributor: 6, notification: 180

So, almost all time is now in sending the notification.

The cache heap usage is quite small, 4MB for 3246 items.

Change-Id: I754c9f12d6b0a318645d6b20fafdfbbbdf95c5f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214685
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-27 21:50:33 +00:00
Ryan Macnak cc0add282a [vm, gc] Emit a timeline event for NotifyLowMemory.
TEST=--complete-timeline
Change-Id: I6c08753fc6ea3a98d52d288888d7707c43df4d36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214742
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-09-27 21:49:23 +00:00
Alexander Markov 72ff129797 [vm/dartfuzz] Handle StackOverflowError similarly to OutOfMemoryError
Fixes https://github.com/dart-lang/sdk/issues/47295

Change-Id: I5bd46069aa3d8cb49c9df0a53f1da136019661af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214740
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-27 21:34:53 +00:00
Stephen Adams 4d5f8a1504 [dart2js] Add HInstruction.replaceInput
Change-Id: I646a06017d9e65ab30cba7eeaa49a308e6479c10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214511
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-27 20:58:03 +00:00
pq cac3e81f27 migrate to package:async unawaited
Change-Id: I6835e32658bbcf19f207fdc0e0f43ba0455c05b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214683
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-09-27 19:43:33 +00:00
pq 8db81bbc44 migrate to package:async unawaited
Change-Id: I48cc9c0b2d16ecc50b3b7d1ea68006388e041a08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214684
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-09-27 19:35:43 +00:00
Brian Quinlan ab453e64b0 Add some more details to the documentation for operatingSystemVersion
Change-Id: Ib3647e19feca8258dd654da690db2599e2195929
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214423
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-09-27 18:50:23 +00:00
Alexander Markov 0cdfa4b4ae [vm/arm64] Use unconditional branch instead of b.al on arm64
TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/47002

Change-Id: I32bf90db0ff33e33d5c158bce0cede36b704305d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214480
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-27 18:30:53 +00:00
Ben Konyi b8533e6b09 [ package:dds ] Fix issue where cancelling multiple streams with the same name would throw a StateError
Fixes https://github.com/flutter/devtools/issues/3302

TEST=test/regress_devtools_issue_3302_test.dart

Change-Id: Ica0665c8a48cdb881ecdf7e3985660513c4b98b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214662
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-09-27 16:35:53 +00:00
Paul Berry 15a028d5ec Fix SDK version associated with SDK_VERSION_GT_GT_GT_OPERATOR hint.
The `>>>` operator wasn't released until 2.14.0, not 2.3.2.

Change-Id: Ief7b7b3982109a290d229a1ede817e66bc10a6c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-27 16:17:43 +00:00
Konstantin Shcheglov 8f0cddf1a9 Renames in AnalysisDriverTestView.
Change-Id: I3e0114f44eda4336a37c27e45f87a2c076e6c2bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-27 15:59:32 +00:00
Paul Berry 7176311597 In message codegen, use json.encode to format strings.
This is more robust than just encoding the string in `r"..."` because
it allows for error messages that contain double quotes.

Change-Id: I90f698f06a8f197ad46e4bcef54deff34c23776b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214661
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-27 15:00:43 +00:00
Paul Berry 0b9fae5414 Create a data structure to represent a message loaded from YAML.
In follow-up CLs I will build on this data structure to do more
sophisticated YAML error message processing, including generation of
existing analyzer error codes from YAML.

Change-Id: If5d22e2ac3d5c123e3700f8d46c327920a941689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214076
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-27 14:52:17 +00:00
Paul Berry 7bcfedfa00 Fix two broken tests in explicit_type_instantiation_parsing_test.dart.
Change-Id: I69c3b15188762817f7cbb6db5e95e39f17db1331
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214300
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-09-27 14:40:23 +00:00
Sam Rawlins ed112b55c6 analyzer: support type literals as const expressions
Additionally, fix instantiate-to-bounds in implicit-type-arg type literals in const expressions.

Bug: https://github.com/dart-lang/sdk/issues/46020
Change-Id: I6357d25a525bfedfcdd68d4a27f63bdd121f5e07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-27 14:27:24 +00:00
Konstantin Shcheglov a0bd1d89ad Use typeStringByNullability() where possible.
Change-Id: Ie8229a863996e2a42c0ab8b6b3ec4020a2d79969
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214580
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-27 14:17:16 +00:00
Paul Berry 94a079896b Fix error message comments to work with documentation extraction tool.
The tool `pkg/analyzer/tool/diagnostics/generate.dart` is very
particular about the format of documentation it recognizes.  This CL
corrects a few minor inconsistencies that were causing it to miss some
documentation.

Change-Id: Iac937666426e987d597323e314f60971c15371be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214421
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-27 14:11:33 +00:00
Paul Berry 1248f21b34 Add int.>>> to analyzer's mock SDK.
Change-Id: I3527868a2a0e4e921fbeaef77feb8dc1484f246a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214560
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-27 13:17:23 +00:00
Lasse R.H. Nielsen bdbd3c0602 Make unawaited accept a nullable argument.
The associated `unawaited_futures` lint triggers for expressions
of type `Future?` as well, so we should allow the workaround to
handle such expressions.

This change makes a static function more permissive, and is not expected
to be breaking in any way.
(It does mean that you need Dart 2.15.0 to use the function with
nullable arguments. I've changed the annotation to say `@Since("2.15")`.
That means anyone using a 2.15 SDK should assume that they need a 2.15
SDK to use it, and someone using a 2.14 SDK will not see the argument
as nullable. If anyone uses `@Since` annotations for anything at all.)

Change-Id: Ib2da4b353104cc88a834208a6ebd788ae55b4544
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214406
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-09-27 11:58:16 +00:00
Tess Strickland bb1640eec2 Reland "[vm/compiler] Add more checks in TTSes for uninstantiated types."
This is a reland of 1016bbadde

The broken benchmarks causing the revert were not due to this CL.

TEST=vm/cc/TTS

Original change's description:
> [vm/compiler] Add more checks in TTSes for uninstantiated types.
>
> In certain cases, optimized type testing stubs for uninstantiated types
> compare the instantiation of the type arguments for the type against the
> corresponding instance type arguments. Previously, only an identity
> check was generated, so the instantiation had to match the instance type
> argument exactly.
>
> This CL adds checks for the following cases:
> * The instantiated type argument is dynamic, void, or Object.
> * The instance type argument is Null or Never.
>
> When strong null safety is enabled, we also check that the the instance
> type argument is legacy or non-nullable when the instantiated type
> argument is non-nullable Object or that the instantiated type argument
> is nullable or legacy when the instance type argument is Null.
>
> This CL also adds handling for the case where the instantiated or
> instance type argument is not a Type, which is necessary for safely
> retrieving the type class id and nullability, and allocates some
> additional registers in TTSInternalRegs for storing type arguments. On
> ARM7, this requires pushes/pops around type argument checking, because
> we've run out of registers there.
>
> Fixes https://github.com/dart-lang/sdk/issues/40736
>
> TEST=vm/cc/TTS
>
> Bug: https://github.com/dart-lang/sdk/issues/46920
> Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try
> Change-Id: Ib8498fd2b9593b4abb92111f062ed2fc95a45c16
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210681
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>

Bug: https://github.com/dart-lang/sdk/issues/46920
Change-Id: Id84730b3bb292ea7fdfe9ebd8b1fc6e71c64cf22
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211901
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-09-27 10:57:18 +00:00
Irina Arkhipets 11f497f6ab [co19_2] Status files updated
[co19] Status files updated

Change-Id: I206e33a31e5c55954f8ac914e0885dc6003afe26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212003
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-09-27 10:27:42 +00:00
Clement Skau 629803d782 [vm/ffi] Skips new DartAPI FFI tests on simarm.
TEST=None. Status file change.

Bug: https://github.com/dart-lang/sdk/issues/47284
Fixes: https://github.com/dart-lang/sdk/issues/47284
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-simarm64c-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-nnbd-mac-release-simarm64-try
Change-Id: Ifacf1057cca181aed27e461b69f4bb4231cf57fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214408
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-09-27 10:22:33 +00:00
Sam Rawlins 23ff0c8e11 analyzer: Improved checks of type variables in const function references
In particular, check the two cases where a constructor reference or
function reference may appear in which they must be constant
expressions, but are not in constant contexts:

* default parameter value
* field initializer in a class with at least one generative const
  constructor

We also update NodeReplacer to also replace a DefaultParameterElement's
reference to the AST of the default value.

Bug: https://github.com/dart-lang/sdk/issues/46020
Change-Id: Iea92265d41459b9f79317128e96d80de5069abfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-26 22:35:54 +00:00
Kevin Moore b67a67e03c pkg:analy* - don't call .hashCode within Object.hash functions
Follow-up to cb7c932f7b

Change-Id: Ie00e7759880bfc80f7b04a79979325d26607f148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214581
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-26 21:49:04 +00:00
Konstantin Shcheglov 5f18cd99a4 Fix AnalysisDriverCachingTest on Windows.
Change-Id: I4b10e4fb5ebbf9d3e12ce5b8217d8d86564ae4f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214509
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-26 18:28:44 +00:00
Brian Wilkerson 84c56cc846 Add more documentation for diagnostics
Change-Id: Ic135d6645a8987e9eab0e0ed406a076c81b7b4c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214507
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-26 16:48:33 +00:00
Devon Carew 1d43ec2a99 Add an initial version of a script to validate the code samples in the dart: doc comments.
Change-Id: If74a11ffee8130963c37c9bd8ad74da4211f61d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214307
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-26 03:07:11 +00:00
Konstantin Shcheglov 667e879ded Remove only libraries potentially affected by the changed file.
For a small analyzer library the time to analyze it 100 times,
each time changing that file that we are analyzing, so simulating
typing in this file, goes from 1000 ms to 100 ms; for a bigger
library 2400 vs 800 ms.

For a tiny Flutter hello_world the difference is 100x, 5800 vs 50 ms.

Bug: https://github.com/flutter/flutter-intellij/issues/5761
Change-Id: I15c43f4cd66399788ffe6032c52fb365665de7f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214502
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-25 17:56:10 +00:00
Kevin Moore b85488cedd pkg:compiler - enable and fix null operator lints
Change-Id: I5aaef20fdd61fd6ac9dc69978111fb680c7f99e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211624
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-24 23:07:19 +00:00
Ben Konyi 7786183e14 [ Profiler ] Fix CPU sample streaming sending only a single sample block instead of a chain of blocks
A pointer to a single SampleBlockBuffer was being passed in while
building a profile instead of a reference to SampleBlockListProcessor.
This also could lead to a segfault if there were no blocks to process.

TEST=CQ + manual testing in Flutter engine

Change-Id: I1e2903cf718da7b32747553c2ed1efcb78b62c86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214441
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-09-24 23:02:49 +00:00
Kevin Moore 70533ae7fa pkg:compiler - enable and fix prefer_final_fields lint
Change-Id: I042f6047c2c10490121398027489217c6291425d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211622
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-09-24 21:37:39 +00:00