mirror of
https://github.com/nodejs/node.git
synced 2024-11-27 22:16:50 +01:00
deps: make V8 10.2 ABI-compatible with 10.1
Create an unused deopt kind to replace `DeoptimizeKind::kSoft`, which
was removed. This ensures that the layout of IsolateData doesn't change.
Refs: 1ff685d8b1
PR-URL: https://github.com/nodejs/node/pull/42740
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
parent
421fd079a2
commit
8d0bbf934f
@ -36,7 +36,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.7',
|
||||
'v8_embedder_string': '-node.8',
|
||||
|
||||
##### V8 defaults for Node.js #####
|
||||
|
||||
|
4
deps/v8/include/v8-internal.h
vendored
4
deps/v8/include/v8-internal.h
vendored
@ -365,8 +365,8 @@ class Internals {
|
||||
|
||||
static const uint32_t kNumIsolateDataSlots = 4;
|
||||
static const int kStackGuardSize = 7 * kApiSystemPointerSize;
|
||||
static const int kBuiltinTier0EntryTableSize = 9 * kApiSystemPointerSize;
|
||||
static const int kBuiltinTier0TableSize = 9 * kApiSystemPointerSize;
|
||||
static const int kBuiltinTier0EntryTableSize = 10 * kApiSystemPointerSize;
|
||||
static const int kBuiltinTier0TableSize = 10 * kApiSystemPointerSize;
|
||||
|
||||
// IsolateData layout guarantees.
|
||||
static const int kIsolateCageBaseOffset = 0;
|
||||
|
4
deps/v8/src/builtins/arm/builtins-arm.cc
vendored
4
deps/v8/src/builtins/arm/builtins-arm.cc
vendored
@ -3537,6 +3537,10 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
|
||||
}
|
||||
|
||||
void Builtins::Generate_DeoptimizationEntry_Unused(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kUnused);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// Restarts execution either at the current or next (in execution order)
|
||||
|
4
deps/v8/src/builtins/arm64/builtins-arm64.cc
vendored
4
deps/v8/src/builtins/arm64/builtins-arm64.cc
vendored
@ -4056,6 +4056,10 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
|
||||
}
|
||||
|
||||
void Builtins::Generate_DeoptimizationEntry_Unused(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kUnused);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// Restarts execution either at the current or next (in execution order)
|
||||
|
2
deps/v8/src/builtins/builtins-definitions.h
vendored
2
deps/v8/src/builtins/builtins-definitions.h
vendored
@ -46,6 +46,8 @@ namespace internal {
|
||||
/* Deoptimization entries. */ \
|
||||
ASM(DeoptimizationEntry_Eager, DeoptimizationEntry) \
|
||||
ASM(DeoptimizationEntry_Lazy, DeoptimizationEntry) \
|
||||
/* Replaces "Soft" for ABI compatibility. */ \
|
||||
ASM(DeoptimizationEntry_Unused, DeoptimizationEntry) \
|
||||
\
|
||||
/* GC write barrier. */ \
|
||||
TFC(RecordWriteEmitRememberedSetSaveFP, WriteBarrier) \
|
||||
|
4
deps/v8/src/builtins/ia32/builtins-ia32.cc
vendored
4
deps/v8/src/builtins/ia32/builtins-ia32.cc
vendored
@ -4153,6 +4153,10 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
|
||||
}
|
||||
|
||||
void Builtins::Generate_DeoptimizationEntry_Unused(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kUnused);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// Restarts execution either at the current or next (in execution order)
|
||||
|
@ -3554,6 +3554,10 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
|
||||
}
|
||||
|
||||
void Builtins::Generate_DeoptimizationEntry_Unused(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kUnused);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// Restarts execution either at the current or next (in execution order)
|
||||
|
4
deps/v8/src/builtins/mips/builtins-mips.cc
vendored
4
deps/v8/src/builtins/mips/builtins-mips.cc
vendored
@ -4002,6 +4002,10 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
|
||||
}
|
||||
|
||||
void Builtins::Generate_DeoptimizationEntry_Unused(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kUnused);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// Restarts execution either at the current or next (in execution order)
|
||||
|
@ -3581,6 +3581,10 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
|
||||
}
|
||||
|
||||
void Builtins::Generate_DeoptimizationEntry_Unused(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kUnused);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// Restarts execution either at the current or next (in execution order)
|
||||
|
4
deps/v8/src/builtins/ppc/builtins-ppc.cc
vendored
4
deps/v8/src/builtins/ppc/builtins-ppc.cc
vendored
@ -3839,6 +3839,10 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
|
||||
}
|
||||
|
||||
void Builtins::Generate_DeoptimizationEntry_Unused(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kUnused);
|
||||
}
|
||||
|
||||
void Builtins::Generate_BaselineOrInterpreterEnterAtBytecode(
|
||||
MacroAssembler* masm) {
|
||||
// Implement on this platform, https://crrev.com/c/2695591.
|
||||
|
@ -3668,6 +3668,10 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
|
||||
}
|
||||
|
||||
void Builtins::Generate_DeoptimizationEntry_Unused(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kUnused);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// Restarts execution either at the current or next (in execution order)
|
||||
|
4
deps/v8/src/builtins/s390/builtins-s390.cc
vendored
4
deps/v8/src/builtins/s390/builtins-s390.cc
vendored
@ -3836,6 +3836,10 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
|
||||
}
|
||||
|
||||
void Builtins::Generate_DeoptimizationEntry_Unused(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kUnused);
|
||||
}
|
||||
|
||||
void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
|
||||
OnStackReplacement(masm, OsrSourceTier::kInterpreter);
|
||||
}
|
||||
|
4
deps/v8/src/builtins/x64/builtins-x64.cc
vendored
4
deps/v8/src/builtins/x64/builtins-x64.cc
vendored
@ -5007,6 +5007,10 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
|
||||
}
|
||||
|
||||
void Builtins::Generate_DeoptimizationEntry_Unused(MacroAssembler* masm) {
|
||||
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kUnused);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// Restarts execution either at the current or next (in execution order)
|
||||
|
4
deps/v8/src/common/globals.h
vendored
4
deps/v8/src/common/globals.h
vendored
@ -522,11 +522,13 @@ constexpr int kNoDeoptimizationId = -1;
|
||||
// Deoptimize bailout kind:
|
||||
// - Eager: a check failed in the optimized code and deoptimization happens
|
||||
// immediately.
|
||||
// - Unused: replaces "Soft" for ABI compatibility.
|
||||
// - Lazy: the code has been marked as dependent on some assumption which
|
||||
// is checked elsewhere and can trigger deoptimization the next time the
|
||||
// code is executed.
|
||||
enum class DeoptimizeKind : uint8_t {
|
||||
kEager,
|
||||
kUnused,
|
||||
kLazy,
|
||||
};
|
||||
constexpr DeoptimizeKind kFirstDeoptimizeKind = DeoptimizeKind::kEager;
|
||||
@ -540,6 +542,8 @@ constexpr const char* ToString(DeoptimizeKind kind) {
|
||||
switch (kind) {
|
||||
case DeoptimizeKind::kEager:
|
||||
return "Eager";
|
||||
case DeoptimizeKind::kUnused:
|
||||
return "Unused";
|
||||
case DeoptimizeKind::kLazy:
|
||||
return "Lazy";
|
||||
}
|
||||
|
7
deps/v8/src/deoptimizer/deoptimizer.cc
vendored
7
deps/v8/src/deoptimizer/deoptimizer.cc
vendored
@ -460,6 +460,8 @@ const char* Deoptimizer::MessageFor(DeoptimizeKind kind) {
|
||||
switch (kind) {
|
||||
case DeoptimizeKind::kEager:
|
||||
return "deopt-eager";
|
||||
case DeoptimizeKind::kUnused:
|
||||
return "deopt-unused";
|
||||
case DeoptimizeKind::kLazy:
|
||||
return "deopt-lazy";
|
||||
}
|
||||
@ -585,6 +587,8 @@ Builtin Deoptimizer::GetDeoptimizationEntry(DeoptimizeKind kind) {
|
||||
switch (kind) {
|
||||
case DeoptimizeKind::kEager:
|
||||
return Builtin::kDeoptimizationEntry_Eager;
|
||||
case DeoptimizeKind::kUnused:
|
||||
return Builtin::kDeoptimizationEntry_Unused;
|
||||
case DeoptimizeKind::kLazy:
|
||||
return Builtin::kDeoptimizationEntry_Lazy;
|
||||
}
|
||||
@ -599,6 +603,9 @@ bool Deoptimizer::IsDeoptimizationEntry(Isolate* isolate, Address addr,
|
||||
case Builtin::kDeoptimizationEntry_Eager:
|
||||
*type_out = DeoptimizeKind::kEager;
|
||||
return true;
|
||||
case Builtin::kDeoptimizationEntry_Unused:
|
||||
*type_out = DeoptimizeKind::kUnused;
|
||||
return true;
|
||||
case Builtin::kDeoptimizationEntry_Lazy:
|
||||
*type_out = DeoptimizeKind::kLazy;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user