diff options
Diffstat (limited to 'src/vm/ceeload.h')
-rw-r--r-- | src/vm/ceeload.h | 141 |
1 files changed, 6 insertions, 135 deletions
diff --git a/src/vm/ceeload.h b/src/vm/ceeload.h index 6af3a22c3b..f3d6bd5b8a 100644 --- a/src/vm/ceeload.h +++ b/src/vm/ceeload.h @@ -12,8 +12,6 @@ #ifndef CEELOAD_H_ #define CEELOAD_H_ -#ifndef CLR_STANDALONE_BINDER - #include "common.h" #ifdef FEATURE_FUSION #include <fusion.h> @@ -52,37 +50,6 @@ #include "readytoruninfo.h" #endif -#else // CLR_STANDALONE_BINDER - -#include "volatile.h" -#include "crst.h" -#include "bitmask.h" -#include "arraylist.h" - -#define VPTR(type) type* -typedef DPTR(class Assembly) PTR_Assembly; -typedef DPTR(class Binder) PTR_Binder; -typedef DPTR(class CGrowableStream) PTR_CGrowableStream; -typedef DPTR(struct DomainLocalModule) PTR_DomainLocalModule; -typedef DPTR(class EEClassHashTable) PTR_EEClassHashTable; -typedef DPTR(class EETypeHashTable) PTR_EETypeHashTable; -typedef DPTR(class FieldDesc) PTR_FieldDesc; -typedef DPTR(class InstMethodHashTable) PTR_InstMethodHashTable; -typedef DPTR(class LoaderHeap) PTR_LoaderHeap; -typedef DPTR(class MethodDesc) PTR_MethodDesc; -typedef DPTR(class MethodTable) PTR_MethodTable; -typedef VPTR(class PEFile) PTR_PEFile; -typedef DPTR(class ProfilingBlobTable) PTR_ProfilingBlobTable; -typedef DPTR(class TypeVarTypeDesc) PTR_TypeVarTypeDesc; -template<typename PTR_TYPE> class FixupPointer; - -class EEPtrHashTable; -class ISymUnmanagedReader; -class NgenStats; - -#endif // CLR_STANDALONE_BINDER - - class PELoader; class Stub; class MethodDesc; @@ -280,13 +247,11 @@ public: TADDR GetValueFromCompressedMap(DWORD rid); #ifndef DACCESS_COMPILE -#ifndef CLR_STANDALONE_BINDER void CreateHotItemList(DataImage *image, CorProfileData *profileData, int table, BOOL fSkipNullEntries = FALSE); void Save(DataImage *image, DataImage::ItemKind kind, CorProfileData *profileData, int table, BOOL fCopyValues = FALSE); void SaveUncompressedMap(DataImage *image, DataImage::ItemKind kind, BOOL fCopyValues = FALSE); void ConvertSavedMapToUncompressed(DataImage *image, DataImage::ItemKind kind); void Fixup(DataImage *image, BOOL fFixupEntries = TRUE); -#endif // !CLR_STANDALONE_BINDER #endif // !DACCESS_COMPILE #ifdef _DEBUG @@ -507,23 +472,12 @@ public: // Place holder types for RID maps that store cross-module references -#ifndef CLR_STANDALONE_BINDER - class TypeRef { }; typedef DPTR(class TypeRef) PTR_TypeRef; class MemberRef { }; typedef DPTR(class MemberRef) PTR_MemberRef; -#else // CLR_STANDALONE_BINDER - -struct TypeRef; -typedef DPTR(struct TypeRef) PTR_TypeRef; - -struct MemberRef; -typedef DPTR(struct MemberRef) PTR_MemberRef; - -#endif // CLR_STANDALONE_BINDER // flag used to mark member ref pointers to field descriptors in the member ref cache #define IS_FIELD_MEMBER_REF ((TADDR)0x00000002) @@ -579,8 +533,6 @@ struct NGenLayoutInfo DWORD m_rvaFilterPersonalityRoutine; }; -#ifndef CLR_STANDALONE_BINDER - // // VASigCookies are allocated to encapsulate a varargs call signature. // A reference to the cookie is embedded in the code stream. Cookies @@ -620,12 +572,6 @@ struct VASigCookieBlock VASigCookie m_cookies[kVASigCookieBlockSize]; }; -#else // CLR_STANDALONE_BINDER - -struct VASigCookieBlock; - -#endif // CLR_STANDALONE_BINDER - // This lookup table persists the information about boxed statics into the ngen'ed image // which allows one to the type static initialization without touching expensive EEClasses. Note // that since the persisted info is stored at ngen time as opposed to class layout time, @@ -697,7 +643,6 @@ struct ModuleCtorInfo return hashVal; }; -#ifndef CLR_STANDALONE_BINDER ArrayDPTR(FixupPointer<PTR_MethodTable>) GetGCStaticMTs(DWORD index); #ifdef FEATURE_PREJIT @@ -755,12 +700,11 @@ struct ModuleCtorInfo } }; #endif // FEATURE_PREJIT -#endif // CLR_STANDALONE_BINDER }; -#if defined(FEATURE_PREJIT) && !defined(CLR_STANDALONE_BINDER) +#ifdef FEATURE_PREJIT // For IBC Profiling we collect signature blobs for instantiated types. // For such instantiated types and methods we create our own ibc token @@ -1059,7 +1003,7 @@ public: DWORD MethodTableRestoreNumReasons[TotalMethodTables + 1]; }; -#endif // FEATURE_PREJIT && !CLR_STANDALONE_BINDER +#endif // FEATURE_PREJIT // // A Module is the primary unit of code packaging in the runtime. It @@ -1120,8 +1064,6 @@ typedef SHash<DynamicILBlobTraits> DynamicILBlobTable; typedef DPTR(DynamicILBlobTable) PTR_DynamicILBlobTable; -#ifndef CLR_STANDALONE_BINDER - // declare an array type of COR_IL_MAP entries typedef ArrayDPTR(COR_IL_MAP) ARRAY_PTR_COR_IL_MAP; @@ -1220,8 +1162,6 @@ public: static bool IsNull(const element_t &e) { LIMITED_METHOD_DAC_CONTRACT; return e.m_methodToken == mdMethodDefNil; } }; -#endif // CLR_STANDALONE_BINDER - // ESymbolFormat specified the format used by a symbol stream typedef enum { @@ -1230,9 +1170,6 @@ typedef enum eSymbolFormatILDB /* ILDB format from ildbsymbols.dll */ }ESymbolFormat; -#ifdef CLR_STANDALONE_BINDER -class ILOffsetMappingTraits; -#endif // Hash table of profiler-provided instrumented IL offset mapping, keyed by the MethodDef token typedef SHash<ILOffsetMappingTraits> ILOffsetMappingTable; @@ -1453,16 +1390,6 @@ struct ThreadLocalModule; class Module { -#ifdef CLR_STANDALONE_BINDER - friend class MdilModule; - - // CLR's Module has some virtual methods, and therefore has a vtable. The binder's version doesn't have - // any virtual methods, but for compatibility with CLR it must have a vtable. So a dummy virtual method - // is defined here. The vtable address is zeroed out in Module::Fixup before saved in native image, - // and reset to the correct value in Module ctor when the native image is loaded. - virtual void DummyVirtualMethod() {} -#endif - #ifdef DACCESS_COMPILE friend class ClrDataAccess; friend class NativeImageDumper; @@ -1590,12 +1517,8 @@ private: ESymbolFormat m_symbolFormat; // Active dependencies -#ifndef CLR_STANDALONE_BINDER ArrayList m_activeDependencies; -#else - // Avoid calling ctor/dtor, since the binder only needs a placeholder. - ArrayListStatic m_activeDependencies; -#endif + SynchronizedBitMask m_unconditionalDependencies; ULONG m_dwNumberOfActivations; @@ -1683,8 +1606,6 @@ private: #endif public: - -#ifndef CLR_STANDALONE_BINDER LookupMap<PTR_MethodTable>::Iterator EnumerateTypeDefs() { LIMITED_METHOD_CONTRACT; @@ -1692,7 +1613,6 @@ public: return LookupMap<PTR_MethodTable>::Iterator(&m_TypeDefToMethodTableMap); } -#endif // Hash of available types by name PTR_EEClassHashTable m_pAvailableClasses; @@ -1791,13 +1711,6 @@ private: CORCOMPILE_METHOD_PROFILE_LIST *m_methodProfileList; #if defined(FEATURE_COMINTEROP) - - #if defined(CLR_STANDALONE_BINDER) - - private: PTR_GuidToMethodTableHashTable m_AlwaysNull_pGuidToTypeHash; - - #else // !defined(CLR_STANDALONE_BINDER) - public: #ifndef DACCESS_COMPILE @@ -1811,8 +1724,6 @@ private: private: PTR_GuidToMethodTableHashTable m_pGuidToTypeHash; // A map from GUID to Type, for the "WinRT-interesting" types - #endif // !defined(CLR_STANDALONE_BINDER) - #endif // defined(FEATURE_COMINTEROP) #endif // FEATURE_PREJIT @@ -1823,8 +1734,6 @@ private: #ifdef FEATURE_PREJIT struct TokenProfileData { -#ifndef CLR_STANDALONE_BINDER - static TokenProfileData *CreateNoThrow(void); TokenProfileData() @@ -1848,7 +1757,6 @@ private: RidBitmap tokenBitmaps[CORBBTPROF_TOKEN_MAX_NUM_FLAGS]; } m_formats[SectionFormatCount]; -#endif // CLR_STANDALONE_BINDER } *m_tokenProfileData; // Stats for prejit log @@ -1873,8 +1781,6 @@ protected: // Domain that the IJW fixups were applied in ADID m_DomainIdOfIJWFixups; -#ifndef CLR_STANDALONE_BINDER - public: ADID GetDomainIdOfIJWFixups() { @@ -1890,11 +1796,8 @@ public: m_DomainIdOfIJWFixups = id; } -#endif // CLR_STANDALONE_BINDER #endif // FEATURE_MIXEDMODE -#ifndef CLR_STANDALONE_BINDER - protected: void CreateDomainThunks(); @@ -2727,14 +2630,10 @@ public: #endif BOOL MightContainMatchingProperty(mdProperty tkProperty, ULONG nameHash); -#endif //CLR_STANDALONE_BINDER - private: ArrayDPTR(BYTE) m_propertyNameSet; DWORD m_nPropertyNameSet; -#ifndef CLR_STANDALONE_BINDER - public: // Debugger stuff @@ -2800,16 +2699,12 @@ public: return &m_ModuleCtorInfo; } -#endif // CLR_STANDALONE_BINDER - private: #ifdef FEATURE_MIXEDMODE class MUThunkHash *m_pMUThunkHash; #endif // FEATURE_MIXEDMODE -#ifndef CLR_STANDALONE_BINDER - public: #ifndef DACCESS_COMPILE BOOL Equals(Module *pModule) { WRAPPER_NO_CONTRACT; return m_file->Equals(pModule->m_file); } @@ -2994,11 +2889,7 @@ public: // Turn triggers from this module into runtime checks void EnableModuleFailureTriggers(Module *pModule, AppDomain *pDomain); -#endif // !CLR_STANDALONE_BINDER - #ifdef FEATURE_PREJIT -#ifndef CLR_STANDALONE_BINDER - BOOL IsZappedCode(PCODE code); BOOL IsZappedPrecode(PCODE code); @@ -3094,18 +2985,12 @@ public: // ExpandAll() depending on more information that may now be available // (after all the methods have been compiled) -#else // CLR_STANDALONE_BINDER -public: -#endif // CLR_STANDALONE_BINDER - void Save(DataImage *image); void Arrange(DataImage *image); void PlaceType(DataImage *image, TypeHandle th, DWORD profilingFlags); void PlaceMethod(DataImage *image, MethodDesc *pMD, DWORD profilingFlags); void Fixup(DataImage *image); -#ifndef CLR_STANDALONE_BINDER - bool AreAllClassesFullyLoaded(); // Precompute type-specific auxiliary information saved into NGen image @@ -3242,10 +3127,8 @@ public: FastInterlockOr(&m_dwTransientFlags, MODULE_SAVED); } -#endif // !CLR_STANDALONE_BINDER #endif // FEATURE_PREJIT -#ifndef CLR_STANDALONE_BINDER #ifdef _DEBUG //Similar to the ExpandAll we use for NGen, this forces jitting of all methods in a module. This is //used for debug purposes though. @@ -3267,10 +3150,7 @@ public: static DWORD EncodeModuleHelper(void* pModuleContext, Module *pReferencedModule); static void TokenDefinitionHelper(void* pModuleContext, Module *pReferencedModule, DWORD index, mdToken* token); -#endif // CLR_STANDALONE_BINDER - public: -#ifndef CLR_STANDALONE_BINDER MethodTable* MapZapType(UINT32 typeID); void SetDynamicIL(mdToken token, TADDR blobAddress, BOOL fTemporaryOverride); @@ -3378,7 +3258,6 @@ public: LIMITED_METHOD_CONTRACT; return (SIZE_T*) &m_ModuleID; } -#endif // !CLR_STANDALONE_BINDER static SIZE_T GetOffsetOfModuleID() { @@ -3386,7 +3265,6 @@ public: return offsetof(Module, m_ModuleID); } -#ifndef CLR_STANDALONE_BINDER PTR_DomainLocalModule GetDomainLocalModule(AppDomain *pDomain); #ifndef DACCESS_COMPILE @@ -3402,8 +3280,6 @@ public: #endif // FEATURE_PREJIT void EnumRegularStaticGCRefs (AppDomain* pAppDomain, promote_func* fn, ScanContext* sc); - -#endif // CLR_STANDALONE_BINDER protected: @@ -3612,12 +3488,12 @@ private: // is not called for each fixup PTR_Assembly *m_NativeMetadataAssemblyRefMap; -#endif // !defined(CLR_STANDALONE_BINDER) && defined(FEATURE_PREJIT) +#endif // defined(FEATURE_PREJIT) public: ModuleSecurityDescriptor* m_pModuleSecurityDescriptor; -#if !defined(CLR_STANDALONE_BINDER) && !defined(DACCESS_COMPILE) && defined(FEATURE_PREJIT) +#if !defined(DACCESS_COMPILE) && defined(FEATURE_PREJIT) PTR_Assembly GetNativeMetadataAssemblyRefFromCache(DWORD rid) { PTR_Assembly * NativeMetadataAssemblyRefMap = VolatileLoadWithoutBarrier(&m_NativeMetadataAssemblyRefMap); @@ -3630,12 +3506,9 @@ public: } void SetNativeMetadataAssemblyRefInCache(DWORD rid, PTR_Assembly pAssembly); -#endif // !defined(CLR_STANDALONE_BINDER) && !defined(DACCESS_COMPILE) && defined(FEATURE_PREJIT) +#endif // !defined(DACCESS_COMPILE) && defined(FEATURE_PREJIT) }; - -#ifndef CLR_STANDALONE_BINDER - // // A ReflectionModule is a module created by reflection // @@ -3847,6 +3720,4 @@ struct VASigCookieEx : public VASigCookie bool IsSingleAppDomain(); -#endif // CLR_STANDALONE_BINDER - #endif // !CEELOAD_H_ |