[builtins] Fix build issue on 32-bit MSVC
Bug: v8:8906 Change-Id: I3187f702c270781e48c434c6f6bd7803569988d4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1964391 Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#65430}
This commit is contained in:
parent
116d77b42f
commit
488baddb77
@ -325,7 +325,7 @@ const kMaxTypedArrayInHeap:
|
||||
// kMaxSafeIntegerUint64 is defined as uintptr and allowed to be used only
|
||||
// inside if constexpr (Is64()) i.e. on 64-bit architectures.
|
||||
const kMaxSafeIntegerUint64: constexpr uintptr
|
||||
generates 'static_cast<uintptr_t>(kMaxSafeIntegerUint64)';
|
||||
generates 'CodeStubAssembler::MaxSafeIntegerUintPtr()';
|
||||
const kMaxSafeInteger: constexpr float64 generates 'kMaxSafeInteger';
|
||||
const kMaxUInt32Double: constexpr float64 generates 'kMaxUInt32Double';
|
||||
const kSmiMaxValue: constexpr uintptr generates 'kSmiMaxValue';
|
||||
|
@ -3593,6 +3593,19 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
|
||||
bool ConstexprUintPtrLessThan(uintptr_t a, uintptr_t b) { return a < b; }
|
||||
|
||||
// CSA does not support 64-bit types on 32-bit platforms so as a workaround
|
||||
// the kMaxSafeIntegerUint64 is defined as uintptr and allowed to be used only
|
||||
// inside if constexpr (Is64()) i.e. on 64-bit architectures.
|
||||
static uintptr_t MaxSafeIntegerUintPtr() {
|
||||
#if defined(V8_HOST_ARCH_64_BIT)
|
||||
// This ifdef is required to avoid build issues on 32-bit MSVC which
|
||||
// complains about static_cast<uintptr_t>(kMaxSafeIntegerUint64).
|
||||
return kMaxSafeIntegerUint64;
|
||||
#else
|
||||
UNREACHABLE();
|
||||
#endif
|
||||
}
|
||||
|
||||
void PerformStackCheck(TNode<Context> context);
|
||||
|
||||
void SetPropertyLength(TNode<Context> context, TNode<Object> array,
|
||||
|
Loading…
Reference in New Issue
Block a user