Use `GrowableList` instead of `List` for the container type in
`_JsonListener`.
Eliminates virtual calls in `_populateUnsafe`.
Improves bytes/second in an internal JSON decoding benchmark from
206,257,553 to 222,982,950 (8%).
Change-Id: I02e467e5353cc348493b52be1fb9ef2e6599381b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380702
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
V8 has very limited support for inlining calls to Wasm functions
into JS. For the string/byte copy implementation it failed to inline
functions due to needing to do type conversions of parameters
in JS wrappers (e.g. to check that value is `anyref`).
=> We change wasm signatures to requires `WasmExternRef`
=> We do the type cast inside the wasm
=> This makes V8 inline the accessors
This results in roughly 3-10x faster JS<->Wasm data transfer:
WasmDataTransfer.ToBrowserString.10: -60%
WasmDataTransfer.ToBrowserBytes.10: -72%
WasmDataTransfer.FromBrowserString.1KB: -70%
WasmDataTransfer.ToBrowserBytes.1KB: -74%
WasmDataTransfer.FromBrowserString.1MB: -70%
WasmDataTransfer.ToBrowserString.1MB: -86%
WasmDataTransfer.ToBrowserBytes.1MB: -91%
(There's still plenty of room for improvement, especially on the V8 side).
Change-Id: I1e0c3843a5c5e2bcd10a616b71f49ea3338ae280
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380700
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Stop running co19 suite on the ddc-canary-linux-chrome bot.
Cleanup temporary skips from status file.
These changes are staged across multiple CLs to avoid crashing
the infra when too many tests status changes need to be uploaded
at the same time.
Change-Id: I378954fc0cbb47c0f54edf158b3b7c38744bf0b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379525
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Work towards https://github.com/dart-lang/sdk/issues/56467
Thw two assists do the following:
* Add a digit separators every 3 digits in a decimal int, a decimal
double, and a scientific notation double.
* Add a digit separators every 2 digits in a hexadecimal int.
No assists are introduced which remove digit separators.
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I0920fb279285963c33a78d9288317213739ae83b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380601
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Arbitrary ObjectPtr can be a non-heap object (Smi), so methods
ObjectPtr::Is* which test class id should account for Smi.
Changed ObjectPtr::GetClassId to account for Smi similarly to
Object::GetClassId. Added unsafe ObjectPtr::GetClassIdOfHeapObject
which can be used when caller knows the heap nature of the object.
This change also fixes Integer::GetInt64Value which was relying on ObjectPtr::IsSmi.
TEST=vm/cc/Smi, vm/cc/Mint
Change-Id: I1391600e2acedc7b2a8f35c814df113ec9ba8698
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380280
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This reverts commit c1976b097d.
Reason for revert: It seems this change caused failures on Flutter
HHH bot. Example log can be found at [0]:
```
| lib/src/super_reader/super_reader.dart:615:14: Error: Final field 'showDebugLeaderBounds' is not initialized.
| Try to initialize the field in the declaration or in every constructor.
| final bool showDebugLeaderBounds;
| ^^^^^^^^^^^^^^^^^^^^^
```
Looking at the sources it seems that may be related to the
`// ignore: unused_element` analyzer directive:
```
602 /// A [SuperReaderDocumentLayerBuilder] that builds a [SelectionLeadersDocumentLayer], which positions
603 /// leader widgets at the base and extent of the user's selection, so that other widgets
604 /// can position themselves relative to the user's selection.
605 class _SelectionLeadersDocumentLayerBuilder implements SuperReaderDocumentLayerBuilder {
606 const _SelectionLeadersDocumentLayerBuilder({
607 required this.links,
608 // ignore: unused_element
609 this.showDebugLeaderBounds = false,
610 });
611
612 /// Collections of [LayerLink]s, which are given to leader widgets that are
613 /// positioned at the selection bounds, and around the full selection.
614 final SelectionLayerLinks links;
615
616 /// Whether to paint colorful bounds around the leader widgets, for debugging purposes.
617 final bool showDebugLeaderBounds;
```
So tentatively reverting this CL.
[0] https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8739650477551803313/+/u/Run_customer_testing_tests/stdout
Original change's description:
> analyzer: separate unused_element_parameter from unused_element
>
> Fixes https://github.com/dart-lang/sdk/issues/49025
>
> This allows users to blanket ignore unused_element_parameter without
> ignoring unused_element. They are reported in distinct situations so it
> is valid to separate them.
>
> Tested: Presubmit CI
> Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
> Change-Id: I4844a6a0e0a67cd5e37ed8735b1526e174deb950
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378500
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Phil Quitslund <pquitslund@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
Change-Id: Ibbba75fe56601c7c4b5535c9142cf94c2dd80b91
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380460
Commit-Queue: Martin Kustermann <kustermann@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Dart classes that are structurally equivalent are currently
merged into the same recursive group to allow binaryen to distinguish
them and ptimize them independently.
This change reduces the cost of checking for structurally equivalence:
* We skip it during the discovery of available types
* We skip trivial comparisons (self, reverse, irrelevant types)
This recovers the compile-time regression mentioned in
https://dart-review.googlesource.com/c/sdk/+/378764/comment/f7990317_f4b34810/
Change-Id: I5c97b1498f261c8549b70fd3622c0762499eda21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379754
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This is a reland of commit e7658520bb
Fixes in the reland + context:
Type parameters emitted in implicit type checks on covariant mixin forwarding stubs may reference type arguments in anonymous classes. We reduce this to their mixin's implementing subclass to avoid generating RTI rules for anonymous classes.
Previous implementations would 'translate' type parameters to that of their mixed in type, but that strategy fails if the implementing subtype shuffles the order of type arguments relative to its mixed in type (demonstrated in the test - though not actually relevant in the Flutter break).
Original change's description:
> [ddc] Overhauling DDC's generic class representation.
>
> Prior to this change, DDC represented generic classes as closures over type parameters (with type arguments provided at runtime), which tightly coupled generic class definitions with their types and concrete instantiation.
>
> This rewrite decouples this representation, letting us 1) bind type information late and 2) separate generic class definitions from their instantiation.
>
> Notable changes:
> - Generic classes are now declared at top level (rather than within in closures).
> - RTIs are now passed to generic class constructors at runtime (except for JS Interop classes). Only the instantiated class's RTI is required (and it's retained up the type hierarchy).
> - Type signature resolvers are now lambdas that accept a type environment RTI at runtime. While signatures are still attached early, their instances' RTIs are now needed at runtime.
> - Generic classes, constructors, and factories are now evaluated in a 'Class' type environment.
> - An `RtiTypeEnvironment` is introduced to represent lookups on an RTI type environment bound to a parameter. These are used when evaluating type signatures and at constructor/factory bodies.
> - Type recipes now emit Class type parameters with names - but continue to emit method type parameters with de Bruijn indices. This is because indices aren't stable across subtypes.
> - Certain debugger functions now require instances (e.g.,`getClassMetadata`).
> - Adds a special flag for non-external JS interop factory constructors to emit 'true' types (versus 'any').
>
> Change-Id: I7cbeaaf666dd4f9bd5e3ef22a1163a659fc0ee48
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365863
> Reviewed-by: Srujan Gaddam <srujzs@google.com>
> Reviewed-by: Kallen Tu <kallentu@google.com>
> Reviewed-by: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Nate Biggs <natebiggs@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>
Change-Id: I9b6f69b7150631f28442675c4230e093e3b821d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379511
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Stop running co19/LibTest suite on the ddc-canary-linux-chrome bot.
These changes are staged across multiple CLs to avoid crashing
the infra when too many tests status changes need to be uploaded
at the same time.
Change-Id: Id696dd4e7b655ac797fd52409fc07d12c76ec2bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379524
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
This lint is the complement of 'omit_obvious_local_variable_types'
in that it flags every declaration that does _not_ specify the type
of a local variable, when it has an initializing expression whose type
is not obvious (defined as in 'omit_obvious_local_variable_types').
Change-Id: If80a961e47fed0412d0ea0bac5ac010e26fea7bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
This opens possibility for other core libraries to access implementation
details of compact hash maps/sets and call special "core-library-only"
methods.
TEST=ci
CoreLibraryReviewExempt: VM only library change
Change-Id: I1d7524932c34e6fbe2428853dd547d58bef2d061
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379840
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>