mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:58: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
|
@ -24,12 +24,18 @@ public:
|
|||
bool is_marked() const { return m_mark; }
|
||||
void set_marked(bool b) { m_mark = b; }
|
||||
|
||||
virtual void did_become_zombie() { }
|
||||
#ifdef JS_TRACK_ZOMBIE_CELLS
|
||||
virtual void did_become_zombie()
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
enum class State {
|
||||
Live,
|
||||
Dead,
|
||||
#ifdef JS_TRACK_ZOMBIE_CELLS
|
||||
Zombie,
|
||||
#endif
|
||||
};
|
||||
|
||||
State state() const { return m_state; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue