Skip to content

Commit 260f1f4

Browse files
deps: patch V8 to 12.8.374.33
Refs: v8/v8@12.8.374.32...12.8.374.33 PR-URL: #54952 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent d5c29ba commit 260f1f4

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

deps/v8/include/v8-version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 12
1212
#define V8_MINOR_VERSION 8
1313
#define V8_BUILD_NUMBER 374
14-
#define V8_PATCH_LEVEL 32
14+
#define V8_PATCH_LEVEL 33
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/deoptimizer/deoptimizer.cc

+28
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,21 @@ class ActivationsFinder : public ThreadVisitor {
338338
// for the trampoline to the deoptimizer call respective to each code, and use
339339
// it to replace the current pc on the stack.
340340
void VisitThread(Isolate* isolate, ThreadLocalTop* top) override {
341+
#if V8_ENABLE_WEBASSEMBLY
342+
// Also visit the ancestors of the active stack for wasm stack switching.
343+
// We don't need to visit suspended stacks at the moment, because 1) they
344+
// only contain wasm frames and 2) wasm does not do lazy deopt. Revisit this
345+
// if one of these assumptions changes.
346+
Tagged<WasmContinuationObject> continuation;
347+
if (top == isolate->thread_local_top()) {
348+
Tagged<Object> maybe_continuation =
349+
isolate->root(RootIndex::kActiveContinuation);
350+
if (!IsUndefined(maybe_continuation)) {
351+
continuation = Cast<WasmContinuationObject>(maybe_continuation);
352+
}
353+
}
354+
#endif
355+
341356
for (StackFrameIterator it(isolate, top); !it.done(); it.Advance()) {
342357
if (it.frame()->is_optimized()) {
343358
Tagged<GcSafeCode> code = it.frame()->GcSafeLookupCode();
@@ -371,6 +386,19 @@ class ActivationsFinder : public ThreadVisitor {
371386
}
372387
}
373388
}
389+
390+
#if V8_ENABLE_WEBASSEMBLY
391+
// We reached the base of the wasm stack. Follow the chain of
392+
// continuations to find the parent stack and reset the iterator.
393+
if (it.frame()->type() == StackFrame::STACK_SWITCH) {
394+
CHECK_EQ(top, isolate->thread_local_top());
395+
DCHECK(!continuation.is_null());
396+
continuation = Cast<WasmContinuationObject>(continuation->parent());
397+
wasm::StackMemory* parent =
398+
reinterpret_cast<wasm::StackMemory*>(continuation->stack());
399+
it.Reset(top, parent);
400+
}
401+
#endif
374402
}
375403
}
376404

0 commit comments

Comments
 (0)