1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

LibJS: Make Interpreter::run() a void function

With one small exception, this is how we've been using this API already,
and it makes sense: a Program is just a ScopeNode with any number of
statements, which are executed one by one. There's no explicit return
value at the end, only a completion value of the last value-producing
statement, which we then access using VM::last_value() if needed (e.g.
in the REPL).
This commit is contained in:
Linus Groh 2021-03-16 09:09:56 +01:00 committed by Andreas Kling
parent ef3679f9c3
commit dadf2e8251
3 changed files with 8 additions and 8 deletions

View file

@ -61,7 +61,7 @@ public:
~Interpreter();
Value run(GlobalObject&, const Program&);
void run(GlobalObject&, const Program&);
GlobalObject& global_object();
const GlobalObject& global_object() const;