Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c9914b7

Browse files
Rename IGCHandleTable to IGCHandleManager.
1 parent da00894 commit c9914b7

13 files changed

+81
-81
lines changed

src/gc/gc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ extern "C" GCHeapType g_gc_heap_type;
115115
extern "C" uint32_t g_max_generation;
116116
extern "C" MethodTable* g_gc_pFreeObjectMethodTable;
117117

118-
::IGCHandleTable* CreateGCHandleTable();
118+
::IGCHandleManager* CreateGCHandleManager();
119119

120120
namespace WKS {
121121
::IGCHeapInternal* CreateGCHeap();
@@ -260,8 +260,8 @@ void updateGCShadow(Object** ptr, Object* val);
260260
// The single GC heap instance, shared with the VM.
261261
extern IGCHeapInternal* g_theGCHeap;
262262

263-
// The single GC handle table instance, shared with the VM.
264-
extern IGCHandleTable* g_theGCHandleTable;
263+
// The single GC handle manager instance, shared with the VM.
264+
extern IGCHandleManager* g_theGCHandleManager;
265265

266266
#ifndef DACCESS_COMPILE
267267
inline bool IsGCInProgress(bool bConsiderGCStart = false)

src/gc/gccommon.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "gc.h"
1616

1717
IGCHeapInternal* g_theGCHeap;
18-
IGCHandleTable* g_theGCHandleTable;
18+
IGCHandleManager* g_theGCHandleManager;
1919

2020
#ifdef FEATURE_STANDALONE_GC
2121
IGCToCLR* g_theGCToCLR;
@@ -143,18 +143,18 @@ namespace SVR
143143
extern void PopulateDacVars(GcDacVars* dacVars);
144144
}
145145

146-
bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleTable** gcHandleTable, GcDacVars* gcDacVars)
146+
bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleManager** gcHandleManager, GcDacVars* gcDacVars)
147147
{
148148
LIMITED_METHOD_CONTRACT;
149149

150150
IGCHeapInternal* heap;
151151

152152
assert(gcDacVars != nullptr);
153153
assert(gcHeap != nullptr);
154-
assert(gcHandleTable != nullptr);
154+
assert(gcHandleManager != nullptr);
155155

156-
IGCHandleTable* handleTable = CreateGCHandleTable();
157-
if (handleTable == nullptr)
156+
IGCHandleManager* handleManager = CreateGCHandleManager();
157+
if (handleManager == nullptr)
158158
{
159159
return false;
160160
}
@@ -192,7 +192,7 @@ bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleTa
192192
assert(clrToGC == nullptr);
193193
#endif
194194

195-
*gcHandleTable = handleTable;
195+
*gcHandleManager = handleManager;
196196
*gcHeap = heap;
197197
return true;
198198
}

src/gc/gchandletable.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
GCHandleStore* g_gcGlobalHandleStore;
1212

13-
IGCHandleTable* CreateGCHandleTable()
13+
IGCHandleManager* CreateGCHandleManager()
1414
{
15-
return new (nothrow) GCHandleTable();
15+
return new (nothrow) GCHandleManager();
1616
}
1717

1818
void GCHandleStore::Uproot()
@@ -57,22 +57,22 @@ GCHandleStore::~GCHandleStore()
5757
Ref_DestroyHandleTableBucket(_underlyingBucket);
5858
}
5959

60-
bool GCHandleTable::Initialize()
60+
bool GCHandleManager::Initialize()
6161
{
6262
return Ref_Initialize();
6363
}
6464

65-
void GCHandleTable::Shutdown()
65+
void GCHandleManager::Shutdown()
6666
{
6767
Ref_Shutdown();
6868
}
6969

70-
IGCHandleStore* GCHandleTable::GetGlobalHandleStore()
70+
IGCHandleStore* GCHandleManager::GetGlobalHandleStore()
7171
{
7272
return g_gcGlobalHandleStore;
7373
}
7474

75-
IGCHandleStore* GCHandleTable::CreateHandleStore(void* context)
75+
IGCHandleStore* GCHandleManager::CreateHandleStore(void* context)
7676
{
7777
#ifndef FEATURE_REDHAWK
7878
HandleTableBucket* newBucket = ::Ref_CreateHandleTableBucket(ADIndex((DWORD)(uintptr_t)context));
@@ -83,37 +83,37 @@ IGCHandleStore* GCHandleTable::CreateHandleStore(void* context)
8383
#endif
8484
}
8585

86-
void GCHandleTable::DestroyHandleStore(IGCHandleStore* store)
86+
void GCHandleManager::DestroyHandleStore(IGCHandleStore* store)
8787
{
8888
delete store;
8989
}
9090

91-
void* GCHandleTable::GetHandleContext(OBJECTHANDLE handle)
91+
void* GCHandleManager::GetHandleContext(OBJECTHANDLE handle)
9292
{
9393
return (void*)((uintptr_t)::HndGetHandleTableADIndex(::HndGetHandleTable(handle)).m_dwIndex);
9494
}
9595

96-
OBJECTHANDLE GCHandleTable::CreateGlobalHandleOfType(Object* object, int type)
96+
OBJECTHANDLE GCHandleManager::CreateGlobalHandleOfType(Object* object, int type)
9797
{
9898
return ::HndCreateHandle(g_HandleTableMap.pBuckets[0]->pTable[GetCurrentThreadHomeHeapNumber()], type, ObjectToOBJECTREF(object));
9999
}
100100

101-
OBJECTHANDLE GCHandleTable::CreateDuplicateHandle(OBJECTHANDLE handle)
101+
OBJECTHANDLE GCHandleManager::CreateDuplicateHandle(OBJECTHANDLE handle)
102102
{
103103
return ::HndCreateHandle(HndGetHandleTable(handle), HNDTYPE_DEFAULT, ::HndFetchHandle(handle));
104104
}
105105

106-
void GCHandleTable::DestroyHandleOfType(OBJECTHANDLE handle, int type)
106+
void GCHandleManager::DestroyHandleOfType(OBJECTHANDLE handle, int type)
107107
{
108108
::HndDestroyHandle(::HndGetHandleTable(handle), type, handle);
109109
}
110110

111-
void GCHandleTable::DestroyHandleOfUnknownType(OBJECTHANDLE handle)
111+
void GCHandleManager::DestroyHandleOfUnknownType(OBJECTHANDLE handle)
112112
{
113113
::HndDestroyHandleOfUnknownType(::HndGetHandleTable(handle), handle);
114114
}
115115

116-
void* GCHandleTable::GetExtraInfoFromHandle(OBJECTHANDLE handle)
116+
void* GCHandleManager::GetExtraInfoFromHandle(OBJECTHANDLE handle)
117117
{
118118
return (void*)::HndGetHandleExtraInfo(handle);
119119
}

src/gc/gchandletableimpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class GCHandleStore : public IGCHandleStore
3535

3636
extern GCHandleStore* g_gcGlobalHandleStore;
3737

38-
class GCHandleTable : public IGCHandleTable
38+
class GCHandleManager : public IGCHandleManager
3939
{
4040
public:
4141
virtual bool Initialize();

src/gc/gcinterface.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ struct segment_info
169169

170170
class Object;
171171
class IGCHeap;
172-
class IGCHandleTable;
172+
class IGCHandleManager;
173173

174174
// Initializes the garbage collector. Should only be called
175175
// once, during EE startup. Returns true if the initialization
176176
// was successful, false otherwise.
177-
bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleTable** gcHandleTable, GcDacVars* gcDacVars);
177+
bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleManager** gcHandleTable, GcDacVars* gcDacVars);
178178

179179
// The runtime needs to know whether we're using workstation or server GC
180180
// long before the GCHeap is created. This function sets the type of
@@ -420,7 +420,7 @@ class IGCHandleStore {
420420
virtual ~IGCHandleStore() {};
421421
};
422422

423-
class IGCHandleTable {
423+
class IGCHandleManager {
424424
public:
425425

426426
virtual bool Initialize() = 0;

src/gc/sample/GCSample.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ int __cdecl main(int argc, char* argv[])
130130
//
131131
GcDacVars dacVars;
132132
IGCHeap *pGCHeap;
133-
IGCHandleTable *pGCHandleTable;
134-
if (!InitializeGarbageCollector(nullptr, &pGCHeap, &pGCHandleTable, &dacVars))
133+
IGCHandleManager *pGCHandleManager;
134+
if (!InitializeGarbageCollector(nullptr, &pGCHeap, &pGCHandleManager, &dacVars))
135135
{
136136
return -1;
137137
}
@@ -140,9 +140,9 @@ int __cdecl main(int argc, char* argv[])
140140
return -1;
141141

142142
//
143-
// Initialize handle table
143+
// Initialize handle manager
144144
//
145-
if (!pGCHandleTable->Initialize())
145+
if (!pGCHandleManager->Initialize())
146146
return -1;
147147

148148
//

src/vm/appdomain.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ BaseDomain::BaseDomain()
741741

742742
#ifndef CROSSGEN_COMPILE
743743
// Note that m_handleStore is overridden by app domains
744-
m_handleStore = GCHandleTableUtilities::GetGCHandleTable()->GetGlobalHandleStore();
744+
m_handleStore = GCHandleUtilities::GetGCHandleManager()->GetGlobalHandleStore();
745745
#else
746746
m_handleStore = NULL;
747747
#endif
@@ -4273,11 +4273,11 @@ void AppDomain::Init()
42734273
// default domain cannot be unloaded.
42744274
if (GetId().m_dwId == DefaultADID)
42754275
{
4276-
m_handleStore = GCHandleTableUtilities::GetGCHandleTable()->GetGlobalHandleStore();
4276+
m_handleStore = GCHandleUtilities::GetGCHandleManager()->GetGlobalHandleStore();
42774277
}
42784278
else
42794279
{
4280-
m_handleStore = GCHandleTableUtilities::GetGCHandleTable()->CreateHandleStore((void*)(uintptr_t)m_dwIndex.m_dwIndex);
4280+
m_handleStore = GCHandleUtilities::GetGCHandleManager()->CreateHandleStore((void*)(uintptr_t)m_dwIndex.m_dwIndex);
42814281
}
42824282

42834283
#endif // CROSSGEN_COMPILE
@@ -4580,7 +4580,7 @@ void AppDomain::Terminate()
45804580

45814581
if (m_handleStore)
45824582
{
4583-
GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleStore(m_handleStore);
4583+
GCHandleUtilities::GetGCHandleManager()->DestroyHandleStore(m_handleStore);
45844584
m_handleStore = NULL;
45854585
}
45864586

src/vm/appdomain.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "ilstubcache.h"
2929
#include "testhookmgr.h"
3030
#include "gcheaputilities.h"
31-
#include "gchandletableutilities.h"
31+
#include "gchandleutilities.h"
3232
#include "../binder/inc/applicationcontext.hpp"
3333
#include "rejit.h"
3434

src/vm/ceemain.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ void EEStartupHelper(COINITIEE fFlags)
869869

870870
// Initialize remoting
871871

872-
if (!GCHandleTableUtilities::GetGCHandleTable()->Initialize())
872+
if (!GCHandleUtilities::GetGCHandleManager()->Initialize())
873873
{
874874
IfFailGo(E_OUTOFMEMORY);
875875
}
@@ -1880,7 +1880,7 @@ void STDMETHODCALLTYPE EEShutDownHelper(BOOL fIsDllUnloading)
18801880
#ifdef SHOULD_WE_CLEANUP
18811881
if (!g_fFastExitProcess)
18821882
{
1883-
GCHandleTableUtilities::GetGCHandleTable()->Shutdown();
1883+
GCHandleUtilities::GetGCHandleManager()->Shutdown();
18841884
}
18851885
#endif /* SHOULD_WE_CLEANUP */
18861886

@@ -2483,17 +2483,17 @@ void InitializeGarbageCollector()
24832483
IGCToCLR* gcToClr = nullptr;
24842484
#endif
24852485

2486-
IGCHandleTable *pGcHandleTable;
2486+
IGCHandleManager *pGcHandleManager;
24872487

24882488
IGCHeap *pGCHeap;
2489-
if (!InitializeGarbageCollector(gcToClr, &pGCHeap, &pGcHandleTable, &g_gc_dac_vars))
2489+
if (!InitializeGarbageCollector(gcToClr, &pGCHeap, &pGcHandleManager, &g_gc_dac_vars))
24902490
{
24912491
ThrowOutOfMemory();
24922492
}
24932493

24942494
assert(pGCHeap != nullptr);
24952495
g_pGCHeap = pGCHeap;
2496-
g_pGCHandleTable = pGcHandleTable;
2496+
g_pGCHandleManager = pGcHandleManager;
24972497
g_gcDacGlobals = &g_gc_dac_vars;
24982498

24992499
// Apparently the Windows linker removes global variables if they are never

0 commit comments

Comments
 (0)