From 17a5af04e325b034e733d2f601e899271acf2e25 Mon Sep 17 00:00:00 2001 From: MacDue Date: Thu, 20 Jul 2023 23:49:48 +0100 Subject: [PATCH] LibJS: Actually generate the bytecode CFG This is just something I spotted looking around the code, previously the PassPipelineExecutable was passed by value to generate_cfg_for_block, which generated the CFG then just dropped it on the floor. Making this a reference results in the CFG actually getting generated. --- Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp b/Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp index c92cf1fb8b8..180e6dfe14e 100644 --- a/Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Pass/GenerateCFG.cpp @@ -23,7 +23,7 @@ static BasicBlock const* next_handler_or_finalizer() return unwind_frames.last()->handler ?: unwind_frames.last()->finalizer; } -static void generate_cfg_for_block(BasicBlock const& current_block, PassPipelineExecutable executable) +static void generate_cfg_for_block(BasicBlock const& current_block, PassPipelineExecutable& executable) { seen_blocks.set(¤t_block);