mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:25:07 +00:00
LibJS: Extract most of Interpreter's run() into execute_statement()
Interpreter::run() was so far being used both as the "public API entry point" for running a JS::Program as well as internally to execute JS::Statement|s of all kinds - this is now more distinctly separated. A program as returned by the parser is still going through run(), which is responsible for creating the initial global call frame, but all other statements are executed via execute_statement() directly. Fixes #3437, a regression introduced by adding ASSERT(!exception()) to run() without considering the effects that would have on internal usage.
This commit is contained in:
parent
bd6390d8cb
commit
ec43f73b74
5 changed files with 55 additions and 25 deletions
|
@ -100,7 +100,9 @@ public:
|
|||
|
||||
~Interpreter();
|
||||
|
||||
Value run(GlobalObject&, const Statement&, ArgumentVector = {}, ScopeType = ScopeType::Block);
|
||||
Value run(GlobalObject&, const Program&);
|
||||
|
||||
Value execute_statement(GlobalObject&, const Statement&, ArgumentVector = {}, ScopeType = ScopeType::Block);
|
||||
|
||||
GlobalObject& global_object();
|
||||
const GlobalObject& global_object() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue