diff options
author | Hendiadyoin1 <leon.a@serenityos.org> | 2023-02-26 20:17:34 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-26 23:09:37 +0100 |
commit | 8e5ebb04f4b1384f67ed7d861d42420681540535 (patch) | |
tree | c6bd61c162c036fb64bab1a3b7a58eb91df92eec /Userland/Libraries/LibJS | |
parent | bd1cecb991247e00d13bc8fc970f3abe6517ab1a (diff) | |
download | serenity-8e5ebb04f4b1384f67ed7d861d42420681540535.zip |
LibJS: Use a pseudo top-level UnwindFrame in GenerateCFG
Previously we assumed that there is always one such frame, now there is.
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r-- | Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); |