From 8e5ebb04f4b1384f67ed7d861d42420681540535 Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Sun, 26 Feb 2023 20:17:34 +0100 Subject: LibJS: Use a pseudo top-level UnwindFrame in GenerateCFG Previously we assumed that there is always one such frame, now there is. --- Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Userland/Libraries/LibJS') diff --git a/Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp b/Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp index cf86913497..f0553cefa7 100644 --- a/Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp @@ -160,6 +160,9 @@ void GenerateCFG::perform(PassPipelineExecutable& executable) seen_blocks.clear(); unwind_frames.clear(); + UnwindFrame top_level_frame = {}; + + unwind_frames.append(&top_level_frame); generate_cfg_for_block(executable.executable.basic_blocks.first(), executable); -- cgit v1.2.3