Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions src/coreclr/inc/corcompile.h
Original file line number Diff line number Diff line change
Expand Up @@ -1285,14 +1285,6 @@ class ICorCompilePreloader
CORINFO_METHOD_HANDLE method,
CORINFO_METHOD_HANDLE duplicateMethod) = 0;

#ifdef FEATURE_READYTORUN_COMPILER
// Returns a compressed encoding of the inline tracking map
// for this compilation
virtual void GetSerializedInlineTrackingMap(
IN OUT SBuffer * pSerializedInlineTrackingMap
) = 0;
#endif

//
// Release frees the preloader
//
Expand Down Expand Up @@ -1726,27 +1718,6 @@ class ICorCompileInfo
virtual BOOL GetIsGeneratingNgenPDB() = 0;
virtual void SetIsGeneratingNgenPDB(BOOL fGeneratingNgenPDB) = 0;

#ifdef FEATURE_READYTORUN_COMPILER
virtual CORCOMPILE_FIXUP_BLOB_KIND GetFieldBaseOffset(
CORINFO_CLASS_HANDLE classHnd,
DWORD * pBaseOffset
) = 0;

virtual BOOL NeedsTypeLayoutCheck(CORINFO_CLASS_HANDLE classHnd) = 0;
virtual void EncodeTypeLayout(CORINFO_CLASS_HANDLE classHandle, SigBuilder * pSigBuilder) = 0;

virtual BOOL AreAllClassesFullyLoaded(CORINFO_MODULE_HANDLE moduleHandle) = 0;

virtual int GetVersionResilientTypeHashCode(CORINFO_MODULE_HANDLE moduleHandle, mdToken token) = 0;

virtual int GetVersionResilientMethodHashCode(CORINFO_METHOD_HANDLE methodHandle) = 0;

virtual BOOL EnumMethodsForStub(CORINFO_METHOD_HANDLE hMethod, void** enumerator) = 0;
virtual BOOL EnumNextMethodForStub(void * enumerator, CORINFO_METHOD_HANDLE *hMethod) = 0;
virtual void EnumCloseForStubEnumerator(void *enumerator) = 0;

#endif

virtual BOOL HasCustomAttribute(CORINFO_METHOD_HANDLE method, LPCSTR customAttributeName) = 0;
};

Expand All @@ -1767,26 +1738,4 @@ extern "C" unsigned __stdcall PartialNGenStressPercentage();
extern "C" HRESULT __stdcall CreatePdb(CORINFO_ASSEMBLY_HANDLE hAssembly, BSTR pNativeImagePath, BSTR pPdbPath, BOOL pdbLines, BSTR pManagedPdbSearchPath, LPCWSTR pDiasymreaderPath);

extern bool g_fNGenMissingDependenciesOk;

#ifdef FEATURE_READYTORUN_COMPILER
extern bool g_fReadyToRunCompilation;
extern bool g_fLargeVersionBubble;
#endif

inline bool IsReadyToRunCompilation()
{
#ifdef FEATURE_READYTORUN_COMPILER
return g_fReadyToRunCompilation;
#else
return false;
#endif
}

#ifdef FEATURE_READYTORUN_COMPILER
inline bool IsLargeVersionBubbleEnabled()
{
return g_fLargeVersionBubble;
}
#endif

#endif /* COR_COMPILE_H_ */
38 changes: 4 additions & 34 deletions src/coreclr/vm/ceeload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3181,16 +3181,13 @@ BOOL Module::IsInCurrentVersionBubble()
if (pAppDomain->IsCompilationDomain() && pAppDomain->ToCompilationDomain()->GetTargetModule() == this)
return TRUE;

if (IsReadyToRunCompilation())
return IsLargeVersionBubbleEnabled();

return TRUE;
#else // FEATURE_NATIVE_IMAGE_GENERATION
return TRUE;
#endif // FEATURE_NATIVE_IMAGE_GENERATION
}

#if defined(FEATURE_READYTORUN) && !defined(FEATURE_READYTORUN_COMPILER)
#if defined(FEATURE_READYTORUN)
//---------------------------------------------------------------------------------------
// Check if the target module is in the same version bubble as this one
// The current implementation uses the presence of an AssemblyRef for the target module's assembly in
Expand Down Expand Up @@ -3257,7 +3254,7 @@ BOOL Module::IsInSameVersionBubble(Module *target)

return FALSE;
}
#endif // FEATURE_READYTORUN && !FEATURE_READYTORUN_COMPILER
#endif // FEATURE_READYTORUN

//---------------------------------------------------------------------------------------
//
Expand Down Expand Up @@ -4943,29 +4940,8 @@ mdTypeRef Module::LookupTypeRefByMethodTable(MethodTable *pMT)
return token;
}
}

#ifdef FEATURE_READYTORUN_COMPILER
if (IsReadyToRunCompilation())
{
if (pMT->GetClass()->IsEquivalentType())
{
if (g_CorCompileVerboseLevel >= CORCOMPILE_VERBOSE)
GetSvcLogger()->Log(W("ReadyToRun: Type reference to equivalent type cannot be encoded\n"));
ThrowHR(E_NOTIMPL);
}

// FUTURE: Encoding of new cross-module references for ReadyToRun
// This warning is hit for recursive cross-module inlining. It is commented out to avoid noise.
// if (g_CorCompileVerboseLevel >= CORCOMPILE_VERBOSE)
// GetSvcLogger()->Log(W("ReadyToRun: Type reference outside of current version bubble cannot be encoded\n"));
ThrowHR(E_NOTIMPL);
}
else
#endif // FEATURE_READYTORUN_COMPILER
{
// FUTURE TODO: Version resilience
_ASSERTE(!"Cross module type reference not found");
}
// FUTURE TODO: Version resilience
_ASSERTE(!"Cross module type reference not found");
ThrowHR(E_FAIL);
}

Expand Down Expand Up @@ -7043,12 +7019,6 @@ MethodDesc* Module::LoadIBCMethodHelper(DataImage *image, CORBBTPROF_BLOB_PARAM_
NULL,
pZapSigContext);

// curInst will be nullptr when the type fails the versioning bubble check
if (curInst.IsNull() && IsReadyToRunCompilation())
{
COMPlusThrow(kTypeLoadException, IDS_IBC_MISSING_EXTERNAL_TYPE);
}

pInst[i] = curInst;
IfFailThrow(p.SkipExactlyOne());
}
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/ceeload.h
Original file line number Diff line number Diff line change
Expand Up @@ -1899,9 +1899,9 @@ class Module

BOOL IsInCurrentVersionBubble();

#if defined(FEATURE_READYTORUN) && !defined(FEATURE_READYTORUN_COMPILER)
#if defined(FEATURE_READYTORUN)
BOOL IsInSameVersionBubble(Module *target);
#endif // FEATURE_READYTORUN && !FEATURE_READYTORUN_COMPILER
#endif // FEATURE_READYTORUN


LPCWSTR GetPathForErrorMessages();
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/classcompat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ VOID MethodTableBuilder::BuildInteropVTable_ExpandInterface(InterfaceInfo_t *pIn
MethodTable *pItf = it.GetInterfaceApprox();
if (pItf->HasInstantiation() || pItf->IsSpecialMarkerTypeForGenericCasting())
continue;

BuildInteropVTable_ExpandInterface(pInterfaceMap, pItf,
pwInterfaceListSize, pdwMaxInterfaceMethods, FALSE);
}
Expand Down Expand Up @@ -2595,7 +2595,7 @@ VOID MethodTableBuilder::EnumerateClassMethods()
if (fIsClassInterface
#if defined(FEATURE_DEFAULT_INTERFACES)
// Only fragile crossgen wasn't upgraded to deal with default interface methods.
&& !IsReadyToRunCompilation() && !IsNgenPDBCompilationProcess()
&& !IsNgenPDBCompilationProcess()
#endif
)
{
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/clsload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ PTR_Module ClassLoader::ComputeLoaderModuleWorker(
// for CoreLib (or compiling CoreLib itself). It is not the case for ReadyToRun compilation because
// CoreLib as always treated as IL there (see code:PEFile::ShouldTreatNIAsMSIL for details).
//
if (IsCompilationProcess() && !IsReadyToRunCompilation())
if (IsCompilationProcess())
{
RETURN(ComputeLoaderModuleForCompilation(pDefinitionModule, token, classInst, methodInst));
}
Expand Down
Loading