diff options
Diffstat (limited to 'Source/JavaScriptCore/heap/ConservativeRoots.h')
-rw-r--r-- | Source/JavaScriptCore/heap/ConservativeRoots.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/Source/JavaScriptCore/heap/ConservativeRoots.h b/Source/JavaScriptCore/heap/ConservativeRoots.h index 0cad933a4..e46445b41 100644 --- a/Source/JavaScriptCore/heap/ConservativeRoots.h +++ b/Source/JavaScriptCore/heap/ConservativeRoots.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Apple Inc. All rights reserved. + * Copyright (C) 2009, 2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,23 +23,19 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef ConservativeRoots_h -#define ConservativeRoots_h +#pragma once #include "Heap.h" -#include <wtf/OSAllocator.h> -#include <wtf/Vector.h> namespace JSC { class CodeBlockSet; -class Heap; +class HeapCell; class JITStubRoutineSet; -class JSCell; class ConservativeRoots { public: - ConservativeRoots(const MarkedBlockSet*, CopiedSpace*); + ConservativeRoots(Heap&); ~ConservativeRoots(); void add(void* begin, void* end); @@ -47,26 +43,25 @@ public: void add(void* begin, void* end, JITStubRoutineSet&, CodeBlockSet&); size_t size(); - JSCell** roots(); + HeapCell** roots(); private: static const size_t inlineCapacity = 128; - static const size_t nonInlineCapacity = 8192 / sizeof(JSCell*); + static const size_t nonInlineCapacity = 8192 / sizeof(HeapCell*); template<typename MarkHook> - void genericAddPointer(void*, TinyBloomFilter, MarkHook&); + void genericAddPointer(void*, HeapVersion, TinyBloomFilter, MarkHook&); template<typename MarkHook> void genericAddSpan(void*, void* end, MarkHook&); void grow(); - JSCell** m_roots; + HeapCell** m_roots; size_t m_size; size_t m_capacity; - const MarkedBlockSet* m_blocks; - CopiedSpace* m_copiedSpace; - JSCell* m_inlineRoots[inlineCapacity]; + Heap& m_heap; + HeapCell* m_inlineRoots[inlineCapacity]; }; inline size_t ConservativeRoots::size() @@ -74,11 +69,9 @@ inline size_t ConservativeRoots::size() return m_size; } -inline JSCell** ConservativeRoots::roots() +inline HeapCell** ConservativeRoots::roots() { return m_roots; } } // namespace JSC - -#endif // ConservativeRoots_h |