mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:22:07 +00:00
LibJS: Remove unused realm parameter from run_and_return_frame()
This commit is contained in:
parent
d6e959686d
commit
3ccac0cf6e
9 changed files with 15 additions and 17 deletions
|
@ -105,7 +105,7 @@ ThrowCompletionOr<Value> Interpreter::run(Script& script_record, JS::GCPtr<Envir
|
|||
executable->dump();
|
||||
|
||||
// a. Set result to the result of evaluating script.
|
||||
auto result_or_error = run_and_return_frame(script_record.realm(), *executable, nullptr);
|
||||
auto result_or_error = run_and_return_frame(*executable, nullptr);
|
||||
if (result_or_error.value.is_error())
|
||||
result = result_or_error.value.release_error();
|
||||
else
|
||||
|
@ -165,7 +165,7 @@ ThrowCompletionOr<Value> Interpreter::run(SourceTextModule& module)
|
|||
return js_undefined();
|
||||
}
|
||||
|
||||
Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Realm&, Executable& executable, BasicBlock const* entry_point, CallFrame* in_frame)
|
||||
Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable& executable, BasicBlock const* entry_point, CallFrame* in_frame)
|
||||
{
|
||||
dbgln_if(JS_BYTECODE_DEBUG, "Bytecode::Interpreter will run unit {:p}", &executable);
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ public:
|
|||
ThrowCompletionOr<Value> run(Script&, JS::GCPtr<Environment> lexical_environment_override = nullptr);
|
||||
ThrowCompletionOr<Value> run(SourceTextModule&);
|
||||
|
||||
ThrowCompletionOr<Value> run(Realm& realm, Bytecode::Executable& executable, Bytecode::BasicBlock const* entry_point = nullptr)
|
||||
ThrowCompletionOr<Value> run(Bytecode::Executable& executable, Bytecode::BasicBlock const* entry_point = nullptr)
|
||||
{
|
||||
auto value_and_frame = run_and_return_frame(realm, executable, entry_point);
|
||||
auto value_and_frame = run_and_return_frame(executable, entry_point);
|
||||
return move(value_and_frame.value);
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
ThrowCompletionOr<Value> value;
|
||||
OwnPtr<CallFrame> frame;
|
||||
};
|
||||
ValueAndFrame run_and_return_frame(Realm&, Bytecode::Executable&, Bytecode::BasicBlock const* entry_point, CallFrame* = nullptr);
|
||||
ValueAndFrame run_and_return_frame(Bytecode::Executable&, Bytecode::BasicBlock const* entry_point, CallFrame* = nullptr);
|
||||
|
||||
ALWAYS_INLINE Value& accumulator() { return reg(Register::accumulator()); }
|
||||
ALWAYS_INLINE Value& saved_return_value() { return reg(Register::saved_return_value()); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue