Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
A-And committed Jan 1, 2019
1 parent 9d5c7f1 commit dfde969
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 35 deletions.
4 changes: 1 addition & 3 deletions src/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19906,9 +19906,7 @@ void Compiler::impDevirtualizeCall(GenTreeCall* call,

// Look up the new call info.
CORINFO_CALL_INFO derivedCallInfo;
eeGetCallInfo(&derivedResolvedToken, nullptr,
addVerifyFlag(CORINFO_CALLINFO_ALLOWINSTPARAM),
&derivedCallInfo);
eeGetCallInfo(&derivedResolvedToken, nullptr, addVerifyFlag(CORINFO_CALLINFO_ALLOWINSTPARAM), &derivedCallInfo);

// Update the call.
call->gtCallMoreFlags &= ~GTF_CALL_M_VIRTSTUB_REL_INDIRECT;
Expand Down
17 changes: 3 additions & 14 deletions src/tools/crossgen/crossgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enum ReturnValues
#define NumItems(s) (sizeof(s) / sizeof(s[0]))

STDAPI CreatePDBWorker(LPCWSTR pwzAssemblyPath, LPCWSTR pwzPlatformAssembliesPaths, LPCWSTR pwzTrustedPlatformAssemblies, LPCWSTR pwzPlatformResourceRoots, LPCWSTR pwzAppPaths, LPCWSTR pwzAppNiPaths, LPCWSTR pwzPdbPath, BOOL fGeneratePDBLinesInfo, LPCWSTR pwzManagedPdbSearchPath, LPCWSTR pwzPlatformWinmdPaths, LPCWSTR pwzDiasymreaderPath);
STDAPI NGenWorker(LPCWSTR pwzFilename, DWORD dwFlags, LPCWSTR pwzPlatformAssembliesPaths, LPCWSTR pwzTrustedPlatformAssemblies, LPCWSTR pwzPlatformResourceRoots, LPCWSTR pwzAppPaths, LPCWSTR pwzOutputFilename=NULL, LPCWSTR pwzPlatformWinmdPaths=NULL, LPCWSTR pwzVersionBubbleAssemblyPaths=NULL, ICorSvcLogger *pLogger = NULL, LPCWSTR pwszCLRJITPath = nullptr);
STDAPI NGenWorker(LPCWSTR pwzFilename, DWORD dwFlags, LPCWSTR pwzPlatformAssembliesPaths, LPCWSTR pwzTrustedPlatformAssemblies, LPCWSTR pwzPlatformResourceRoots, LPCWSTR pwzAppPaths, LPCWSTR pwzOutputFilename=NULL, LPCWSTR pwzPlatformWinmdPaths=NULL, ICorSvcLogger *pLogger = NULL, LPCWSTR pwszCLRJITPath = nullptr);
void SetSvcLogger(ICorSvcLogger *pCorSvcLogger);
void SetMscorlibPath(LPCWSTR wzSystemDirectory);

Expand Down Expand Up @@ -422,8 +422,6 @@ int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)
LPCWSTR pwzAppNiPaths = nullptr;
LPCWSTR pwzPlatformAssembliesPaths = nullptr;
LPCWSTR pwzPlatformWinmdPaths = nullptr;
// TODO Add Variable Num of cli arguments
LPCWSTR pwzVersionBubbleAssemblyPaths = nullptr;
StackSString wzDirectoryToStorePDB;
bool fCreatePDB = false;
bool fGeneratePDBLinesInfo = false;
Expand Down Expand Up @@ -474,7 +472,6 @@ int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)

// By default, Crossgen will generate readytorun images unless /FragileNonVersionable switch is specified
dwFlags |= NGENWORKER_FLAGS_READYTORUN;

while (argc > 0)
{
// Command-line parsing
Expand Down Expand Up @@ -533,6 +530,7 @@ int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)
else if (MatchParameter(*argv, W("LargeVersionBubble")))
{
dwFlags |= NGENWORKER_FLAGS_LARGEVERSIONBUBBLE;
fLargeVersionBubbleSwitch = true;
}
#endif
else if (MatchParameter(*argv, W("NoMetaData")))
Expand Down Expand Up @@ -599,14 +597,6 @@ int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)
{
pwzPlatformAssembliesPaths = argv[1];

// skip path list
argv++;
argc--;
}
else if (MatchParameter(*argv, W("Version_Bubble_Assembly_Paths")) && (argc > 1))
{
pwzVersionBubbleAssemblyPaths = argv[1];

// skip path list
argv++;
argc--;
Expand Down Expand Up @@ -933,8 +923,7 @@ int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)
pwzPlatformResourceRoots,
pwzAppPaths,
pwzOutputFilename,
pwzPlatformWinmdPaths,
pwzVersionBubbleAssemblyPaths
pwzPlatformWinmdPaths
#if !defined(FEATURE_MERGE_JIT_AND_ENGINE)
,
NULL, // ICorSvcLogger
Expand Down
1 change: 0 additions & 1 deletion src/vm/ceeload.h
Original file line number Diff line number Diff line change
Expand Up @@ -2393,7 +2393,6 @@ class Module
CrstHolder ch(this->GetLookupTableCrst());
m_pMemberRefToDescHashTable->Insert(token, value);
}
// This call
void StoreMemberRef(mdMemberRef token, MethodDesc *value)
{
WRAPPER_NO_CONTRACT;
Expand Down
1 change: 0 additions & 1 deletion src/vm/readytoruninfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ PTR_ReadyToRunInfo ReadyToRunInfo::Initialize(Module * pModule, AllocMemTracker
STANDARD_VM_CONTRACT;

PEFile * pFile = pModule->GetFile();
// ?
if (!IsReadyToRunEnabled())
{
// Log message is ignored in this case.
Expand Down
1 change: 0 additions & 1 deletion src/vm/readytoruninfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class ReadyToRunInfo
NativeFormat::NativeArray m_methodDefEntryPoints;
NativeFormat::NativeHashtable m_instMethodEntryPoints;
NativeFormat::NativeHashtable m_availableTypesHashtable;
// TODO Should this be a hash table?
NativeFormat::NativeHashtable m_pMetaDataHashtable;

Crst m_Crst;
Expand Down
8 changes: 4 additions & 4 deletions src/vm/zapsig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,9 +781,9 @@ Module *ZapSig::DecodeModuleFromIndexIfLoaded(Module *fromModule,


TypeHandle ZapSig::DecodeType(Module *pEncodeModuleContext,
Module *pInfoModule,
PCCOR_SIGNATURE pBuffer,
ClassLoadLevel level)
Module *pInfoModule,
PCCOR_SIGNATURE pBuffer,
ClassLoadLevel level)
{
CONTRACTL
{
Expand Down Expand Up @@ -879,6 +879,7 @@ MethodDesc *ZapSig::DecodeMethod(Module *pReferencingModule,
//
RID rid;
IfFailThrow(sig.GetData(&rid));

if (methodFlags & ENCODE_METHOD_SIG_MemberRefToken)
{
if (thOwner.IsNull())
Expand Down Expand Up @@ -1201,7 +1202,6 @@ BOOL ZapSig::EncodeMethod(
// GetSvcLogger()->Printf(W("ReadyToRun: Method reference outside of current version bubble cannot be encoded\n"));
ThrowHR(E_FAIL);
}
//_ASSERTE(pReferencingModule == GetAppDomain()->ToCompilationDomain()->GetTargetModule());

methodToken = pResolvedToken->token;

Expand Down
1 change: 0 additions & 1 deletion src/zap/zapimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,6 @@ void ZapImage::Compile()
OutputInliningTableForReadyToRun();
OutputProfileDataForReadyToRun();
OutputManifestMetadataForReadyToRun();

}
else
#endif
Expand Down
3 changes: 0 additions & 3 deletions src/zap/zapimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,6 @@ ZapImport * ZapImportTable::GetExistingMethodHandleImport(CORINFO_METHOD_HANDLE

CORINFO_MODULE_HANDLE ZapImportTable::TryEncodeModule(CORCOMPILE_FIXUP_BLOB_KIND kind, CORINFO_MODULE_HANDLE module, SigBuilder * pSigBuilder)
{
// Use def tokens and module references?
if (!GetCompileInfo()->IsInCurrentVersionBubble(module))
module = GetImage()->GetModuleHandle();

Expand Down Expand Up @@ -990,7 +989,6 @@ void ZapImportTable::EncodeMethod(CORCOMPILE_FIXUP_BLOB_KIND kind, CORINFO_METHO
CORINFO_CLASS_HANDLE clsHandle = GetJitInfo()->getMethodClass(handle);
CORINFO_MODULE_HANDLE referencingModule = GetJitInfo()->getClassModule(clsHandle);
referencingModule = TryEncodeModule(kind, referencingModule, pSigBuilder);

GetCompileInfo()->EncodeMethod(referencingModule, handle, pSigBuilder, this, EncodeModuleHelper,
pResolvedToken, pConstrainedResolvedToken, fEncodeUsingResolvedTokenSpecStreams);
}
Expand Down Expand Up @@ -1847,7 +1845,6 @@ ZapImport * ZapImportTable::GetDynamicHelperCell(CORCOMPILE_FIXUP_BLOB_KIND kind
sigBuilder.AppendData(kind & ~CORINFO_HELP_READYTORUN_ATYPICAL_CALLSITE);

GetCompileInfo()->EncodeClass(m_pImage->GetModuleHandle(), handle, &sigBuilder, this, EncodeModuleHelper);
// CHANGE IT HERE
pImport->SetBlob(GetBlob(&sigBuilder));
}

Expand Down
6 changes: 0 additions & 6 deletions src/zap/zapinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1425,12 +1425,6 @@ CORINFO_MODULE_HANDLE ZapInfo::embedModuleHandle(CORINFO_MODULE_HANDLE handle,
{
_ASSERTE(ppIndirection != NULL);

//if (IsReadyToRunCompilation())
//{
// _ASSERTE(!"embedModuleHandle");
// ThrowHR(E_NOTIMPL);
//}

BOOL fHardbound = m_pImage->m_pPreloader->CanEmbedModuleHandle(handle);
if (fHardbound)
{
Expand Down
2 changes: 1 addition & 1 deletion src/zap/zapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static bool s_fNGenNoMetaData;
// Zapper Object instead of creating one on your own.


STDAPI NGenWorker(LPCWSTR pwzFilename, DWORD dwFlags, LPCWSTR pwzPlatformAssembliesPaths, LPCWSTR pwzTrustedPlatformAssemblies, LPCWSTR pwzPlatformResourceRoots, LPCWSTR pwzAppPaths, LPCWSTR pwzOutputFilename=NULL, LPCWSTR pwzPlatformWinmdPaths=NULL, LPCWSTR pwzVersionBubbleAssemblyPaths=NULL, ICorSvcLogger *pLogger = NULL, LPCWSTR pwszCLRJITPath = nullptr)
STDAPI NGenWorker(LPCWSTR pwzFilename, DWORD dwFlags, LPCWSTR pwzPlatformAssembliesPaths, LPCWSTR pwzTrustedPlatformAssemblies, LPCWSTR pwzPlatformResourceRoots, LPCWSTR pwzAppPaths, LPCWSTR pwzOutputFilename=NULL, LPCWSTR pwzPlatformWinmdPaths=NULL, ICorSvcLogger *pLogger = NULL, LPCWSTR pwszCLRJITPath = nullptr)
{
HRESULT hr = S_OK;

Expand Down

0 comments on commit dfde969

Please sign in to comment.