diff options
author | Michaël Zasso <targos@protonmail.com> | 2022-04-19 11:01:34 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2022-05-23 17:30:37 +0300 |
commit | 742ffefb4449b69369ad8adb34f60a8e98b5f582 (patch) | |
tree | 4e42715e927c09b1f60053c0329c575f61cb9b30 /deps | |
parent | c626a533c711a6cd9b99791314ed24388127bcea (diff) |
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: https://github.com/v8/v8/commit/1ff685d8b1a13794abaca3adf36cfd9838b1f6fc
PR-URL: https://github.com/nodejs/node/pull/42740
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/include/v8-internal.h | 4 | ||||
-rw-r--r-- | deps/v8/src/builtins/arm/builtins-arm.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/builtins/arm64/builtins-arm64.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/builtins/builtins-definitions.h | 2 | ||||
-rw-r--r-- | deps/v8/src/builtins/ia32/builtins-ia32.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/builtins/loong64/builtins-loong64.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/builtins/mips/builtins-mips.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/builtins/mips64/builtins-mips64.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/builtins/ppc/builtins-ppc.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/builtins/riscv64/builtins-riscv64.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/builtins/s390/builtins-s390.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/builtins/x64/builtins-x64.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/common/globals.h | 4 | ||||
-rw-r--r-- | deps/v8/src/deoptimizer/deoptimizer.cc | 7 |
14 files changed, 55 insertions, 2 deletions
diff --git a/deps/v8/include/v8-internal.h b/deps/v8/include/v8-internal.h index 37c5b336dad..e6e9cc5f9f5 100644 --- a/deps/v8/include/v8-internal.h +++ b/deps/v8/include/v8-internal.h @@ -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; diff --git a/deps/v8/src/builtins/arm/builtins-arm.cc b/deps/v8/src/builtins/arm/builtins-arm.cc index 38a88c24efb..e3f78a86aa9 100644 --- a/deps/v8/src/builtins/arm/builtins-arm.cc +++ b/deps/v8/src/builtins/arm/builtins-arm.cc @@ -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) diff --git a/deps/v8/src/builtins/arm64/builtins-arm64.cc b/deps/v8/src/builtins/arm64/builtins-arm64.cc index 7bfd4f81906..0cb649b15dd 100644 --- a/deps/v8/src/builtins/arm64/builtins-arm64.cc +++ b/deps/v8/src/builtins/arm64/builtins-arm64.cc @@ -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) diff --git a/deps/v8/src/builtins/builtins-definitions.h b/deps/v8/src/builtins/builtins-definitions.h index 6b43659d99d..e93ba60ea5e 100644 --- a/deps/v8/src/builtins/builtins-definitions.h +++ b/deps/v8/src/builtins/builtins-definitions.h @@ -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) \ diff --git a/deps/v8/src/builtins/ia32/builtins-ia32.cc b/deps/v8/src/builtins/ia32/builtins-ia32.cc index 7f32853d1f7..0a7b49d6ad7 100644 --- a/deps/v8/src/builtins/ia32/builtins-ia32.cc +++ b/deps/v8/src/builtins/ia32/builtins-ia32.cc @@ -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) diff --git a/deps/v8/src/builtins/loong64/builtins-loong64.cc b/deps/v8/src/builtins/loong64/builtins-loong64.cc index b94128f409d..fa3bf4f32f0 100644 --- a/deps/v8/src/builtins/loong64/builtins-loong64.cc +++ b/deps/v8/src/builtins/loong64/builtins-loong64.cc @@ -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) diff --git a/deps/v8/src/builtins/mips/builtins-mips.cc b/deps/v8/src/builtins/mips/builtins-mips.cc index 379af4b2648..05e676a8837 100644 --- a/deps/v8/src/builtins/mips/builtins-mips.cc +++ b/deps/v8/src/builtins/mips/builtins-mips.cc @@ -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) diff --git a/deps/v8/src/builtins/mips64/builtins-mips64.cc b/deps/v8/src/builtins/mips64/builtins-mips64.cc index f1eb2e1847f..90be59a884b 100644 --- a/deps/v8/src/builtins/mips64/builtins-mips64.cc +++ b/deps/v8/src/builtins/mips64/builtins-mips64.cc @@ -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) diff --git a/deps/v8/src/builtins/ppc/builtins-ppc.cc b/deps/v8/src/builtins/ppc/builtins-ppc.cc index 64b45555a1c..754e7f1679c 100644 --- a/deps/v8/src/builtins/ppc/builtins-ppc.cc +++ b/deps/v8/src/builtins/ppc/builtins-ppc.cc @@ -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. diff --git a/deps/v8/src/builtins/riscv64/builtins-riscv64.cc b/deps/v8/src/builtins/riscv64/builtins-riscv64.cc index d6fb8d279aa..6bccec0ef8a 100644 --- a/deps/v8/src/builtins/riscv64/builtins-riscv64.cc +++ b/deps/v8/src/builtins/riscv64/builtins-riscv64.cc @@ -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) diff --git a/deps/v8/src/builtins/s390/builtins-s390.cc b/deps/v8/src/builtins/s390/builtins-s390.cc index afaae01b2a9..d96115a74ab 100644 --- a/deps/v8/src/builtins/s390/builtins-s390.cc +++ b/deps/v8/src/builtins/s390/builtins-s390.cc @@ -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); } diff --git a/deps/v8/src/builtins/x64/builtins-x64.cc b/deps/v8/src/builtins/x64/builtins-x64.cc index a59143273c0..c5709e9d9e2 100644 --- a/deps/v8/src/builtins/x64/builtins-x64.cc +++ b/deps/v8/src/builtins/x64/builtins-x64.cc @@ -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) diff --git a/deps/v8/src/common/globals.h b/deps/v8/src/common/globals.h index bc9a6eb1c3c..1b9f9a94b4d 100644 --- a/deps/v8/src/common/globals.h +++ b/deps/v8/src/common/globals.h @@ -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"; } diff --git a/deps/v8/src/deoptimizer/deoptimizer.cc b/deps/v8/src/deoptimizer/deoptimizer.cc index ed78a06b359..c8f4b713967 100644 --- a/deps/v8/src/deoptimizer/deoptimizer.cc +++ b/deps/v8/src/deoptimizer/deoptimizer.cc @@ -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; |