Skip to content

Commit 3795e97

Browse files
StefanStojanovicRafaelGSS
authored andcommitted
deps: patch V8 to support compilation with MSVC
After enabling -std:c++20 on Windows, patch is now much smaller. PR-URL: #52465 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 2b1e7c2 commit 3795e97

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

common.gypi

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
# Reset this number to 0 on major V8 upgrades.
3939
# Increment by one for each non-official patch applied to deps/v8.
40-
'v8_embedder_string': '-node.7',
40+
'v8_embedder_string': '-node.8',
4141

4242
##### V8 defaults for Node.js #####
4343

@@ -288,6 +288,8 @@
288288
'/Zc:__cplusplus',
289289
# The following option enables c++20 on Windows. This is needed for V8 v12.4+
290290
'-std:c++20',
291+
# The following option reduces the "error C1060: compiler is out of heap space"
292+
'/Zm2000',
291293
],
292294
'BufferSecurityCheck': 'true',
293295
'DebugInformationFormat': 1, # /Z7 embed info in .obj files

deps/v8/src/compiler/backend/instruction-selector-adapter.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -855,12 +855,13 @@ struct TurboshaftAdapter : public turboshaft::OperationMatcher {
855855
*traps_on_null = load_->kind.trap_on_null;
856856
#if V8_ENABLE_WEBASSEMBLY
857857
} else {
858-
DCHECK((load_transform_ && !load_transform_->load_kind.trap_on_null)
859858
#if V8_ENABLE_WASM_SIMD256_REVEC
859+
DCHECK((load_transform_ && !load_transform_->load_kind.trap_on_null)
860860
|| (load_transform256_ &&
861-
!load_transform256_->load_kind.trap_on_null)
861+
!load_transform256_->load_kind.trap_on_null));
862+
#else
863+
DCHECK((load_transform_ && !load_transform_->load_kind.trap_on_null));
862864
#endif // V8_ENABLE_WASM_SIMD256_REVEC
863-
);
864865
*traps_on_null = false;
865866
#endif // V8_ENABLE_WEBASSEMBLY
866867
}

deps/v8/src/objects/tagged-field.h

-2
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,10 @@ static_assert(sizeof(UnalignedDoubleMember) == sizeof(double));
100100
#define FLEXIBLE_ARRAY_MEMBER(Type, name) \
101101
using FlexibleDataReturnType = Type[0]; \
102102
FlexibleDataReturnType& name() { \
103-
static_assert(alignof(Type) <= alignof(decltype(*this))); \
104103
using ReturnType = Type[0]; \
105104
return reinterpret_cast<ReturnType&>(*(this + 1)); \
106105
} \
107106
const FlexibleDataReturnType& name() const { \
108-
static_assert(alignof(Type) <= alignof(decltype(*this))); \
109107
using ReturnType = Type[0]; \
110108
return reinterpret_cast<const ReturnType&>(*(this + 1)); \
111109
} \

0 commit comments

Comments
 (0)