Skip to content

Commit 2ca9061

Browse files
deps: patch V8 to support compilation with MSVC
Co-Authored-By: Michaël Zasso <[email protected]> PR-URL: nodejs#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 4583bd8 commit 2ca9061

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-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
@@ -861,7 +861,7 @@ ElementAccessFeedback const& JSHeapBroker::ProcessFeedbackMapsForElementAccess(
861861
Tagged<Map> transition_target;
862862

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

deps/v8/src/execution/frames.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1260,11 +1260,11 @@ class WasmFrame : public TypedFrame {
12601260
void Summarize(std::vector<FrameSummary>* frames) const override;
12611261

12621262
static WasmFrame* cast(StackFrame* frame) {
1263-
DCHECK(frame->is_wasm()
12641263
#ifdef V8_ENABLE_DRUMBRAKE
1265-
&& !frame->is_wasm_interpreter_entry()
1264+
DCHECK(frame->is_wasm() && !frame->is_wasm_interpreter_entry());
1265+
#else
1266+
DCHECK(frame->is_wasm());
12661267
#endif // V8_ENABLE_DRUMBRAKE
1267-
);
12681268
return static_cast<WasmFrame*>(frame);
12691269
}
12701270

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

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

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -2578,14 +2578,19 @@ Handle<WasmExportedFunction> WasmExportedFunction::New(
25782578
DirectHandle<WasmFuncRef> func_ref,
25792579
DirectHandle<WasmInternalFunction> internal_function, int arity,
25802580
DirectHandle<Code> export_wrapper) {
2581+
#if V8_ENABLE_DRUMBRAKE
25812582
DCHECK(CodeKind::JS_TO_WASM_FUNCTION == export_wrapper->kind() ||
25822583
(export_wrapper->is_builtin() &&
25832584
(export_wrapper->builtin_id() == Builtin::kJSToWasmWrapper ||
2584-
#if V8_ENABLE_DRUMBRAKE
25852585
export_wrapper->builtin_id() ==
25862586
Builtin::kGenericJSToWasmInterpreterWrapper ||
2587-
#endif // V8_ENABLE_DRUMBRAKE
25882587
export_wrapper->builtin_id() == Builtin::kWasmPromising)));
2588+
#else
2589+
DCHECK(CodeKind::JS_TO_WASM_FUNCTION == export_wrapper->kind() ||
2590+
(export_wrapper->is_builtin() &&
2591+
(export_wrapper->builtin_id() == Builtin::kJSToWasmWrapper ||
2592+
export_wrapper->builtin_id() == Builtin::kWasmPromising)));
2593+
#endif // V8_ENABLE_DRUMBRAKE
25892594
int func_index = internal_function->function_index();
25902595
Factory* factory = isolate->factory();
25912596
const wasm::WasmModule* module = instance_data->module();

0 commit comments

Comments
 (0)