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 <stddef.h>
|
||||||
|
|
||||||
|
#include "jspubtd.h"
|
||||||
#include "jstypes.h"
|
#include "jstypes.h"
|
||||||
#include "jsutil.h"
|
#include "jsutil.h"
|
||||||
|
|
||||||
@ -95,7 +96,7 @@ struct Cell
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
inline bool isAligned() const;
|
inline bool isAligned() const;
|
||||||
bool isTenured() const;
|
inline bool isTenured() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -994,6 +995,16 @@ Cell::isAligned() const
|
|||||||
{
|
{
|
||||||
return Arena::isAligned(address(), arenaHeader()->getThingSize());
|
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
|
#endif
|
||||||
|
|
||||||
inline uintptr_t
|
inline uintptr_t
|
||||||
|
@ -261,12 +261,6 @@ ArenaHeader::checkSynchronizedWithFreeList() const
|
|||||||
*/
|
*/
|
||||||
JS_ASSERT(firstSpan.isSameNonEmptySpan(list));
|
JS_ASSERT(firstSpan.isSameNonEmptySpan(list));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
js::gc::Cell::isTenured() const
|
|
||||||
{
|
|
||||||
return !IsInsideNursery(runtime(), this);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* static */ void
|
/* static */ void
|
||||||
|
Loading…
Reference in New Issue
Block a user