This CL reduces the number of part files in serialization/ by moving
classes into smaller libraries.
This allows the {Data,Binary,Object}{Sink,Source} to be migrated to
NNBD while sink.dart and source.dart still have dependencies.
Change-Id: I0ea44f95841f18978e78c2e1697fbc97a3bf73c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243711
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Implement ClassIntrospector.superclassOf(), a few tests.
Change-Id: Ifcc7ea033f5958a4096a770dac4c2b77dc1d35e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243705
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
The methods to add to hash maps and hash sets are recursive: if the
index needs to be rehashed then the same method is called again after
rehashing.
This CL nests the actual implementation in a private method that takes
the full hashCode as an extra argument.
No significant code size or run time changes are reported on our
benchmarks. (Our benchmarks do not contain purposefully slow hashCodes.)
Note that hashCode can be called again later if rehashing of the index
is required on adding subsequent elements.
Bug: https://github.com/dart-lang/sdk/issues/48948
Change-Id: Ia3ccff9e592d675b4922ac78c4aa7ee0287ecb50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243623
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This will be used to analyze the unpatched SDK. The file contains only
the major and minor part of the version number. The patch version will
always be 0. This is sufficient for the analyzer to construct a language
version.
Change-Id: Ief71ce617b279f7c688e9068c425bc31394cbf5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This refactoring introduces FUNCTION_REG constant for a register
containing target function object when calling Dart functions in JIT
mode. This register is similar to CODE_REG and ARGS_DESC_REG
registers which are also a part of Dart calling conventions.
Hardcoded registers are replaced with new constant where
appropriate. Also, ARGS_DESC_REG and IC_DATA_REG are used instead of
hardcoded registers in more places.
TEST=ci (pure refactoring)
Change-Id: I9e71022d7bca8d4e555b9e4f22558f388073495f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243681
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
For now we put them into the defining unit, eventually they will
stay in the augmentation library.
Change-Id: I1fc5800f9c54248e24df68cc6f4ee7acf8f8e386
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243648
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
`MournFinalized` runs during marking and can add objects to the store
buffer. These objects are stored in the threads' store buffer block.
This block needs to be released to the central store buffer in order for
the objects' addresses to be updated during compacting.
TEST=runtime/vm/object_test.cc
TEST=tools/test.py vm/cc/Finalizer_Regress_48843
Closes: https://github.com/dart-lang/sdk/issues/48843
Change-Id: Ib2424929c86fee730d3f09fbd2f9f6c97f31abfd
Cq-Include-Trybots: luci.dart.try:vm-canary-linux-debug-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-mac-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-release-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243262
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
ignore prefer_interpolation_to_compose_strings and
constant_identifier_names in generated files.
Change-Id: I963504e298f8e439734522fed9ac09911750f419
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243646
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
The test shows up as flaky when running in parallel on the
"iso-stress" builder and as such is not needed to test concurrency in
the VM, so we'll remove it.
The test fails with
```
FutureExpect.throws received Instance of '_RawDatagramSocket' instead of an exception
#0 FutureExpect.throws.<anonymous closure>
#1 _rootRunUnary
#2 _CustomZone.runUnary
<asynchronous suspension>
#3 FutureExpect.throws.<anonymous closure>
<asynchronous suspension>
```
TEST=Should get "iso-stress" builder geen.
Change-Id: Iad79851bda5c8eb75b2387df296b357e3884c822
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243622
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
With dart2wasm emitting nominal types by default now, we can move on
from 10.0.40. This newest version contains a fix to type conversion
when round-tripping a JS value through WasmGC plus some early stack
switching support.
Change-Id: I4744e0b9705dc0d3ee1a4a417e299b4eb8ed9b3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240405
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
This involves a large refactoring of completion_metrics.dart, extracting
out some common code into completion_metrics_base.dart
The code in completion_metrics.dart and completion_metrics_base.dart is
largely unchanged, but restructured to fit the sub-class structure.
* Rename CompletionMetricsComputer -> CompletionQualityMetricsComputer,
as this is focused on quality metrics.
* Extract out applyOverlay and removeOverlay methods.
* Extract out computeSuggestionsAndMetrics, code which is run per
ExpectedCompletion.
* Extract out setupForResolution, for code custom to the quality
computer.
The meat of this change though is in completion_metrics_client.dart:
* _AnalysisServerClient is code which was extracted from
package:dartdev/src/analysis_server.dart. It may seem like an odd
choice when we have package:analysis_server_client, but I think
dartdev's client is fairly mature in creating a short-lived client,
and handling crashes, etc. If this should be re-combined with dartdev,
I think there are open questions about where that should live, and I'd
like to address that in a follow-up.
* The client does not perform overlays yet.
* The client does not track slowest requests yet.
* The client does not have support for performance metrics which DAS
tracks itself. Adding this is high priority.
Change-Id: Ib259f78e4646d10b61559bfd5700d98a95d14d43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243522
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
These were far too sensitive to code size changes and causing unhelpful failures.
Change-Id: I5293c7d281a5db2d36af35f67966f4d47413a78a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243561
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
This change allows function literals in invocations to be inferred in
dependency order. For example, given the following code:
U f<T, U>(T Function() g, U Function(T) h) => h(g());
test() {
var x = f(() => 0, (y) => [y]);
}
The function literal `() => 0` is inferred first, causing the type
parameter `T` to be assigned the type `int`. Then, `(y) => [x]` is
inferred with the benefit of this type assignment, so `y` gets the
type `int`, and consequently, `U` gets assigned the type `List<int>`.
This completes the support for
https://github.com/dart-lang/language/issues/731 (improved inference
for fold etc.)
Change-Id: I48c22693720a1cc8bbf435643e863834e07f02b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243002
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Don't emit dead code branches that are guarded by boolean literals.
Add a single level of simplification for !true -> false, and
!false -> true.
While this might not be very common in code, it does allow for a
useful pattern in the runtime libraries. Branches can be included
into the compiled code or not based on a compile time flag.
Change-Id: Ib90e1e951cea3ef8c75b944635776b292759594a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243363
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
A recent fix for a use-after-free crash created a memory leak due to
Timeline::Clear() returning immediately as the timeline had already
entered its shutdown state. This change adds a new helper function to
bypass the shutting down check in Timeline::Clear(), allowing for the
recorder to be properly cleaned up.
TEST=CQ, local testing
Change-Id: Id2ea3992ea4c4544a2c1cf82b74ea6c3882fa670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243480
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>