diff options
Diffstat (limited to 'src/gc/gchandletableimpl.h')
-rw-r--r-- | src/gc/gchandletableimpl.h | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/src/gc/gchandletableimpl.h b/src/gc/gchandletableimpl.h index af20f52e54..01c1c130ed 100644 --- a/src/gc/gchandletableimpl.h +++ b/src/gc/gchandletableimpl.h @@ -6,33 +6,44 @@ #define GCHANDLETABLE_H_ #include "gcinterface.h" +#include "objecthandle.h" -class GCHandleTable : public IGCHandleTable +class GCHandleStore : public IGCHandleStore { public: - virtual bool Initialize(); + virtual void Uproot(); - virtual void Shutdown(); + virtual bool ContainsHandle(OBJECTHANDLE handle); - virtual void* GetGlobalHandleStore(); + virtual OBJECTHANDLE CreateHandleOfType(Object* object, int type); - virtual void* CreateHandleStore(void* context); + virtual OBJECTHANDLE CreateHandleOfType(Object* object, int type, int heapToAffinitizeTo); - virtual void* GetHandleContext(OBJECTHANDLE handle); + virtual OBJECTHANDLE CreateHandleWithExtraInfo(Object* object, int type, void* pExtraInfo); - virtual void DestroyHandleStore(void* store); + virtual OBJECTHANDLE CreateDependentHandle(Object* primary, Object* secondary); - virtual void UprootHandleStore(void* store); + virtual ~GCHandleStore(); - virtual bool ContainsHandle(void* store, OBJECTHANDLE handle); + HandleTableBucket _underlyingBucket; +}; - virtual OBJECTHANDLE CreateHandleOfType(void* store, Object* object, int type); +extern GCHandleStore* g_gcGlobalHandleStore; - virtual OBJECTHANDLE CreateHandleOfType(void* store, Object* object, int type, int heapToAffinitizeTo); +class GCHandleManager : public IGCHandleManager +{ +public: + virtual bool Initialize(); - virtual OBJECTHANDLE CreateHandleWithExtraInfo(void* store, Object* object, int type, void* pExtraInfo); + virtual void Shutdown(); - virtual OBJECTHANDLE CreateDependentHandle(void* store, Object* primary, Object* secondary); + virtual void* GetHandleContext(OBJECTHANDLE handle); + + virtual IGCHandleStore* GetGlobalHandleStore(); + + virtual IGCHandleStore* CreateHandleStore(void* context); + + virtual void DestroyHandleStore(IGCHandleStore* store); virtual OBJECTHANDLE CreateGlobalHandleOfType(Object* object, int type); @@ -43,6 +54,12 @@ public: virtual void DestroyHandleOfUnknownType(OBJECTHANDLE handle); virtual void* GetExtraInfoFromHandle(OBJECTHANDLE handle); + + virtual void StoreObjectInHandle(OBJECTHANDLE handle, Object* object); + + virtual bool StoreObjectInHandleIfNull(OBJECTHANDLE handle, Object* object); + + virtual Object* InterlockedCompareExchangeObjectInHandle(OBJECTHANDLE handle, Object* object, Object* comparandObject); }; #endif // GCHANDLETABLE_H_ |