From 2ea45f48817434e4680a846615e12c41ff418861 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Sun, 8 Oct 2023 12:25:58 +0200 Subject: [PATCH] LibJS: Forward-declare RegexTable and BasicBlock in Executable.h Previously every file that included Executable.h (which is pretty much most LibJS and LibHTML files, given that VM.h needs it) had the whole definition of LibRegex, which was slowing down source parsing. --- Userland/Libraries/LibJS/Bytecode/Executable.cpp | 2 ++ Userland/Libraries/LibJS/Bytecode/Executable.h | 3 +-- Userland/Libraries/LibJS/Forward.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Executable.cpp b/Userland/Libraries/LibJS/Bytecode/Executable.cpp index 568e8f787a..05ff21f682 100644 --- a/Userland/Libraries/LibJS/Bytecode/Executable.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Executable.cpp @@ -4,7 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include +#include #include namespace JS::Bytecode { diff --git a/Userland/Libraries/LibJS/Bytecode/Executable.h b/Userland/Libraries/LibJS/Bytecode/Executable.h index 6e020e19d0..fa537ddee4 100644 --- a/Userland/Libraries/LibJS/Bytecode/Executable.h +++ b/Userland/Libraries/LibJS/Bytecode/Executable.h @@ -9,10 +9,9 @@ #include #include #include -#include #include -#include #include +#include namespace JS::Bytecode { diff --git a/Userland/Libraries/LibJS/Forward.h b/Userland/Libraries/LibJS/Forward.h index 8074d1a79f..2b661aeb65 100644 --- a/Userland/Libraries/LibJS/Forward.h +++ b/Userland/Libraries/LibJS/Forward.h @@ -306,6 +306,7 @@ class Executable; class Generator; class Instruction; class Interpreter; +class RegexTable; class Register; }