Commit 270c2d71 authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

[maglev] Keep BytecodeArray alive via deopt literals

Do the same trick as TurboFan, keeping the BytecodeArray alive by
holding it strongly in the deopt literals.

Bug: v8:7700
Change-Id: I8f8472674b08df3ca18aff58172e7ba83d09a620
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647358
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80519}
parent 19b6e5f4
......@@ -347,6 +347,13 @@ class MaglevCodeGeneratorImpl final {
processor_.ProcessGraph(graph_);
EmitDeferredCode();
EmitDeopts();
// Add the bytecode to the deopt literals to make sure it's held strongly.
// TODO(leszeks): Do this fo inlined functions too.
GetDeoptLiteral(*code_gen_state_.compilation_info()
->toplevel_compilation_unit()
->bytecode()
.object());
}
void EmitDeferredCode() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment