mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 10:15:07 +00:00
test262-runner+js: Respect the bytecode optimizations enabled flag
This commit is contained in:
parent
aa0ed4ab4e
commit
e012565898
4 changed files with 15 additions and 14 deletions
|
@ -32,6 +32,13 @@ void Interpreter::set_enabled(bool enabled)
|
|||
s_bytecode_interpreter_enabled = enabled;
|
||||
}
|
||||
|
||||
static bool s_optimizations_enabled = false;
|
||||
|
||||
void Interpreter::set_optimizations_enabled(bool enabled)
|
||||
{
|
||||
s_optimizations_enabled = enabled;
|
||||
}
|
||||
|
||||
bool g_dump_bytecode = false;
|
||||
|
||||
Interpreter::Interpreter(VM& vm)
|
||||
|
@ -104,7 +111,7 @@ ThrowCompletionOr<Value> Interpreter::run(Script& script_record, JS::GCPtr<Envir
|
|||
} else {
|
||||
auto executable = executable_result.release_value();
|
||||
|
||||
if (m_optimizations_enabled) {
|
||||
if (s_optimizations_enabled) {
|
||||
auto& passes = optimization_pipeline();
|
||||
passes.perform(*executable);
|
||||
}
|
||||
|
@ -173,11 +180,6 @@ ThrowCompletionOr<Value> Interpreter::run(SourceTextModule& module)
|
|||
return js_undefined();
|
||||
}
|
||||
|
||||
void Interpreter::set_optimizations_enabled(bool enabled)
|
||||
{
|
||||
m_optimizations_enabled = enabled;
|
||||
}
|
||||
|
||||
Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Realm& realm, Executable const& executable, BasicBlock const* entry_point, RegisterWindow* in_frame)
|
||||
{
|
||||
dbgln_if(JS_BYTECODE_DEBUG, "Bytecode::Interpreter will run unit {:p}", &executable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue