deps: V8: cherry-pick de611e69ad51

Original commit message:

    [maglev] fix non-ptr-compr compilation on old compilers

    When pointer compression is disabled, the preprocessor expands some
    static asserts to static_assert(false), which doesn't compile on
    compilers not implementing the C++ defect report CWG2518, notably clang
    before version 17 and gcc before version 13.

    Adding in part of the template parameter to the static assert prevents
    it from being evaluated immediately which fixes the compilation.

    Test: compiled with gcc-11 and clang-14 without pointer compression.
    Change-Id: I95ce29bdb1278e6dad9e592d6f9476395f8aeb59
    Fixed: v8:14355
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5022760
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#91553}

Refs: de611e69ad
PR-URL: https://github.com/nodejs/node/pull/51200
Refs: https://github.com/nodejs/node/issues/50690
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
Keyhan Vakil 2023-12-21 09:44:19 -08:00 committed by GitHub
parent 918e36e0b2
commit f5c95991d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -36,7 +36,7 @@
# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.18',
'v8_embedder_string': '-node.19',
##### V8 defaults for Node.js #####

View File

@ -419,7 +419,11 @@ class ParallelMoveResolver {
void EmitMovesFromSource(RegisterT source_reg, GapMoveTargets&& targets) {
DCHECK(moves_from_register_[source_reg.code()].is_empty());
if constexpr (DecompressIfNeeded) {
static_assert(COMPRESS_POINTERS_BOOL);
// The DecompressIfNeeded clause is redundant with the if-constexpr above,
// but otherwise this code cannot be compiled by compilers not yet
// implementing CWG2518.
static_assert(DecompressIfNeeded && COMPRESS_POINTERS_BOOL);
if (targets.needs_decompression == kNeedsDecompression) {
__ DecompressTagged(source_reg, source_reg);
}
@ -462,7 +466,11 @@ class ParallelMoveResolver {
// Decompress after the first move, subsequent moves reuse this register so
// they're guaranteed to be decompressed.
if constexpr (DecompressIfNeeded) {
static_assert(COMPRESS_POINTERS_BOOL);
// The DecompressIfNeeded clause is redundant with the if-constexpr above,
// but otherwise this code cannot be compiled by compilers not yet
// implementing CWG2518.
static_assert(DecompressIfNeeded && COMPRESS_POINTERS_BOOL);
if (targets.needs_decompression == kNeedsDecompression) {
__ DecompressTagged(register_with_slot_value, register_with_slot_value);
targets.needs_decompression = kDoesNotNeedDecompression;