mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Don't return the "last computed value" from Interpreter::run()
Only return whatever a "return" statment told us to return. The last computed value is now available in Interpreter::last_value() instead, where the REPL can pick it up.
This commit is contained in:
parent
97cd1173fa
commit
2db8716a6f
Notes:
sideshowbarker
2024-07-19 07:55:29 +09:00
Author: https://github.com/awesomekling
Commit: 2db8716a6f
3 changed files with 17 additions and 7 deletions
|
@ -154,11 +154,15 @@ public:
|
|||
return throw_exception(heap().allocate<Exception>(value));
|
||||
}
|
||||
|
||||
Value last_value() const { return m_last_value; }
|
||||
|
||||
private:
|
||||
Interpreter();
|
||||
|
||||
Heap m_heap;
|
||||
|
||||
Value m_last_value;
|
||||
|
||||
Vector<ScopeFrame> m_scope_stack;
|
||||
Vector<CallFrame> m_call_stack;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue