1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

LibJS/Bytecode: Begin moving shareable (JIT+Interpreter) stuff somewhere

There are a lot of native C++ functions that will be used by both the
bytecode interpreter and jitted code. Let's put them in their own file
instead of having them in Interpreter.cpp.
This commit is contained in:
Andreas Kling 2023-10-18 13:26:47 +02:00
parent b923ca392d
commit 8905682a16
4 changed files with 86 additions and 56 deletions

View file

@ -0,0 +1,17 @@
/*
* Copyright (c) 2021-2023, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Bytecode/IdentifierTable.h>
#include <LibJS/Runtime/Completion.h>
namespace JS::Bytecode {
ThrowCompletionOr<NonnullGCPtr<Object>> base_object_for_get(Bytecode::Interpreter&, Value base_value);
ThrowCompletionOr<Value> get_by_id(Bytecode::Interpreter&, IdentifierTableIndex, Value base_value, Value this_value, u32 cache_index);
}