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

Commit 93459f6

Browse files
committed
Replace PLATFORM_UNIX && _TARGET_ARM_ for NGEN relocations optimizations with FEATURE_NGEN_RELOCS_OPTIMIZATIONS
1 parent f35128d commit 93459f6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/vm/method.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2583,7 +2583,7 @@ class NDirectMethodDesc : public MethodDesc
25832583
};
25842584

25852585
// The writeable part of the methoddesc.
2586-
#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_)
2586+
#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
25872587
RelativePointer<PTR_NDirectWriteableData> m_pWriteableData;
25882588
#else
25892589
PlainPointer<PTR_NDirectWriteableData> m_pWriteableData;
@@ -3399,7 +3399,7 @@ class InstantiatedMethodDesc : public MethodDesc
33993399
//
34003400
// For generic method definitions that are not the typical method definition (e.g. C<int>.m<U>)
34013401
// this field is null; to obtain the instantiation use LoadMethodInstantiation
3402-
#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_)
3402+
#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
34033403
RelativePointer<PTR_Dictionary> m_pPerInstInfo; //SHARED
34043404
#else
34053405
PlainPointer<PTR_Dictionary> m_pPerInstInfo; //SHARED

src/vm/methodtable.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct InterfaceInfo_t
111111
#endif
112112

113113
// Method table of the interface
114-
#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_)
114+
#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
115115
RelativeFixupPointer<PTR_MethodTable> m_pMethodTable;
116116
#else
117117
FixupPointer<PTR_MethodTable> m_pMethodTable;
@@ -1667,7 +1667,7 @@ class MethodTable
16671667
#define VTABLE_SLOTS_PER_CHUNK 8
16681668
#define VTABLE_SLOTS_PER_CHUNK_LOG2 3
16691669

1670-
#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) && defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
1670+
#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
16711671
typedef RelativePointer<PCODE> VTableIndir2_t;
16721672
typedef RelativePointer<DPTR(VTableIndir2_t)> VTableIndir_t;
16731673
#else
@@ -2182,7 +2182,7 @@ class MethodTable
21822182
// THE METHOD TABLE PARENT (SUPERCLASS/BASE CLASS)
21832183
//
21842184

2185-
#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_)
2185+
#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
21862186
#define PARENT_MT_FIXUP_OFFSET (-FIXUP_POINTER_INDIRECTION)
21872187
typedef RelativeFixupPointer<PTR_MethodTable> ParentMT_t;
21882188
#else
@@ -2214,7 +2214,7 @@ class MethodTable
22142214
inline static PTR_VOID GetParentMethodTableOrIndirection(PTR_VOID pMT)
22152215
{
22162216
WRAPPER_NO_CONTRACT;
2217-
#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_)
2217+
#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
22182218
PTR_MethodTable pMethodTable = dac_cast<PTR_MethodTable>(pMT);
22192219
PTR_MethodTable pParentMT = ReadPointerMaybeNull((MethodTable*) pMethodTable, &MethodTable::m_pParentMethodTable);
22202220
return dac_cast<PTR_VOID>(pParentMT);
@@ -3120,7 +3120,7 @@ class MethodTable
31203120
// must have a dictionary entry. On the other hand, for instantiations shared with Dict<string,double> the opposite holds.
31213121
//
31223122

3123-
#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_)
3123+
#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
31243124
typedef RelativePointer<PTR_Dictionary> PerInstInfoElem_t;
31253125
typedef RelativePointer<DPTR(PerInstInfoElem_t)> PerInstInfo_t;
31263126
#else
@@ -4191,7 +4191,7 @@ public :
41914191

41924192
RelativePointer<PTR_Module> m_pLoaderModule; // LoaderModule. It is equal to the ZapModule in ngened images
41934193

4194-
#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_)
4194+
#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
41954195
RelativePointer<PTR_MethodTableWriteableData> m_pWriteableData;
41964196
#else
41974197
PlainPointer<PTR_MethodTableWriteableData> m_pWriteableData;
@@ -4207,7 +4207,7 @@ public :
42074207
static const TADDR UNION_MASK = 3;
42084208

42094209
union {
4210-
#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_)
4210+
#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
42114211
RelativePointer<DPTR(EEClass)> m_pEEClass;
42124212
RelativePointer<TADDR> m_pCanonMT;
42134213
#else
@@ -4242,7 +4242,7 @@ public :
42424242
public:
42434243
union
42444244
{
4245-
#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_)
4245+
#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
42464246
RelativePointer<PTR_InterfaceInfo> m_pInterfaceMap;
42474247
#else
42484248
PlainPointer<PTR_InterfaceInfo> m_pInterfaceMap;

0 commit comments

Comments
 (0)