mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibJS/Bytecode: Move environment coordinate caches to Executable
Moving them out of the respective instructions allows the bytecode stream to be immutable.
This commit is contained in:
parent
5c7e5cc738
commit
2e23f00a2f
7 changed files with 31 additions and 20 deletions
|
@ -206,6 +206,7 @@ public:
|
|||
void emit_get_by_id_with_this(IdentifierTableIndex, Register);
|
||||
|
||||
[[nodiscard]] size_t next_global_variable_cache() { return m_next_global_variable_cache++; }
|
||||
[[nodiscard]] size_t next_environment_variable_cache() { return m_next_environment_variable_cache++; }
|
||||
|
||||
private:
|
||||
enum class JumpType {
|
||||
|
@ -236,6 +237,7 @@ private:
|
|||
u32 m_next_block { 1 };
|
||||
u32 m_next_property_lookup_cache { 0 };
|
||||
u32 m_next_global_variable_cache { 0 };
|
||||
u32 m_next_environment_variable_cache { 0 };
|
||||
FunctionKind m_enclosing_function_kind { FunctionKind::Normal };
|
||||
Vector<LabelableScope> m_continuable_scopes;
|
||||
Vector<LabelableScope> m_breakable_scopes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue