Skip to content

Commit

Permalink
deps: patch V8 to 12.8.374.33
Browse files Browse the repository at this point in the history
Refs: v8/v8@12.8.374.32...12.8.374.33
PR-URL: #54952
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
  • Loading branch information
nodejs-github-bot authored Sep 17, 2024
1 parent d5c29ba commit 260f1f4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 12
#define V8_MINOR_VERSION 8
#define V8_BUILD_NUMBER 374
#define V8_PATCH_LEVEL 32
#define V8_PATCH_LEVEL 33

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
28 changes: 28 additions & 0 deletions deps/v8/src/deoptimizer/deoptimizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,21 @@ class ActivationsFinder : public ThreadVisitor {
// for the trampoline to the deoptimizer call respective to each code, and use
// it to replace the current pc on the stack.
void VisitThread(Isolate* isolate, ThreadLocalTop* top) override {
#if V8_ENABLE_WEBASSEMBLY
// Also visit the ancestors of the active stack for wasm stack switching.
// We don't need to visit suspended stacks at the moment, because 1) they
// only contain wasm frames and 2) wasm does not do lazy deopt. Revisit this
// if one of these assumptions changes.
Tagged<WasmContinuationObject> continuation;
if (top == isolate->thread_local_top()) {
Tagged<Object> maybe_continuation =
isolate->root(RootIndex::kActiveContinuation);
if (!IsUndefined(maybe_continuation)) {
continuation = Cast<WasmContinuationObject>(maybe_continuation);
}
}
#endif

for (StackFrameIterator it(isolate, top); !it.done(); it.Advance()) {
if (it.frame()->is_optimized()) {
Tagged<GcSafeCode> code = it.frame()->GcSafeLookupCode();
Expand Down Expand Up @@ -371,6 +386,19 @@ class ActivationsFinder : public ThreadVisitor {
}
}
}

#if V8_ENABLE_WEBASSEMBLY
// We reached the base of the wasm stack. Follow the chain of
// continuations to find the parent stack and reset the iterator.
if (it.frame()->type() == StackFrame::STACK_SWITCH) {
CHECK_EQ(top, isolate->thread_local_top());
DCHECK(!continuation.is_null());
continuation = Cast<WasmContinuationObject>(continuation->parent());
wasm::StackMemory* parent =
reinterpret_cast<wasm::StackMemory*>(continuation->stack());
it.Reset(top, parent);
}
#endif
}
}

Expand Down

0 comments on commit 260f1f4

Please sign in to comment.