mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibJS: Put zombie cell tracking code behind a compile-time flag
Since this is a debug-only feature, let's not have it impact GC marking performance when you don't need it.
This commit is contained in:
parent
f290c59dd8
commit
6a1b82df2b
13 changed files with 76 additions and 8 deletions
|
@ -30,7 +30,13 @@ public:
|
|||
virtual void remove_swept_cells(Badge<Heap>, Span<Cell*>) override;
|
||||
|
||||
private:
|
||||
virtual void did_become_zombie() override { deregister(); }
|
||||
#ifdef JS_TRACK_ZOMBIE_CELLS
|
||||
virtual void did_become_zombie() override
|
||||
{
|
||||
deregister();
|
||||
}
|
||||
#endif
|
||||
|
||||
void visit_edges(Visitor&) override;
|
||||
|
||||
HashMap<Cell*, Value> m_values; // This stores Cell pointers instead of Object pointers to aide with sweeping
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue