mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibJS: Remove no-longer-needed environment record shape
We had a cached shape for environment records to make instantiating them fast. Now that environment records don't inherit from JS::Object, we can just get rid of this. :^)
This commit is contained in:
parent
9ccc2f6c4d
commit
cf34313fad
2 changed files with 0 additions and 7 deletions
|
@ -40,8 +40,6 @@ VM::VM()
|
||||||
m_single_ascii_character_strings[i] = m_heap.allocate_without_global_object<PrimitiveString>(String::formatted("{:c}", i));
|
m_single_ascii_character_strings[i] = m_heap.allocate_without_global_object<PrimitiveString>(String::formatted("{:c}", i));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_environment_record_shape = m_heap.allocate_without_global_object<Shape>(Shape::ShapeWithoutGlobalObjectTag::Tag);
|
|
||||||
|
|
||||||
#define __JS_ENUMERATE(SymbolName, snake_name) \
|
#define __JS_ENUMERATE(SymbolName, snake_name) \
|
||||||
m_well_known_symbol_##snake_name = js_symbol(*this, "Symbol." #SymbolName, false);
|
m_well_known_symbol_##snake_name = js_symbol(*this, "Symbol." #SymbolName, false);
|
||||||
JS_ENUMERATE_WELL_KNOWN_SYMBOLS
|
JS_ENUMERATE_WELL_KNOWN_SYMBOLS
|
||||||
|
@ -94,7 +92,6 @@ void VM::gather_roots(HashTable<Cell*>& roots)
|
||||||
for (auto* string : m_single_ascii_character_strings)
|
for (auto* string : m_single_ascii_character_strings)
|
||||||
roots.set(string);
|
roots.set(string);
|
||||||
|
|
||||||
roots.set(m_environment_record_shape);
|
|
||||||
roots.set(m_exception);
|
roots.set(m_exception);
|
||||||
|
|
||||||
if (m_last_value.is_cell())
|
if (m_last_value.is_cell())
|
||||||
|
|
|
@ -242,8 +242,6 @@ public:
|
||||||
|
|
||||||
CommonPropertyNames names;
|
CommonPropertyNames names;
|
||||||
|
|
||||||
Shape& environment_record_shape() { return *m_environment_record_shape; }
|
|
||||||
|
|
||||||
void run_queued_promise_jobs();
|
void run_queued_promise_jobs();
|
||||||
void enqueue_promise_job(NativeFunction&);
|
void enqueue_promise_job(NativeFunction&);
|
||||||
|
|
||||||
|
@ -288,8 +286,6 @@ private:
|
||||||
JS_ENUMERATE_WELL_KNOWN_SYMBOLS
|
JS_ENUMERATE_WELL_KNOWN_SYMBOLS
|
||||||
#undef __JS_ENUMERATE
|
#undef __JS_ENUMERATE
|
||||||
|
|
||||||
Shape* m_environment_record_shape { nullptr };
|
|
||||||
|
|
||||||
bool m_underscore_is_last_value { false };
|
bool m_underscore_is_last_value { false };
|
||||||
|
|
||||||
u32 m_execution_generation { 0 };
|
u32 m_execution_generation { 0 };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue