mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibJS/JIT: Don't keep trying to JIT unsupported bytecode executables
We now only try jitting each Bytecode::Executable once, and then cache the resulting NativeExecutable.
This commit is contained in:
parent
6a6ef6670c
commit
310bcd4717
Notes:
sideshowbarker
2024-07-17 21:16:31 +09:00
Author: https://github.com/awesomekling
Commit: 310bcd4717
Pull-request: https://github.com/SerenityOS/serenity/pull/21619
Reviewed-by: https://github.com/Hendiadyoin1
5 changed files with 21 additions and 3 deletions
|
@ -8,10 +8,12 @@
|
|||
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <LibJS/Bytecode/IdentifierTable.h>
|
||||
#include <LibJS/Bytecode/StringTable.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/JIT/NativeExecutable.h>
|
||||
#include <LibJS/Runtime/EnvironmentCoordinate.h>
|
||||
|
||||
namespace JS::Bytecode {
|
||||
|
@ -63,6 +65,12 @@ public:
|
|||
DeprecatedFlyString const& get_identifier(IdentifierTableIndex index) const { return identifier_table->get(index); }
|
||||
|
||||
void dump() const;
|
||||
|
||||
JIT::NativeExecutable const* get_or_create_native_executable();
|
||||
|
||||
private:
|
||||
OwnPtr<JIT::NativeExecutable> m_native_executable;
|
||||
bool m_did_try_jitting { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue