Commit Graph

69725 Commits

Author SHA1 Message Date
Jakob Gruber
9bfd401ef5 [compiler] RawFastPropertyAt without serialization
This is a step towards making JSObjectRef non-serialized.

Change JSObjectRef::RawFastPropertyAt to use a direct load with
relaxed semantics. Special handling of `uninitialized` sentinel values
is moved to the only use-site.

A new lock `boilerplate_migration_access` protects against concurrent
boilerplate migrations while we are iterating over properties.

Bug: v8:7790
Change-Id: Ic9de54ca16c1f3364d497a77058cfa33d48dd4a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928184
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75033}
2021-06-09 07:24:58 +00:00
Maya Lekova
75d9e3b83e Revert "Update V8 DEPS."
This reverts commit eb3ce72b87.

Reason for revert: Broke Android Arm64 Builder, see https://bugs.chromium.org/p/chromium/issues/detail?id=1217912

Original change's description:
> Update V8 DEPS.
>
> Rolling v8/build: 8870cb4..921ea58
>
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a8bae77..df0a59a
>
> Rolling v8/third_party/depot_tools: b508ecd..b14cdae
>
> Rolling v8/tools/clang: 0c64e83..d987b04
>
> TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com
>
> Change-Id: I8906ce650c866bd771910fea5db6c735bfe0c7e2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947396
> Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/master@{#75029}

Change-Id: I4d83f012cf04ab94eb66bab9a8ebec04ed098fbf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947417
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75032}
2021-06-09 07:15:09 +00:00
Iain Ireland
363ab5ae71 [regexp] Propagate eats_at_least for negative lookahead
In issue 11290, we disabled the propagation of EAL data out of
lookarounds, because it was incorrect for lookahead nodes in
loops. This caused performance regressions: for example,
`/^\P{Letter}+$/u` (matching only characters that are not in Unicode's
Letter category) uses negative lookahead when matching lone
surrogates, and became about 2x slower. I spent some time looking into
fixes, and this is what I've settled on.

Some background: the implementation of lookarounds in irregexp is
split between positive and negative lookaheads. (Lookbehinds aren't
relevant here, because backwards matches always have EAL=0.)  Positive
lookaheads are wrapped in BEGIN_SUBMATCH and POSITIVE_SUBMATCH_SUCCESS
ActionNodes. BEGIN_SUBMATCH saves the current state.
POSITIVE_SUBMATCH_SUCCESS restores the necessary state (while leaving
any captures that occurred during the lookaround intact).

Negative lookaheads also begin with a BEGIN_SUBMATCH node, but follow
it with a NegativeLookaroundChoiceNode. This node has two successors:
a lookaround node, and a continue node. It only executes the continue
node if the lookaround node backtracks, which automatically restores
the previous state. Negative lookarounds also can't update captures.

This affects EAL calculations. It turns out that negative lookaheads
are already doing the right thing: EatsAtLeastPropagator only
propagates information from the continue node, ignoring the lookaround
node. The same is true for quick checks (see the comment in
RegExpLookaround:Builder::ForMatch). A BEGIN_SUBMATCH for a negative
lookahead can simply propagate the EAL data from its successor like
any other ActionNode, and everything works.

Positive lookaheads are harder. I tried saving a pointer to the
successor in BEGIN_SUBMATCH, but ran into problems in FillInBMInfo,
because the EAL value corresponded to the nodes after the lookahead,
but the analysis was still looking at the nodes inside. I fell back
to a more modest approach: split BEGIN_SUBMATCH in two, and propagate
EAL info for BEGIN_NEGATIVE_SUBMATCH while keeping the current
behaviour for BEGIN_POSITIVE_SUBMATCH. This fixes the performance
regression at hand.

Two potential approaches for fixing EAL for positive lookahead are:
 1. Handling positive lookahead with its own dedicated choice node,
    like NegativeLookaroundChoiceNode.
 2. Adding an eats_at_least_inside_loop field to EatsAtLeastInfo,
    which is <= eats_at_least_from_possibly_start, and using that
    value in EatsAtLeastFromLoopEntry.

Both of those approaches are more complex than I want to tackle
right now, though.

Bug: v8:11844
Change-Id: I2a43509c2c21194b8c18f0a587fa21c194db76c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2934858
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75031}
2021-06-09 06:54:58 +00:00
Frank Tang
4a78a7d00c Address flaky tests
The test push stack boundary and too flaky (timeout) while
running machine with more memory.

Bug: v8:11845
Change-Id: I5b603f05270d224de71c735ece5dd65a27311c25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2939082
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75030}
2021-06-09 05:48:18 +00:00
v8-ci-autoroll-builder
eb3ce72b87 Update V8 DEPS.
Rolling v8/build: 8870cb4..921ea58

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a8bae77..df0a59a

Rolling v8/third_party/depot_tools: b508ecd..b14cdae

Rolling v8/tools/clang: 0c64e83..d987b04

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I8906ce650c866bd771910fea5db6c735bfe0c7e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947396
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75029}
2021-06-09 03:50:37 +00:00
Jakob Kummerow
766cd46355 [bigint][ia32] Make bigint::Compare inlineable
Due to the limits of ia32's calling convention, being able to
avoid construction of "Digits" objects (thanks to inlining)
helps a lot for microbenchmarks.

Fixed: chromium:1192133
Change-Id: I5676640d96a99dc6422f3946c608bcc93ef222ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947410
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75028}
2021-06-08 19:03:36 +00:00
Frank Tang
c0f90e5923 Implement DisplayNames v2
Add "calendar", and "dateTimeField"
Add option for languageDisplay

https://tc39.es/intl-displaynames-v2/
https://chromestatus.com/feature/5082027281874944
Design Doc:
https://docs.google.com/document/d/17hQz4nOC7PJYhxc_MU-BRoT6BnYGZv66XlU1iGX0ywQ/edit#

Bug: v8:11637
Change-Id: Ie7dc80d16956f0e668b11e600e47f5bafb081ff7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2924523
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75027}
2021-06-08 17:49:36 +00:00
Junliang Yan
c9b1f165dd ppc: rename LoadF32/F64/WithUpdate
Change-Id: I3a4e827f9407286c8665ee032fbbc4552ebd1d89
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945272
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75026}
2021-06-08 17:37:26 +00:00
Frank Tang
c563e44a13 Fix supportedLocalesOf of "best fit" matcher
Only return "subset of" the requested Locales.


Bug: v8:11860
Change-Id: I917753c6f0f5dfc7a52d071febbe03abfab45b04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2946746
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75025}
2021-06-08 16:53:46 +00:00
Michael Lippautz
8c2c22fa9c cppgc: NameProvider:GetName() -> NameProvider::GetHumanReadableName()
GetName() is very generic and arleady exists as virtual method in Blink.

Bug: chromium:1056170
Change-Id: I7aa6e869a06c048e7baea45939894717c872d89e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947404
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75024}
2021-06-08 15:56:46 +00:00
Santiago Aboy Solanes
4cf7a03ae3 [object] Update SlicedStrings' comment regarding ExternalStrings
See set_parent
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/string-inl.h;l=857;drc=a6207b54d010a5bee8611a6ef08f9bee9a9768cf

Change-Id: I2fa5718c04b281016e2d4cae07b7f36e37176d6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947402
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75023}
2021-06-08 15:26:46 +00:00
Thibaud Michaud
c134f0af98 [wasm][liftoff] Add step counter in Liftoff
Add a new testing tier based on Liftoff. In this tier, the Liftoff
compiler takes an address to a counter, and decrements that counter at
every instruction. When the counter reaches 0, execution aborts.

R=clemensb@chromium.org

Bug: v8:11856
Change-Id: I20970e323ff19f7cb6ab6855377c678ca391421e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944440
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75022}
2021-06-08 15:02:36 +00:00
Vicky Kontoura
385f304df9 [d8] Support more ways of passing source code to Realm.eval()
This CL updates Realm.eval() to also handle reading source code as a
JavaScript function or from a file. To distinguish between different
argument types, an additional options bag needs to be provided. If no
options bag is provided, the behavior defaults to the current one,
which is reading source code from a string.

Bug: v8:11525, v8:11706
Change-Id: I68238335eb91171041dca2c83db211c40dd68359
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944435
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Vicky Kontoura <vkont@google.com>
Cr-Commit-Position: refs/heads/master@{#75021}
2021-06-08 14:44:16 +00:00
Vicky Kontoura
08ce6e5c98 [web snapshot] Support top-level non-objects
Currently, the serializer and deserializer assume that all top-level
declarations to be serialized will be objects.

This CL removes this assumption.

Bug: v8:11525, v8:11706
Change-Id: I5acf5e7a3b73aba5ffc5b1d5eb9cb51b3804a4af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945178
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Vicky Kontoura <vkont@google.com>
Cr-Commit-Position: refs/heads/master@{#75020}
2021-06-08 14:38:06 +00:00
Georg Neis
376eb8020d [compiler] Add missing prototype serialization of bound function map
This is needed for JSCallReducer.

Bug: chromium:1217562
Change-Id: I1f06040a74c393598c134301ba0cf04a46380107
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945184
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75019}
2021-06-08 14:09:56 +00:00
Milad Fa
dc5a4c909a PPC/s390: [sparkplug][x64] Reduce CallRecordWrite instructions
Port f68e1be795

Original Commit Message:

    Directly use the correct registers for calling the RecordWrite stubs
    in sparkplug. To keep changes to existing builtins minimal there are
    certain register requirements which are now made explicit in
    WriteBarrierDescriptor::Verify.

R=cbruni@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Id01f936f96cf231dcfc599b4f2662124bc1a7744
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945832
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75018}
2021-06-08 14:02:36 +00:00
Clemens Backes
863f322e68 Add clemensh->clemensb to .mailmap
This adds a .mailmap entry to remap clemensh@chromium.org to
clemensb@chromium.org, with Clemens' new name.

R=mathias@chromium.org

Change-Id: If234c59cf9089e71a1baf56115d5ee900f8af275
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919626
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75017}
2021-06-08 13:18:11 +00:00
Ulan Degenbaev
87e0d0a4d3 Remove ulan@ from OWNERS
Change-Id: I4a30e0f01e35eb0824f5abeec62d55d62970b59f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2910781
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75016}
2021-06-08 13:10:21 +00:00
Wenyu Zhao
09faa661ea Reland "[csa] Remove InnerAllocate and replace with non-folded allocations"
The initial CL is suspected to break the --predictable CI.
But looks like the CI is still crashing and also flaky after the
revert. So reland it again.

This is a reland of 59d58d722e

Original change's description:
> [csa] Remove InnerAllocate and replace with non-folded allocations
>
> This CL removes all uses of InnerAllocate (except memento allocations)
> and replace with non-folded allocations. The change is based on the
> fact that 1. Those InnerAllocates are not guarded by --allocation-folding
> flag. 2. Hopefully the MemoryOptimizer can handle the folding and no
> performance regression will happen.
>
> Two special versions of InnerAllocate is still kept:
> * One for memento allocations (renamed to InnerAllocateMemento).
> * One for AllocateUninitializedJSArrayWithElements (renamed to InnerAllocateElements).
>
> Change-Id: Ie77da6b2fba31b048241f7b7d927065305a01c27
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2873767
> Commit-Queue: Wenyu Zhao <wenyu.zhao@anu.edu.au>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74899}

Change-Id: I540c3a6b6e3f7c70c048f8ad1e5f702287fb086b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2946667
Commit-Queue: Wenyu Zhao <wenyu.zhao@anu.edu.au>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75015}
2021-06-08 11:52:51 +00:00
Patrick Thier
fd9d6fefd6 [sparkplug] Add tracing for batch compilation
Add flag --trace-baseline-batch-compilation to enable tracing for
baseline batch compilation.

Bug: v8:11790
Change-Id: I2b05017181b95bf3bccb70e2092250211dafb86c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945174
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75014}
2021-06-08 11:37:11 +00:00
Clemens Backes
5c89c4c788 [wasm][predictable] Unskip tests
Predictable does not contradict --wasm-tier-up any more, hence unskip
the tests.

R=ahaas@chromium.org

Bug: v8:11319, v8:11848
Change-Id: Iaefcf6c80e65d27c527aa1a45b054ace1d85fe39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945171
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75013}
2021-06-08 11:21:51 +00:00
Michael Lippautz
7ef67b2e9e heap: Fix initial GC configuration for C++-only heaps
Heaps in V8 start with a large limit that is shrunk upon young
generation GCs, based on some liveness estimate. This provides best
throughput during startup while at the same time finding a reasonable
first limit.

For C++ (embedder memory) there is no estimate which is why it was
piggy-backing on V8. This breaks in scenarios where no JS memory is
allocated.

In this fix we start a memory reducer after embedder memory has hit
the activation threshold if no GC happened so far. As soon as a single
Scavenger has happened, we leave it up to the JS estimate to figure
out a limit. Memory reducing GCs will then find a regular limit based
on the initial live size.

Drive-by: Give embedders the same activiation threshold of 8MB as JS.

Bug: chromium:1217076
Change-Id: I8469696002ac2af8d75d6b47def062d2608387a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944935
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75012}
2021-06-08 11:20:11 +00:00
Manos Koukoutos
83d30dcb87 [wasm-gc] Use feature over flag for rtt.fresh_sub
Bug: v8:7748
Change-Id: I4d1badcc31accfc1a2efcd0d12118e7aa436e610
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2940894
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75011}
2021-06-08 10:54:12 +00:00
Camillo Bruni
45662e6f67 [macro-assembler] Make IncrementCounter prechecks inlinable
Bug: v8:11420
Change-Id: Ic2b977c41dd71426838e1039b66dc7936cc4ff98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2933658
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75010}
2021-06-08 10:04:47 +00:00
Clemens Backes
dcd078421c Reland "[wasm] Remove all implications from --predictable"
This is a reland of 79d63a5ef3. Some fixes
landed already, and two tests need to be skipped now (one with a tracking
bug).

Original change's description:
> [wasm] Remove all implications from --predictable
>
> In predictable mode, we want to execute the same code as otherwise,
> modulo timing. Hence remove any implications which change behaviour
> (like tier-up or asynchronous compilation).
> Note that --predictable is a debugging flag, so the configurations does
> not need to "make sense" in production.
>
> R=ahaas@chromium.org
>
> Bug: v8:11848
> Change-Id: If74fbacadeb087d977922c41f33fd18738b50ded
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2940898
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74973}

Bug: v8:11848
Change-Id: I3564e4351d6545bb9643d1ae44722eb2606b8961
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944936
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75009}
2021-06-08 09:32:37 +00:00
Camillo Bruni
425f4ed82f [tools][system-analyzer] Improve flamechart
- Scale svg flamechart directly instead of rerendering
- Convert markers to SVG as well
- Fix scroll position after zooming
- Support tooltips for flamechart

Change-Id: I01c966d2705989cf45a91c64aa4302a8de035414
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944894
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75008}
2021-06-08 09:25:07 +00:00
Clemens Backes
8803cc14d3 [d8][predictable] Fix task execution loop
The predictable platform only executed background tasks if at least one
foreground task was executed. Async compilation in Wasm only spawns a
background task though, so that one could be missed.

This CL fixes the loop to also execute background tasks if no foreground
task was executed.

R=ahaas@chromium.org

Bug: v8:11848
Change-Id: Ia0b32427c24a79d5710c784b98528bf431471528
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944833
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75007}
2021-06-08 09:05:59 +00:00
Manos Koukoutos
95e8d86709 [wasm-gc] Allow struct.new_with_rtt as constant expression
Changes:
- Add struct.new_with_rtt as a new WasmInitExpr. Parse it in
  consume_init_expr(). Add it to
  InstanceBuilder::EvaluateInitExpression().
- Change WasmInitExpr::operand_ to vector operands_.
- In consume_init_expr(), use parsed over hard-coded opcode length.
- Improve WasmStruct::WasmStructPrint slightly.
- Add Factory::NewWasmStruct().
- Add WasmValue::CopyToWithSystemEndianness.
- In wasm-module-builder.js, generalize emit_init_expr for expressions
  with operands. Add missing init. expression types.
- Add tests.

Bug: v8:7748
Change-Id: Ica12378d202730aff1b57c7d4240aa00ef124f8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2940893
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75006}
2021-06-08 08:57:07 +00:00
Zhao Jiazhong
cea8c2ca1b Revert "[sparkplug] Adjust compare and jump function in sparkplug"
This reverts commit febfbb21b9.

Reason for revert: Introduced new bugs:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64%20-%20debug/34472/overview

Original change's description:
> [sparkplug] Adjust compare and jump function in sparkplug
>
> Mips and risc-v do not have the flag register and can not decide
> whether to jump through flags in JumpIf();
>
> Therefor, we merge the comparison with the jump;
>
> Bug: v8:11803
>
> Change-Id: If53752da93b97e8ff65affdfe99e5de8e1a1493f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2921034
> Auto-Submit: Liu yu <liuyu@loongson.cn>
> Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75001}

Bug: v8:11803
Change-Id: Ic982564ccdef9a07bf3a5fb4745a11cfa178cc0e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2946818
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#75005}
2021-06-08 08:47:28 +00:00
Daniel Bevenius
ca05c5a2e5 Add TryGetCurrent() method to v8::Isolate
This commit adds a TryGetCurrent() method to the v8::Isolate class.

The motivation for adding this method this is that in Node.js we've run
into situations where we need to check if there is a current
Isolate and we are using GetCurrent() for this. The issue is that for a
debug build of Node.js, the debug check in GetCurrent() will cause a
failure.

The suggestion in this changeset is to allow getting the current
Isolate, or null if one does not exist, without any checks.

Change-Id: I01676e4bcdbe86da0496f5df1982d14eb1c9ebf8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2910630
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75004}
2021-06-08 08:11:17 +00:00
Liu Yu
693e86143b [mips][runtime] Rename Builtins::Name to Builtin 1/2
Some supplements on mips for 8ab75a56a2

Change-Id: Id0928e59b6a265f34a4ee986fa80e6b9dee0198c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2946812
Auto-Submit: Liu yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#75003}
2021-06-08 07:53:47 +00:00
Clemens Backes
83441dc29f [d8] Fix job execution on the predictable platform
Jobs were still being posted on the underlying default platform, which
caused concurrent execution. By directly returning a
{NewDefaultJobHandle} with a pointer to the {PredictablePlatform}, we
force execution of all posted tasks via that platform.

R=ahaas@chromium.org, cbruni@chromium.org

Bug: v8:11848
Change-Id: Ie10519583341b427776ca428f85641e96f821367
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944808
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75002}
2021-06-08 07:44:37 +00:00
Liu Yu
febfbb21b9 [sparkplug] Adjust compare and jump function in sparkplug
Mips and risc-v do not have the flag register and can not decide
whether to jump through flags in JumpIf();

Therefor, we merge the comparison with the jump;

Bug: v8:11803

Change-Id: If53752da93b97e8ff65affdfe99e5de8e1a1493f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2921034
Auto-Submit: Liu yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75001}
2021-06-08 07:22:47 +00:00
Michael Achenbach
6085ed8eb2 [build] Remove obsolete flag from fuzzilli bot
The flag had no effect and was removed from fuzzilli instructions here:
f31bfb7b5a

No-Try: true
Change-Id: If28e79fdf469a4cb665a83793c9fef8c6c2a8232
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944431
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75000}
2021-06-08 06:37:17 +00:00
v8-ci-autoroll-builder
91f9aa405b Update V8 DEPS.
Rolling v8/build: e353b02..8870cb4

Rolling v8/buildtools: eb65cc3..c793cca

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8bf7a0b..a8bae77

Rolling v8/third_party/depot_tools: a5b6b2f..b508ecd

Rolling v8/tools/clang: 30cbc5c..0c64e83

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: Ib0903c26326e045b1f2b1e2ac2f37dd3a883e6ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2946109
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#74999}
2021-06-08 03:44:07 +00:00
Camillo Bruni
f68e1be795 [sparkplug][x64] Reduce CallRecordWrite instructions
Directly use the correct registers for calling the RecordWrite stubs
in sparkplug. To keep changes to existing builtins minimal there are
certain register requirements which are now made explicit in
WriteBarrierDescriptor::Verify.


Bug: v8:11420
Change-Id: I3a0c500fbe26f82ee2243a61dbf574fd31656982
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2910313
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74998}
2021-06-07 21:29:55 +00:00
Michael Achenbach
0f4d1cecb7 [test] Bump shards for slow test step
Test262 with extra variants times out on several debug bots regularly:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20debug/37382
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20debug/35401
https://ci.chromium.org/p/v8/builders/try.triggered/v8_linux64_dbg_ng_triggered/b8845063257835477664

Bug: v8:11428
Change-Id: I749556be0e5dd5ce788ee66ba10e1431ebf47b93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944938
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74997}
2021-06-07 20:53:14 +00:00
Junliang Yan
d54ccebcc8 ppc: Unify Memory Operation 5
Change-Id: I363e9ecdcecacca34e87086506a9cc4ab8a19d91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944594
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74996}
2021-06-07 20:37:54 +00:00
Camillo Bruni
8ab75a56a2 [runtime] Rename Builtins::Name to Builtin 1/2
- Add new Builtin enum
- Move Builtins::Name:kXXX to Builtin::kXXX
- Update existing code

Follow CLs will unify the mix of using int builtin-ids and
Builtins::Name to only use the new Builtin enum and changing it to
an enum class.

Change-Id: Ib39aa45a25696acdf147f46392901b1e051deaa4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905592
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74995}
2021-06-07 20:05:44 +00:00
Igor Sheludko
1f5113816c [runtime] Fix handling of interceptors, pt.2
Bug: chromium:1216437
Change-Id: Ib8439aefc778beefed4dc40290473311cc23d5f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944937
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74994}
2021-06-07 19:20:34 +00:00
Chong Gu
13a5125212 [Fuchsia] Filter failing tests on Fuchsia
This will allow Fuchsia tests to be run on v8 CI

Bug: v8:11843, chromium:934932
Change-Id: I516329d8f29d9c94d46aa010fa729fa3ca0993ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2935024
Commit-Queue: Chong Gu <chonggu@google.com>
Auto-Submit: Chong Gu <chonggu@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74993}
2021-06-07 19:18:16 +00:00
Seth Brenith
82b673bcbc Fix counting ignition dispatches
The flag --trace-ignition-dispatches has been broken for a long time,
since it was not designed to work with bytecode handlers that are
generated ahead of time by mksnapshot. This splits the existing
--trace-ignition-dispatches logic into two separate parts:

1. A gn argument which instructs mksnapshot to include dispatch counting
   in the bytecode handlers, and ensures that the Interpreter allocates
   the array of counters, and
2. A runtime flag which enables the ignition-statistics extension which
   implements the JS-accessible function getIgnitionDispatchCounters().

Change-Id: I89323425697f5641451f67b9ddcc0303b8ca209f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2937564
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#74992}
2021-06-07 18:47:24 +00:00
Patrick Thier
4c5ac8e049 [ia32] Save used FP-regs before calling RecordWrite
xmm0 and xmm1 are used to save/restore values in asm builtins, but they
were not saved before calling RecordWrite, which calls C++ code.
Instead of passing SaveFPRegsMode::kSave to RecordWriteField, which
would save/restore all FP-regs, this CL explicitly saves/restores the
FP-regs we rely on beyond the C-Call.

Bug: chromium:1216295
Change-Id: Ifcc7ce4e8819303ffb79576a88304df2e3a6cc4c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944427
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74991}
2021-06-07 16:17:19 +00:00
Patrick Thier
03dade3ec2 [sparkplug] Fix NumFuzz issues with batch-compilation test
Add flag --lazy-feedback-allocation to prevent NumFuzz errors.

Bug: v8:11853
Change-Id: I5170ef9db374e168cf248b86dbed3c3e7c87f826
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944428
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74990}
2021-06-07 16:16:14 +00:00
Dominik Inführ
c2297cae36 [heap] Only main thread handles may reference left-trimmed objects
Left-trimming only works when there is a single reference to the
backing store from the JS object. Main thread handles are an exception
to this rule because it is not feasible to ensure that no such
leftover handles may store such stale pointers.

FixStaleLeftTrimmedHandlesVisitor clears such references
in main thread handles, such that the GC never tries to visit them. This
CL renames this class to ClearStaleLeftTrimmedHandlesVisitor to
emphasize that such slots are cleared rather than "fixed up" to point
to the new object start.

Previously ClearStaleLeftTrimmedHandlesVisitor was used for local
and persistent handles as well. Starting with this CL, stale references
to left-trimmed objects are only allowed in main thread handles.
https://crrev.com/c/2928502 enabled us to be more restrictive here.

Change-Id: If4db0630f1df2d6c3fe5f242bf866c57a8ae2969
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944807
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74989}
2021-06-07 16:05:24 +00:00
Igor Sheludko
f9857fdf74 [runtime] Fix handling of interceptors
Bug: chromium:1216437
Change-Id: Ic417583813ccef4d93b46d5b53af6dd0e6ba9840
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2940889
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74988}
2021-06-07 16:00:34 +00:00
Camillo Bruni
72eb1ca18d [tools][system-analyzer] Switch to SVG rendering + various improvements
- Introduce proper TickLogEntry and use a separate Timeline object
- Update the main rendering to use SVG for speed
- Separate custom-elements: timeline-track-map and timeline-track-tick
- Revamp flame-chart drawing
- Enable map-transitions overlay
- Use mouse position to infer current log-entry instead of individual
  event handlers
- Fix first timelineLegend column header
- Fixing scrollbar-color for FireFox

Change-Id: I7c53c13366b3e4614b1c5592dfaa69d0654a3b5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944430
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74987}
2021-06-07 15:44:30 +00:00
Marja Hölttä
b308c41a07 [ast] Fix de-duping "get 0 {}" and "0: ..." inside objects
This fix makes ObjectLiteral::CalculateEmitStore work correctly.

Bug: v8:11810
Change-Id: I60f3d5cb657f4b2ca574d5224c8f1cb7a8216354
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917040
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74986}
2021-06-07 15:43:24 +00:00
Camillo Bruni
4cb3c5cb27 [tools][profiler] Fix JsonProfile script url
Use new Script.prototype.update method to set the url and the script
source.

Bug: v8:11850
Change-Id: I555d4d0158cdacb7cb42efa385371454542fc2f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944438
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74985}
2021-06-07 15:02:14 +00:00
Santiago Aboy Solanes
a6207b54d0 [object] Make the interaction [String::Get()-access guard] explicit
We have recursive calls such ThinStrings where we go String::Get into
ThinString::Get into String::Get again for the internalized string. If
we need to, we would acquire the StringAccessGuard in the first
String::Get and it wouldn't be needed to be re-acquired for the second
String::Get. Trying to re-acquire it would in fact be an error since we
are already holding the lock.

The code, however, didn't know if we acquired it or not. It was working
correctly due to the way the methods were defined and called. By passing
down the access guard through the Get() calls we make this interaction
explicit.

Also add some thin string tests to test the interaction.

Bug: v8:7790
Change-Id: I1181edec1e802cb754c4d1d1ac268577257b92f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2936598
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74984}
2021-06-07 15:00:15 +00:00