From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/JavaScriptCore/heap/ConservativeRoots.h | 29 ++++++++++---------------- 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'Source/JavaScriptCore/heap/ConservativeRoots.h') 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 -#include 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 - void genericAddPointer(void*, TinyBloomFilter, MarkHook&); + void genericAddPointer(void*, HeapVersion, TinyBloomFilter, MarkHook&); template 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 -- cgit v1.2.1