Skip to content

Commit 1866363

Browse files
StefanStojanovictargos
authored andcommittedSep 19, 2024
deps: patch V8 to support compilation with MSVC
Co-Authored-By: Michaël Zasso <targos@protonmail.com> PR-URL: #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 6f4f22f commit 1866363

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed
 

Diff for: ‎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

Diff for: ‎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);

Diff for: ‎deps/v8/src/execution/frames.h

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

12711271
static WasmFrame* cast(StackFrame* frame) {
1272-
DCHECK(frame->is_wasm()
12731272
#ifdef V8_ENABLE_DRUMBRAKE
1274-
&& !frame->is_wasm_interpreter_entry()
1273+
DCHECK(frame->is_wasm() && !frame->is_wasm_interpreter_entry());
1274+
#else
1275+
DCHECK(frame->is_wasm());
12751276
#endif // V8_ENABLE_DRUMBRAKE
1276-
);
12771277
return static_cast<WasmFrame*>(frame);
12781278
}
12791279

Diff for: ‎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
} \

Diff for: ‎deps/v8/src/wasm/wasm-objects.cc

+7-2
Original file line numberDiff line numberDiff line change
@@ -2455,14 +2455,19 @@ Handle<WasmExportedFunction> WasmExportedFunction::New(
24552455
DirectHandle<WasmFuncRef> func_ref,
24562456
DirectHandle<WasmInternalFunction> internal_function, int arity,
24572457
DirectHandle<Code> export_wrapper) {
2458+
#if V8_ENABLE_DRUMBRAKE
24582459
DCHECK(CodeKind::JS_TO_WASM_FUNCTION == export_wrapper->kind() ||
24592460
(export_wrapper->is_builtin() &&
24602461
(export_wrapper->builtin_id() == Builtin::kJSToWasmWrapper ||
2461-
#if V8_ENABLE_DRUMBRAKE
24622462
export_wrapper->builtin_id() ==
24632463
Builtin::kGenericJSToWasmInterpreterWrapper ||
2464-
#endif // V8_ENABLE_DRUMBRAKE
24652464
export_wrapper->builtin_id() == Builtin::kWasmPromising)));
2465+
#else
2466+
DCHECK(CodeKind::JS_TO_WASM_FUNCTION == export_wrapper->kind() ||
2467+
(export_wrapper->is_builtin() &&
2468+
(export_wrapper->builtin_id() == Builtin::kJSToWasmWrapper ||
2469+
export_wrapper->builtin_id() == Builtin::kWasmPromising)));
2470+
#endif // V8_ENABLE_DRUMBRAKE
24662471
int func_index = internal_function->function_index();
24672472
Factory* factory = isolate->factory();
24682473
const wasm::WasmModule* module = instance_data->module();

0 commit comments

Comments
 (0)
Please sign in to comment.