mirror of
https://github.com/nodejs/node.git
synced 2026-11-15 10:36:53 -05:00
deps: patch V8 to 12.8.374.32
Refs: https://github.com/v8/v8/compare/12.8.374.31...12.8.374.32 PR-URL: https://github.com/nodejs/node/pull/54884 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
e21984b70c
commit
b887942e6b
5 files changed
+37
-20
No files matched your search
Vendored
+1
-1
@@ -11,7 +11,7 @@
|
||||
#define V8_MAJOR_VERSION 12
|
||||
#define V8_MINOR_VERSION 8
|
||||
#define V8_BUILD_NUMBER 374
|
||||
#define V8_PATCH_LEVEL 31
|
||||
#define V8_PATCH_LEVEL 32
|
||||
|
||||
// Use 1 for candidates and 0 otherwise.
|
||||
// (Boolean macro values are not supported by all preprocessors.)
|
||||
|
||||
Vendored
+27
-2
@@ -2125,10 +2125,16 @@ Tagged<Object> Isolate::UnwindAndFindHandler() {
|
||||
// We reached the base of the wasm stack. Follow the chain of
|
||||
// continuations to find the parent stack and reset the iterator.
|
||||
DCHECK(!continuation.is_null());
|
||||
continuation = Cast<WasmContinuationObject>(continuation->parent());
|
||||
wasm::StackMemory* stack =
|
||||
reinterpret_cast<wasm::StackMemory*>(continuation->stack());
|
||||
iter.Reset(thread_local_top(), stack);
|
||||
RetireWasmStack(stack);
|
||||
continuation = Cast<WasmContinuationObject>(continuation->parent());
|
||||
wasm::StackMemory* parent =
|
||||
reinterpret_cast<wasm::StackMemory*>(continuation->stack());
|
||||
parent->jmpbuf()->state = wasm::JumpBuffer::Active;
|
||||
roots_table().slot(RootIndex::kActiveContinuation).store(continuation);
|
||||
SyncStackLimit();
|
||||
iter.Reset(thread_local_top(), parent);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -3642,6 +3648,25 @@ void Isolate::UpdateCentralStackInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
void Isolate::RetireWasmStack(wasm::StackMemory* stack) {
|
||||
stack->jmpbuf()->state = wasm::JumpBuffer::Retired;
|
||||
size_t index = stack->index();
|
||||
// We can only return from a stack that was still in the global list.
|
||||
DCHECK_LT(index, wasm_stacks().size());
|
||||
std::unique_ptr<wasm::StackMemory> stack_ptr =
|
||||
std::move(wasm_stacks()[index]);
|
||||
DCHECK_EQ(stack_ptr.get(), stack);
|
||||
if (index != wasm_stacks().size() - 1) {
|
||||
wasm_stacks()[index] = std::move(wasm_stacks().back());
|
||||
wasm_stacks()[index]->set_index(index);
|
||||
}
|
||||
wasm_stacks().pop_back();
|
||||
for (size_t i = 0; i < wasm_stacks().size(); ++i) {
|
||||
SLOW_DCHECK(wasm_stacks()[i]->index() == i);
|
||||
}
|
||||
stack_pool().Add(std::move(stack_ptr));
|
||||
}
|
||||
|
||||
wasm::WasmOrphanedGlobalHandle* Isolate::NewWasmOrphanedGlobalHandle() {
|
||||
return wasm::WasmEngine::NewOrphanedGlobalHandle(&wasm_orphaned_handle_);
|
||||
}
|
||||
|
||||
Vendored
+6
@@ -2173,6 +2173,12 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
|
||||
void UpdateCentralStackInfo();
|
||||
|
||||
void SyncStackLimit();
|
||||
|
||||
// To be called when returning from {stack}, or when an exception crosses the
|
||||
// stack boundary. This updates the {StackMemory} object and the global
|
||||
// {wasm_stacks_} list. This does *not* update the ActiveContinuation root and
|
||||
// the stack limit.
|
||||
void RetireWasmStack(wasm::StackMemory* stack);
|
||||
#else
|
||||
bool IsOnCentralStack() { return true; }
|
||||
#endif
|
||||
|
||||
Vendored
-4
@@ -65,10 +65,6 @@ void StackPool::Add(std::unique_ptr<StackMemory> stack) {
|
||||
return;
|
||||
}
|
||||
size_ += stack->size_;
|
||||
#if DEBUG
|
||||
constexpr uint8_t kZapValue = 0xab;
|
||||
memset(stack->limit_, kZapValue, stack->size_);
|
||||
#endif
|
||||
freelist_.push_back(std::move(stack));
|
||||
}
|
||||
|
||||
|
||||
+3
-13
@@ -675,19 +675,9 @@ void return_switch(Isolate* isolate, Address raw_continuation) {
|
||||
|
||||
Tagged<WasmContinuationObject> continuation =
|
||||
Cast<WasmContinuationObject>(Tagged<Object>{raw_continuation});
|
||||
size_t index = reinterpret_cast<StackMemory*>(continuation->stack())->index();
|
||||
// We can only return from a stack that was still in the global list.
|
||||
DCHECK_LT(index, isolate->wasm_stacks().size());
|
||||
std::unique_ptr<StackMemory> stack = std::move(isolate->wasm_stacks()[index]);
|
||||
if (index != isolate->wasm_stacks().size() - 1) {
|
||||
isolate->wasm_stacks()[index] = std::move(isolate->wasm_stacks().back());
|
||||
isolate->wasm_stacks()[index]->set_index(index);
|
||||
}
|
||||
isolate->wasm_stacks().pop_back();
|
||||
for (size_t i = 0; i < isolate->wasm_stacks().size(); ++i) {
|
||||
SLOW_DCHECK(isolate->wasm_stacks()[i]->index() == i);
|
||||
}
|
||||
isolate->stack_pool().Add(std::move(stack));
|
||||
wasm::StackMemory* stack =
|
||||
reinterpret_cast<StackMemory*>(continuation->stack());
|
||||
isolate->RetireWasmStack(stack);
|
||||
isolate->SyncStackLimit();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user