Commit Graph

76716 Commits

Author SHA1 Message Date
Al Muthanna Athamina
e6bcabd10c Revert "Reland "[infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off""
This reverts commit fe327545e3.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20stress-incremental-marking/8615/overview

Original change's description:
> Reland "[infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off"
>
> This is a reland of commit 2055c3b482
>
> Original change's description:
> > [infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off
> >
> > Bug: v8:13058
> > Change-Id: If9d500f46f02ed3588d2b0e3904567c61aaddd12
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810184
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#82213}
>
> Bug: v8:13058
> Change-Id: I315fd1cd5c36464b1a15c635c8f31825769c3eb0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812042
> Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82221}

Bug: v8:13058
Change-Id: Icb621fac3758384e0b04520585f5c998563c1f6f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811289
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82224}
2022-08-05 13:28:58 +00:00
Al Muthanna Athamina
96da5b007f [infra] Add "no" to pointer compression naming convention
Bug: v8:13058
Change-Id: I2a90e3ef4f4b455d6ece47a809defc975f09e1bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810351
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82223}
2022-08-05 12:17:43 +00:00
Al Muthanna Athamina
298aed175a [infra] Add MinorMC builders
Bug: v8:13145
Change-Id: Ie507d3db4ac1d6096ddb12e7d2d8895e18886642
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810182
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82222}
2022-08-05 12:16:34 +00:00
Al Muthanna Athamina
fe327545e3 Reland "[infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off"
This is a reland of commit 2055c3b482

Original change's description:
> [infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off
>
> Bug: v8:13058
> Change-Id: If9d500f46f02ed3588d2b0e3904567c61aaddd12
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810184
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82213}

Bug: v8:13058
Change-Id: I315fd1cd5c36464b1a15c635c8f31825769c3eb0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812042
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82221}
2022-08-05 11:47:24 +00:00
JialuZhang-intel
6e692296ba [tools] fix deopt func count error in profview.
The "Deoptimized function count" displayed in profview tool
should be the sum of deopt-eager, deopt-lazy and deopt-soft.

Change-Id: I42252930c3685f1ca721691f983abb8adeb492e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793469
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Jialu Zhang <jialu.zhang@intel.com>
Cr-Commit-Position: refs/heads/main@{#82220}
2022-08-05 11:05:04 +00:00
Leszek Swirski
dd255c0c49 [maglev] Add support for Symbol feedback on equality
Introduces a CheckSymbol to guard a reference equality for values in an
equality comparison with Symbol feedback.

Bug: v8:7700
Change-Id: Ieb012b292f2d955faf76e485e6636a2d293fa007
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811500
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82219}
2022-08-05 10:59:43 +00:00
Andreas Haas
2b50e9cee9 [wasm][lazy] Avoid validation in case of a prefix_cache_hit
If the same WebAssembly module gets compiled multiple times, the
compilation result of the first compilation gets reused for later
compilations. With streaming compilation functions get compiled before
the whole module got downloaded, so it cannot be determined if the
currently compiled module has already been compiled or not. Therefore,
to check if the WebAssembly module has already been compiled, we compare
if the hash of the header section matches the hash of any of the already
compiled modules. If so, no function gets compiled until all bytes were
received. Then a full module check can be done, and either an existing
module can be reused, or the whole module gets compiled.

While compilation is avoided after a prefix_cache_hit, decoding still has
to happen. In the existing implementation, validation for lazy
compilation also happened in addition to decoding. This lead to the
problem that validation of lazy compilation could post a foreground task
when an error was detected, and later another foreground task got posted
when all bytes were received to do the full module check. Having two
foreground tasks at the same time violates an invariant in the
AsyncCompileJob.

With this CL we avoid the initial function validation after a
prefix_cache_hit to avoid the task for the error handling. Validation
will anyways happen again if the full module check fails later, or
validation is unnecessary if the full module check succeeds, as the
module has already been validated before.

R=clemensb@chromium.org

Bug: v8:13147, v8:12852
Change-Id: Iae24c056057f3a5dfd2f61accd1f9f0d35412996
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812038
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82218}
2022-08-05 10:45:36 +00:00
Yoshisato Yanagisawa
ec12d3d585 Fix: Experimental_IsNopFunction should not compile twice.
In the previous CL
(https://chromium-review.googlesource.com/c/v8/v8/+/3778969), we
executed i::Compiler::Compile regardless of the function has been
compiled or not.  That caused DCHECK failures in the Compile function,
which allows to compile only once.

Bug: chromium:1347319
Change-Id: I240591cbec46dc4fac4028a80a8ba5ab2f05c450
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3806929
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82217}
2022-08-05 10:15:43 +00:00
Simon Zünd
5242128f7a [debug] Fix crash in debug scope search
This CL fixes a crash when we build the scope chain after re-parsing
for Debugger.evaluateOnCallFrame.

The following script causes the crash:

class A {
  test(){
    debugger;
  }
  f = (x) => {}
}
let a = new A()
a.test()

The current scope search tries to be smart and descends deeper
into the scope tree based on source position. That is not a sound
approach as V8 doesn't guarantee that sibling scopes don't overlap.

In the above case V8 creates an instance initializer scope where
f is assigned (and the initializer scope is the parent scope for
the arrow function). The problem is that the initializer scope
uses the same source range as the class `A` itself, so when we
look for the scope for `test`, we descend wrongly into the
initializer scope and can't recover.

The solution is to not try and be too smart:
  - First, find the closure scope with a straight-up DFS.
  - Once we have that, descend from there and try to find the
    closest fitting scope around the break position.

R=bmeurer@chromium.org, jarin@chromium.org

Bug: chromium:1348186
Change-Id: Ic5e20c4d12b3d768f76a17367dc0f87bcc73763b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807594
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82216}
2022-08-05 09:53:54 +00:00
Nico Hartmann
9179ea3ca1 Revert "[infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off"
This reverts commit 2055c3b482.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20-%20release%20builder/29801/overview

Original change's description:
> [infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off
>
> Bug: v8:13058
> Change-Id: If9d500f46f02ed3588d2b0e3904567c61aaddd12
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810184
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82213}

Bug: v8:13058
Change-Id: I63b86420d12fb4bf0333e9e52b17763c9d80afce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811498
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82215}
2022-08-05 08:45:13 +00:00
wenqin.yang
9cb95a0e6b [interpreter] equivalence_id_ field type change
There are a same name field equivalence_id_ in both
BytecodeRegisterOptimizer and RegisterInfo, but one of them is int,
another one is uint32_t, it's better to change them as same type
to avoid addtional or potential type casting.

Change-Id: I509f850d82a9a0fc30168fae83a0bd6565b7000e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811138
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Wenqin Yang <wenqin.yang@intel.com>
Cr-Commit-Position: refs/heads/main@{#82214}
2022-08-05 08:39:13 +00:00
Al Muthanna Athamina
2055c3b482 [infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off
Bug: v8:13058
Change-Id: If9d500f46f02ed3588d2b0e3904567c61aaddd12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810184
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82213}
2022-08-05 08:19:04 +00:00
Dominik Inführ
9f9eacee62 [heap] Remove revisiting logic in the main thread marker
Factory::CopyCode was using ProcessBlackAllocatedObject and
WriteBarrierForCode(Code) to handle write barriers for that newly
created code object. But even when used in tandem with each other they
would miss OLD_TO_NEW references in the code object header.

This CL simplifies Factory::CopyCode by letting
WriteBarrierForCode(Code) handle all outgoing pointers of that code
object (not just a subset of RelocInfos) by implementing an
ObjectVisitor. This removes the need for ProcessBlackAllocatedObject.

Since Factory::CopyCode was the only user of
ProcessBlackAllocatedObject, we can also remove all the object
revisiting logic in the main thread marker.

Bug: v8:11708
Change-Id: I7d9b12eb0a76ba41a38efc147f44556ddc941a96
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810186
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82212}
2022-08-05 08:13:34 +00:00
v8-ci-autoroll-builder
87be6e594e Update V8 DEPS (trusted-origins)
Rolling v8/base/trace_event/common: d115b03..2ba7a48

Rolling v8/build: 0ad6539..664331e

Rolling v8/tools/clang: ba74bc7..5a9c565

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

Change-Id: I9110def860f4ac6e6bebc3dea81e24254498d3a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812269
Bot-Commit: 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/main@{#82211}
2022-08-05 04:52:53 +00:00
Hao Xu
1e98dd917e [compiler] Improve reduction of Word64Comparisons
Add "k <= (x >> n) to (k << n) <= x" reduction to Word64Comparisons.
This can help to reduce the below codes:

  45: Int64Constant[164]
  39: Load[kRepTaggedSigned|kTypeInt32](...)
  40: BitcastTaggedToWordForTagAndSmiBits(39)
  41: TruncateInt64ToInt32(40)
  42: ChangeInt32ToInt64(41)
  43: Word64Sar[ShiftOutZeros](42, 29)
  46: Uint64LessThan(45, 43)

into:

  4530: Int32Constant[328]
  39: Load[kRepTaggedSigned|kTypeInt32](...)
  40: BitcastTaggedToWordForTagAndSmiBits(39)
  41: TruncateInt64ToInt32(40)
  46: Uint32LessThan(4530, 41)

Change-Id: I6ca802c9bb3c941c689ebbcb4ae3072501555266
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793464
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82210}
2022-08-05 01:51:33 +00:00
Milad Fa
ecdde64cff PPC/s390: [heap] Improve verification for code write barrier
Port dc2d69d815

Original Commit Message:

    Pass WriteBarrierMode to the code object write barrier and DCHECK WriteBarrier::IsRequired when using SKIP_WRITE_BARRIER.

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

Change-Id: I356379e0d682e855d1c43f35a7a0d06734f8408b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812036
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Cr-Commit-Position: refs/heads/main@{#82209}
2022-08-04 21:51:23 +00:00
Dominik Inführ
f206986718 [codegen] Invoke full code writer barrier in set_target_address
While it is not required to invoke the full barrier in this case, we
can invoke the full write barrier which improves verification but also
makes the code easier to understand by relying less on GC
implementation details.

Bug: v8:11708
Change-Id: I4d2f6640bc0efb5b763ccd5ca99e573421be3a06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807592
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82208}
2022-08-04 20:17:33 +00:00
Andreas Haas
78ec12e928 [wasm] Fix test condition in test-wasm-metrics.cc for lazy compilation
R=ecmziegler@chromium.org

Bug: v8:12852
Change-Id: I69fc153aefa9711fce22a1330b9d24910a467b3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3809812
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82207}
2022-08-04 19:46:44 +00:00
Camillo Bruni
53c3e10482 [tools] Fix parse-processor
- Update parse processor to use new async log-reader functions
- Fix some typos
- Add more desciptions to the output
- Update bytes and time formatting to use common helper.mjs functions

Bug: v8:13146
Change-Id: Idf58a394aa493b7f50ad5282533c1b6d326117be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810233
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82206}
2022-08-04 19:00:33 +00:00
Nikolaos Papaspyrou
a44803dce6 [heap] Fix bug in efficiency and collection rate metrics
When calculating the GC collection rate, we assume that the start object
size (before GC) is non zero. It appears that this is not always the
case, not only because of tests that explicitly trigger GC, but also in
Chrome, when the --gc-interval flag is used with a small interval value.

Furthermore, efficiency calculation (freed bytes over GC duration)
assumes that the duration of the GC is non zero. However, if the clock
resolution is not small enough and the entire GC is very short, the
timed value appears to be zero. This again leads to NaN values showing
in metrics and CHECKs failing and has already been fixed for Oilpan
(crrev.com/c/3723499).

This CL fixes these two issues.

Change-Id: I902b2e9740d9750a2b6463a00289625500c4c0d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810393
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82205}
2022-08-04 18:13:23 +00:00
Victor Gomes
2d5edc661c [maglev] Support ForIn
It introduces GetSecondReturnedValue node, which must be added
immediately after a node that calls a builtin that expects 2
returned values.

It simply binds kReturnRegister1 to a value node. Since the previous
node must have been a builtin call, kReturnRegister1 is free in
the register allocator. No gap moves will be emitted between these
two nodes.

Bug: v8:7700
Change-Id: Iddd81ef534a6397bad5682fa1430a94d2075b746
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810183
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82204}
2022-08-04 18:11:23 +00:00
Leszek Swirski
a52e552791 [maglev] Use scratch reg for parallel move cycle break where possible
Resolve the TODO to avoid the push/pop of the cycle break temporary
value, by keeping track of whether the scratch register currently holds
the temporary value and spill it if the register is needed for stack
slot moves instead.

Bug: v8:7700
Change-Id: If4119e63312bdc2b89987f92328ae646a46543ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810185
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82203}
2022-08-04 14:13:54 +00:00
Leszek Swirski
18710f8550 [maglev] Add --maglev to numfuzz
Bug: v8:7700
Change-Id: I17f0df4e8ddf835af8231c5e06a6ecc416b3bc97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810181
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82202}
2022-08-04 13:32:16 +00:00
Dominik Inführ
dc2d69d815 [heap] Improve verification for code write barrier
Pass WriteBarrierMode to the code object write barrier and DCHECK WriteBarrier::IsRequired when using SKIP_WRITE_BARRIER.

Bug: v8:11708
Change-Id: I457d0fa07e830d6831fb95a4ae9311f6066215e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810171
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82201}
2022-08-04 13:23:43 +00:00
Clemens Backes
368b1e2fde [foozzie] Limit wasm memory size
Memory limits are difference on 32-bit and 64-bit systems, so foozzie
finds differences in Wasm execution.
This can be avoided by always setting the same (lower) limit.

R=machenbach@chromium.org

Bug: chromium:1348335
Change-Id: I452d257fd78730b4113bfe67120dbed2e8ba5878
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804696
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82200}
2022-08-04 13:11:53 +00:00
Milad Fa
17ee577c80 S390: pass a scratch register when using register_location
Change-Id: Ie78370bd2fb99df62a195da1d0070fd4da8d879a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807853
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#82199}
2022-08-04 13:00:22 +00:00
Lu Yahan
942a67ca01 Reland "[riscv32] Add RISCV32 backend"
This is a reland of commit 491de34bcc

co-authors: Ji Qiu <qiuji@iscas.ac.cn>
            Alvise De Faveri Tron <elvisilde@gmail.com>
            Usman Zain <uszain@gmail.com>
            Zheng Quan <vitalyankh@gmail.com>

Original change's description:
> [riscv32] Add RISCV32 backend
>
> This very large changeset adds support for RISCV32.
>
> Bug: v8:13025
> Change-Id: Ieacc857131e6620f0fcfd7daa88a0f8d77056aa9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736732
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
> Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82053}

Bug: v8:13025
Change-Id: I220fae4b8e2679bdc111724e08817b079b373bd5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807124
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82198}
2022-08-04 12:47:44 +00:00
Omer Katz
7c64e5b43b [heap] Remove MinorMC variant from bots
As part of revising MinorMC, it would soon be broken and bots should
not be red because of it.

Bug: v8:12612
Change-Id: I0551d0a115ac2f4fa7fc32190458850f80b84cf5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810353
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82197}
2022-08-04 12:36:22 +00:00
Peter Kasting
fc57686544 VirtualRegisterData must be fully defined before it's used.
Fixes a C++20 build break.

Bug: chromium:1284275
Change-Id: I67ee8c94a4ecd0d53101a643ff37c1d1ce0bd512
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3803132
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82196}
2022-08-04 11:52:34 +00:00
Victor Gomes
1fce10002c [maglev] Support BranchIfJSReceiver
Bug: v8:7700
Change-Id: I4cb5636acd38319f13d91cbad7d04486346ba74d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3805882
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82195}
2022-08-04 10:13:08 +00:00
Victor Gomes
b6f01045ad [bazel] Silent zlib warning '-Wdeprecated-non-prototype'
Change-Id: Ic4266909eef21398377372a18b004e2ba37567e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810192
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82194}
2022-08-04 10:12:05 +00:00
Al Muthanna Athamina
28a306f901 [infra] Add GC stress builders for Linux 64
Bug: v8:13116
Change-Id: I76b5e7dfa5e99107fc54722b794bd07ada91152c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810231
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82193}
2022-08-04 10:11:02 +00:00
Michael Achenbach
afd0933317 Revert "[infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off"
This reverts commit 161d7f9299.

Reason for revert: 
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20-%20release%20builder/29779/overview

Original change's description:
> [infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off
>
> Bug: v8:13058
> Change-Id: Ie3d4f87080fd1076edff1ee75cb03ee8ea4db505
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3788096
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82191}

Bug: v8:13058
Change-Id: I68a4097074150f2cf7cca9c776054dca19597fcc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810611
Auto-Submit: Michael Achenbach <machenbach@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/main@{#82192}
2022-08-04 09:45:22 +00:00
Al Muthanna Athamina
161d7f9299 [infra] Enable sandbox for x64 and arm64 builders and add a set of builders with Sandbox off
Bug: v8:13058
Change-Id: Ie3d4f87080fd1076edff1ee75cb03ee8ea4db505
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3788096
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82191}
2022-08-04 09:32:25 +00:00
Simon Zünd
ddee82c078 Reland "[inspector] Enable async stack tagging API by default"
This is a reland of commit 4bab7a8ee6

The reland changes the way how we install the async stack tagging API
on the console object. Instead of using `v8::Object::Set`, we use
`createDataProperty` which is sufficient. With `Set`, arbitrary
JS could run via accessors, which might not be allowed depending on
when the API is installed.

Original change's description:
> [inspector] Enable async stack tagging API by default
>
> R=bmeurer@chromium.org
>
> Fixed: chromium:1334585
> Change-Id: Id79a60bac1731ea9c60654ff15c8e23f958c6e57
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3799431
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82161}

Change-Id: I9b8c8e643705f8f043acac5af14307f2dbdb5a68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3809692
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82190}
2022-08-04 08:54:05 +00:00
Jakob Linke
42c602fb91 Add .mailmap entries for jgruber
Change-Id: I67b6594d7ec5226d54f09954210fe4f6ec4d47b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810172
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82189}
2022-08-04 08:53:02 +00:00
Michael Lippautz
2c37749081 [heap] Conservatively scan for TracedNode GlobalHandle
v8::TracedReference is supposed to be used from objects allocated on
CppHeap. Such objects can be in construction during garbage
collection, meaning that they are unable to invoke
Trace(v8::TraceReference) as they have not been properly set up.

It is thus necessary to use conservative tracing to find
v8::TracedReference (backed by TracedNode in GlobalHandle) in
in-construction objects.

Change-Id: I5b4ac6e7805ff7ded33f63a405db65ea08d809ad
Bug: v8:13141, chromium:1322114
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3806439
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82188}
2022-08-04 08:26:25 +00:00
v8-ci-autoroll-builder
eea2548cc1 Update V8 DEPS (trusted-origins)
Rolling v8/build: b1d3dce..0ad6539

Rolling v8/tools/clang: b11b8b4..ba74bc7

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

Change-Id: I5bdd2fa04c54f6c0bcad868651d5d424e6aea1b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3808973
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#82187}
2022-08-04 04:52:36 +00:00
QiuJi
0c785c0760 [riscv] Reland: [wasm] WasmCompileLazyFrame scanning
Port 4e329f8c8a
Also fix 64-bit addressed stores on riscv64

Bug: v8:12852
Bug: v8:10949
Change-Id: Ibc0d4efe04da5b4ca3c3e6c2997655b8d3795004
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3806593
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Auto-Submit: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#82186}
2022-08-04 00:59:14 +00:00
Frank Tang
6fd503608a [Temporal] Fix test to sync with latest spec after spec change.
1. fix year value between 100 and 9999 should use 4 digit padding without '+' prefix to sync with the latest spec in
mjsunit/temporal/plain-date-time-to-json

2. Change the the toPlainDateTime to accept object with partial time fields to sync with current spect in
test/mjsunit/temporal/plain-date-to-plain-date-time.js

3. Change the test to accept input parameter type to Number instead of BigInt for Instant fromEpochSeconds and from EpochMilliseconds in
test/mjsunit/temporal/instant-from-epoch-milliseconds.js and
test/mjsunit/temporal/instant-from-epoch-seconds.js
Throw TypeError if the type is BigInt.

4. Change the return type of Instant epochSeconds and epochMilliseconds from BigInt to Number to sync with the spec in
test/mjsunit/temporal/instant-constructor.js

Spec text
https://tc39.es/proposal-temporal/#sec-temporal-padisoyear
https://tc39.es/proposal-temporal/#sec-temporal-totemporaltimerecord
https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochmilliseconds
https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochseconds
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochmilliseconds
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochseconds

Bug: v8:11544
Change-Id: Icd290905b65fdabbedece27e59c785635c212ec2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807122
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82185}
2022-08-03 23:53:24 +00:00
Frank Tang
f4a938e4a6 [Temporal] Fix bug in Plain(Date|YearMonth|MonthDay) with()
Correct the wrong parameter passing in the 3rd  PrepareTemporalFields
calls

Spec text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.with
https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.with
https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.with

Bug: v8:11544
Change-Id: I8acd7059cedf6924eee36ed5cb7892b636c8c72a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807905
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82184}
2022-08-03 21:58:54 +00:00
Thibaud Michaud
29db563159 [wasm] Implement new JS Promise Integration API
Implement the WebAssembly.Function-based API.
With the old API, wrapping an import and export with JS Promise
Integration looked like:

  WebAssembly.returnPromiseOnSuspend(<wasm_export>);
  WebAssembly.suspendOnReturnedPromise(
    new WebAssembly.Function(<sig>, <js_import>));

With the new API:

  new WebAssembly.Function(<sig>, <wasm_export>, {promising: 'first'})
  new WebAssembly.Function(<sig>, <js_import>, {suspending: 'first'})

For details, see
https://github.com/WebAssembly/js-promise-integration/pull/8/files

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: Iaefaac5304a038fc39283db165b637af7e48b009
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804669
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82183}
2022-08-03 17:34:24 +00:00
Clemens Backes
f62fadc614 Revert "[inspector] Enable async stack tagging API by default"
This reverts commit 4bab7a8ee6.

Reason for revert: Breaks chromium integration, blocking the roll: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Blink%20Linux%20Debug/15697/overview

Original change's description:
> [inspector] Enable async stack tagging API by default
>
> R=​bmeurer@chromium.org
>
> Fixed: chromium:1334585
> Change-Id: Id79a60bac1731ea9c60654ff15c8e23f958c6e57
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3799431
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82161}

Change-Id: I1918c5c14d17d724b7836e04eb4a64d034c2af9b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804697
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82182}
2022-08-03 17:07:18 +00:00
Andreas Haas
fe53fbfca0 [wasm] Delay error messages for lazy compilation
With streaming compilation we delay the generation of errors until after
all bytes are received, so that potentially better error messages get
generated. With this CL we also delay the generation of errors in the
combination of lazy compilation and streaming compilation.

In particular, this CL does the following:
* It avoids the creation of a `DecodeFail` task in
`FinishAsyncCompileJobWithError`, which would create an error immediately before a potential name section arrived.
* It calls `CompilationStateImpl::SetError()` so that an error is
created once the stream finishes.
* It removes the return value of `ProcessFunctionBody` so that wire
bytes continue to be received even after a validation error.
* It adds an early exit to `ProcessFunctionBody` if
`CompilationStateImpl::failed()` is true, so that we don't continue
validation after the first detected error.

R=clemensb@chromium.org

Bug: v8:12852
Change-Id: Ie8c6be243a257ef62cbb29fea6b8e0c205060680
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3802691
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82181}
2022-08-03 15:43:04 +00:00
Andreas Haas
7c5f378208 [wasm] Fix test condition for lazy compilation
R=clemensb@chromium.org

Bug: v8:12852
Change-Id: I3fbae50b164cca4ad1c0fefb856070ae2e472ff5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3805059
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82180}
2022-08-03 15:34:14 +00:00
Dominik Inführ
45059dc2b7 [heap] Fix broken DCHECK in FlushBytecodeFromSFI
The String might be in the shared heap which is not collected during
client GCs.

Bug: v8:11708
Change-Id: I0958c46996a2aeba3a046263350617e8d177deca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3805883
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82179}
2022-08-03 15:16:54 +00:00
Clemens Backes
79e3fc0df8 [libplatform] Spawn more tasks from DefaultJobState::Join
If DefaultJobState::Join is called before any worker tasks were spawned
(e.g. right after Platform::CreateJob), it should spawn the required
number of worker tasks (mimicing what Platform::PostJob followed by Join
would do, but with less context switches).
This fixes regressions we got from switching from Platform::PostJob to
Platform::CreateJob.

R=mlippautz@chromium.org
CC=etiennep@chromium.org

Bug: chromium:1348512
Change-Id: Ic7984d12a28fc67f4b2f51ddc2ba5a406e43c127
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804600
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82178}
2022-08-03 14:59:28 +00:00
Victor Gomes
a2a5d041d1 [maglev] Support CloneObject
Bug: v8:7700
Change-Id: Ifc1008dce56e8f7e628a0ee0012f13403c40170b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804668
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82177}
2022-08-03 14:58:24 +00:00
Michael Achenbach
dd666a668d Revert "[d8] Dump stack trace on d8 tests timeouts on posix systems"
This reverts commit 5592bad963.

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

Original change's description:
> [d8] Dump stack trace on d8 tests timeouts on posix systems
>
> - Add a SIGTERM handler in d8 that dupms the stack trace
> - Send SIGTERM before SIGKILL in the test runner
>
> Bug: v8:13115
> Change-Id: I75285f33caabab61ff6ae83c1fbc6faf45cf595a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791906
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82173}

Bug: v8:13115
Change-Id: I29f72d67036f76f93043f06841e4236864623bbe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3805885
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82176}
2022-08-03 14:35:24 +00:00
Victor Gomes
229687bae1 [maglev] Support CallWithSpread and ContructWithSpread
Bug: v8:7700
Change-Id: I4d74ca2d063869978226586c81fc45e0fd45dffa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804665
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82175}
2022-08-03 14:15:34 +00:00