From 6f9121bf9e51472780e25d7f50b8c9e46898ad50 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Thu, 3 Jan 2019 14:46:57 +0100 Subject: [PATCH] Remove unnecessary propagation of stack crawl marks. (#21781) --- src/vm/appdomain.cpp | 3 +-- src/vm/appdomain.hpp | 1 - src/vm/assemblynative.cpp | 2 +- src/vm/assemblyspec.cpp | 9 ++++----- src/vm/assemblyspec.hpp | 9 +++------ src/vm/compile.cpp | 2 -- src/vm/compile.h | 1 - src/vm/coreassemblyspec.cpp | 3 +-- 8 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/vm/appdomain.cpp b/src/vm/appdomain.cpp index fe0c694..19035604 100644 --- a/src/vm/appdomain.cpp +++ b/src/vm/appdomain.cpp @@ -6068,7 +6068,6 @@ AppDomain::BindHostedPrivAssembly( PEAssembly * AppDomain::BindAssemblySpec( AssemblySpec * pSpec, BOOL fThrowOnFileNotFound, - StackCrawlMark * pCallerStackMark, BOOL fUseHostBinderIfAvailable) { STATIC_CONTRACT_THROWS; @@ -6169,7 +6168,7 @@ EndTry2:; // Use CoreClr's fusion alternative CoreBindResult bindResult; - pSpec->Bind(this, fThrowOnFileNotFound, &bindResult, FALSE /* fNgenExplicitBind */, FALSE /* fExplicitBindToNativeImage */, pCallerStackMark); + pSpec->Bind(this, fThrowOnFileNotFound, &bindResult, FALSE /* fNgenExplicitBind */, FALSE /* fExplicitBindToNativeImage */); hrBindResult = bindResult.GetHRBindResult(); if (bindResult.Found()) diff --git a/src/vm/appdomain.hpp b/src/vm/appdomain.hpp index 0aeab8f..9db5ad5 100644 --- a/src/vm/appdomain.hpp +++ b/src/vm/appdomain.hpp @@ -2263,7 +2263,6 @@ public: virtual PEAssembly * BindAssemblySpec( AssemblySpec *pSpec, BOOL fThrowOnFileNotFound, - StackCrawlMark *pCallerStackMark = NULL, BOOL fUseHostBinderIfAvailable = TRUE) DAC_EMPTY_RET(NULL); HRESULT BindAssemblySpecForHostedBinder( diff --git a/src/vm/assemblynative.cpp b/src/vm/assemblynative.cpp index 14bef33..b291dbe 100644 --- a/src/vm/assemblynative.cpp +++ b/src/vm/assemblynative.cpp @@ -135,7 +135,7 @@ FCIMPL7(Object*, AssemblyNative::Load, AssemblyNameBaseObject* assemblyNameUNSAF { GCX_PREEMP(); - pAssembly = spec.LoadAssembly(FILE_LOADED, fThrowOnFileNotFound, stackMark); + pAssembly = spec.LoadAssembly(FILE_LOADED, fThrowOnFileNotFound); } if (pAssembly != NULL) diff --git a/src/vm/assemblyspec.cpp b/src/vm/assemblyspec.cpp index 136589f..b2d33b3 100644 --- a/src/vm/assemblyspec.cpp +++ b/src/vm/assemblyspec.cpp @@ -753,7 +753,7 @@ PEAssembly *AssemblySpec::ResolveAssemblyFile(AppDomain *pDomain) } -Assembly *AssemblySpec::LoadAssembly(FileLoadLevel targetLevel, BOOL fThrowOnFileNotFound, StackCrawlMark *pCallerStackMark) +Assembly *AssemblySpec::LoadAssembly(FileLoadLevel targetLevel, BOOL fThrowOnFileNotFound) { CONTRACTL { @@ -763,7 +763,7 @@ Assembly *AssemblySpec::LoadAssembly(FileLoadLevel targetLevel, BOOL fThrowOnFil } CONTRACTL_END; - DomainAssembly * pDomainAssembly = LoadDomainAssembly(targetLevel, fThrowOnFileNotFound, pCallerStackMark); + DomainAssembly * pDomainAssembly = LoadDomainAssembly(targetLevel, fThrowOnFileNotFound); if (pDomainAssembly == NULL) { _ASSERTE(!fThrowOnFileNotFound); return NULL; @@ -891,8 +891,7 @@ ICLRPrivBinder* AssemblySpec::GetBindingContextFromParentAssembly(AppDomain *pDo } DomainAssembly *AssemblySpec::LoadDomainAssembly(FileLoadLevel targetLevel, - BOOL fThrowOnFileNotFound, - StackCrawlMark *pCallerStackMark) + BOOL fThrowOnFileNotFound) { CONTRACT(DomainAssembly *) { @@ -932,7 +931,7 @@ DomainAssembly *AssemblySpec::LoadDomainAssembly(FileLoadLevel targetLevel, } - PEAssemblyHolder pFile(pDomain->BindAssemblySpec(this, fThrowOnFileNotFound, pCallerStackMark)); + PEAssemblyHolder pFile(pDomain->BindAssemblySpec(this, fThrowOnFileNotFound)); if (pFile == NULL) RETURN NULL; diff --git a/src/vm/assemblyspec.hpp b/src/vm/assemblyspec.hpp index 5cf87f2..97bbd5f 100644 --- a/src/vm/assemblyspec.hpp +++ b/src/vm/assemblyspec.hpp @@ -216,15 +216,12 @@ class AssemblySpec : public BaseAssemblySpec BOOL fThrowOnFileNotFound, CoreBindResult* pBindResult, BOOL fNgenExplicitBind = FALSE, - BOOL fExplicitBindToNativeImage = FALSE, - StackCrawlMark *pCallerStackMark = NULL ); + BOOL fExplicitBindToNativeImage = FALSE); Assembly *LoadAssembly(FileLoadLevel targetLevel, - BOOL fThrowOnFileNotFound = TRUE, - StackCrawlMark *pCallerStackMark = NULL); + BOOL fThrowOnFileNotFound = TRUE); DomainAssembly *LoadDomainAssembly(FileLoadLevel targetLevel, - BOOL fThrowOnFileNotFound = TRUE, - StackCrawlMark *pCallerStackMark = NULL); + BOOL fThrowOnFileNotFound = TRUE); //**************************************************************************************** // diff --git a/src/vm/compile.cpp b/src/vm/compile.cpp index 3cec66e..323c66a 100644 --- a/src/vm/compile.cpp +++ b/src/vm/compile.cpp @@ -7221,7 +7221,6 @@ void ReportMissingDependency(Exception * e) PEAssembly *CompilationDomain::BindAssemblySpec( AssemblySpec *pSpec, BOOL fThrowOnFileNotFound, - StackCrawlMark *pCallerStackMark, BOOL fUseHostBinderIfAvailable) { PEAssembly *pFile = NULL; @@ -7238,7 +7237,6 @@ PEAssembly *CompilationDomain::BindAssemblySpec( pFile = AppDomain::BindAssemblySpec( pSpec, fThrowOnFileNotFound, - pCallerStackMark, fUseHostBinderIfAvailable); } EX_HOOK diff --git a/src/vm/compile.h b/src/vm/compile.h index 79991dd..e86cd07 100644 --- a/src/vm/compile.h +++ b/src/vm/compile.h @@ -791,7 +791,6 @@ class CompilationDomain : public AppDomain, PEAssembly *BindAssemblySpec( AssemblySpec *pSpec, BOOL fThrowOnFileNotFound, - StackCrawlMark *pCallerStackMark = NULL, BOOL fUseHostBinderIfAvailable = TRUE) DAC_EMPTY_RET(NULL); BOOL CanEagerBindToZapFile(Module *targetModule, BOOL limitToHardBindList = TRUE); diff --git a/src/vm/coreassemblyspec.cpp b/src/vm/coreassemblyspec.cpp index 832b33e..44da972 100644 --- a/src/vm/coreassemblyspec.cpp +++ b/src/vm/coreassemblyspec.cpp @@ -107,8 +107,7 @@ VOID AssemblySpec::Bind(AppDomain *pAppDomain, BOOL fThrowOnFileNotFound, CoreBindResult *pResult, BOOL fNgenExplicitBind /* = FALSE */, - BOOL fExplicitBindToNativeImage /* = FALSE */, - StackCrawlMark *pCallerStackMark /* = NULL */) + BOOL fExplicitBindToNativeImage /* = FALSE */) { CONTRACTL { -- 2.7.4