Rename old "Pub client" headline for consistency with older entries
Add headline for linter in CHANGELOG.md
Change-Id: I118127a6aab564f5d498441f30957e8851e69d6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103527
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
In addition, if a _ByteDataView came from a use of the ByteData
constructor, its offset is always 0.
Also add appropriate canonicalization for the following instructions for
typed data views coming from a known factory call:
* LoadField getting type arguments
* GuardFieldLength
This closes https://github.com/dart-lang/sdk/issues/36570.
Change-Id: I1c045edb2d928c3bb3340d9d12009c2afa66febb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102362
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
This adds a "--deflake" flag to test.dart. Deflaking will only run if
that flag is set.
Deflaking is time consuming and delays the information that users want
to see when most of the time they know that the result is not caused by
flakiness.
A typical session may look like this:
* Run test.dart with a broad test selector without deflaking.
* Re-run test.dart with a narrow test selector for suspected flakes with
"--deflake". This second step is optional.
Additionally, a new "--report-flakes" flag is added that can be
used to report test failures for tests known to be flaky.
Change-Id: I543d0b40c32065eb0a50338c55e7050b7887abce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102381
Reviewed-by: Jonas Termansen <sortie@google.com>
This is an incomplete parser implementation of extension methods.
Subsequent CLs will flesh out the details.
Change-Id: I8c891827e97b451388cadc9cedea3afb7a8cf922
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit a9ad427 introduced a bug that assumed the cookie value was at least
one character, but the cookie value can also be empty.
RFC 6265 5.2 does not specify any special behavior for double quotes and as
such they should be considered part of the value. This change stops
stripping those double quotes and instead preserves them.
The io/http_cookie_test test was skipped because it was considered flaky.
This change dusts it off and tests the new behavior.
This change adds the exact offsets and source to the FormatExceptions to
help the caller understand why a malformed cookie was rejected.
Fixes https://github.com/dart-lang/sdk/issues/33327
Fixes https://github.com/dart-lang/sdk/issues/35804
Change-Id: I3479ba48be5763c485bd3ca5b5d2d86d283df971
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/91221
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Hitting this when compiling the analyzer with DDC. I thought this was exercised
when training the DDC snapshot (it compiles itself), but it seems not.
Lost the assignment here on the recent implicit cast removal.
Change-Id: Id1a74999c75b2a36071bac3692c2022e7ad7eefe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103482
Commit-Queue: Vijay Menon <vsm@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Vijay Menon <vsm@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Hitting this when compiling the analyzer with ddc. Should sanity check that our bots are
running with assertions enabled.
Change-Id: I1276b936162f3adc830a79d1f014c6dccd80de86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103461
Auto-Submit: Vijay Menon <vsm@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Only ~29/100 calls for runtimeCall and ~2/31 calls for runtimeStatement
were using the single value option. Change to take a `List<Object>`
always and add list literals to those calls which were previously only
passing one value.
Update pubspec SDk constraint so that the analyzer will allow the `..?`
syntax.
Change-Id: Ib8eb8eb854a8aa04e36dc5cc713016a43b8e9325
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103361
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
This change adds merging of cid ranges into Cids::Create if there are
gaps with the same target function. Previously, this optimization was
performed only when calculating targets via CallTargets::CreateAndExpand.
However, Cids::Create is widely used to check receiver type if there is
only one targets (e.g. in CallSpecializer::AddReceiverCheck /
CallSpecializer::AddChecksForArgNr).
This optimization is needed to shrink huge code for CheckClass instructions
in Flutter RenderObject.layout() method in JIT mode.
Issue: https://github.com/dart-lang/sdk/issues/36428
Change-Id: I97051b4213066b252ac3238df55ab4ed5c98f412
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103402
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This ensures that core-jit snapshots used in Fuchsia (built according
to the compilation trace) would have properly sorted cids without any
gaps with non-finalized classes. This enables merging of cid ranges in
more cases and more efficient cid checks.
Issue: https://github.com/dart-lang/sdk/issues/36428
Change-Id: I7b696ccb7d5ffa80f190bcfc9e1b7229937f16b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103403
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
As mentioned in #28303 Dart needs the innerText getter/setter.
This seems like all thats needed.
Closes#35471https://github.com/dart-lang/sdk/pull/35471
GitOrigin-RevId: 95f45dd8ba1d0ce58acbeb99242c45b56c586f85
Change-Id: I3514e02915b4c388d6fe2462976e0a88a6081493
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100822
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
This reverts commit fde6a5917e.
Reason for revert: This commit looks to be causing new test failures on dart2js. While there are some odd results on some builders that look like infra failures, some builders (for example, dart2js-minified-strong-linux-x64-d8) show the new failing tests clearly.
Original change's description:
> [vm, compiler] Unoptimized megamorphic calls.
>
> When an instance call in unoptimized code creates more than FLAG_max_polymorphic_checks cases, switch the call to use a MegamorphicCache instead of ICData. The prevents unbounded collection of type feedback, and gives improvements on microbenchmarks in the 3-8% range for unoptimized code.
>
> It also leads to a loss of target frequency information for the optimizer, leading to different ordering for range checks in polymorphic inlining. This leads to changes on megamorphic microbenchmarks from -31% to +60%, weighted toward the negative end.
>
> In practice the frequency information seems unimportant, as dart2js has 4.01% geomean improvement.
>
> This is a step toward direct monomorphic calls in unoptimized code, which will also make use of the patching and type feedback extraction added here.
>
> Bug: https://github.com/dart-lang/sdk/issues/26780
> Bug: https://github.com/dart-lang/sdk/issues/36409
> Bug: https://github.com/dart-lang/sdk/issues/36731
> Change-Id: I29f53f23b6794c5f5f0db8b8184788cee16fd9c5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99270
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
TBR=rmacnak@google.com,alexmarkov@google.com,ajcbik@google.com
Change-Id: Icad46b93cdf8541a00563f49da6b4ac0a4df1ba1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/26780, https://github.com/dart-lang/sdk/issues/36409, https://github.com/dart-lang/sdk/issues/36731
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103440
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
The VM uses the collection and set literal transformations. The set
literal transformation assumes that collections have already been
transformed. This was not done correctly when translating a
list (e.g., constructor initializers).
Fixes https://github.com/dart-lang/sdk/issues/37027
Change-Id: If7a6bda55f8cf0efd761fd8932d3a9e2c60db19b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103134
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Resolution is incomplete at the time when we perform rewriting.
For example, in `C<int>` the type of `int` is not set, so we get
incomplete InterfaceType of `C` with `null` as the type argument.
This was crashing summary2 in one situation internally.
R=brianwilkerson@google.com
Change-Id: Ifcff68f007a90b5694cf3e4e4d3825309c04e2b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Until now we often leaked kernel buffers (e.g. hot reload buffers) because various
objects were referencing ExternalTypedData objects pointing into the middle of
c-allocated memory. This made it impossible for the GC to determine when the last
reference is gone.
This CL ensures that the actual buffers are *always* made available via
ExternalTypedData and any inner pointers into it are created via TypedDataViews.
The embedder guarantees to the free kernel buffers it has provided to:
- Dart_CreateIsolateFromKernel
- Dart_LoadScriptFromKernel
- Dart_LoadLibraryFromKernel
- Dart_SetDartLibrarySourcesKernel
on isolate shutdown.
All other kernel buffers will get a finalizer attached, which ensures the
kernel buffers get freed by the GC once they are no longer referenced:
- Kernel blobs for expression evaluation
- Kernel blobs for Hot-Reload
- Kernel blobs for cc tests
Fixes https://github.com/dart-lang/sdk/issues/33973
Fixes https://github.com/dart-lang/sdk/issues/36857
Issue https://github.com/dart-lang/sdk/issues/37030
Change-Id: I1cc410c94c0f4b229413e793728a261afcb10aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103130
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Explicit casts make it easier to confidently navigate the code base and
apply refactorings which tighten types. This change exposes a number of
places where types can be tightened, but only the most trivial were
applied. For most places I added the explicit cast that would have
happened anyway and so behavior shouldn't be changing.
- Add the configuration which disallows implicit casts in the analyzer.
- Add explicit casts in almost all instances.
- Where the implicit cast was due to a local variable type on the left,
change it to a `var` so the type is not repeated.
- In a few places add argument types where they were already applied on
the parent type, and the subclass was unnecessarily loosening argument
types to dynamic.
- In a few places where a method was defined with an implicit dynamic
return but had an obvious and consistent return type, annotate the
method instead of casting after calls to that method.
Change-Id: I90e11b1cc08ce69967ea5705b507d5758a8f668f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103381
Reviewed-by: Nicholas Shahan <nshahan@google.com>
This fixes the Astbuilder recovery when encountering "get <identifier> :"
in a class body to build a method node rather than a constructor node.
Fix https://github.com/dart-lang/sdk/issues/36961
Change-Id: I48242838d72c3a6c18e78a469b6e07fd1481d0c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
When an instance call in unoptimized code creates more than FLAG_max_polymorphic_checks cases, switch the call to use a MegamorphicCache instead of ICData. The prevents unbounded collection of type feedback, and gives improvements on microbenchmarks in the 3-8% range for unoptimized code.
It also leads to a loss of target frequency information for the optimizer, leading to different ordering for range checks in polymorphic inlining. This leads to changes on megamorphic microbenchmarks from -31% to +60%, weighted toward the negative end.
In practice the frequency information seems unimportant, as dart2js has 4.01% geomean improvement.
This is a step toward direct monomorphic calls in unoptimized code, which will also make use of the patching and type feedback extraction added here.
Bug: https://github.com/dart-lang/sdk/issues/26780
Bug: https://github.com/dart-lang/sdk/issues/36409
Bug: https://github.com/dart-lang/sdk/issues/36731
Change-Id: I29f53f23b6794c5f5f0db8b8184788cee16fd9c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99270
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Now that we assign indexes to occurred GenericFunctionType nodes, we
need to make the order consistent across all visitors.
R=brianwilkerson@google.com
Change-Id: Ifc9c7bfa35612cef235f000f30130d36116067e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Rationale:
A basic peephole optimizer with window size one that avoids
redundant push-pop sequences already results is substantial
savings in code size and runtime, without any noticeable impact
on compile time (the peephole is very, very fast).
Performance:
Golem unoptimized code (which typically runs -90% compared to
optimized code, sees 5-60% improvements
https://github.com/dart-lang/sdk/issues/36409
Change-Id: I08db4b3dbc92377d89340a4969db6e664e54bceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102980
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Change-Id: I7c85a642eeaa862ecf9c6837c0a488938e8d97e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101225
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Recent changes to GN require only buildable files to be included in
sources. See crbug.com/gn/77 for additional details.
Change-Id: Ic8fd059e85ba86a63c5d6483e8ec64ddbd1612ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103022
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
It is currently failing because it is trying to cd in non-existent directory.
Change-Id: I29f3947db6aa0e34d747309b310da565dc0c010d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103137
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>