Commit Graph

67724 Commits

Author SHA1 Message Date
Milad Fa
7dfe0d170c PPC [simd]: Implement min/max operations on Sim
Also renamed VECTOR_BIN_OP to VECTOR_ARITHMETIC_OP for clarity.

Change-Id: Icbe1cf9ac95f2c0b1cec364f50123a9fcb846f48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727644
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73132}
2021-03-02 17:05:43 +00:00
Nico Hartmann
0f8b5c5d2a Revert "[wasm][liftoff][eh] Implement catch_all"
This reverts commit 6e234e9d76.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20CFI/4795/overview

Original change's description:
> [wasm][liftoff][eh] Implement catch_all
>
> Inline a catch handler after each potentially throwing call. The handler
> just merges values into the actual catch environment and then jumps to
> the catch body.
>
> This automatically adds support for unwind, which also uses the
> "CatchAll" interface method.
>
> Many tests can be written either with "catch" or with "catch_all".
> Duplicate them to get coverage for both.
>
> R=​clemensb@chromium.org
>
> Bug: v8:11453
> Change-Id: I789ad44b8d1e496f026157d5c37a12004a8b37e3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726497
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73129}

Bug: v8:11453
Change-Id: Ica7fa708962d9ae4b9fbf7473963d187062227ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727266
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73131}
2021-03-02 16:59:26 +00:00
Toon Verwaest
8904bceeb0 [sparkplug] Adjust interrupt weight by current bytecode size
The interpreter always adjusts the current interrupt budget down by the
current bytecode size as well. This aligns the optimization heuristics.

Bug: v8:11420
Change-Id: I0cc78d004779b393a3d8fb46e44bdd7465fcf4ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726496
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73130}
2021-03-02 16:36:43 +00:00
Thibaud Michaud
6e234e9d76 [wasm][liftoff][eh] Implement catch_all
Inline a catch handler after each potentially throwing call. The handler
just merges values into the actual catch environment and then jumps to
the catch body.

This automatically adds support for unwind, which also uses the
"CatchAll" interface method.

Many tests can be written either with "catch" or with "catch_all".
Duplicate them to get coverage for both.

R=clemensb@chromium.org

Bug: v8:11453
Change-Id: I789ad44b8d1e496f026157d5c37a12004a8b37e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726497
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73129}
2021-03-02 16:25:23 +00:00
Camillo Bruni
1b11278eb0 [tools] Revamp callstats.html
- Fix diff coloring when a baseline is selected
- Cleanup UI and use dark-mode by default
- Reuse CSS from the system-analyzer
- Support loading mutliple files by default everywhere
- Use hideable panels from system-analyzer

Change-Id: Iafe271d2f86fbbd10a940b3ac99874dd51f45442
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2721763
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73128}
2021-03-02 14:49:02 +00:00
Camillo Bruni
757771f74a [factory] Dehandlify object initializers in factory
Clang cannot optimise across handle derefs and produces quite
inefficient code when setting multiple properties in a row.

We are already dealing with a lot of raw pointers in factory, thus
adding further DisallowGarbageCollection and will not significantly
increase the risk of stale pointers.

Bug: v8:11263
Change-Id: I2b62f79ecde95faa84a182c09d89c03423900d98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2581963
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73127}
2021-03-02 14:44:43 +00:00
Santiago Aboy Solanes
eb976c3ef9 [csa][cleanup] TNodify PrepareValueForWriteToTypedArray
Using templates seems like the best way to go. We are duplicating code
but seems like a fair trade-off.

Bug: v8:6949
Change-Id: I22b3d5e2e74bfc2bf46f95656782aae4944d72de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727816
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73126}
2021-03-02 13:33:02 +00:00
Dan Elphick
4db38b0c9e [build] Add v8_libbase dep to wasm_test_common
Dependency is needed as wasm-interpreter.cc uses base/overflowing-math.h
and base/safe_conversions.h.

Bug: v8:7330
Change-Id: I4515babf18723a34c89e63621f8aaa49252d3461
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727408
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73125}
2021-03-02 12:45:43 +00:00
Dan Elphick
20bbb356a4 [build] Add flag-utils headers to wasm_test_common
Adds test/common/flag-utils.h and test/common/wasm/flag-utils.h to
wasm_test_common to reduce the number of gn check errors by 4.

Bug: v8:7330
Change-Id: I94e11130c4b96972604cabbaa019617cb1f8f67a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727404
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73124}
2021-03-02 12:33:52 +00:00
Liu Yu
33ece42469 [mips64] Fix TestFastJSWasmCall_MultipleArgs failure
Add register t3 to ALLOCATABLE_GENERAL_REGISTERS,
and change kSpeculationPoisonRegister from a7 to t3.

Change-Id: I199c1b837d5fdd0b47f0865ac3146e47e4ddb68f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726050
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#73123}
2021-03-02 12:09:12 +00:00
Dan Elphick
9bfb7a123a [build] Add various missing dependencies
Adds cppgc_headers to v8_internal_headers and fuzzer_support to
lib_wasm_fuzzer_common in BUILD.gn as well as v8_libbase and
v8_libplatform to cctest_headers in test/cctest/BUILD.gn.

Bug: v8:7730
Change-Id: I9759bb0993be779ddfc26668b9e08503ea53bd69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727501
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73122}
2021-03-02 11:54:52 +00:00
Santiago Aboy Solanes
0378123215 [CSA][cleanup] TNodify CODE_ASSEMBLER_BINARY_OP macros
Bug: v8:6949
Change-Id: Ie8620ec5f3025cdf4f419c80db221d57698fd508
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726514
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73121}
2021-03-02 11:41:59 +00:00
Dan Elphick
64ca87d8f9 [build] Add cppgc_headers dep to v8_headers
To fix 6 gn check errors, this adds a cppgc_headers dep to v8_headers.
To resolve the resulting cycle, it also changes v8_libplatform to depend
on v8_config_headers since it only needs v8config.h.

Bug: v8:7330
Change-Id: I1e21271c84f2a80c248c584e8e107da99eaad5a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727500
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73120}
2021-03-02 10:01:19 +00:00
Benedikt Meurer
06359f7453 [debug] Don't put a source position on internal Returns.
Be explicit about source positions for `Return`s in the
BytecodeGenerator, and only do self-healing explicitly in the
`ReturnStatement` translation, where an end position of
`kNoSourcePosition` is turned into the return position of the
function literal.

This allows us to reason more easily about which `Return`s actually
receive a meaningful source position, and in particular it allows us
to construct the internal `Return`s for `yield` and `yield*` with no
source position attached to them. Previously they'd get the source
position for the implicit (final) return attached to it, which confused
the debugger and led to breakpoints being set in the completely wrong
spot.

Considering the simplified example

```
function* foo(){
  var a = 1;
}
```

this would previously generate the following bytecode

```
        0 : SwitchOnGeneratorState r0, [0], [1] { 0: @20 }
        4 : Mov <closure>, r2
        7 : Mov <this>, r3
 13 E> 10 : InvokeIntrinsic [_CreateJSGeneratorObject], r2-r3
       14 : Star0
 13 E> 15 : SuspendGenerator r0, r0-r1, [0]
       20 : ResumeGenerator r0, r0-r1
       24 : Star2
       25 : InvokeIntrinsic [_GeneratorGetResumeMode], r0-r0
       29 : SwitchOnSmiNoFeedback [1], [2], [0] { 0: @39, 1: @36 }
       33 : Ldar r2
 13 E> 35 : Throw
       36 : Ldar r2
 30 S> 38 : Return    <=========================== internal Return
 27 S> 39 : LdaSmi [1]
       41 : Star1
       42 : LdaUndefined
 30 S> 43 : Return
```

where everything between offset 4 and 42 corresponds to the implicit
yield at the beginning of every generator function, in particular the
code between 20 and 42 corresponds to that initial yields resumption
logic. Notice how the internal Return at offset 38 gets assigned the
source position of the function literal (the same as the implicit
return at the end). This confuses the debugger quite a bit when trying
to set a breakpoint on the closing brace, since it's going in bytecode
order and will thus discover the `Return` at offset 38 first (matching
the source position 30 it's currently looking for) and setting the
breakpoint there. This `Return` bytecode however is only executed when
the generator is resumed via `GeneratorPrototype.return()`, and it'll
not hit when the developer uses the generator normally, which is not
the desired behavior and extremely confusing (especially since stepping
on the other hand works as expected).

With this patch, we no longer slap a source position (and in particular
not the function literal's return position) onto these internal
`Return`s as you can see from the generated bytecode below:

```
       0 : SwitchOnGeneratorState r0, [0], [1] { 0: @20 }
       4 : Mov <closure>, r2
       7 : Mov <this>, r3
13 E> 10 : InvokeIntrinsic [_CreateJSGeneratorObject], r2-r3
      14 : Star0
13 E> 15 : SuspendGenerator r0, r0-r1, [0]
      20 : ResumeGenerator r0, r0-r1
      24 : Star2
      25 : InvokeIntrinsic [_GeneratorGetResumeMode], r0-r0
      29 : SwitchOnSmiNoFeedback [1], [2], [0] { 0: @39, 1: @36 }
      33 : Ldar r2
13 E> 35 : Throw
      36 : Ldar r2
      38 : Return
27 S> 39 : LdaSmi [1]
      41 : Star1
      42 : LdaUndefined
30 S> 43 : Return
```

This also allows us to remove the break position finding hack that was
kept in BreakIterator::BreakIndexFromPosition() for generators and
modules.

Fixed: chromium:901819
Change-Id: If19a6b26e2622d49b6b5e54bf7a162747543f970
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727820
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73119}
2021-03-02 08:42:10 +00:00
Dan Elphick
be5ccde28a [build] Split out EmbeddedFileWriterInterface
To reduce gn check errors, this moves EmbeddedFileWriterInterface into
its own header file that can be included directly by isolate.cc since
embedded-file-writer.h is in the mksnapshot target.

Bug: v8:7330
Change-Id: I3bfb1f48c646680b71189e8229b8df54ead9eea0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727817
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73118}
2021-03-02 08:20:59 +00:00
Dan Elphick
179ee5f250 [build] Move wasm constants files into v8_shared_internal_headers
Moves src/wasm/wasm-constants.h and src/wasm/wasm-limits.h into
v8_shared_internal_headers so v8_flags can access them.

Bug: v8:7330
Change-Id: I322ac483d26a03fd79e9961678462227a89e594b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727498
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73117}
2021-03-02 07:58:39 +00:00
v8-ci-autoroll-builder
547c37f542 Update V8 DEPS.
Rolling v8/build: 06d89c7..a1f3c3d

Rolling v8/buildtools/third_party/libunwind/trunk: 8d5fb6f..201ff85

Rolling v8/third_party/aemu-linux-x64: 12utHdzpAJMv14HvzgxQA19OLkI0UrGervsCs46ESbIC..gUyZgCT7R0DTHyu0Lq1Q7yrbbA9cage7ltjq_oN3mXkC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/df7850d..cae643a

Rolling v8/third_party/depot_tools: e952fae..6ac4a15

TBR=v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ic0e83640067bc37ed7b5ec5d35c6118e5e649e72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2728641
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@{#73116}
2021-03-02 03:59:28 +00:00
Frank Tang
13ac253ac7 Revert "[test] Disable tests failing with new msan roll"
This reverts commit 57ae048bd2.

Reason for revert: bug fixed in https://chromium-review.googlesource.com/c/v8/v8/+/2706353

Original change's description:
> [test] Disable tests failing with new msan roll
>
> Temporarily disable these tests failing on msan builds after latest
> roll:
> - test262/intl402/DateTimeFormat/timezone-invalid
> - intl/regress-364374
> - mjsunit/regress/regress-crbug-627935
>
> No-Try: true
> No-Tree-Checks: true
> Bug: v8:11438
> Change-Id: I4a7755f9f65b2e9a12463c9e12fbbe39d3f5efb2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692188
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72691}

Bug: v8:11438
Change-Id: Iaca0a401a2c6d89e1bc8292ad41ae0086943c635
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2724862
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73115}
2021-03-02 00:00:03 +00:00
Shu-yu Guo
9c5e0cd832 [x64] Remove dead code related to safepoint registers
Change-Id: I33999e33793662aad741d336018f3a099af17fec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2728239
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73114}
2021-03-01 23:14:03 +00:00
Ng Zhi An
40790bfa44 [ia32] Remove unused Psrlw macro-assembler instruction
Bug: v8:11384
Change-Id: I51ac29ed041bc0491c9c45ca1416d69639d9338e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720018
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73113}
2021-03-01 22:46:28 +00:00
Dan Elphick
725c839c4e [build] Fix cppgc_headers deps
Add conditional include of caged-heap-local-data.h and v8_libplatform
dep.

Bug: v8:7730
Change-Id: Ic9dcb919a94e96fbdeb586e20de9fe17ff4d0ce1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727499
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73112}
2021-03-01 22:45:23 +00:00
Ng Zhi An
39f9936c15 [wasm-simd][ia32] Fix ext add codegen
The main problem here is that the macro-assembler for Pmaddubsw and
Pmaddwd expects dst == src1 when AVX is not supported.

For Pmaddwd, we use an existing macro to define the function.

For Pmaddubsw, we do the AVX check inline and use movaps if not
supported because it requires a SSSE3 scope, and we don't have an
existing macro to do this (we can find other uses and clean up as
necessary in the future).

Bug: v8:11086
Change-Id: I97bd29cd93456744414d28e5f1ffcbc875c3ab22
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2716740
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73111}
2021-03-01 21:14:53 +00:00
Dan Elphick
fcf29e4815 [build] Split out v8_flags target
Moves flags/flags.h and flags/flag-definitions.h out of
v8_internal_headers into a new v8_flags target that can be included by
torque_base to resolve a gn check error.

Bug: v8:7330
Change-Id: I08e3a4475cc4f455077995ddff8683266ed51cd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727819
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73110}
2021-03-01 21:10:53 +00:00
Milad Fa
c687bee8f3 PPC [simd]: Implement vector binary ops on Sim
Change-Id: I8f9f2e291e943a0a63cb78a033b44e6c4a7889f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727822
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73109}
2021-03-01 20:57:33 +00:00
Dan Elphick
cff5e69696 [build] Remove the separate v8_libsampler build target
v8_libsampler was previously split off to serve goals that were never
achieved and seem unlikely to be. Since the division creates a
dependency cycle between v8_base_without_compiler and v8_libsampler
(where one edge is a #include that breaks gn check), this moves
sampler.* back into v8_base_without_compiler and removes the
v8_libsampler target.

Bug: v8:7330
Change-Id: Ied87b68927a372ec084cd650b278af98d7db5f8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727818
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73108}
2021-03-01 20:53:33 +00:00
Junliang Yan
d9f3d4290e s390x: [liftoff] implement emit_type_conversion
Change-Id: Ia9935d84edc020196f0b728c2852499d62fffeca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727657
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73107}
2021-03-01 18:44:13 +00:00
Milad Fa
dd268b4a3e PPC/s390: [wasm-simd] Remove signselect
Port 7c78ad8026

Original Commit Message:

    These were prototyped and not merged into the SIMD proposal.

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

Change-Id: Ic6f604891908d0b4f1554951a57ef45e6e7d285e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727655
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73106}
2021-03-01 16:51:13 +00:00
Michael Lippautz
c546b42e29 cppgc: Fixes for GCs on detached heaps
Bug: chromium:1056170
Change-Id: I2744bbb615e417d9658cd2160220cf097b38b698
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726509
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73105}
2021-03-01 16:35:52 +00:00
Dan Elphick
00abcea4af [build] Create v8_internal_headers target
Split out all the headers from v8_compiler/v8_compiler_opt and
v8_base_without_compiler into v8_internal_headers since the headers
have inter-dependencies that otherwise make it impossible to satisfy gn
check.

Also adds new v8_header_set torque_runtime_support that exports
src/torque/runtime-support.h separately from the generated headers.

This reduces the number of gn check failures from 169 to 59.

Bug: v8:7330
Change-Id: Ie7ebc894910b7efa02011a74da964e11995c7f4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712569
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73104}
2021-03-01 16:30:22 +00:00
Santiago Aboy Solanes
8e8c727ae2 [string] Add tests for uncached strings with cacheable resources
Add tests for internal external uncached strings with cacheable
resources, for the cached_data functionality added in
https://chromium-review.googlesource.com/c/v8/v8/+/2710440.

Bug: v8:7790, v8:11463
Change-Id: I679c50995d315cc4289452a00838b3cafa4c93e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715187
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73103}
2021-03-01 15:59:43 +00:00
Manos Koukoutos
475d47d703 [wasm][bug] Use correct maximum size for loop unrolling
Bug: v8:11298
Change-Id: I064cfda6744f01099f70aab37cfd620afaff1262
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726505
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73102}
2021-03-01 15:57:32 +00:00
Santiago Aboy Solanes
19e796ccff [cleanup][csa] Remove UntypedParameter outside of tests
Using Parameter has some crashes on arm64. The other Parameters are
also using UncheckedParameter so let's use that.

Bug: v8:6949
Change-Id: Ia802b4edd6d57fb87de5c58415e9569b4824fc6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2470566
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73101}
2021-03-01 15:29:32 +00:00
Clemens Backes
0be822b47e [api][no-wasm] Disable Webassembly in the API
This CL removes the includes of src/wasm files from the API if Wasm is
disabled (v8_enable_webassembly=false). This will allow to later
remove the whole src/wasm directory from compilation.
Since we do not want to modify the exposed API in a no-wasm build, we
instead make all Wasm-related functions fail.

R=ulan@chromium.org

Bug: v8:11238
Change-Id: I61038e75ac62871758351eb01f299fe68d478c82
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726504
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73100}
2021-03-01 15:24:52 +00:00
Frank Emrich
342f66210a [dict-proto] C++ implementation of SwissNameDictionary, pt. 7
This CL is part of a series that adds the C++ implementation of
SwissNameDictionary, a deterministic property backing store based on
Swiss Tables.

This CL adds an in-place version of Rehash and a small change to
HeapObject::HeapObjectShortPrint.

Bug: v8:11388
Change-Id: I578ef8f5638a6201111602ffef7f2d4a5a257bcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720305
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Frank Emrich <emrich@google.com>
Cr-Commit-Position: refs/heads/master@{#73099}
2021-03-01 14:29:42 +00:00
Mike Stanton
ea5ba5dbb0 [TurboFan] Code object needs some relaxed load/stores
We got a TSAN
warning because of the non-atomic store of the code pointer in
a JSFunction in the interpreter builtin (when the pointer is
discovered in the FeedbackVector). However, we know this store is
safe because we guarantee a release store into the
FeedbackVector. However, TSAN can't recognize this interesting
triple relation. Therefore, we mark the fields we need to read
from TurboFan as relaxed.

Bug: v8:11501, v8:7790
Change-Id: I20652216294db540bf9c20e5067a6362fea07dc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2721762
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73098}
2021-03-01 13:14:32 +00:00
Dominik Inführ
2ea823550d [heap] Add flag to crash when evacuation aborts
Add a flag that crashes the process instead of gracefully handling the
abortion of evacuation. The goal of this CL is to check whether we could
get away with simply reporting OOM instead of handling this case.

Change-Id: I6a561ed007c76a111cfb85c454f7f025f07ab9cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2724272
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73097}
2021-03-01 12:56:02 +00:00
Santiago Aboy Solanes
21f09a7522 [compiler] Move String and Name to kNeverSerialized
Bug: v8:7790
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_no_cm_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Change-Id: I950ffddcf135ede1af8a2409461868d458eac3c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726498
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73096}
2021-03-01 12:42:22 +00:00
Manos Koukoutos
bf43d2062b [wasm][turbofan] Exit loop exploration early if loop is too large
During loop exploration implemented for wasm loop unrolling, we can exit
early if we already know that the loop is too large to unroll.

Bug: v8:11298
Change-Id: I213edef995b58500d07d428f1f1a725132dd44e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726501
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73095}
2021-03-01 12:06:43 +00:00
Mythri A
0ebbcb1622 [turbofan] Frame size computation should include additional arguments
For adding stack checks in optimized code, we compute a conservative
estimate of the frame size in the case of a deoptimization. Earlier we
included the size of arguments adaptor frames used when actual arguments
didn't match formal parameter count. Though we don't have an explicit
adaptor frame, we should still include the size of these additional
arguments when computing the frame size.

Bug: chromium:1181240
Change-Id: Ib977c5492bb824762fe62aac5e4ffb1c2c233b86
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2723252
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73094}
2021-03-01 12:00:42 +00:00
Toon Verwaest
506aeae95d [heap] Allocate code close to the binary
Calls >4gb may have pretty bad performance on 64bit processors that use
32bits to encode branch prediction. By passing in a function in the
binary as a hint to mmap it's more likely we'll be given an address
close to the binary. This may significantly improve performance on many
types of 64bit cores, especially those without hyperthreading.

Change-Id: Ia1f712a3a029e10cb0c6a0d1e2c4919bbb2854f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726500
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73093}
2021-03-01 11:18:52 +00:00
Omer Katz
5defb206ff cppgc: Object sizes for cpp objects in heap snapshot
This CL sets it so that the actual object size is reported only when
cppgc_enable_object_names is set to true. Otherwise the heap snapshot
merges nodes and the sizes don't make sense.

Also, this will resolve a web test failure for the library.

Bug: chromium:1056170
Change-Id: I32f6552560bdfad4b64c67b21292543978042a81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726499
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73092}
2021-03-01 11:10:12 +00:00
Igor Sheludko
0cbb6b7ca4 [sparkplug] Remove redundant optimization marker check
Bug: v8:11420,v8:11429
Change-Id: Ic08a1277b08a3de1ad1124dcedaeaf2fbd313c25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726495
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73091}
2021-03-01 09:34:42 +00:00
Camillo Bruni
ce4baffcf2 [API] More Utils::ApiCheck instead of CHECK in api.cc
Utils::ApiCheck has better usability and error messages in release mode.

Bug: v8:11195
Change-Id: I80a31823df03b7581af2e6e8e4a52f6e39100c6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2721770
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73090}
2021-03-01 09:20:02 +00:00
Dominik Inführ
17cba4f0f0 [heap] Safepointing with an atomic state
To improve performance of parking, keep the thread state in an atomic
variable instead of protecting it with a mutex.

However the mutex was used e.g. to force Unpark() to block while the
safepoint operation was still running. Therefore the safepoint algorithm
has to change as well.

Park() and Unpark() use CAS operation to transition the state.
Safepoint() uses a relaxed load for checking whether a safepoint was
requested. Since Safepoint(), Park() and Unpark() all have a slow path,
there is no need for busy-waiting on the main thread.

We need two more ThreadStates:
* SafepointRequested: This state is set by GlobalSafepoint to force
    Running threads into the slow path on Safepoint() and Park(). This
    state also replaces the separate atomic<bool> safepoint_requested_
    field we used before.
* ParkedSafepoint: This state is set by GlobalSafepoint as well to force
    parked threads into the slow path on Unpark().

When stopping all threads, GlobalSafepoint transitions states from
Running --> SafepointRequested and Parked --> ParkedSafepoint to force
the slow path for all three methods. After performing the transition
for each thread we know the exact number of Running threads and wait
until each of them either reached a safepoint or parked itself.

Design doc: https://docs.google.com/document/d/1p9klWyqT_AScAnK_PdHZTcNhZGzoBiYWPkUciIh2C58/edit?usp=sharing

Bug: chromium:1177144, v8:10315
Change-Id: I8697da915c7d18e2fb941f1bedf6181226408feb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2704075
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73089}
2021-03-01 08:41:12 +00:00
Liu Yu
19741114bf [mips][wasm] Avoid duplicating parameter lists
Port: 679af80e75

Bug: v8:11377
Change-Id: I65902d260f72a33e816dfec6f6435e55d2fbd306
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2725673
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#73088}
2021-03-01 07:53:00 +00:00
v8-ci-autoroll-builder
acddd72a86 Update V8 DEPS.
Rolling v8/build: e28b4b7..06d89c7

Rolling v8/third_party/aemu-linux-x64: ftKmphEHEwMJc1_tTOsvx50Hd3J_GRNUTxp59ts3NjoC..12utHdzpAJMv14HvzgxQA19OLkI0UrGervsCs46ESbIC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6236096..df7850d

Rolling v8/third_party/depot_tools: 8a2e6a7..e952fae

TBR=v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ia0bc8dfd0e53ae425022e383922fa9e56f11bf7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726137
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@{#73087}
2021-03-01 03:48:30 +00:00
Paolo Severini
da491ec4e8 [compiler] Enable inlining of JS-to-Wasm calls inside try/catch
Fixes a problem with the inlining of JS-to-Wasm call wrappers into a
surrounding exception handler and re-enables this case.

Bug: v8:11092
Change-Id: I4937838c2b4a199e21f5ac90bee5b8e8de2470be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2678341
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73086}
2021-02-28 09:49:40 +00:00
Liu Yu
9c14b8dc6f [mips][wasm] Rename more "type" to "kind"
Port: 52cc7ba9bc

Bug: v8:11477
Change-Id: Ic4d518ae85b80077963b5034a3ac63c3bd2f152a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2725672
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#73085}
2021-02-27 08:35:39 +00:00
v8-ci-autoroll-builder
5dce53b24a Update V8 DEPS.
Rolling v8/build: be2a0bf..e28b4b7

Rolling v8/buildtools: fd1ca3e..aa09fa7

Rolling v8/buildtools/third_party/libc++abi/trunk: 5fb4080..6918862

Rolling v8/third_party/aemu-linux-x64: 8c4TvsC0hrCVIdsAVOIoQ3TnOJ3PX5iVaUqg4iQkJP4C..ftKmphEHEwMJc1_tTOsvx50Hd3J_GRNUTxp59ts3NjoC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/9105610..6236096

Rolling v8/third_party/depot_tools: 7d69005..8a2e6a7

TBR=v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: If0bff6987bed992c9732c054200a4b5f41eddd1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2724864
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@{#73084}
2021-02-27 03:58:29 +00:00
Deepti Gandluri
9960f69ffd Stop inlining the SupportsWasmSimd128 function
Change-Id: Id9b69f960887f55d26842ecad57c43367c7ddfcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2704951
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73083}
2021-02-26 23:55:04 +00:00