Skip to content

Commit dc5d320

Browse files
StefanStojanovictargos
authored andcommitted
deps: patch V8 to support compilation with MSVC
Co-Authored-By: Michaël Zasso <[email protected]> PR-URL: nodejs/node#54536 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 8598f9e commit dc5d320

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.3',
39+
'v8_embedder_string': '-node.4',
4040

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

deps/v8/src/compiler/js-heap-broker.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ ElementAccessFeedback const& JSHeapBroker::ProcessFeedbackMapsForElementAccess(
879879
Tagged<Map> transition_target;
880880

881881
// Don't generate elements kind transitions from stable maps.
882-
if (!map.is_stable()) {
882+
if (!map.is_stable() && possible_transition_targets.begin() != possible_transition_targets.end()) {
883883
// The lock is needed for UnusedPropertyFields (called deep inside
884884
// FindElementsKindTransitionedMap).
885885
MapUpdaterGuardIfNeeded mumd_scope(this);

deps/v8/src/execution/frames.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1292,11 +1292,11 @@ class WasmFrame : public TypedFrame {
12921292
FrameSummaries Summarize() const override;
12931293

12941294
static WasmFrame* cast(StackFrame* frame) {
1295-
DCHECK(frame->is_wasm()
12961295
#ifdef V8_ENABLE_DRUMBRAKE
1297-
&& !frame->is_wasm_interpreter_entry()
1296+
DCHECK(frame->is_wasm() && !frame->is_wasm_interpreter_entry());
1297+
#else
1298+
DCHECK(frame->is_wasm());
12981299
#endif // V8_ENABLE_DRUMBRAKE
1299-
);
13001300
return static_cast<WasmFrame*>(frame);
13011301
}
13021302

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

-2
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,10 @@ static_assert(sizeof(UnalignedDoubleMember) == sizeof(double));
121121
#define FLEXIBLE_ARRAY_MEMBER(Type, name) \
122122
using FlexibleDataReturnType = Type[0]; \
123123
FlexibleDataReturnType& name() { \
124-
static_assert(alignof(Type) <= alignof(decltype(*this))); \
125124
using ReturnType = Type[0]; \
126125
return reinterpret_cast<ReturnType&>(*(this + 1)); \
127126
} \
128127
const FlexibleDataReturnType& name() const { \
129-
static_assert(alignof(Type) <= alignof(decltype(*this))); \
130128
using ReturnType = Type[0]; \
131129
return reinterpret_cast<const ReturnType&>(*(this + 1)); \
132130
} \

deps/v8/src/wasm/wasm-objects.cc

+8-2
Original file line numberDiff line numberDiff line change
@@ -2712,15 +2712,21 @@ Handle<WasmExportedFunction> WasmExportedFunction::New(
27122712
DirectHandle<WasmFuncRef> func_ref,
27132713
DirectHandle<WasmInternalFunction> internal_function, int arity,
27142714
DirectHandle<Code> export_wrapper) {
2715+
#if V8_ENABLE_DRUMBRAKE
27152716
DCHECK(CodeKind::JS_TO_WASM_FUNCTION == export_wrapper->kind() ||
27162717
(export_wrapper->is_builtin() &&
27172718
(export_wrapper->builtin_id() == Builtin::kJSToWasmWrapper ||
2718-
#if V8_ENABLE_DRUMBRAKE
27192719
export_wrapper->builtin_id() ==
27202720
Builtin::kGenericJSToWasmInterpreterWrapper ||
2721-
#endif // V8_ENABLE_DRUMBRAKE
27222721
export_wrapper->builtin_id() == Builtin::kWasmPromising ||
27232722
export_wrapper->builtin_id() == Builtin::kWasmStressSwitch)));
2723+
#else
2724+
DCHECK(CodeKind::JS_TO_WASM_FUNCTION == export_wrapper->kind() ||
2725+
(export_wrapper->is_builtin() &&
2726+
(export_wrapper->builtin_id() == Builtin::kJSToWasmWrapper ||
2727+
export_wrapper->builtin_id() == Builtin::kWasmPromising ||
2728+
export_wrapper->builtin_id() == Builtin::kWasmStressSwitch)));
2729+
#endif // V8_ENABLE_DRUMBRAKE
27242730
int func_index = internal_function->function_index();
27252731
Factory* factory = isolate->factory();
27262732
DirectHandle<Map> rtt;

0 commit comments

Comments
 (0)