Skip to content

Commit fea2f02

Browse files
StefanStojanovictargos
authored andcommitted
deps: patch V8 to support compilation with MSVC
Co-Authored-By: Michaël Zasso <targos@protonmail.com> PR-URL: nodejs/node#54536 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent 2bd5312 commit fea2f02

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
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.3',
40+
'v8_embedder_string': '-node.4',
4141

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

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,15 +2753,21 @@ DirectHandle<WasmExportedFunction> WasmExportedFunction::New(
27532753
DirectHandle<WasmFuncRef> func_ref,
27542754
DirectHandle<WasmInternalFunction> internal_function, int arity,
27552755
DirectHandle<Code> export_wrapper) {
2756+
#if V8_ENABLE_DRUMBRAKE
27562757
DCHECK(CodeKind::JS_TO_WASM_FUNCTION == export_wrapper->kind() ||
27572758
(export_wrapper->is_builtin() &&
27582759
(export_wrapper->builtin_id() == Builtin::kJSToWasmWrapper ||
2759-
#if V8_ENABLE_DRUMBRAKE
27602760
export_wrapper->builtin_id() ==
27612761
Builtin::kGenericJSToWasmInterpreterWrapper ||
2762-
#endif // V8_ENABLE_DRUMBRAKE
27632762
export_wrapper->builtin_id() == Builtin::kWasmPromising ||
27642763
export_wrapper->builtin_id() == Builtin::kWasmStressSwitch)));
2764+
#else
2765+
DCHECK(CodeKind::JS_TO_WASM_FUNCTION == export_wrapper->kind() ||
2766+
(export_wrapper->is_builtin() &&
2767+
(export_wrapper->builtin_id() == Builtin::kJSToWasmWrapper ||
2768+
export_wrapper->builtin_id() == Builtin::kWasmPromising ||
2769+
export_wrapper->builtin_id() == Builtin::kWasmStressSwitch)));
2770+
#endif // V8_ENABLE_DRUMBRAKE
27652771
int func_index = internal_function->function_index();
27662772
Factory* factory = isolate->factory();
27672773
DirectHandle<Map> rtt;

0 commit comments

Comments
 (0)