From dc692676bb385477d702f173c04e9ff5af015126 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Fri, 20 Apr 2018 11:54:18 +0300 Subject: [PATCH 38/47] Replace PLATFORM_UNIX && _TARGET_ARM_ for NGEN relocations optimizations with FEATURE_NGEN_RELOCS_OPTIMIZATIONS --- src/vm/method.hpp | 4 ++-- src/vm/methodtable.h | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vm/method.hpp b/src/vm/method.hpp index 92fbdee..d60984c 100644 --- a/src/vm/method.hpp +++ b/src/vm/method.hpp @@ -2599,7 +2599,7 @@ public: }; // The writeable part of the methoddesc. -#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) +#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) RelativePointer m_pWriteableData; #else PlainPointer m_pWriteableData; @@ -3415,7 +3415,7 @@ public: // make private: JITinterface.cpp accesses through this // // For generic method definitions that are not the typical method definition (e.g. C.m) // this field is null; to obtain the instantiation use LoadMethodInstantiation -#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) +#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) RelativePointer m_pPerInstInfo; //SHARED #else PlainPointer m_pPerInstInfo; //SHARED diff --git a/src/vm/methodtable.h b/src/vm/methodtable.h index 5cc6f45..32b4ca4 100644 --- a/src/vm/methodtable.h +++ b/src/vm/methodtable.h @@ -112,7 +112,7 @@ struct InterfaceInfo_t #endif // Method table of the interface -#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) +#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) RelativeFixupPointer m_pMethodTable; #else FixupPointer m_pMethodTable; @@ -1622,7 +1622,7 @@ public: #define VTABLE_SLOTS_PER_CHUNK 8 #define VTABLE_SLOTS_PER_CHUNK_LOG2 3 -#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) && defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) +#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) typedef RelativePointer VTableIndir2_t; typedef RelativePointer VTableIndir_t; #else @@ -2136,7 +2136,7 @@ public: // THE METHOD TABLE PARENT (SUPERCLASS/BASE CLASS) // -#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) +#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) #define PARENT_MT_FIXUP_OFFSET (-FIXUP_POINTER_INDIRECTION) typedef RelativeFixupPointer ParentMT_t; #else @@ -2168,7 +2168,7 @@ public: inline static PTR_VOID GetParentMethodTableOrIndirection(PTR_VOID pMT) { WRAPPER_NO_CONTRACT; -#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) +#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) PTR_MethodTable pMethodTable = dac_cast(pMT); PTR_MethodTable pParentMT = ReadPointerMaybeNull((MethodTable*) pMethodTable, &MethodTable::m_pParentMethodTable); return dac_cast(pParentMT); @@ -3066,7 +3066,7 @@ public: // must have a dictionary entry. On the other hand, for instantiations shared with Dict the opposite holds. // -#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) +#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) typedef RelativePointer PerInstInfoElem_t; typedef RelativePointer PerInstInfo_t; #else @@ -4151,7 +4151,7 @@ private: RelativePointer m_pLoaderModule; // LoaderModule. It is equal to the ZapModule in ngened images -#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) +#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) RelativePointer m_pWriteableData; #else PlainPointer m_pWriteableData; @@ -4167,7 +4167,7 @@ private: static const TADDR UNION_MASK = 3; union { -#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) +#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) RelativePointer m_pEEClass; RelativePointer m_pCanonMT; #else @@ -4202,7 +4202,7 @@ private: public: union { -#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) +#if defined(FEATURE_NGEN_RELOCS_OPTIMIZATIONS) RelativePointer m_pInterfaceMap; #else PlainPointer m_pInterfaceMap; -- 2.7.4