Skip to content

deps: patch V8 to 12.8.374.33 #54952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 17, 2024
Merged
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 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
Loading