Commit 4e822638 authored by mhahnenberg@apple.com's avatar mhahnenberg@apple.com

Rename Bump* to Copy*

https://bugs.webkit.org/show_bug.cgi?id=78573

Reviewed by Geoffrey Garen.

Renamed anything with "Bump" in the name to have "Copied" instead.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* heap/BumpBlock.h: Removed.
* heap/BumpSpace.cpp: Removed.
* heap/BumpSpace.h: Removed.
* heap/BumpSpaceInlineMethods.h: Removed.
* heap/ConservativeRoots.cpp:
(JSC::ConservativeRoots::ConservativeRoots):
(JSC::ConservativeRoots::genericAddPointer):
* heap/ConservativeRoots.h:
(ConservativeRoots):
* heap/CopiedBlock.h: Added.
(JSC):
(CopiedBlock):
(JSC::CopiedBlock::CopiedBlock):
* heap/CopiedSpace.cpp: Added.
(JSC):
(JSC::CopiedSpace::tryAllocateSlowCase):
* heap/CopiedSpace.h: Added.
(JSC):
(CopiedSpace):
(JSC::CopiedSpace::isInCopyPhase):
(JSC::CopiedSpace::totalMemoryAllocated):
(JSC::CopiedSpace::totalMemoryUtilized):
* heap/CopiedSpaceInlineMethods.h: Added.
(JSC):
(JSC::CopiedSpace::CopiedSpace):
(JSC::CopiedSpace::init):
(JSC::CopiedSpace::contains):
(JSC::CopiedSpace::pin):
(JSC::CopiedSpace::startedCopying):
(JSC::CopiedSpace::doneCopying):
(JSC::CopiedSpace::doneFillingBlock):
(JSC::CopiedSpace::recycleBlock):
(JSC::CopiedSpace::getFreshBlock):
(JSC::CopiedSpace::borrowBlock):
(JSC::CopiedSpace::addNewBlock):
(JSC::CopiedSpace::allocateNewBlock):
(JSC::CopiedSpace::fitsInBlock):
(JSC::CopiedSpace::fitsInCurrentBlock):
(JSC::CopiedSpace::tryAllocate):
(JSC::CopiedSpace::tryAllocateOversize):
(JSC::CopiedSpace::allocateFromBlock):
(JSC::CopiedSpace::tryReallocate):
(JSC::CopiedSpace::tryReallocateOversize):
(JSC::CopiedSpace::isOversize):
(JSC::CopiedSpace::isPinned):
(JSC::CopiedSpace::oversizeBlockFor):
(JSC::CopiedSpace::blockFor):
* heap/Heap.cpp:
* heap/Heap.h:
(JSC):
(Heap):
* heap/MarkStack.cpp:
(JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::startCopying):
(JSC::SlotVisitor::allocateNewSpace):
(JSC::SlotVisitor::doneCopying):
* heap/MarkStack.h:
(MarkStackThreadSharedData):
* heap/SlotVisitor.h:
(SlotVisitor):
* runtime/JSArray.cpp:
* runtime/JSObject.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent aea14609
......@@ -75,7 +75,7 @@ SET(JavaScriptCore_SOURCES
dfg/DFGSpeculativeJIT64.cpp
dfg/DFGThunks.cpp
heap/BumpSpace.cpp
heap/CopiedSpace.cpp
heap/DFGCodeBlocks.cpp
heap/Heap.cpp
heap/HandleHeap.cpp
......
2012-02-17 Mark Hahnenberg <mhahnenberg@apple.com>
Rename Bump* to Copy*
https://bugs.webkit.org/show_bug.cgi?id=78573
Reviewed by Geoffrey Garen.
Renamed anything with "Bump" in the name to have "Copied" instead.
* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* heap/BumpBlock.h: Removed.
* heap/BumpSpace.cpp: Removed.
* heap/BumpSpace.h: Removed.
* heap/BumpSpaceInlineMethods.h: Removed.
* heap/ConservativeRoots.cpp:
(JSC::ConservativeRoots::ConservativeRoots):
(JSC::ConservativeRoots::genericAddPointer):
* heap/ConservativeRoots.h:
(ConservativeRoots):
* heap/CopiedBlock.h: Added.
(JSC):
(CopiedBlock):
(JSC::CopiedBlock::CopiedBlock):
* heap/CopiedSpace.cpp: Added.
(JSC):
(JSC::CopiedSpace::tryAllocateSlowCase):
* heap/CopiedSpace.h: Added.
(JSC):
(CopiedSpace):
(JSC::CopiedSpace::isInCopyPhase):
(JSC::CopiedSpace::totalMemoryAllocated):
(JSC::CopiedSpace::totalMemoryUtilized):
* heap/CopiedSpaceInlineMethods.h: Added.
(JSC):
(JSC::CopiedSpace::CopiedSpace):
(JSC::CopiedSpace::init):
(JSC::CopiedSpace::contains):
(JSC::CopiedSpace::pin):
(JSC::CopiedSpace::startedCopying):
(JSC::CopiedSpace::doneCopying):
(JSC::CopiedSpace::doneFillingBlock):
(JSC::CopiedSpace::recycleBlock):
(JSC::CopiedSpace::getFreshBlock):
(JSC::CopiedSpace::borrowBlock):
(JSC::CopiedSpace::addNewBlock):
(JSC::CopiedSpace::allocateNewBlock):
(JSC::CopiedSpace::fitsInBlock):
(JSC::CopiedSpace::fitsInCurrentBlock):
(JSC::CopiedSpace::tryAllocate):
(JSC::CopiedSpace::tryAllocateOversize):
(JSC::CopiedSpace::allocateFromBlock):
(JSC::CopiedSpace::tryReallocate):
(JSC::CopiedSpace::tryReallocateOversize):
(JSC::CopiedSpace::isOversize):
(JSC::CopiedSpace::isPinned):
(JSC::CopiedSpace::oversizeBlockFor):
(JSC::CopiedSpace::blockFor):
* heap/Heap.cpp:
* heap/Heap.h:
(JSC):
(Heap):
* heap/MarkStack.cpp:
(JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::startCopying):
(JSC::SlotVisitor::allocateNewSpace):
(JSC::SlotVisitor::doneCopying):
* heap/MarkStack.h:
(MarkStackThreadSharedData):
* heap/SlotVisitor.h:
(SlotVisitor):
* runtime/JSArray.cpp:
* runtime/JSObject.cpp:
2012-02-16 Yuqiang Xian <yuqiang.xian@intel.com>
Add JSC code profiling support on Linux x86
......@@ -183,10 +183,10 @@ javascriptcore_sources += \
Source/JavaScriptCore/dfg/DFGThunks.cpp \
Source/JavaScriptCore/dfg/DFGThunks.h \
Source/JavaScriptCore/dfg/DFGVariableAccessData.h \
Source/JavaScriptCore/heap/BumpBlock.h \
Source/JavaScriptCore/heap/BumpSpace.cpp \
Source/JavaScriptCore/heap/BumpSpace.h \
Source/JavaScriptCore/heap/BumpSpaceInlineMethods.h \
Source/JavaScriptCore/heap/CopiedBlock.h \
Source/JavaScriptCore/heap/CopiedSpace.cpp \
Source/JavaScriptCore/heap/CopiedSpace.h \
Source/JavaScriptCore/heap/CopiedSpaceInlineMethods.h \
Source/JavaScriptCore/heap/CardSet.h \
Source/JavaScriptCore/heap/ConservativeRoots.cpp \
Source/JavaScriptCore/heap/ConservativeRoots.h \
......
......@@ -27,9 +27,9 @@
'API/OpaqueJSString.h',
'assembler/MacroAssemblerCodeRef.h',
'bytecode/Opcode.h',
'heap/BumpBlock.h',
'heap/BumpSpace.h',
'heap/BumpSpaceInlineMethods.h',
'heap/CopiedBlock.h',
'heap/CopiedSpace.h',
'heap/CopiedSpaceInlineMethods.h',
'heap/ConservativeRoots.h',
'heap/GCAssertions.h',
'heap/Handle.h',
......
......@@ -2038,19 +2038,19 @@
Name="heap"
>
<File
RelativePath="..\..\heap\BumpBlock.h"
RelativePath="..\..\heap\CopiedBlock.h"
>
</File>
<File
RelativePath="..\..\heap\BumpSpace.cpp"
RelativePath="..\..\heap\CopiedSpace.cpp"
>
</File>
<File
RelativePath="..\..\heap\BumpSpace.h"
RelativePath="..\..\heap\CopiedSpace.h"
>
</File>
<File
RelativePath="..\..\heap\BumpSpaceInlineMethods.h"
RelativePath="..\..\heap\CopiedSpaceInlineMethods.h"
>
</File>
<File
......
......@@ -743,14 +743,14 @@
C22C531313FAF6EF00B7DC0D /* strtod.cc in Sources */ = {isa = PBXBuildFile; fileRef = C22C52B913FAF6EF00B7DC0D /* strtod.cc */; };
C22C531413FAF6EF00B7DC0D /* strtod.h in Headers */ = {isa = PBXBuildFile; fileRef = C22C52BA13FAF6EF00B7DC0D /* strtod.h */; settings = {ATTRIBUTES = (Private, ); }; };
C22C531513FAF6EF00B7DC0D /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = C22C52BB13FAF6EF00B7DC0D /* utils.h */; settings = {ATTRIBUTES = (Private, ); }; };
C240305514B404E60079EB64 /* BumpSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C240305314B404C90079EB64 /* BumpSpace.cpp */; };
C240305514B404E60079EB64 /* CopiedSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C240305314B404C90079EB64 /* CopiedSpace.cpp */; };
C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = C2B916C114DA014E00CBAC86 /* MarkedAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2B916C514DA040C00CBAC86 /* MarkedAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2B916C414DA040C00CBAC86 /* MarkedAllocator.cpp */; };
C2C8D02D14A3C6E000578E65 /* BumpSpaceInlineMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02B14A3C6B200578E65 /* BumpSpaceInlineMethods.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2C8D03014A3CEFC00578E65 /* BumpBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02E14A3CEFC00578E65 /* BumpBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2C8D02D14A3C6E000578E65 /* CopiedSpaceInlineMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02B14A3C6B200578E65 /* CopiedSpaceInlineMethods.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2C8D03014A3CEFC00578E65 /* CopiedBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02E14A3CEFC00578E65 /* CopiedBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2C8D03114A3CEFC00578E65 /* HeapBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02F14A3CEFC00578E65 /* HeapBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2D9CA1314BCC04600304B46 /* CheckedBoolean.h in Headers */ = {isa = PBXBuildFile; fileRef = C2D9CA1214BCC04600304B46 /* CheckedBoolean.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2EAA3FA149A835E00FCE112 /* BumpSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = C2EAA3F8149A830800FCE112 /* BumpSpace.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2EAA3FA149A835E00FCE112 /* CopiedSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = C2EAA3F8149A830800FCE112 /* CopiedSpace.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2EE59A013FC973F009CEAFE /* DecimalNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = C2EE599E13FC972A009CEAFE /* DecimalNumber.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2EE59A113FC9768009CEAFE /* DecimalNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2EE599D13FC972A009CEAFE /* DecimalNumber.cpp */; };
D7A46A4F1338FFEA00ED695C /* DynamicAnnotations.h in Headers */ = {isa = PBXBuildFile; fileRef = D75AF59612F8CB9500FC0ADF /* DynamicAnnotations.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -1550,14 +1550,14 @@
C22C52B913FAF6EF00B7DC0D /* strtod.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strtod.cc; sourceTree = "<group>"; };
C22C52BA13FAF6EF00B7DC0D /* strtod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strtod.h; sourceTree = "<group>"; };
C22C52BB13FAF6EF00B7DC0D /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = "<group>"; };
C240305314B404C90079EB64 /* BumpSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BumpSpace.cpp; sourceTree = "<group>"; };
C240305314B404C90079EB64 /* CopiedSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CopiedSpace.cpp; sourceTree = "<group>"; };
C2B916C114DA014E00CBAC86 /* MarkedAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkedAllocator.h; sourceTree = "<group>"; };
C2B916C414DA040C00CBAC86 /* MarkedAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MarkedAllocator.cpp; sourceTree = "<group>"; };
C2C8D02B14A3C6B200578E65 /* BumpSpaceInlineMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BumpSpaceInlineMethods.h; sourceTree = "<group>"; };
C2C8D02E14A3CEFC00578E65 /* BumpBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BumpBlock.h; sourceTree = "<group>"; };
C2C8D02B14A3C6B200578E65 /* CopiedSpaceInlineMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopiedSpaceInlineMethods.h; sourceTree = "<group>"; };
C2C8D02E14A3CEFC00578E65 /* CopiedBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopiedBlock.h; sourceTree = "<group>"; };
C2C8D02F14A3CEFC00578E65 /* HeapBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapBlock.h; sourceTree = "<group>"; };
C2D9CA1214BCC04600304B46 /* CheckedBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckedBoolean.h; sourceTree = "<group>"; };
C2EAA3F8149A830800FCE112 /* BumpSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BumpSpace.h; sourceTree = "<group>"; };
C2EAA3F8149A830800FCE112 /* CopiedSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopiedSpace.h; sourceTree = "<group>"; };
C2EE599D13FC972A009CEAFE /* DecimalNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DecimalNumber.cpp; sourceTree = "<group>"; };
C2EE599E13FC972A009CEAFE /* DecimalNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DecimalNumber.h; sourceTree = "<group>"; };
D21202280AD4310C00ED79B6 /* DateConversion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DateConversion.cpp; sourceTree = "<group>"; };
......@@ -1824,10 +1824,10 @@
142E312A134FF0A600AFADB5 /* heap */ = {
isa = PBXGroup;
children = (
C2C8D02E14A3CEFC00578E65 /* BumpBlock.h */,
C240305314B404C90079EB64 /* BumpSpace.cpp */,
C2EAA3F8149A830800FCE112 /* BumpSpace.h */,
C2C8D02B14A3C6B200578E65 /* BumpSpaceInlineMethods.h */,
C2C8D02E14A3CEFC00578E65 /* CopiedBlock.h */,
C240305314B404C90079EB64 /* CopiedSpace.cpp */,
C2EAA3F8149A830800FCE112 /* CopiedSpace.h */,
C2C8D02B14A3C6B200578E65 /* CopiedSpaceInlineMethods.h */,
A7521E121429169A003C8D0C /* CardSet.h */,
146B14DB12EB5B12001BEC1B /* ConservativeRoots.cpp */,
149DAAF212EB559D0083B12B /* ConservativeRoots.h */,
......@@ -2797,10 +2797,10 @@
E4D8CEFB12FC439600BC9F5A /* BloomFilter.h in Headers */,
BC18C3EC0E16F5CD00B34460 /* BooleanObject.h in Headers */,
0FD82E85141F3FE300179C94 /* BoundsCheckedPointer.h in Headers */,
C2C8D03014A3CEFC00578E65 /* BumpBlock.h in Headers */,
C2C8D03014A3CEFC00578E65 /* CopiedBlock.h in Headers */,
86676D5211FED9BC004B6863 /* BumpPointerAllocator.h in Headers */,
C2EAA3FA149A835E00FCE112 /* BumpSpace.h in Headers */,
C2C8D02D14A3C6E000578E65 /* BumpSpaceInlineMethods.h in Headers */,
C2EAA3FA149A835E00FCE112 /* CopiedSpace.h in Headers */,
C2C8D02D14A3C6E000578E65 /* CopiedSpaceInlineMethods.h in Headers */,
A7A1F7AD0F252B3C00E184E2 /* ByteArray.h in Headers */,
969A07230ED1CE3300F1F681 /* BytecodeGenerator.h in Headers */,
C22C52F613FAF6EF00B7DC0D /* cached-powers.h in Headers */,
......@@ -3556,7 +3556,7 @@
14280863107EC11A0013E7B2 /* BooleanConstructor.cpp in Sources */,
14280864107EC11A0013E7B2 /* BooleanObject.cpp in Sources */,
14280865107EC11A0013E7B2 /* BooleanPrototype.cpp in Sources */,
C240305514B404E60079EB64 /* BumpSpace.cpp in Sources */,
C240305514B404E60079EB64 /* CopiedSpace.cpp in Sources */,
A7A1F7AC0F252B3C00E184E2 /* ByteArray.cpp in Sources */,
148F21AA107EC53A0042EC2C /* BytecodeGenerator.cpp in Sources */,
C22C52F513FAF6EF00B7DC0D /* cached-powers.cc in Sources */,
......
......@@ -66,7 +66,7 @@ SOURCES += \
bytecode/ValueProfile.cpp \
bytecompiler/BytecodeGenerator.cpp \
bytecompiler/NodesCodegen.cpp \
heap/BumpSpace.cpp \
heap/CopiedSpace.cpp \
heap/ConservativeRoots.cpp \
heap/DFGCodeBlocks.cpp \
heap/HandleHeap.cpp \
......
......@@ -26,8 +26,8 @@
#include "config.h"
#include "ConservativeRoots.h"
#include "BumpSpace.h"
#include "BumpSpaceInlineMethods.h"
#include "CopiedSpace.h"
#include "CopiedSpaceInlineMethods.h"
#include "CodeBlock.h"
#include "DFGCodeBlocks.h"
#include "JSCell.h"
......@@ -36,12 +36,12 @@
namespace JSC {
ConservativeRoots::ConservativeRoots(const MarkedBlockSet* blocks, BumpSpace* bumpSpace)
ConservativeRoots::ConservativeRoots(const MarkedBlockSet* blocks, CopiedSpace* copiedSpace)
: m_roots(m_inlineRoots)
, m_size(0)
, m_capacity(inlineCapacity)
, m_blocks(blocks)
, m_bumpSpace(bumpSpace)
, m_copiedSpace(copiedSpace)
{
}
......@@ -72,9 +72,9 @@ inline void ConservativeRoots::genericAddPointer(void* p, TinyBloomFilter filter
{
markHook.mark(p);
BumpBlock* block;
if (m_bumpSpace->contains(p, block))
m_bumpSpace->pin(block);
CopiedBlock* block;
if (m_copiedSpace->contains(p, block))
m_copiedSpace->pin(block);
MarkedBlock* candidate = MarkedBlock::blockFor(p);
if (filter.ruleOut(reinterpret_cast<Bits>(candidate))) {
......
......@@ -38,7 +38,7 @@ class Heap;
class ConservativeRoots {
public:
ConservativeRoots(const MarkedBlockSet*, BumpSpace*);
ConservativeRoots(const MarkedBlockSet*, CopiedSpace*);
~ConservativeRoots();
void add(void* begin, void* end);
......@@ -63,7 +63,7 @@ private:
size_t m_size;
size_t m_capacity;
const MarkedBlockSet* m_blocks;
BumpSpace* m_bumpSpace;
CopiedSpace* m_copiedSpace;
JSCell* m_inlineRoots[inlineCapacity];
};
......
......@@ -23,19 +23,19 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BumpBlock_h
#define BumpBlock_h
#ifndef CopiedBlock_h
#define CopiedBlock_h
#include "HeapBlock.h"
namespace JSC {
class BumpSpace;
class CopiedSpace;
class BumpBlock : public HeapBlock {
friend class BumpSpace;
class CopiedBlock : public HeapBlock {
friend class CopiedSpace;
public:
BumpBlock(PageAllocationAligned& allocation)
CopiedBlock(PageAllocationAligned& allocation)
: HeapBlock(allocation)
, m_offset(m_payload)
, m_isPinned(false)
......
......@@ -24,13 +24,13 @@
*/
#include "config.h"
#include "BumpSpace.h"
#include "CopiedSpace.h"
#include "BumpSpaceInlineMethods.h"
#include "CopiedSpaceInlineMethods.h"
namespace JSC {
CheckedBoolean BumpSpace::tryAllocateSlowCase(size_t bytes, void** outPtr)
CheckedBoolean CopiedSpace::tryAllocateSlowCase(size_t bytes, void** outPtr)
{
if (isOversize(bytes))
return tryAllocateOversize(bytes, outPtr);
......
......@@ -23,8 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BumpSpace_h
#define BumpSpace_h
#ifndef CopiedSpace_h
#define CopiedSpace_h
#include "HeapBlock.h"
#include "TinyBloomFilter.h"
......@@ -40,13 +40,13 @@
namespace JSC {
class Heap;
class BumpBlock;
class CopiedBlock;
class HeapBlock;
class BumpSpace {
class CopiedSpace {
friend class SlotVisitor;
public:
BumpSpace(Heap*);
CopiedSpace(Heap*);
void init();
CheckedBoolean tryAllocate(size_t, void**);
......@@ -56,42 +56,42 @@ public:
void doneCopying();
bool isInCopyPhase() { return m_inCopyingPhase; }
void pin(BumpBlock*);
void pin(CopiedBlock*);
bool isPinned(void*);
bool contains(void*, BumpBlock*&);
bool contains(void*, CopiedBlock*&);
size_t totalMemoryAllocated() { return m_totalMemoryAllocated; }
size_t totalMemoryUtilized() { return m_totalMemoryUtilized; }
static BumpBlock* blockFor(void*);
static CopiedBlock* blockFor(void*);
private:
CheckedBoolean tryAllocateSlowCase(size_t, void**);
CheckedBoolean addNewBlock();
CheckedBoolean allocateNewBlock(BumpBlock**);
CheckedBoolean allocateNewBlock(CopiedBlock**);
bool fitsInCurrentBlock(size_t);
static void* allocateFromBlock(BumpBlock*, size_t);
static void* allocateFromBlock(CopiedBlock*, size_t);
CheckedBoolean tryAllocateOversize(size_t, void**);
CheckedBoolean tryReallocateOversize(void**, size_t, size_t);
static bool isOversize(size_t);
CheckedBoolean borrowBlock(BumpBlock**);
CheckedBoolean getFreshBlock(AllocationEffort, BumpBlock**);
void doneFillingBlock(BumpBlock*);
void recycleBlock(BumpBlock*);
static bool fitsInBlock(BumpBlock*, size_t);
static BumpBlock* oversizeBlockFor(void* ptr);
CheckedBoolean borrowBlock(CopiedBlock**);
CheckedBoolean getFreshBlock(AllocationEffort, CopiedBlock**);
void doneFillingBlock(CopiedBlock*);
void recycleBlock(CopiedBlock*);
static bool fitsInBlock(CopiedBlock*, size_t);
static CopiedBlock* oversizeBlockFor(void* ptr);
Heap* m_heap;
BumpBlock* m_currentBlock;
CopiedBlock* m_currentBlock;
TinyBloomFilter m_toSpaceFilter;
TinyBloomFilter m_oversizeFilter;
HashSet<BumpBlock*> m_toSpaceSet;
HashSet<CopiedBlock*> m_toSpaceSet;
Mutex m_toSpaceLock;
Mutex m_memoryStatsLock;
......
......@@ -21,8 +21,8 @@
#include "config.h"
#include "Heap.h"
#include "BumpSpace.h"
#include "BumpSpaceInlineMethods.h"
#include "CopiedSpace.h"
#include "CopiedSpaceInlineMethods.h"
#include "CodeBlock.h"
#include "ConservativeRoots.h"
#include "GCActivityCallback.h"
......
......@@ -40,7 +40,7 @@
namespace JSC {
class BumpSpace;
class CopiedSpace;
class CodeBlock;
class GCActivityCallback;
class GlobalCodeBlock;
......@@ -139,7 +139,7 @@ namespace JSC {
friend class MarkedSpace;
friend class MarkedAllocator;
friend class MarkedBlock;
friend class BumpSpace;
friend class CopiedSpace;
friend class SlotVisitor;
friend class CodeBlock;
template<typename T> friend void* allocateCell(Heap&);
......@@ -197,7 +197,7 @@ namespace JSC {
OperationInProgress m_operationInProgress;
MarkedSpace m_objectSpace;
BumpSpace m_storageSpace;
CopiedSpace m_storageSpace;
DoublyLinkedList<HeapBlock> m_freeBlocks;
size_t m_numberOfFreeBlocks;
......
......@@ -26,8 +26,8 @@
#include "config.h"
#include "MarkStack.h"
#include "BumpSpace.h"
#include "BumpSpaceInlineMethods.h"
#include "CopiedSpace.h"
#include "CopiedSpaceInlineMethods.h"
#include "ConservativeRoots.h"
#include "Heap.h"
#include "Options.h"
......@@ -235,7 +235,7 @@ void* MarkStackThreadSharedData::markingThreadStartFunc(void* shared)
MarkStackThreadSharedData::MarkStackThreadSharedData(JSGlobalData* globalData)
: m_globalData(globalData)
, m_bumpSpace(&globalData->heap.m_storageSpace)
, m_copiedSpace(&globalData->heap.m_storageSpace)
, m_sharedMarkStack(m_segmentAllocator)
, m_numberOfActiveParallelMarkers(0)
, m_parallelMarkersShouldExit(false)
......@@ -402,7 +402,7 @@ void SlotVisitor::drainFromShared(SharedDrainMode sharedDrainMode)
while (true) {
// Did we reach termination?
if (!m_shared.m_numberOfActiveParallelMarkers && m_shared.m_sharedMarkStack.isEmpty()) {
// Let any sleeping slaves know it's time for them to give their private BumpBlocks back
// Let any sleeping slaves know it's time for them to give their private CopiedBlocks back
m_shared.m_markingCondition.broadcast();
return;
}
......@@ -459,32 +459,32 @@ void MarkStack::mergeOpaqueRoots()
void SlotVisitor::startCopying()
{
ASSERT(!m_copyBlock);
if (!m_shared.m_bumpSpace->borrowBlock(&m_copyBlock))
if (!m_shared.m_copiedSpace->borrowBlock(&m_copyBlock))
CRASH();
}
void* SlotVisitor::allocateNewSpace(void* ptr, size_t bytes)
{
if (BumpSpace::isOversize(bytes)) {
m_shared.m_bumpSpace->pin(BumpSpace::oversizeBlockFor(ptr));
if (CopiedSpace::isOversize(bytes)) {
m_shared.m_copiedSpace->pin(CopiedSpace::oversizeBlockFor(ptr));
return 0;
}
if (m_shared.m_bumpSpace->isPinned(ptr))
if (m_shared.m_copiedSpace->isPinned(ptr))
return 0;
// The only time it's possible to have a null copy block is if we have just started copying.
if (!m_copyBlock)
startCopying();
if (!BumpSpace::fitsInBlock(m_copyBlock, bytes)) {
if (!CopiedSpace::fitsInBlock(m_copyBlock, bytes)) {
// We don't need to lock across these two calls because the master thread won't
// call doneCopying() because this thread is considered active.
m_shared.m_bumpSpace->doneFillingBlock(m_copyBlock);
if (!m_shared.m_bumpSpace->borrowBlock(&m_copyBlock))
m_shared.m_copiedSpace->doneFillingBlock(m_copyBlock);
if (!m_shared.m_copiedSpace->borrowBlock(&m_copyBlock))
CRASH();
}
return BumpSpace::allocateFromBlock(m_copyBlock, bytes);
return CopiedSpace::allocateFromBlock(m_copyBlock, bytes);
}
void SlotVisitor::copy(void** ptr, size_t bytes)
......@@ -524,7 +524,7 @@ void SlotVisitor::doneCopying()
if (!m_copyBlock)
return;
m_shared.m_bumpSpace->doneFillingBlock(m_copyBlock);
m_shared.m_copiedSpace->doneFillingBlock(m_copyBlock);
m_copyBlock = 0;
}
......
......@@ -26,7 +26,7 @@
#ifndef MarkStack_h
#define MarkStack_h
#include "BumpSpace.h"
#include "CopiedSpace.h"
#include "HandleTypes.h"
#include "Options.h"
#include "JSValue.h"
......@@ -182,7 +182,7 @@ namespace JSC {
#endif
JSGlobalData* m_globalData;
BumpSpace* m_bumpSpace;
CopiedSpace* m_copiedSpace;
MarkStackSegmentAllocator m_segmentAllocator;
......
......@@ -26,7 +26,7 @@
#ifndef SlotVisitor_h
#define SlotVisitor_h
#include "BumpSpace.h"
#include "CopiedSpace.h"
#include "MarkStack.h"
namespace JSC {
......@@ -78,7 +78,7 @@ private:
donateSlow();
}
BumpBlock* m_copyBlock;
CopiedBlock* m_copyBlock;
};
inline SlotVisitor::SlotVisitor(MarkStackThreadSharedData& shared)
......
......@@ -24,8 +24,8 @@
#include "JSArray.h"
#include "ArrayPrototype.h"
#include "BumpSpace.h"
#include "BumpSpaceInlineMethods.h"
#include "CopiedSpace.h"
#include "CopiedSpaceInlineMethods.h"
#include "CachedCall.h"
#include "Error.h"
#include "Executable.h"
......
......@@ -24,7 +24,7 @@
#include "config.h"
#include "JSObject.h"
#include "BumpSpaceInlineMethods.h"
#include "CopiedSpaceInlineMethods.h"
#include "DatePrototype.h"
#include "ErrorConstructor.h"
#include "GetterSetter.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment