- WeakTable rehashing
- worklist in the root set
Apply the pattern from object_graph_copy of maintaining the worklist as a heap object to avoid bloating the root set, and using a hash table that can safepoint in the middle of rehashing by not using address-based hash codes.
TEST=IsolateSendExitLatency
Change-Id: I2a632327102b0cc88ccdcffb024d813aa8e355f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372161
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
In this CL, Debugger::FindCompiledFunctions always just returns
Error::null(), but when eager compilation of functions is implemented
(https://dart-review.googlesource.com/c/sdk/+/338740), it will introduce
the possibility of Debugger::FindCompiledFunctions truly returning
errors. So, this CL adds the error propagation logic in advance to
avoid making the eager function compilation CL too large.
TEST=this is effectively just a refactor, so CI
Change-Id: Ibedbebf19fed306c8b93c98ba71b7cc57b90e174
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369161
Reviewed-by: Alexander Aprelev <aam@google.com>
It is dead code. Breakpoint requests that only have a line number are just handled by passing column_number=-1 to SetBreakpointAtLineCol.
TEST=CI
Change-Id: I44fb9f805c364edb074bf9cdbd3fcbe3888b3bff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369160
Reviewed-by: Alexander Aprelev <aam@google.com>
No initializer list variable is created with this._ and super._ initializing formals.
this._ will still initialize fields and super._ will forward the argument's value to the super constructor invocation.
Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: Id4cb25d0ecaf3518cc577e37b74a349d19418679
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372600
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
There are a couple of tests where the new code fails to produce a
prefix, but in those cases the prefixes are `""` and `{`, which are
not useful for filtering (and wrong for replacing). The new code does,
however, now find prefixes that the old code missed, which improves the
filtering. The changes to the tests reflect the improved filtering.
Change-Id: I3d48162ee56de1b94ecb3a88d11e8a2167fb8f2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372860
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
4.2.4 was retracted due to an extra binary being included in the archive
that increased the package size by 10x.
Change-Id: Iebca85555e871fee22bafdd1bf547972bfe5b201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372920
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Type inference logging may be used to examine details of the
analyzer's type inference algorithm. It may be invoked as follows:
dart pkg/analyzer/tool/type_inference_log.dart <file_to_analyze>
The log is printed to standard output.
Change-Id: I687e4a343e2ea11c6a757066c4375fd6a411e1af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This saves us about 150 ms, from 2350 ms.
In a macro running benchmark with 200 JSON classes in 20 libraries.
Bug: https://github.com/dart-lang/sdk/issues/55784
Change-Id: Ia2e242b38157709cd34fafc9445159676824f3d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372800
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The single loader does the same thing here:
ef59500e6f/sdk/lib/_internal/js_runtime/lib/js_helper.dart (L3257)
This retry token acts as a cache-buster for requests where the download succeeded but the part file was corrupted and failed to initialize. In that case Chrome has to re-download the file, it can't use the cached file.
I just missed passing this parameter when I added the new multiloader.
b/348644880
Change-Id: I26f4bc0da6c7e6fd714f442df8d32b8f10678047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372700
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Auto-Submit: Nate Biggs <natebiggs@google.com>
This CL adds `isWildcard` to `StructuralVariableBuilder` and allows type variables in functions and function types. It also removes them from scope so they can't be used.
Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: I26237375480318dd0c9a01cb59b3426b783ca7be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372240
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Also, add an assertion to `SharedInferenceLogWriter` to prevent
accidentally setting static types more than once in the future.
Change-Id: If96a40c5490d91b67e061158b2b92af90c05d4d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372602
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The type inference logging infrastructure in the analyzer is built out
to include the following functionality:
- Tracking of type inference of annotations, collection elements,
patterns, and statements.
- Tracking of method lookups.
- Tracking of the generic type inference process, including type
formals, constraints that were generated (and their sources),
partial solutions, and the final types chosen.
It is not yet possible to invoke this functionality on the command
line; I plan to introduce a mechanism for doing so in a follow-up
commit.
Change-Id: I3f592a483b272fcea74c1e31bc51f2c5c3623bc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This removes the special runtime blob for string conversions, instead we
make 2 functions for conversions use our built-in `JS<>()` support.
This will allow specializing the implementation in a future CL.
Change-Id: I06df25ed805042c0a3e2efb966eaebd1ce67dc0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372660
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
The intent of the new method is that it can be used to get the candidate
suggestions before they are sent to the suggestion builder, making it
easier for us to skip the suggestion builder (in the future) and
translate directly into the apporpriate protocol objects.
Change-Id: I4cb185f9076e559dd131870f9c3f05bc4fc883f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372601
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This WasmArray-backed list classes to `dart:_list`, similar to
`dart:_string` and `dart:_typed_data`
This will allow having internally-public list members like unchecked
getters and setters that we will use in the rest of the standard
library.
This CL doesn't add anything new, just renames things.
- `dart.core._ListBase` -> `dart._list.WasmListBase`
This is to avoid confusion with `dart.core.ListBase` (defined by Dart
standard library), and also to be consistent with `WasmTypedDataBase`
and `WasmStringBase`.
- `dart.core._List` -> `dart._list.ModifiableFixedLengthList`
Similar to the above, to avoid confusion with `dart.core.List`.
- `GrowableList.ofOther` -> `GrowableList.fromIterable`
`ofOther` sounds like it should make a growable list from another
growable list, but the type is more general than that. To reflect what
it actually does we call it `fromIterable`.
Tested: Existing tests.
Change-Id: I24398765e1b0d549fc70b03ba94161479c5fc54c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372622
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
The presubmit has a different working dir than expected, making the
check not work (which has resulted in some status entries that shouldn't
have existed).
This CL sets the working directory for the presubmit making the check
work.
Change-Id: I7535050c73af6cd5ae7957c63c85fb2c3b33813d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372624
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
After 9a9b33eb0b running the outline suite
got noticeably slower.
For whatever reason it wasn't noticed until now though.
```
$ out/ReleaseX64/dart pkg/front_end/test/fasta/outline_suite.dart --traceStepTiming
[...]
[ 05:02 | 100.0% | + 2914 | - 0 ]: outline/wildcard_variables/unnamed_optional_parameter_no_default
check errors: 0:00:00.301055 ms
ErrorCommentChecker: 0:00:00.455464 ms
stress constant evaluator: 0:00:00.810962 ms
write .dill: 0:00:01.040020 ms
print: 0:00:01.048330 ms
verify: 0:00:06.864096 ms
match expectations: 0:00:07.527595 ms
typeCheck: 0:00:12.512297 ms
outline: 0:04:31.713300 ms
```
The reason is that the outline also serializes the entire component (including the platform).
This CL disables that and instead gets (back) to:
With this CL:
```
$ out/ReleaseX64/dart pkg/front_end/test/fasta/outline_suite.dart --traceStepTiming
[...]
[ 01:15 | 100.0% | + 2914 | - 0 ]: outline/wildcard_variables/unnamed_optional_parameter_no_default
check errors: 0:00:00.347309 ms
ErrorCommentChecker: 0:00:00.438746 ms
stress constant evaluator: 0:00:00.915786 ms
write .dill: 0:00:01.092630 ms
print: 0:00:01.108090 ms
verify: 0:00:07.156487 ms
match expectations: 0:00:08.019510 ms
typeCheck: 0:00:14.013395 ms
outline: 0:00:41.738619 ms
```
Change-Id: I1fd7486384b34a54ec86b884f102eae6963508f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372483
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Golem config expects RunTimeRaw metric (as we want to see not runs per
second but a more meaningful benchmark, i.e. how much transferring 1KB
of data takes)
=> Golem cannot just display it in different form, we have to make the
benchmark report it also as RunTimeRaw.
=> This CL should fix the golem benchmarks.
Change-Id: I91301930941986771eb0725fd0d85424bb07dc3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372640
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This reverts commit 282893db9e.
Reason for revert: breaks roll of flutter into google3.
Original change's description:
> [cfe] Process invocations eagerly
>
> Some invocation nodes, such as redirecting factory invocations,
> type-aliased constructor invocations, and type aliased factory
> invocations, were unaliased and resolved via lists of delayed
> processing actions. That was due to dependencies of the processing
> actions on each other.
>
> This CL untangles the dependencies and processes the invocations
> eagerly. Namely, the redirecting factory constructors are processed
> before all other nodes that may require unaliasing and resolving. The
> eager processing of nodes eliminates the need for fragile filtering of
> the nodes that may require post-processing.
>
> Change-Id: I3e6971515a974c01eced31aa68bf72399dcfa8b8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372280
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Change-Id: Ib2a9da524a763396559e48aec70f2581e85ebdd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372620
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>