mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 864085 - Inline Cell::isTenured; r=billm
--HG-- extra : rebase_source : ee9d5e65652dcc6c233542c063c1e2eaf51b2bf0
This commit is contained in:
parent
03fcef2cfa
commit
f1726d5d97
@ -12,6 +12,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "jspubtd.h"
|
||||
#include "jstypes.h"
|
||||
#include "jsutil.h"
|
||||
|
||||
@ -95,7 +96,7 @@ struct Cell
|
||||
|
||||
#ifdef DEBUG
|
||||
inline bool isAligned() const;
|
||||
bool isTenured() const;
|
||||
inline bool isTenured() const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
@ -994,6 +995,16 @@ Cell::isAligned() const
|
||||
{
|
||||
return Arena::isAligned(address(), arenaHeader()->getThingSize());
|
||||
}
|
||||
|
||||
bool
|
||||
Cell::isTenured() const
|
||||
{
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
JS::shadow::Runtime *rt = js::gc::GetGCThingRuntime(this);
|
||||
return uintptr_t(this) < rt->gcNurseryStart_ || uintptr_t(this) >= rt->gcNurseryEnd_;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline uintptr_t
|
||||
|
@ -261,12 +261,6 @@ ArenaHeader::checkSynchronizedWithFreeList() const
|
||||
*/
|
||||
JS_ASSERT(firstSpan.isSameNonEmptySpan(list));
|
||||
}
|
||||
|
||||
bool
|
||||
js::gc::Cell::isTenured() const
|
||||
{
|
||||
return !IsInsideNursery(runtime(), this);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* static */ void
|
||||
|
Loading…
Reference in New Issue
Block a user