diff --git a/common.gypi b/common.gypi index 38471d4639eb5e..ec92c9df4c1ea2 100644 --- a/common.gypi +++ b/common.gypi @@ -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.36', + 'v8_embedder_string': '-node.37', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/ast/ast.h b/deps/v8/src/ast/ast.h index 971a2b0ec1321e..be1fe09ee438ad 100644 --- a/deps/v8/src/ast/ast.h +++ b/deps/v8/src/ast/ast.h @@ -999,7 +999,7 @@ class Literal final : public Expression { friend class AstNodeFactory; friend Zone; - using TypeField = Expression::NextBitField; + using TypeField = Expression::NextBitField; Literal(int smi, int position) : Expression(position, kLiteral), smi_(smi) { bit_field_ = TypeField::update(bit_field_, kSmi); diff --git a/deps/v8/src/base/bit-field.h b/deps/v8/src/base/bit-field.h index 63142a20fa2c29..9605c41c14f8ce 100644 --- a/deps/v8/src/base/bit-field.h +++ b/deps/v8/src/base/bit-field.h @@ -40,6 +40,11 @@ class BitField final { static constexpr U kNumValues = U{1} << kSize; // Value for the field with all bits set. + // If clang complains + // "constexpr variable 'kMax' must be initialized by a constant expression" + // on this line, then you're creating a BitField for an enum with more bits + // than needed for the enum values. Either reduce the BitField size, + // or give the enum an explicit underlying type. static constexpr T kMax = static_cast(kNumValues - 1); template diff --git a/deps/v8/src/compiler/backend/instruction-codes.h b/deps/v8/src/compiler/backend/instruction-codes.h index b06b522287f2d1..19cb21d041b897 100644 --- a/deps/v8/src/compiler/backend/instruction-codes.h +++ b/deps/v8/src/compiler/backend/instruction-codes.h @@ -195,7 +195,7 @@ V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, V(None) \ TARGET_ADDRESSING_MODE_LIST(V) -enum AddressingMode { +enum AddressingMode : uint8_t { #define DECLARE_ADDRESSING_MODE(Name) kMode_##Name, ADDRESSING_MODE_LIST(DECLARE_ADDRESSING_MODE) #undef DECLARE_ADDRESSING_MODE @@ -306,7 +306,7 @@ using MiscField = base::BitField; // LaneSizeField and AccessModeField are helper types to encode/decode a lane // size, an access mode, or both inside the overlapping MiscField. using LaneSizeField = base::BitField; -using AccessModeField = base::BitField; +using AccessModeField = base::BitField; // TODO(turbofan): {HasMemoryAccessMode} is currently only used to guard // decoding (in CodeGenerator and InstructionScheduler). Encoding (in // InstructionSelector) is not yet guarded. There are in fact instructions for diff --git a/deps/v8/src/compiler/backend/instruction.h b/deps/v8/src/compiler/backend/instruction.h index 89394b2c2427d3..66a6232c32a8d0 100644 --- a/deps/v8/src/compiler/backend/instruction.h +++ b/deps/v8/src/compiler/backend/instruction.h @@ -586,8 +586,8 @@ class LocationOperand : public InstructionOperand { } STATIC_ASSERT(KindField::kSize == 3); - using LocationKindField = base::BitField64; - using RepresentationField = base::BitField64; + using LocationKindField = base::BitField64; + using RepresentationField = LocationKindField::Next; using IndexField = base::BitField64; }; diff --git a/deps/v8/src/maglev/maglev-ir.h b/deps/v8/src/maglev/maglev-ir.h index 1f7c5471de025d..9ff1a3085790c8 100644 --- a/deps/v8/src/maglev/maglev-ir.h +++ b/deps/v8/src/maglev/maglev-ir.h @@ -196,7 +196,7 @@ class OpProperties { } constexpr bool is_pure() const { - return (bitfield_ | kPureMask) == kPureValue; + return (bitfield_ & kPureMask) == kPureValue; } constexpr bool is_required_when_unused() const { return can_write() || non_memory_side_effects(); diff --git a/deps/v8/src/wasm/wasm-code-manager.h b/deps/v8/src/wasm/wasm-code-manager.h index 137c3074d503f0..c6e878a1db508e 100644 --- a/deps/v8/src/wasm/wasm-code-manager.h +++ b/deps/v8/src/wasm/wasm-code-manager.h @@ -474,7 +474,7 @@ class V8_EXPORT_PRIVATE WasmCode final { int trap_handler_index_ = -1; // Bits encoded in {flags_}: - using KindField = base::BitField8; + using KindField = base::BitField8; using ExecutionTierField = KindField::Next; using ForDebuggingField = ExecutionTierField::Next;