summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/Collector.h
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/runtime/Collector.h')
-rw-r--r--JavaScriptCore/runtime/Collector.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/JavaScriptCore/runtime/Collector.h b/JavaScriptCore/runtime/Collector.h
index 0a40758..34e238c 100644
--- a/JavaScriptCore/runtime/Collector.h
+++ b/JavaScriptCore/runtime/Collector.h
@@ -220,6 +220,13 @@ namespace JSC {
void set(size_t n) { bits[n >> 5] |= (1 << (n & 0x1F)); }
void clear(size_t n) { bits[n >> 5] &= ~(1 << (n & 0x1F)); }
void clearAll() { memset(bits, 0, sizeof(bits)); }
+ ALWAYS_INLINE void advanceToNextPossibleFreeCell(size_t& startCell)
+ {
+ if (!~bits[startCell >> 5])
+ startCell = (startCell & (~0x1F)) + 32;
+ else
+ ++startCell;
+ }
size_t count(size_t startCell = 0)
{
size_t result = 0;