Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v18.x] deps: V8: cherry-pick d15d49b09dc7 #52337

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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 #####

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/ast/ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ class Literal final : public Expression {
friend class AstNodeFactory;
friend Zone;

using TypeField = Expression::NextBitField<Type, 4>;
using TypeField = Expression::NextBitField<Type, 3>;

Literal(int smi, int position) : Expression(position, kLiteral), smi_(smi) {
bit_field_ = TypeField::update(bit_field_, kSmi);
Expand Down
5 changes: 5 additions & 0 deletions deps/v8/src/base/bit-field.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(kNumValues - 1);

template <class T2, int size2>
Expand Down
4 changes: 2 additions & 2 deletions deps/v8/src/compiler/backend/instruction-codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -306,7 +306,7 @@ using MiscField = base::BitField<int, 22, 10>;
// 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<int, 22, 8>;
using AccessModeField = base::BitField<MemoryAccessMode, 30, 2>;
using AccessModeField = base::BitField<MemoryAccessMode, 30, 1>;
// 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
Expand Down
4 changes: 2 additions & 2 deletions deps/v8/src/compiler/backend/instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ class LocationOperand : public InstructionOperand {
}

STATIC_ASSERT(KindField::kSize == 3);
using LocationKindField = base::BitField64<LocationKind, 3, 2>;
using RepresentationField = base::BitField64<MachineRepresentation, 5, 8>;
using LocationKindField = base::BitField64<LocationKind, 3, 1>;
using RepresentationField = LocationKindField::Next<MachineRepresentation, 8>;
using IndexField = base::BitField64<int32_t, 35, 29>;
};

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/maglev/maglev-ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/wasm/wasm-code-manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ class V8_EXPORT_PRIVATE WasmCode final {
int trap_handler_index_ = -1;

// Bits encoded in {flags_}:
using KindField = base::BitField8<Kind, 0, 3>;
using KindField = base::BitField8<Kind, 0, 2>;
using ExecutionTierField = KindField::Next<ExecutionTier, 2>;
using ForDebuggingField = ExecutionTierField::Next<ForDebugging, 2>;

Expand Down
Loading