Move OBJECTHANDLE definition to gcinterface.h
authorAditya Mandaleeka <adityam@microsoft.com>
Fri, 7 Apr 2017 01:11:57 +0000 (18:11 -0700)
committerAditya Mandaleeka <adityam@microsoft.com>
Fri, 7 Apr 2017 22:02:04 +0000 (15:02 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/447521434ab80ea97a42108a429e3773e71f7c66

src/coreclr/src/gc/env/gcenv.base.h
src/coreclr/src/gc/gcinterface.h
src/coreclr/src/vm/vars.hpp

index f5e730d..2ce07ef 100644 (file)
@@ -328,16 +328,6 @@ typedef PTR_PTR_Object PTR_OBJECTREF;
 typedef PTR_Object _UNCHECKED_OBJECTREF;
 typedef PTR_PTR_Object PTR_UNCHECKED_OBJECTREF;
 
-#ifndef DACCESS_COMPILE
-struct OBJECTHANDLE__
-{
-    void* unused;
-};
-typedef struct OBJECTHANDLE__* OBJECTHANDLE;
-#else
-typedef TADDR OBJECTHANDLE;
-#endif
-
 // With no object reference wrapping the following macros are very simple.
 #define ObjectToOBJECTREF(_obj) (OBJECTREF)(_obj)
 #define OBJECTREFToObject(_obj) (Object*)(_obj)
index 2fe9b3a..92c3e8b 100644 (file)
@@ -385,6 +385,18 @@ typedef void (* record_surv_fn)(uint8_t* begin, uint8_t* end, ptrdiff_t reloc, v
 typedef void (* fq_walk_fn)(bool, void*);
 typedef void (* fq_scan_fn)(Object** ppObject, ScanContext *pSC, uint32_t dwFlags);
 typedef void (* handle_scan_fn)(Object** pRef, Object* pSec, uint32_t flags, ScanContext* context, bool isDependent);
+
+// Opaque type for tracking object pointers
+#ifndef DACCESS_COMPILE
+struct OBJECTHANDLE__
+{
+    void* unused;
+};
+typedef struct OBJECTHANDLE__* OBJECTHANDLE;
+#else
+typedef uintptr_t OBJECTHANDLE;
+#endif
+
 class IGCHandleTable {
 public:
 
index a72f414..391fa43 100644 (file)
@@ -72,6 +72,8 @@ typedef unsigned short wchar_t;
 
 #include "profilepriv.h"
 
+#include "gcinterface.h"
+
 class ClassLoader;
 class LoaderHeap;
 class IGCHeap;
@@ -98,23 +100,6 @@ class BBSweep;
 struct IAssemblyUsageLog;
 
 //
-// object handles are opaque types that track object pointers
-//
-#ifndef DACCESS_COMPILE
-
-struct OBJECTHANDLE__
-{
-    void* unused;
-};
-typedef struct OBJECTHANDLE__* OBJECTHANDLE;
-
-#else
-
-typedef TADDR OBJECTHANDLE;
-
-#endif
-
-//
 // loader handles are opaque types that track object pointers that have a lifetime
 // that matches that of a loader allocator
 //