mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
LibJS+AK: Move cross-platform stack bounds code from JS::Heap to AK::StackInfo
This will be useful for other things than the Heap, maybe even outside of LibJS.
This commit is contained in:
parent
2d96a07b26
commit
9c3ead8f91
5 changed files with 136 additions and 40 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <AK/FlyString.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/StackInfo.h>
|
||||
#include <LibJS/Heap/Heap.h>
|
||||
#include <LibJS/Runtime/CommonPropertyNames.h>
|
||||
#include <LibJS/Runtime/ErrorTypes.h>
|
||||
|
@ -165,6 +166,8 @@ public:
|
|||
Value last_value() const { return m_last_value; }
|
||||
void set_last_value(Badge<Interpreter>, Value value) { m_last_value = value; }
|
||||
|
||||
const StackInfo& stack_info() const { return m_stack_info; };
|
||||
|
||||
bool underscore_is_last_value() const { return m_underscore_is_last_value; }
|
||||
void set_underscore_is_last_value(bool b) { m_underscore_is_last_value = b; }
|
||||
|
||||
|
@ -248,6 +251,8 @@ private:
|
|||
ScopeType m_unwind_until { ScopeType::None };
|
||||
FlyString m_unwind_until_label;
|
||||
|
||||
StackInfo m_stack_info;
|
||||
|
||||
bool m_underscore_is_last_value { false };
|
||||
|
||||
HashMap<String, Symbol*> m_global_symbol_map;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue