From 8c745ca223f98d32feba54656baea25bd137da72 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 27 Oct 2023 11:50:37 +0200 Subject: [PATCH] LibJS+LibJIT: Fix GCC build --- Userland/Libraries/LibJIT/Assembler.h | 5 ++++- Userland/Libraries/LibJS/JIT/Compiler.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJIT/Assembler.h b/Userland/Libraries/LibJIT/Assembler.h index 54f9acd581..5fac163c75 100644 --- a/Userland/Libraries/LibJIT/Assembler.h +++ b/Userland/Libraries/LibJIT/Assembler.h @@ -228,7 +228,10 @@ struct Assembler { [[nodiscard]] Label make_label() { - return { .offset_of_label_in_instruction_stream = m_output.size() }; + return Label { + .offset_of_label_in_instruction_stream = m_output.size(), + .jump_slot_offsets_in_instruction_stream = {}, + }; } [[nodiscard]] Label jump() diff --git a/Userland/Libraries/LibJS/JIT/Compiler.cpp b/Userland/Libraries/LibJS/JIT/Compiler.cpp index 4e1b9aef00..b1569370a2 100644 --- a/Userland/Libraries/LibJS/JIT/Compiler.cpp +++ b/Userland/Libraries/LibJS/JIT/Compiler.cpp @@ -581,7 +581,7 @@ void Compiler::compile_new_array(Bytecode::Op::NewArray const& op) store_vm_register(Bytecode::Register::accumulator(), RET); } -Value cxx_new_function( +static Value cxx_new_function( VM& vm, FunctionExpression const& function_node, Optional const& lhs_name,