diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-11-14 02:40:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-14 02:40:15 +0300 |
commit | 749c80f7821f50e51dcd32bcd402b95eb4935f3c (patch) | |
tree | 3201ecaffa07e63b65b77872eee1db1c8c89c453 /src/Native/Runtime/module.h | |
parent | 510da95d44e0d05f985d0a2a95bdd0de3f598bb1 (diff) |
Compile "Module" code manager for ProjectN only (#4924)
Diffstat (limited to 'src/Native/Runtime/module.h')
-rw-r--r-- | src/Native/Runtime/module.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/Native/Runtime/module.h b/src/Native/Runtime/module.h index 6368633ce..02d355d09 100644 --- a/src/Native/Runtime/module.h +++ b/src/Native/Runtime/module.h @@ -13,6 +13,8 @@ struct VSDInterfaceTargetInfo; class DispatchMap; struct BlobHeader; +#ifdef PROJECTN + class Module : public ICodeManager { friend class AsmOffsets; @@ -144,3 +146,50 @@ private: ReaderWriterLock m_loopHijackMapLock; MapSHash<UInt32, void*> m_loopHijackIndexToTargetMap; }; + +#else // PROJECTN + +// Stubbed out implementation of "Module" code manager. The "Module" code managed is needed for MDIL binder +// generated binaries in ProjectN only. + +class Module : public ICodeManager +{ + friend struct DefaultSListTraits<Module>; + friend class RuntimeInstance; + +public: + static Module * Create(ModuleHeader *pModuleHeader) { return NULL; } + void Destroy() { } + + bool ContainsCodeAddress(PTR_VOID pvAddr) { return false; } + bool ContainsDataAddress(PTR_VOID pvAddr) { return false; } + bool ContainsReadOnlyDataAddress(PTR_VOID pvAddr) { return false; } + bool ContainsStubAddress(PTR_VOID pvAddr) { return false; } + + static void EnumStaticGCRefsBlock(void * pfnCallback, void * pvCallbackData, PTR_StaticGcDesc pStaticGcInfo, PTR_UInt8 pbStaticData) { } + void EnumStaticGCRefs(void * pfnCallback, void * pvCallbackData) { } + + bool IsClasslibModule() { return false; } + void * GetClasslibInitializeFinalizerThread() { return NULL; } + + bool IsContainedBy(HANDLE hOsHandle) { return false; } + + DispatchMap ** GetDispatchMapLookupTable() { return NULL; } + + PTR_ModuleHeader GetModuleHeader() { return NULL; } + + EEType * GetArrayBaseType() { return NULL; } + + bool IsFinalizerInitComplete() { return false; } + void SetFinalizerInitComplete() { } + + void UnsynchronizedResetHijackedLoops() { } + void UnsynchronizedHijackAllLoops() { } + + void * RecoverLoopHijackTarget(UInt32 entryIndex, ModuleHeader * pModuleHeader) { return NULL; } + +private: + PTR_Module m_pNext; +}; + +#endif // PROJECTN |