mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02:00
LibJS: Implement the NewClass opcode
This commit is contained in:
committed by
Linus Groh
parent
8b27917603
commit
d7c207beb9
@@ -10,6 +10,7 @@
|
||||
#include <LibJS/Bytecode/Instruction.h>
|
||||
#include <LibJS/Bytecode/Interpreter.h>
|
||||
#include <LibJS/Bytecode/Op.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Runtime/GlobalEnvironment.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
@@ -193,6 +194,14 @@ ThrowCompletionOr<void> Interpreter::continue_pending_unwind(Label const& resume
|
||||
return {};
|
||||
}
|
||||
|
||||
VM::InterpreterExecutionScope Interpreter::ast_interpreter_scope()
|
||||
{
|
||||
if (!m_ast_interpreter)
|
||||
m_ast_interpreter = JS::Interpreter::create_with_existing_realm(m_realm);
|
||||
|
||||
return { *m_ast_interpreter };
|
||||
}
|
||||
|
||||
AK::Array<OwnPtr<PassManager>, static_cast<UnderlyingType<Interpreter::OptimizationLevel>>(Interpreter::OptimizationLevel::__Count)> Interpreter::s_optimization_pipelines {};
|
||||
|
||||
Bytecode::PassManager& Interpreter::optimization_pipeline(Interpreter::OptimizationLevel level)
|
||||
|
||||
Reference in New Issue
Block a user