#endif
if (pStubManager == PrecodeStubManager::g_pManager)
{
+#ifdef FEATURE_PREJIT
PrecodeStub:
+#endif
PCODE alignedAddress = AlignDown(TO_TADDR(address), PRECODE_ALIGNMENT);
#ifdef _TARGET_ARM_
else
if (pStubManager == JumpStubStubManager::g_pManager)
{
+#ifdef FEATURE_PREJIT
JumpStub:
+#endif
PCODE pTarget = decodeBackToBackJump(TO_TADDR(address));
HRESULT hr = GetRuntimeNameByAddress(pTarget, flags, bufLen, symbolLen, symbolBuf, NULL);
return TRUE;
}
}
+NoFileName:
#endif // FEATURE_PREJIT
-NoFileName:
// no ngen filename
IfFailThrow(pStrFilename->AssignCopy(W("")));
return FALSE;
STDMETHOD (SetInitialGrowth) (DWORD growth) PURE;
};
-// ===========================================================================
-#ifdef FEATURE_PREJIT
-// ===========================================================================
-
-
-// Use the default JIT compiler
-#define DEFAULT_NGEN_COMPILER_DLL_NAME W("clrjit.dll")
-
-
-struct CORCOMPILE_ASSEMBLY_SIGNATURE;
-
//
// IGetIMDInternalImport
//
// RegMeta, WinMDImport - supports the internal GetMetaDataInternalInterfaceFromPublic() "api".
//
// {92B2FEF9-F7F5-420d-AD42-AECEEE10A1EF}
-EXTERN_GUID(IID_IGetIMDInternalImport, 0x92b2fef9, 0xf7f5, 0x420d, 0xad, 0x42, 0xae, 0xce, 0xee, 0x10, 0xa1, 0xef);
+EXTERN_GUID(IID_IGetIMDInternalImport, 0x92b2fef9, 0xf7f5, 0x420d, 0xad, 0x42, 0xae, 0xce, 0xee, 0x10, 0xa1, 0xef);
#undef INTERFACE
#define INTERFACE IGetIMDInternalImport
DECLARE_INTERFACE_(IGetIMDInternalImport, IUnknown)
) PURE;
};
+// ===========================================================================
+#ifdef FEATURE_PREJIT
+// ===========================================================================
+// Use the default JIT compiler
+#define DEFAULT_NGEN_COMPILER_DLL_NAME W("clrjit.dll")
#ifndef DACCESS_COMPILE
DWORD cchBuffer,
__out DWORD *pdwLength);
-
-#ifdef FEATURE_PREJIT
-
-//**********************************************************************
-// Access to native image validation logic in the runtime.
-//
-// An interface only a mother could live as this logic should really be encapsulated in
-// the native binder. But for historical reasons, it lives in the VM directory
-// and is shared by the desktop and coreclr's which have separate native binders.
-// Hence, this interface inherits a lot of "baggage."
-
-
-
-// A small shim around PEAssemblies/IBindResult that allow us to write Fusion/CLR-agnostic code
-// for logging native bind failures to the Fusion log/CLR log.
-//
-// These objects are stack-based and non-thread-safe. They are created for the duration of a single RuntimeVerify call.
-// The methods are expected to compute their data lazily as they are only used in bind failures or in checked builds.
-//
-// This class also exposes the IFusionBindLog pointer. This isn't really the appropriate place to expose that but
-// it serves to avoid compiling references to IFUsionBindLog into code that doesn't define FEATURE_FUSION.
-class LoggableAssembly
-{
- public:
- virtual SString DisplayString() = 0; // Returns an unspecified representation suitable for injecting into log messages.
-};
-
-
-// Validates that an NI matches the running CLR, OS, CPU, etc.
-BOOL RuntimeVerifyNativeImageVersion(const CORCOMPILE_VERSION_INFO *pVerInfo, LoggableAssembly *pLogAsm);
-
-// Validates that an NI matches the required flavor (debug, instrumented, etc.)
-BOOL RuntimeVerifyNativeImageFlavor(const CORCOMPILE_VERSION_INFO *pVerInfo, LoggableAssembly *pLogAsm);
-
-// Validates that a hard-dep matches the a parent NI's compile-time hard-dep.
-BOOL RuntimeVerifyNativeImageDependency(const CORCOMPILE_NGEN_SIGNATURE &ngenSigExpected,
- const CORCOMPILE_VERSION_INFO *pActual,
- LoggableAssembly *pLogAsm);
-
-BOOL RuntimeVerifyNativeImageDependency(const CORCOMPILE_DEPENDENCY *pExpected,
- const CORCOMPILE_VERSION_INFO *pActual,
- LoggableAssembly *pLogAsm);
-
-#endif // FEATURE_PREJIT
-
-
-
-
#endif // _CORPRIV_H_
// EOF =======================================================================
BOOL IsTagged(TADDR base) const
{
LIMITED_METHOD_DAC_CONTRACT;
- return IsTagged();
+ return FALSE;
}
// Returns whether the indirection cell contain fixup that has not been converted to real pointer yet.
BOOL IsTagged() const
{
LIMITED_METHOD_DAC_CONTRACT;
- TADDR addr = m_ptr;
- if ((addr & FIXUP_POINTER_INDIRECTION) != 0)
- return (*PTR_TADDR(addr - FIXUP_POINTER_INDIRECTION) & 1) != 0;
return FALSE;
}
PTR_TYPE * GetValuePtr() const
{
LIMITED_METHOD_CONTRACT;
- TADDR addr = m_ptr;
- if ((addr & FIXUP_POINTER_INDIRECTION) != 0)
- return (PTR_TYPE *)(addr - FIXUP_POINTER_INDIRECTION);
return (PTR_TYPE *)&m_ptr;
}
#endif // !DACCESS_COMPILE
return dac_cast<DPTR(PlainPointer<PTR_TYPE>)>(base)->GetValueMaybeNull(base);
}
+ // Returns value of the encoded pointer.
+ // Allows the value to be tagged.
+ FORCEINLINE TADDR GetValueMaybeTagged() const
+ {
+ LIMITED_METHOD_DAC_CONTRACT;
+ return m_ptr;
+ }
+
+ // Returns value of the encoded pointer. Assumes that the pointer is not NULL.
+ // Allows the value to be tagged.
+ FORCEINLINE TADDR GetValueMaybeTagged(TADDR base) const
+ {
+ LIMITED_METHOD_DAC_CONTRACT;
+ return m_ptr;
+ }
+
// Returns whether pointer is indirect. Assumes that the value is not NULL.
bool IsIndirectPtr(TADDR base) const
{
LIMITED_METHOD_DAC_CONTRACT;
-
- return (m_ptr & FIXUP_POINTER_INDIRECTION) != 0;
+ return FALSE;
}
#ifndef DACCESS_COMPILE
bool IsIndirectPtr() const
{
LIMITED_METHOD_CONTRACT;
- return IsIndirectPtr((TADDR)this);
+ return FALSE;
}
#endif
bool IsIndirectPtrMaybeNull(TADDR base) const
{
LIMITED_METHOD_DAC_CONTRACT;
-
- return IsIndirectPtr(base);
+ return FALSE;
}
#ifndef DACCESS_COMPILE
bool IsIndirectPtrMaybeNull() const
{
LIMITED_METHOD_CONTRACT;
- return IsIndirectPtrMaybeNull((TADDR)this);
+ return FALSE;
}
#endif
STDMETHODIMP SetOptimizeAccessForSpeed(
BOOL fOptSpeed)
{
+#ifdef FEATURE_PREJIT
// The metadata cache of hot items is an optional working-set optimization
// that has a large speed cost relative to direct table lookup
if (fOptSpeed)
{ // We want to disable usage of hot data (e.g. in ngen compilation process)
m_LiteWeightStgdb.m_MiniMd.DisableHotDataUsage();
}
+#endif
return S_OK;
}
_ASSERTE(!"WinMDImport::QueryInterface(IID_IMDInternalEmit) returning E_NOINTERFACE");
else if (riid == IID_IMetaDataEmitHelper)
_ASSERTE(!"WinMDImport::QueryInterface(IID_IMetaDataEmitHelper) returning E_NOINTERFACE");
+#ifdef FEATURE_PREJIT
else if (riid == IID_IMetaDataCorProfileData)
_ASSERTE(!"WinMDImport::QueryInterface(IID_IMetaDataCorProfileData) returning E_NOINTERFACE");
else if (riid == IID_IMDInternalMetadataReorderingOptions)
_ASSERTE(!"WinMDImport::QueryInterface(IID_IMDInternalMetadataReorderingOptions) returning E_NOINTERFACE");
+#endif
else
_ASSERTE(!"WinMDImport::QueryInterface() returning E_NOINTERFACE");
}
class MethodTable;
class AppDomain;
class DynamicMethodTable;
-struct CerPrepInfo;
+class CodeVersionManager;
+class CallCounter;
+class TieredCompilationManager;
#ifdef FEATURE_PREJIT
class CerNgenRootTable;
struct MethodContextElement;
class TypeHandleList;
class ProfileEmitter;
-class CodeVersionManager;
-class CallCounter;
-class TieredCompilationManager;
class TrackingMap;
struct MethodInModule;
class PersistentInlineTrackingMapNGen;
#define IS_FIELD_MEMBER_REF ((TADDR)0x00000002)
+#ifdef FEATURE_PREJIT
//
// NGen image layout information that we need to quickly access at runtime
//
PCODE m_pExternalMethodFixupJumpStub;
DWORD m_rvaFilterPersonalityRoutine;
};
+#endif // FEATURE_PREJIT
+
//
// VASigCookies are allocated to encapsulate a varargs call signature.
return (m_dwPersistedFlags & COLLECTIBLE_MODULE) != 0;
}
+#ifdef FEATURE_READYTORUN
+private:
+ PTR_ReadyToRunInfo m_pReadyToRunInfo;
+#endif
+
#ifdef FEATURE_PREJIT
private:
PTR_NGenLayoutInfo m_pNGenLayoutInfo;
-#ifdef FEATURE_READYTORUN
- PTR_ReadyToRunInfo m_pReadyToRunInfo;
-#endif
PTR_ProfilingBlobTable m_pProfilingBlobTable; // While performing IBC instrumenting this hashtable is populated with the External defs
CorProfileData * m_pProfileData; // While ngen-ing with IBC optimizations this contains a link to the IBC data for the assembly
return m_pNGenLayoutInfo->m_VirtualMethodThunks.IsInRange(code);
}
- BOOL IsReadyToRun()
- {
- LIMITED_METHOD_DAC_CONTRACT;
-
-#ifdef FEATURE_READYTORUN
- return m_pReadyToRunInfo != NULL;
-#else
- return FALSE;
-#endif
- }
-
-#ifdef FEATURE_READYTORUN
- PTR_ReadyToRunInfo GetReadyToRunInfo()
- {
- LIMITED_METHOD_DAC_CONTRACT;
- return m_pReadyToRunInfo;
- }
-#endif
-
ICorJitInfo::ProfileBuffer * AllocateProfileBuffer(mdToken _token, DWORD _size, DWORD _ILSize);
HANDLE OpenMethodProfileDataLogFile(GUID mvid);
static void ProfileDataAllocateTokenLists(ProfileEmitter * pEmitter, TokenProfileData* pTokenProfileData);
#endif // FEATURE_PREJIT
+ BOOL IsReadyToRun()
+ {
+ LIMITED_METHOD_DAC_CONTRACT;
+
+#ifdef FEATURE_READYTORUN
+ return m_pReadyToRunInfo != NULL;
+#else
+ return FALSE;
+#endif
+ }
+
+#ifdef FEATURE_READYTORUN
+ PTR_ReadyToRunInfo GetReadyToRunInfo()
+ {
+ LIMITED_METHOD_DAC_CONTRACT;
+ return m_pReadyToRunInfo;
+ }
+#endif
+
#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.
}
CONTRACTL_END;
+#ifdef FEATURE_PREJIT
// don't attempt to call GetElementPtr for rids inside the compressed portion of
// a multi-node map
if (MapIsCompressed() && rid < dwCount)
return;
+#endif
PTR_TADDR pElement = GetElementPtr(rid);
if (pElement == NULL)
GrowMap(pModule, rid);
#include "shash.h"
#include "pedecoder.h"
#include "gcinfo.h"
+#include "eexcp.h"
#if defined(WIN64EXCEPTIONS) && !defined(USE_INDIRECT_CODEHEADER)
#error "WIN64EXCEPTIONS requires USE_INDIRECT_CODEHEADER"
class EECodeInfo
{
friend BOOL EEJitManager::JitCodeToMethodInfo(RangeSection * pRangeSection, PCODE currentPC, MethodDesc** ppMethodDesc, EECodeInfo * pCodeInfo);
+#ifdef FEATURE_PREJIT
friend BOOL NativeImageJitManager::JitCodeToMethodInfo(RangeSection * pRangeSection, PCODE currentPC, MethodDesc** ppMethodDesc, EECodeInfo * pCodeInfo);
+#endif
#ifdef FEATURE_READYTORUN
friend BOOL ReadyToRunJitManager::JitCodeToMethodInfo(RangeSection * pRangeSection, PCODE currentPC, MethodDesc** ppMethodDesc, EECodeInfo * pCodeInfo);
#endif
CORCOMPILE_VERSION_INFO * pDependencyNativeVersion =
pDependencyNativeLayout->GetNativeVersionInfo();
- LoggablePEAssembly logAsm(pDependencyFile);
- if (!RuntimeVerifyNativeImageDependency(pDependency, pDependencyNativeVersion, &logAsm))
+ if (!RuntimeVerifyNativeImageDependency(pDependency, pDependencyNativeVersion, pDependencyFile))
goto NativeImageRejected;
}
LOG((LF_ZAP, LL_INFO100, "ZAP: Native image dependencies for %S OK.\n",
#ifdef WIN64EXCEPTIONS
+#include "eexcp.h"
+#include "exstatecommon.h"
+
#if defined(_TARGET_ARM_) || defined(_TARGET_X86_)
#define USE_PER_FRAME_PINVOKE_INIT
#endif // _TARGET_ARM_ || _TARGET_X86_
-
// This address lies in the NULL pointer partition of the process memory.
// Accessing it will result in AV.
#define INVALID_RESUME_ADDRESS 0x000000000000bad0
-#include "exstatecommon.h"
-
EXTERN_C EXCEPTION_DISPOSITION
ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord
WIN64_ARG(IN ULONG64 MemoryStackFp)
class MethodDesc;
typedef DPTR(class MethodDesc) PTR_MethodDesc;
+class ZapHeap;
+
struct MethodInModule
{
Module *m_module;
return FALSE;
}
+#ifdef FEATURE_PREJIT
//---------------------------------------------------------------------------
// Determines if a method is visible from COM in a way that requires a marshaling
// stub, i.e. it allows early binding.
return IsMethodVisibleFromCom(pMD);
}
+#endif // FEATURE_PREJIT
#ifndef CROSSGEN_COMPILE
class ReJitManager;
class CodeVersionManager;
class PrepareCodeConfig;
+class CallCounter;
typedef DPTR(FCallMethodDesc) PTR_FCallMethodDesc;
typedef DPTR(ArrayMethodDesc) PTR_ArrayMethodDesc;
pDecl->GetSlotIndex(),
pImpl);
+#ifdef FEATURE_PREJIT
if (IsCompilationProcess())
{
//
pDeclMT->GetWriteableDataForWrite()->SetIsOverridingInterface();
}
}
+#endif
#ifdef _DEBUG
if (bmtInterface->dbg_fShouldInjectInterfaceDuplicates)
//===========================================================================================================
// Encapsulates CLR and Fusion logging for runtime verification of native images.
//===========================================================================================================
-static void RuntimeVerifyVLog(DWORD level, LoggableAssembly *pLogAsm, const WCHAR *fmt, va_list args)
+static void RuntimeVerifyVLog(DWORD level, PEAssembly *pLogAsm, const WCHAR *fmt, va_list args)
{
STANDARD_VM_CONTRACT;
if (fOutputToLogging)
{
- SString displayString = pLogAsm->DisplayString();
+ SString displayString = pLogAsm->GetPath();
LOG((LF_ZAP, level, "%s: \"%S\"\n", "ZAP", displayString.GetUnicode()));
LOG((LF_ZAP, level, "%S", message.GetUnicode()));
LOG((LF_ZAP, level, "\n"));
if (fOutputToDebugger)
{
- SString displayString = pLogAsm->DisplayString();
+ SString displayString = pLogAsm->GetPath();
WszOutputDebugString(W("CLR:("));
WszOutputDebugString(displayString.GetUnicode());
WszOutputDebugString(W(") "));
//===========================================================================================================
// Encapsulates CLR and Fusion logging for runtime verification of native images.
//===========================================================================================================
-static void RuntimeVerifyLog(DWORD level, LoggableAssembly *pLogAsm, const WCHAR *fmt, ...)
+static void RuntimeVerifyLog(DWORD level, PEAssembly *pLogAsm, const WCHAR *fmt, ...)
{
STANDARD_VM_CONTRACT;
#endif // CROSSGEN_COMPILE
//===========================================================================================================
-// Helper for RuntimeVerifyNativeImageVersion(). Compares the loaded clr.dll and clrjit.dll's against
-// the ones the native image was compiled against.
-//===========================================================================================================
-static BOOL RuntimeVerifyNativeImageTimestamps(const CORCOMPILE_VERSION_INFO *info, LoggableAssembly *pLogAsm)
-{
- STANDARD_VM_CONTRACT;
-
-
- return TRUE;
-}
-
-//===========================================================================================================
-// Validates that an NI matches the running CLR, OS, CPU, etc. This is the entrypoint used by the CLR loader.
-//
-//===========================================================================================================
-BOOL PEAssembly::CheckNativeImageVersion(PEImage *peimage)
-{
- STANDARD_VM_CONTRACT;
-
- //
- // Get the zap version header. Note that modules will not have version
- // headers - they add no additional versioning constraints from their
- // assemblies.
- //
- PEImageLayoutHolder image=peimage->GetLayout(PEImageLayout::LAYOUT_ANY,PEImage::LAYOUT_CREATEIFNEEDED);
-
- if (!image->HasNativeHeader())
- return FALSE;
-
- if (!image->CheckNativeHeaderVersion())
- {
- // Wrong native image version is fatal error on CoreCLR
- ThrowHR(COR_E_NI_AND_RUNTIME_VERSION_MISMATCH);
- }
-
- CORCOMPILE_VERSION_INFO *info = image->GetNativeVersionInfo();
- if (info == NULL)
- return FALSE;
-
- LoggablePEAssembly logAsm(this);
- if (!RuntimeVerifyNativeImageVersion(info, &logAsm))
- {
- // Wrong native image version is fatal error on CoreCLR
- ThrowHR(COR_E_NI_AND_RUNTIME_VERSION_MISMATCH);
- }
-
- CorCompileConfigFlags configFlags = PEFile::GetNativeImageConfigFlagsWithOverrides();
-
- // Otherwise, match regardless of the instrumentation flags
- configFlags = (CorCompileConfigFlags) (configFlags & ~(CORCOMPILE_CONFIG_INSTRUMENTATION_NONE | CORCOMPILE_CONFIG_INSTRUMENTATION));
-
- if ((info->wConfigFlags & configFlags) != configFlags)
- {
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-//===========================================================================================================
// Validates that an NI matches the running CLR, OS, CPU, etc.
//
// For historial reasons, some versions of the runtime perform this check at native bind time (preferrred),
// This is the common funnel for both versions and is agnostic to whether the "assembly" is represented
// by a CLR object or Fusion object.
//===========================================================================================================
-BOOL RuntimeVerifyNativeImageVersion(const CORCOMPILE_VERSION_INFO *info, LoggableAssembly *pLogAsm)
+BOOL RuntimeVerifyNativeImageVersion(const CORCOMPILE_VERSION_INFO *info, PEAssembly *pLogAsm)
{
STANDARD_VM_CONTRACT;
- if (!RuntimeVerifyNativeImageTimestamps(info, pLogAsm))
- return FALSE;
-
//
// Check that the EE version numbers are the same.
//
return TRUE;
}
+//===========================================================================================================
+// Validates that an NI matches the running CLR, OS, CPU, etc. This is the entrypoint used by the CLR loader.
+//
+//===========================================================================================================
+BOOL PEAssembly::CheckNativeImageVersion(PEImage *peimage)
+{
+ STANDARD_VM_CONTRACT;
+
+ //
+ // Get the zap version header. Note that modules will not have version
+ // headers - they add no additional versioning constraints from their
+ // assemblies.
+ //
+ PEImageLayoutHolder image = peimage->GetLayout(PEImageLayout::LAYOUT_ANY, PEImage::LAYOUT_CREATEIFNEEDED);
+
+ if (!image->HasNativeHeader())
+ return FALSE;
+
+ if (!image->CheckNativeHeaderVersion())
+ {
+ // Wrong native image version is fatal error on CoreCLR
+ ThrowHR(COR_E_NI_AND_RUNTIME_VERSION_MISMATCH);
+ }
+
+ CORCOMPILE_VERSION_INFO *info = image->GetNativeVersionInfo();
+ if (info == NULL)
+ return FALSE;
+
+ if (!RuntimeVerifyNativeImageVersion(info, this))
+ {
+ // Wrong native image version is fatal error on CoreCLR
+ ThrowHR(COR_E_NI_AND_RUNTIME_VERSION_MISMATCH);
+ }
+
+ CorCompileConfigFlags configFlags = PEFile::GetNativeImageConfigFlagsWithOverrides();
+
+ // Otherwise, match regardless of the instrumentation flags
+ configFlags = (CorCompileConfigFlags)(configFlags & ~(CORCOMPILE_CONFIG_INSTRUMENTATION_NONE | CORCOMPILE_CONFIG_INSTRUMENTATION));
+
+ if ((info->wConfigFlags & configFlags) != configFlags)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
#endif // !DACCESS_COMPILE
/* static */
//===========================================================================================================
BOOL RuntimeVerifyNativeImageDependency(const CORCOMPILE_NGEN_SIGNATURE &ngenSigExpected,
const CORCOMPILE_VERSION_INFO *pActual,
- LoggableAssembly *pLogAsm)
+ PEAssembly *pLogAsm)
{
STANDARD_VM_CONTRACT;
if (ngenSigExpected != pActual->signature)
{
// Signature did not match
- SString displayString = pLogAsm->DisplayString();
+ SString displayString = pLogAsm->GetPath();
RuntimeVerifyLog(LL_ERROR,
pLogAsm,
W("Rejecting native image because native image dependency %s ")
// Wrapper function for use by parts of the runtime that actually have a CORCOMPILE_DEPENDENCY to work with.
BOOL RuntimeVerifyNativeImageDependency(const CORCOMPILE_DEPENDENCY *pExpected,
const CORCOMPILE_VERSION_INFO *pActual,
- LoggableAssembly *pLogAsm)
+ PEAssembly *pLogAsm)
{
WRAPPER_NO_CONTRACT;
typedef ReleaseHolder<PEAssembly> PEAssemblyHolder;
-
-
-// A small shim around PEAssemblies/IBindResult that allow us to write Fusion/CLR-agnostic
-// for logging native bind failures to the Fusion log/CLR log.
-//
-// These structures are stack-based, non-thread-safe and created for the duration of a single RuntimeVerify call.
-// The methods are expected to compute their data lazily as they are only used in bind failures or in checked builds.
-class LoggablePEAssembly : public LoggableAssembly
-{
- public:
- virtual SString DisplayString()
- {
- STANDARD_VM_CONTRACT;
-
- return m_peAssembly->GetPath();
- }
-
-
- LoggablePEAssembly(PEAssembly *peAssembly)
- {
- LIMITED_METHOD_CONTRACT;
-
- m_peAssembly = peAssembly;
- peAssembly->AddRef();
- }
-
- ~LoggablePEAssembly()
- {
- LIMITED_METHOD_CONTRACT;
-
- m_peAssembly->Release();
- }
-
- private:
- PEAssembly *m_peAssembly;
-};
-
+BOOL RuntimeVerifyNativeImageDependency(const CORCOMPILE_DEPENDENCY *pExpected,
+ const CORCOMPILE_VERSION_INFO *pActual,
+ PEAssembly *pLogAsm);
// ================================================================================
// Inline definitions
inline BOOL PEImage::IsIbcOptimized()
{
+#ifdef FEATURE_PREJIT
WRAPPER_NO_CONTRACT;
if (HasLoadedLayout())
return GetLoadedLayout()->GetNativeILIsIbcOptimized();
PEImageLayoutHolder pLayout(GetLayout(PEImageLayout::LAYOUT_ANY,LAYOUT_CREATEIFNEEDED));
return pLayout->GetNativeILIsIbcOptimized();
}
+#else
+ return false;
+#endif
}
#ifdef FEATURE_PREJIT
typedef DPTR(struct READYTORUN_SECTION) PTR_READYTORUN_SECTION;
+#ifndef FEATURE_PREJIT
+typedef DPTR(struct READYTORUN_IMPORT_SECTION) PTR_CORCOMPILE_IMPORT_SECTION;
+#endif
+
class PrepareCodeConfig;
typedef DPTR(class ReadyToRunInfo) PTR_ReadyToRunInfo;
case STUB_CODE_BLOCK_STUBLINK:
return StubLinkStubManager::g_pManager->DoTraceStub(stubStartAddress, trace);
+#ifdef FEATURE_PREJIT
case STUB_CODE_BLOCK_VIRTUAL_METHOD_THUNK:
{
PCODE pTarget = GetMethodThunkTarget(stubStartAddress);
}
return TRUE;
}
+#endif
case STUB_CODE_BLOCK_EXTERNAL_METHOD_THUNK:
{
#include "common.h"
-//define function pointer type: EncodeModuleCallback
-//
+typedef DWORD(*ENCODEMODULE_CALLBACK)(LPVOID pModuleContext, CORINFO_MODULE_HANDLE moduleHandle);
typedef DWORD (*EncodeModuleCallback)(void* pModuleContext, Module *pReferencedModule);
enum {
// return value when EncodeModule fails
ENCODE_MODULE_FAILED = 0xffffffff,
};
-//define function pointer type: TokenDefinitionCallback
-//
+typedef void(*DEFINETOKEN_CALLBACK)(LPVOID pModuleContext, CORINFO_MODULE_HANDLE moduleHandle, DWORD index, mdTypeRef* token);
typedef void (*TokenDefinitionCallback)(void* pModuleContext, Module *pReferencedModule, DWORD index, mdToken* refToken);
class ZapSig