Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.53',
'v8_embedder_string': '-node.54',

##### V8 defaults for Node.js #####

Expand Down
3 changes: 2 additions & 1 deletion deps/v8/src/builtins/arm64/builtins-arm64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1293,11 +1293,12 @@ void Builtins::Generate_BaselineOutOfLinePrologue(MacroAssembler* masm) {

FrameScope frame_scope(masm, StackFrame::INTERNAL);
// Save incoming new target or generator
Register maybe_dispatch_handle = V8_ENABLE_LEAPTIERING_BOOL
Register maybe_dispatch_handle = V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE_BOOL
? kJavaScriptCallDispatchHandleRegister
: padreg;
// No need to SmiTag as dispatch handles always look like Smis.
static_assert(kJSDispatchHandleShift > 0);
__ AssertSmi(maybe_dispatch_handle);
__ Push(maybe_dispatch_handle, new_target);
__ SmiTag(frame_size);
__ PushArgument(frame_size);
Expand Down
5 changes: 3 additions & 2 deletions deps/v8/src/builtins/loong64/builtins-loong64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1103,15 +1103,16 @@ void Builtins::Generate_BaselineOutOfLinePrologue(MacroAssembler* masm) {
FrameScope frame_scope(masm, StackFrame::INTERNAL);
// Save incoming new target or generator
__ Push(kJavaScriptCallNewTargetRegister);
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
// No need to SmiTag as dispatch handles always look like Smis.
static_assert(kJSDispatchHandleShift > 0);
__ AssertSmi(kJavaScriptCallDispatchHandleRegister);
__ Push(kJavaScriptCallDispatchHandleRegister);
#endif
__ SmiTag(frame_size);
__ Push(frame_size);
__ CallRuntime(Runtime::kStackGuardWithGap);
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
__ Pop(kJavaScriptCallDispatchHandleRegister);
#endif
__ Pop(kJavaScriptCallNewTargetRegister);
Expand Down
5 changes: 3 additions & 2 deletions deps/v8/src/builtins/mips64/builtins-mips64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1065,15 +1065,16 @@ void Builtins::Generate_BaselineOutOfLinePrologue(MacroAssembler* masm) {
FrameScope frame_scope(masm, StackFrame::INTERNAL);
// Save incoming new target or generator
__ Push(kJavaScriptCallNewTargetRegister);
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
// No need to SmiTag as dispatch handles always look like Smis.
static_assert(kJSDispatchHandleShift > 0);
__ AssertSmi(kJavaScriptCallDispatchHandleRegister);
__ Push(kJavaScriptCallDispatchHandleRegister);
#endif
__ SmiTag(frame_size);
__ Push(frame_size);
__ CallRuntime(Runtime::kStackGuardWithGap);
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
__ Pop(kJavaScriptCallDispatchHandleRegister);
#endif
__ Pop(kJavaScriptCallNewTargetRegister);
Expand Down
7 changes: 5 additions & 2 deletions deps/v8/src/builtins/riscv/builtins-riscv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1099,15 +1099,18 @@ void Builtins::Generate_BaselineOutOfLinePrologue(MacroAssembler* masm) {
FrameScope frame_scope(masm, StackFrame::INTERNAL);
// Save incoming new target or generator
__ Push(kJavaScriptCallNewTargetRegister);
#if defined(V8_ENABLE_LEAPTIERING) && defined(V8_TARGET_ARCH_RISCV64)
#if defined(V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE) && \
defined(V8_TARGET_ARCH_RISCV64)
// No need to SmiTag as dispatch handles always look like Smis.
static_assert(kJSDispatchHandleShift > 0);
__ AssertSmi(kJavaScriptCallDispatchHandleRegister);
__ Push(kJavaScriptCallDispatchHandleRegister);
#endif
__ SmiTag(frame_size);
__ Push(frame_size);
__ CallRuntime(Runtime::kStackGuardWithGap);
#if defined(V8_ENABLE_LEAPTIERING) && defined(V8_TARGET_ARCH_RISCV64)
#if defined(V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE) && \
defined(V8_TARGET_ARCH_RISCV64)
__ Pop(kJavaScriptCallDispatchHandleRegister);
#endif
__ Pop(kJavaScriptCallNewTargetRegister);
Expand Down
5 changes: 3 additions & 2 deletions deps/v8/src/builtins/x64/builtins-x64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2018,15 +2018,16 @@ void Builtins::Generate_BaselineOutOfLinePrologue(MacroAssembler* masm) {
FrameScope inner_frame_scope(masm, StackFrame::INTERNAL);
// Save incoming new target or generator
__ Push(new_target);
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
// No need to SmiTag as dispatch handles always look like Smis.
static_assert(kJSDispatchHandleShift > 0);
__ AssertSmi(kJavaScriptCallDispatchHandleRegister);
__ Push(kJavaScriptCallDispatchHandleRegister);
#endif
__ SmiTag(frame_size);
__ Push(frame_size);
__ CallRuntime(Runtime::kStackGuardWithGap, 1);
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
__ Pop(kJavaScriptCallDispatchHandleRegister);
#endif
__ Pop(new_target);
Expand Down
11 changes: 6 additions & 5 deletions deps/v8/src/codegen/arm64/macro-assembler-arm64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1518,14 +1518,15 @@ void MacroAssembler::GenerateTailCallToReturnedCode(
FrameScope scope(this, StackFrame::INTERNAL);
// Push a copy of the target function, the new target, the actual
// argument count, and the dispatch handle.
Register lastreg = V8_ENABLE_LEAPTIERING_BOOL
? kJavaScriptCallDispatchHandleRegister
: padreg;
Register maybe_dispatch_handle = V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE_BOOL
? kJavaScriptCallDispatchHandleRegister
: padreg;
SmiTag(kJavaScriptCallArgCountRegister);
// No need to SmiTag the dispatch handle as it always looks like a Smi.
static_assert(kJSDispatchHandleShift > 0);
AssertSmi(maybe_dispatch_handle);
Push(kJavaScriptCallTargetRegister, kJavaScriptCallNewTargetRegister,
kJavaScriptCallArgCountRegister, lastreg);
kJavaScriptCallArgCountRegister, maybe_dispatch_handle);
// Push another copy as a parameter to the runtime call.
PushArgument(kJavaScriptCallTargetRegister);

Expand All @@ -1534,7 +1535,7 @@ void MacroAssembler::GenerateTailCallToReturnedCode(

// Restore target function, new target, actual argument count, and dispatch
// handle.
Pop(lastreg, kJavaScriptCallArgCountRegister,
Pop(maybe_dispatch_handle, kJavaScriptCallArgCountRegister,
kJavaScriptCallNewTargetRegister, kJavaScriptCallTargetRegister);
SmiUntag(kJavaScriptCallArgCountRegister);
}
Expand Down
5 changes: 3 additions & 2 deletions deps/v8/src/codegen/loong64/macro-assembler-loong64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5113,9 +5113,10 @@ void MacroAssembler::GenerateTailCallToReturnedCode(
SmiTag(kJavaScriptCallArgCountRegister);
Push(kJavaScriptCallTargetRegister, kJavaScriptCallNewTargetRegister,
kJavaScriptCallArgCountRegister);
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
// No need to SmiTag since dispatch handles always look like Smis.
static_assert(kJSDispatchHandleShift > 0);
AssertSmi(kJavaScriptCallDispatchHandleRegister);
Push(kJavaScriptCallDispatchHandleRegister);
#endif
// Function is also the parameter to the runtime call.
Expand All @@ -5126,7 +5127,7 @@ void MacroAssembler::GenerateTailCallToReturnedCode(

// Restore target function, new target, actual argument count and dispatch
// handle.
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
Pop(kJavaScriptCallDispatchHandleRegister);
#endif
Pop(kJavaScriptCallTargetRegister, kJavaScriptCallNewTargetRegister,
Expand Down
5 changes: 3 additions & 2 deletions deps/v8/src/codegen/mips64/macro-assembler-mips64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6578,16 +6578,17 @@ void MacroAssembler::GenerateTailCallToReturnedCode(
SmiTag(kJavaScriptCallArgCountRegister);
Push(kJavaScriptCallTargetRegister, kJavaScriptCallNewTargetRegister,
kJavaScriptCallArgCountRegister);
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
// No need to SmiTag since dispatch handles always look like Smis.
static_assert(kJSDispatchHandleShift > 0);
AssertSmi(kJavaScriptCallDispatchHandleRegister);
Push(kJavaScriptCallDispatchHandleRegister);
#endif
// Function is also the parameter to the runtime call.
Push(kJavaScriptCallTargetRegister);
CallRuntime(function_id, 1);
// Restore target function, new target and actual argument count.
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
Pop(kJavaScriptCallDispatchHandleRegister);
#endif
Pop(kJavaScriptCallTargetRegister, kJavaScriptCallNewTargetRegister,
Expand Down
18 changes: 15 additions & 3 deletions deps/v8/src/codegen/riscv/macro-assembler-riscv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,34 @@ void MacroAssembler::GenerateTailCallToReturnedCode(
// -- a0 : actual argument count
// -- a1 : target function (preserved for callee)
// -- a3 : new target (preserved for callee)
// -- a4 : dispatch handle (preserved for callee)
// -----------------------------------
{
FrameScope scope(this, StackFrame::INTERNAL);
// Push a copy of the target function, the new target and the actual
// argument count.
// Push a copy of the target function, the new target, the actual
// argument count, and the dispatch handle.
// Push function as parameter to the runtime call.
SmiTag(kJavaScriptCallArgCountRegister);
#if defined(V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE) && \
defined(V8_TARGET_ARCH_RISCV64)
// No need to SmiTag as dispatch handles always look like Smis.
static_assert(kJSDispatchHandleShift > 0);
AssertSmi(kJavaScriptCallDispatchHandleRegister);
Push(kJavaScriptCallDispatchHandleRegister);
#endif
Push(kJavaScriptCallTargetRegister, kJavaScriptCallNewTargetRegister,
kJavaScriptCallArgCountRegister, kJavaScriptCallTargetRegister);
kJavaScriptCallArgCountRegister);

CallRuntime(function_id, 1);
// Use the return value before restoring a0
LoadCodeInstructionStart(a2, a0, kJSEntrypointTag);
// Restore target function, new target and actual argument count.
Pop(kJavaScriptCallTargetRegister, kJavaScriptCallNewTargetRegister,
kJavaScriptCallArgCountRegister);
#if defined(V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE) && \
defined(V8_TARGET_ARCH_RISCV64)
Pop(kJavaScriptCallDispatchHandleRegister);
#endif
SmiUntag(kJavaScriptCallArgCountRegister);
}

Expand Down
5 changes: 3 additions & 2 deletions deps/v8/src/codegen/x64/macro-assembler-x64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1247,9 +1247,10 @@ void MacroAssembler::GenerateTailCallToReturnedCode(
Push(kJavaScriptCallNewTargetRegister);
SmiTag(kJavaScriptCallArgCountRegister);
Push(kJavaScriptCallArgCountRegister);
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
// No need to SmiTag since dispatch handles always look like Smis.
static_assert(kJSDispatchHandleShift > 0);
AssertSmi(kJavaScriptCallDispatchHandleRegister);
Push(kJavaScriptCallDispatchHandleRegister);
#endif
// Function is also the parameter to the runtime call.
Expand All @@ -1260,7 +1261,7 @@ void MacroAssembler::GenerateTailCallToReturnedCode(

// Restore target function, new target, actual argument count, and dispatch
// handle.
#ifdef V8_ENABLE_LEAPTIERING
#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
Pop(kJavaScriptCallDispatchHandleRegister);
#endif
Pop(kJavaScriptCallArgCountRegister);
Expand Down
Loading