mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibJS+LibTest+js: Convert BC::Interpreter::run to ThrowCompletionOr<>
Note that this is just a shallow API change.
This commit is contained in:
parent
3b0bf05fa5
commit
070d2eaa51
Notes:
sideshowbarker
2024-07-18 01:14:28 +09:00
Author: https://github.com/alimpfard
Commit: 070d2eaa51
Pull-request: https://github.com/SerenityOS/serenity/pull/10864
Reviewed-by: https://github.com/linusg
7 changed files with 19 additions and 11 deletions
|
@ -32,14 +32,14 @@ public:
|
|||
Realm& realm() { return m_realm; }
|
||||
VM& vm() { return m_vm; }
|
||||
|
||||
Value run(Bytecode::Executable const& executable, Bytecode::BasicBlock const* entry_point = nullptr)
|
||||
ThrowCompletionOr<Value> run(Bytecode::Executable const& executable, Bytecode::BasicBlock const* entry_point = nullptr)
|
||||
{
|
||||
auto value_and_frame = run_and_return_frame(executable, entry_point);
|
||||
return value_and_frame.value;
|
||||
}
|
||||
|
||||
struct ValueAndFrame {
|
||||
Value value;
|
||||
ThrowCompletionOr<Value> value;
|
||||
OwnPtr<RegisterWindow> frame;
|
||||
};
|
||||
ValueAndFrame run_and_return_frame(Bytecode::Executable const&, Bytecode::BasicBlock const* entry_point);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue