Commit graph

91431 commits

Author SHA1 Message Date
Konstantin Shcheglov f88e3bd77c Issue 51903. Test fixes for ParserErrorCode.VAR_AND_TYPE
I think DartFixKind.REMOVE_VARwas already available.

This CL adds DartFixKind.REMOVE_TYPE_ANNOTATION support.

Bug: https://github.com/dart-lang/sdk/issues/51903
Change-Id: Ie582cc22fad038edb8b58c1f260afab1595fdcac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295388
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-17 17:51:38 +00:00
Danny Tuppeny f4d42303ad [analysis_server] Handle completion in whitespace after string values
Fixes https://github.com/dart-lang/sdk/issues/52049.

Change-Id: Idf594cd528065939b49aa55acf362fe9d909e22a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295543
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-17 17:19:08 +00:00
Modestas Valauskas 70762f0de0 [ANTLR] Transform recursive definition of onParts to use iteration ...
Closes https://github.com/dart-lang/sdk/pull/51744

GitOrigin-RevId: 08a3bb98762275f10f6911f59b7cdf5ac1ae6c1d
Change-Id: Ib50f2361ca392554e9c632d7b780f83008bfbef7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288980
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-04-17 17:11:24 +00:00
Danny Tuppeny 453647022f [analysis_server] Don't fail on invalid/complex setters in LSP code completion
Fixes https://github.com/dart-lang/sdk/issues/52050.

Change-Id: I6cf5420d5e017b501481cb436a7d1b17f46c0e44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295542
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-17 17:11:03 +00:00
Konstantin Shcheglov a565638b91 Issue 51689. Report when 'super' is used as a standalone expression, not as a receiver of an invocation.
Bug: https://github.com/dart-lang/sdk/issues/51689
Change-Id: I1c9a407ff3b17034a18842484a28b0f9c82bcd83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295500
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-17 16:42:47 +00:00
Konstantin Shcheglov b78d89ce0c Fix DynamicTypeImpl to InterfaceTypeImpl cast exception in AddTypeAnnotation, when ambiguous SetOrMapLiteral.
Saw it in crash logs.

Change-Id: I631e4da816b689ec017f44ecd2a5dc70122ceec1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295501
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-17 16:34:37 +00:00
Alexander Aprelev bd9c7a46e2 Roll zlib to 14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f
Bug: https://github.com/flutter/flutter/issues/124971
Change-Id: Ie4abdff9d3b32ba34a7b811080675e0e62905cf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-04-17 16:32:20 +00:00
Alexander Markov 18b5ecdfc9 [vm] Cleanup dead code around TypeArgumentClassFinder
TypeArgumentClassFinder.FindClass always returns null (because
non-null values are never stored to TypeArgumentClassFinder::klass_).

Consequently, code using TypeArgumentClassFinder
(TypeUsageInfo::PropagateTypeArguments) seems to be redundant and
can be removed, along with another utility class
TypeArgumentInstantiator.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64-try,vm-aot-linux-release-x64-try
Change-Id: I7bfc98e5c4d5b4d3effa639031ae4bd6dce25643
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295382
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-04-17 16:26:35 +00:00
Sam Rawlins 9d4d48949c Add a top-level variable strict-inference test case
Fixes https://github.com/dart-lang/sdk/issues/38426

Change-Id: I31487b28f32df5109c1cf240d87ce828e718e76c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-04-17 16:24:15 +00:00
Derek Xu 8df1b88877 [VM/Service] Create JSONBase64String class
TEST=CI

Change-Id: Ia14fcb1788a2685bef4fd61babfdd7089dd85a06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287801
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-04-17 15:58:28 +00:00
Derek Xu b4aa83b0b7 [VM/Service] Rename JSONStream::AppendSerializedObject to JSONStream::AppendBytes
TEST=CI

Change-Id: I2bb950c608716156e0dfe357a0fd481463b8d0dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287800
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-04-17 15:58:28 +00:00
Derek Xu 4cd9c9c666 Reland "[VM] Begin supporting Perfetto file recorder"
This is a reland of commit 7424295ce9

The differences between this reland and the original CL are: now the
Perfetto file recorder does not get built in PRODUCT builds, and it does
not get built unless the SUPPORT_PERFETTO macro is defined.

TEST=Recorded traces with the Perfetto file recorder and explored them
in Perfetto's trace viewer, CI

Original change's description:
> [VM] Begin supporting Perfetto file recorder
>
> This CL adds the `TimelineEventPerfettoFileRecorder` class, which is a
> timeline recorder that writes a trace to file in Perfetto's proto
> format. This CL supports the recording of all types of timeline events
> except flow events. Support for flow events will be added in a future
> CL.
>
> TEST=Recorded traces with the Perfetto file recorder and explored them
> in Perfetto's trace viewer, CI
>
> Change-Id: Iaa2051e536589a473c5e15f9de9bb9c251f13d38
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278942
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

Change-Id: I8713f704b5fbeed5f1231012bce8a32aaf566ae4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286020
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-04-17 14:42:50 +00:00
Daco Harkes fa3a72fa7e [cfe/ffi] Error on compound constructors
TEST=co19/LibTest/ffi/Struct/Struct_A02_t01
TEST=co19/LibTest/ffi/Union/Union_A03_t01
TEST=co19/LibTest/ffi/Union/Union_A03_t02
TEST=co19/LibTest/ffi/Union/Union_A03_t03
TEST=co19/LibTest/ffi/Union/Union_A04_t01

Closes: https://github.com/dart-lang/sdk/issues/46813
Change-Id: I2a057613a62eccc0de81083a6f63f8ba68430fc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293684
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-04-17 11:03:57 +00:00
Marya 6c7be24b24 Typo in future_iterable_extension_test
Closes https://github.com/dart-lang/sdk/pull/52042

GitOrigin-RevId: 7720eb33b7156a2b6f8b68d2da99de3c8b072f90
Change-Id: I9da87293b58cf7b1f93a754ce3e14dca033f4a8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295384
Reviewed-by: Michael Thomsen <mit@google.com>
2023-04-17 08:24:29 +00:00
Marya fa8197bea8 Typo in future_iterable_extension_test
Closes https://github.com/dart-lang/sdk/pull/52042

GitOrigin-RevId: 7720eb33b7156a2b6f8b68d2da99de3c8b072f90
Change-Id: Idfda8ac9555eb49e7df54c558e280d5f94119810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295385
Reviewed-by: Michael Thomsen <mit@google.com>
2023-04-17 08:20:14 +00:00
Nate Biggs 90d84c8494 [dart2js] Parameterize calls to get (non-)virtual type information.
Change-Id: Icd3aafc7290cd7dcdd74b6f50095ad5b096422e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295260
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-04-15 03:10:53 +00:00
Nate Biggs 8b01742d60 [dart2js] Fix linearization issues.
- For parameters of closurized members make sure to mark the virtual parameter as closurized where appropriate. Closurized parameters are treated as dynamic and this needs to propagate to all the virtual target's overrides. Previously only the concrete target was getting marked as closurized.

- For mixins defining an abstract member, foo, implementations of foo (either directly on the mixin target or superclasses of it) should propagate their types to the abstract foo as they are effectively overriding it. Calls to foo within the body of the mixin can only target the abstract foo with a virtual call. So that virtual target needs to reflect the types of all its overrides.

Tests have been added that capture both of these cases. The values here reflect the non-linearized algorithm but prior to these fixes the linearized algorithms showed a diff for both tests. After these changes there is no diff.

This fixes all failures referenced in b/277876666.

Change-Id: Icaca99cb6902c54f481eebdbb65cbd7cf81aa2c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294960
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-04-15 02:05:49 +00:00
Stephen Adams bfd71ad330 Test for yield* of Iterable with throwing get:iterator
DDC passes, dart2js and VM fail.

----

The dart2js and VM fringe-following scheme could be modified to call
`.iterator` at the `yield*` site and use the Iterator instead of the Iterable.
Calling `.iterator` at the `yield*` site  would move the exception to the right place. It might also present an optimization opportunity where  the call might be inlined, or the entry into the fringe-following algorithm could be made more efficient based on the type of the iterator.

Change-Id: Icfb6f7ca0b92cbeea1349ce138e469cfa707f571
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295200
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-04-14 22:04:28 +00:00
Brian Wilkerson 2197c81060 Add documentation for data-driven fixes
Let me know if any of this is unclear or if there's missing information.
Of course, you might not know that until you start trying to enhance the
support, but we can also refine the doc when issues are discovered. I'm
mostly just interested in helping you get started.

Change-Id: Ib48a8ce46af7b6cc37a27508c81df03bfd2093e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295040
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-04-14 21:33:50 +00:00
Konstantin Shcheglov 36caf084b9 Issue 51953. Quick fix for ParserErrorCode.DEFAULT_IN_SWITCH_EXPRESSION
Bug: https://github.com/dart-lang/sdk/issues/51953
Change-Id: I21d7abdda8b7197cffb87a359c97f12e54cf427a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295390
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-14 21:15:18 +00:00
pq cae0bfa66f assist to destructure local record variable assignments
First, basic cut.

See: https://github.com/dart-lang/sdk/issues/52025

Change-Id: I3388f5ec96a45211669e3ac8a5975ff39feea4bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-04-14 21:04:20 +00:00
Keerti Parthasarathy 90c434254f Add support for patterns for Add type quick fix
Bug: 51866
Change-Id: Id38d0c8405931cad057ec3db1e0c0e3d297d7b4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-04-14 20:09:52 +00:00
Derek Xu fd607ba778 [Runtime] Add extra_product_deps and extra_nonproduct_deps params to "library_for_all_configs_with_compiler" template
These are params of the "library_for_all_configs" template, and I
believe they should also be params of
"library_for_all_configs_with_compiler".

Change-Id: I9fe959a98a9a1d0ebd2bea8f0959bcba4fc794ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295420
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-04-14 19:51:40 +00:00
Konstantin Shcheglov 0d6067232b Issue 51980. Reduce relevance of 'break' inside 'switch'.
Bug: https://github.com/dart-lang/sdk/issues/51980
Change-Id: Ic3a365c85a36a18739b20482c8c7c136210b12b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295387
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-14 19:37:38 +00:00
Brian Wilkerson 5f2d9cf41f A cursor at the end of a file should be inside the compilation unit
Change-Id: I68ff9337af9a416f18573e500a10eec1194adeaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295400
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-14 19:04:48 +00:00
Derek Xu c454945915 [Runtime] Include extra_nonproduct_deps instead of extra_product_deps in debug builds
The "dart_maybe_product_config" and "dart_product_config" configs in
runtime/BUILD.gn have logic to avoid building PRODUCT artifacts in debug builds.
"library_for_all_configs" should account for this and include
extra_nonproduct_deps in debug builds even when conf.is_product is true.

Change-Id: I98a6e35fcb6f90b751d2c98f35c70ded04990b92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295120
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-04-14 18:45:40 +00:00
Konstantin Shcheglov 1925041a31 Issue 52019. Late instance field is not a static context.
Bug: https://github.com/dart-lang/sdk/issues/52019
Change-Id: I6416a2e65c93b08ad145c2e64129873ae414ccfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-14 17:58:24 +00:00
Janice Collins 1abf129bf8 Enable crash reporting via the unified_analytics consent mechanism.
This pulls in the `okToSend` method from https://github.com/dart-lang/tools/pull/79 in the tools repository.

Bug: https://github.com/dart-lang/sdk/issues/28633
Change-Id: I512d041750050338699d3635ba426cc0acdd5a20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2023-04-14 17:29:28 +00:00
Konstantin Shcheglov 9a6b637444 Issue 51989. Add 'Convert to switch statement' assist.
Bug: https://github.com/dart-lang/sdk/issues/51989
Change-Id: I297cbc077604d0c750dc0d78d8480b33852f3a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295201
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-14 17:19:25 +00:00
Jackson Gardner 3015fd34fd [dart2wasm] Allow the user to specify the path of the js runtime file.
Change-Id: Iceb0428f70c77d34daa675e199abf670542babb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295220
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
2023-04-14 16:51:18 +00:00
William Hesse 9466e8d53d [infra] Fix version ordering in release scripts
The prerelease_patch number was being compared before the prerelease
number in the version comparison.

Change-Id: I77cc46d07912ffdbe321ee9d855f928452572a5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295300
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-04-14 12:27:01 +00:00
Sergey G. Grekhov b5ac2821e0 [co19] Roll co19 to c01fbd751c060650b6582523a7751b83777026c3
2023-04-11 sgrekhov22@gmail.com dart-lang/co19#1401. Exhaustiveness tests fixed and new ones added (dart-lang/co19#2019)
2023-04-11 sgrekhov22@gmail.com Fixes dart-lang/co19#2006. `Pointer` can have top types as type arguments (dart-lang/co19#2013)
2023-04-11 sgrekhov22@gmail.com Fixes dart-lang/co19#2010. Fix exhaustiveness tests for a cast-pattern (dart-lang/co19#2018)
2023-04-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2004. Update expected errors locations for CFE (dart-lang/co19#2011)
2023-04-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2005. DynamicLibrary.process() is supported on Windows (dart-lang/co19#2012)
2023-04-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2007. Fix UintPtr_A01_t01.dart not to fail on 32-bit platforms (dart-lang/co19#2014)
2023-04-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2008. Split pattern_context_A01_t01.dart test to multiple methods (dart-lang/co19#2015)
2023-04-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2009. Update scope_A01_t01.dart according to the current CFE behavior (dart-lang/co19#2016)

Change-Id: I5b43a5c5f133dded30564749b38f6a0c965b62fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295281
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-14 10:39:01 +00:00
Ryan Macnak 26f235faf5 [vm] Don't hold function.CurrentCode across the Dart entry safepoint transition.
Also remove edge cases now that constant evaluation does not invoke generated Dart code.

TEST=none
Bug: https://github.com/dart-lang/sdk/issues/52035
Change-Id: Ia6cd733e10dbba2b6f480308d6225c210ea100b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295103
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-04-14 03:09:39 +00:00
Ryan Macnak d6abb7b89a [vm, gc] Fix scavenger deleting heap sampler entries for collected objects.
TEST=lsan
Bug: https://github.com/dart-lang/sdk/issues/52029
Change-Id: I4ea03a4b5cead076547423ff5dedc4b988e5111d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295160
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-04-13 23:17:47 +00:00
Nate Biggs c618771744 [dart2js] Improve StaticUse memory utilization
Create a compact version of StaticUse without fields that are often not provided. And intern instances of StaticUse as there are a lot of duplicates.

This should save >150MB in the emitter phase of Dart2JS.

Change-Id: I8d0d0c64bd9e8e3ffc7a86c413cc875be568c5a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291620
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-04-13 22:16:04 +00:00
Konstantin Shcheglov 40b9404d8e Issue 52004. Check RecordType(s) in UnknownInferredType.isUnknown
Bug: https://github.com/dart-lang/sdk/issues/52004
Change-Id: Ib7d736f44c683b309ae3d55b2b848577c56c8a79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295102
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-13 22:14:51 +00:00
Simon Binder a42a163f3b [analysis_server] Handle missing null in missing enum case fix
When switching over a nullable expression, the `null` value should also
be handled for exhaustiveness.
The analyzer reports a lint for missing nulls, but the correction
producer was unable to fix the problem as it only adds missing enum
constants.
This change makes the fix producer add missing null cases.

Change-Id: I92065b36b6a370d5165e302d84391568894c5dc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294981
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-13 21:55:57 +00:00
Konstantin Shcheglov 63fd5aa364 Issue 52014. Make an implicit name of a named PatternField explicit when the pattern variable is renamed.
Bug: https://github.com/dart-lang/sdk/issues/52014
Change-Id: Ifcc8ba255cb536cba11360ef4326525c1e037b44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-13 21:02:37 +00:00
Nate Biggs 5b50a0f021 [dart2js] Fix file read logic for diagnostic reporting.
- Rather than gating reads on URIs we've seen, gate logic on file scheme. Any URI with a 'file' scheme should be readable.
- Use unmapped URI when creating SourceFile. For providers that expand their URIS (e.g. BazelRootProvider) this will make sure we're using the more readable form rather than the prefix substituted version.

Change-Id: I89a00e48a6ed4fc83d403b34c42092fcc42a8b56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294961
Commit-Queue: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-04-13 20:38:50 +00:00
Sam Rawlins 2f30f88916 Mark deprecated Hints with Warning aliases as deprecated
This will help with any references to deprecated Hints in other
codebases, like nnbd_migraion or linter...

Change-Id: Iccd43d8e3113e6e3e0e458bf959c7f4d48185f35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294182
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-04-13 20:07:36 +00:00
Nate Biggs c6986b4e7e [dart2js] Improve namer runtime (the map lookup is a bit slow) and memory utilization by removing library key cache and using library index to disambiguate libraries.
Change-Id: I23ce733398d3c9a780a72eefd858c17a43b8be6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291642
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-04-13 19:30:32 +00:00
Ryan Macnak 867dfd226e [vm, compiler] Update the RISC-V shadow call stack pointer from S2 to GP.
Cf. https://reviews.llvm.org/D146463

TEST=ci (Linux), inspect disassembly (Fuchsia/Android)
Change-Id: I3ef4bc4c3212e80221ec7edaebfa33e9eb1db03d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291660
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-04-13 19:29:47 +00:00
Konstantin Shcheglov f70238a83b Issue 52015. Extract local variable into SwitchCase / SwitchPatternCase.
Bug: https://github.com/dart-lang/sdk/issues/52015
Change-Id: I069ecfbd2be5375bdba9977872bc9e0c88431f62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-13 19:18:38 +00:00
Ryan Macnak badd96032d [infra] Test gcc cross builds instead of simulators.
Skipping arm64 for lack of toolchain on the bots.

Disable tcmalloc on arm, where it fails to compile.

The builds are split into separate steps instead of using a shorter invocation like `--mode=debug,release --arch=ia32,x64,arm,riscv64` to avoid per-step timeouts.

Change-Id: Iccf5e6e8d91584147138ac37487560a7cc608b6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283121
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-04-13 18:02:37 +00:00
Stephen Adams a34719fdb9 Add test for yield* of iterator with throwing get:current
Change-Id: Idafa467a5e196d2351b3e5989177b39e959fddc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294882
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-04-13 17:34:58 +00:00
Aske Simon Christensen d8b53d97ff [dart2wasm] Implement identityHashCode via br_table.
This saves the space for the `_identityHashCode` method in the
dispatch table and allows customizing `identityHashCode` for classes
not in `dart:core`.

Change-Id: I829fb0f53dea1f3baf92e12079b9772ce2ff8c2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292820
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
2023-04-13 16:45:14 +00:00
Kallen Tu 2954986a7e [parser] Add errors for using class modifiers on enums.
Otherwise, in its current state, there's no clear error for any modifiers when used before an enum declaration.
This follows the same format to FINAL_MIXIN_CLASS and those groups of errors.

Bug: https://github.com/dart-lang/sdk/issues/51935
Change-Id: I8174b6894c95fef5c0f4704927b161942c19d3ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294122
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-04-13 14:59:57 +00:00
Janice Collins 62edbb5a81 Adjust legacy analytics timeout to improve performance.
This may have the result of dropping any analytics for fast-exiting
commands such as --help.

TEST=manual testing

Bug: https://github.com/dart-lang/sdk/issues/50360
Change-Id: I9ffa81d37a70a4a6c862f9bc5893d8521dc4022e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294940
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2023-04-13 14:36:01 +00:00
Lasse R.H. Nielsen 3e0ca136b6 Update documentation on Record and identical.
Smaller clean-ups.

CoreLibraryReviewExempt: Documentation only.
Change-Id: Idfe543f18927043ae8ec73e81dc7d9d333bb88df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294542
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-04-13 12:35:44 +00:00
dependabot[bot] be6c10504a Bump ossf/scorecard-action from 2.1.2 to 2.1.3
Closes https://github.com/dart-lang/sdk/pull/51925

GitOrigin-RevId: bb075698f5f93573a488559d56cd9b4c906f6efc
Change-Id: Ib2a852cbe943c152ee35043570c6d0caaf5b1812
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292760
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-13 09:58:32 +00:00