summaryrefslogtreecommitdiff
path: root/src/vm/assembly.cpp
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-02-12 16:51:48 -0800
committerdanmosemsft <danmose@microsoft.com>2017-02-12 17:00:53 -0800
commitb9f410b7b85d3948aece3aa009885df244f11e41 (patch)
tree4adbb4ae045896b11f373794e79b572e26d2def1 /src/vm/assembly.cpp
parent206b6a7efbc2e947eff900f448b86573b77ae392 (diff)
downloadcoreclr-b9f410b7b85d3948aece3aa009885df244f11e41.tar.gz
coreclr-b9f410b7b85d3948aece3aa009885df244f11e41.tar.bz2
coreclr-b9f410b7b85d3948aece3aa009885df244f11e41.zip
Remove never defined FEATURE_FUSION
Diffstat (limited to 'src/vm/assembly.cpp')
-rw-r--r--src/vm/assembly.cpp228
1 files changed, 0 insertions, 228 deletions
diff --git a/src/vm/assembly.cpp b/src/vm/assembly.cpp
index dd8aaf88f7..3e1745b23d 100644
--- a/src/vm/assembly.cpp
+++ b/src/vm/assembly.cpp
@@ -22,11 +22,6 @@
#include "perfcounters.h"
#include "assemblyname.hpp"
-#ifdef FEATURE_FUSION
-#include "fusion.h"
-#include "assemblysink.h"
-#include "ngenoptout.h"
-#endif
#include "eeprofinterfaces.h"
@@ -152,9 +147,6 @@ Assembly::Assembly(BaseDomain *pDomain, PEAssembly* pFile, DebuggerAssemblyContr
m_fIsDomainNeutral(pDomain == SharedDomain::GetDomain()),
#ifdef FEATURE_LOADER_OPTIMIZATION
m_bMissingDependenciesCheckDone(FALSE),
-#ifdef FEATURE_FUSION
- m_pBindingClosure(NULL),
-#endif
#endif // FEATURE_LOADER_OPTIMIZATION
m_debuggerFlags(debuggerFlags),
m_fTerminated(FALSE),
@@ -365,12 +357,6 @@ Assembly::~Assembly()
if (m_pAllowedFiles)
delete(m_pAllowedFiles);
#endif
-#ifdef FEATURE_FUSION
- if (m_pBindingClosure)
- {
- m_pBindingClosure->Release();
- }
-#endif
if (IsDynamic()) {
if (m_pOnDiskManifest)
// clear the on disk manifest if it is not cleared yet.
@@ -2674,20 +2660,6 @@ PEModule * Assembly::LoadModule_AddRef(mdFile kFile, BOOL fLoadResource)
{
GCX_PREEMP();
-#ifdef FEATURE_FUSION // specific to remote modules
- if (GetFusionAssembly()) {
- StackSString path;
- ::GetAppDomain()->GetFileFromFusion(GetFusionAssembly(),
- (LPCWSTR)name, path);
- pModule = PEModule::Open(m_pManifestFile, kFile, path);
- goto lDone;
- }
-
- if (GetIHostAssembly()) {
- pModule = PEModule::Open(m_pManifestFile, kFile, name);
- goto lDone;
- }
-#endif
if (!m_pManifestFile->GetPath().IsEmpty()) {
StackSString path = m_pManifestFile->GetPath();
@@ -2699,9 +2671,6 @@ PEModule * Assembly::LoadModule_AddRef(mdFile kFile, BOOL fLoadResource)
}
pModule = PEModule::Open(m_pManifestFile, kFile, path);
}
-#ifdef FEATURE_FUSION
- lDone: ;
-#endif
}
EX_CATCH
{
@@ -3045,186 +3014,6 @@ BOOL Assembly::MissingDependenciesCheckDone()
};
-#ifdef FEATURE_FUSION
-void Assembly::SetBindingClosure(IAssemblyBindingClosure* pClosure) // Addrefs. It is assumed the caller did not addref pClosure for us.
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- INJECT_FAULT(COMPlusThrowOM(););
- }
- CONTRACTL_END;
-
- _ASSERTE(m_pBindingClosure == NULL);
- _ASSERTE(pClosure != NULL);
-
- m_pBindingClosure = pClosure;
- pClosure->AddRef(); // It is assumed the caller did not addref pBindingClosure for us.
-}
-
-IAssemblyBindingClosure * Assembly::GetBindingClosure()
-{
- LIMITED_METHOD_CONTRACT;
- return m_pBindingClosure;
-}
-
-
-// The shared module list is effectively an extension of the shared domain assembly hash table.
-// It is the canonical list and aribiter of modules loaded from this assembly by any app domain.
-// Modules are stored here immediately on creating (to prevent duplicate creation), as opposed to
-// in the rid map, where they are only placed upon load completion.
-
-BOOL Assembly::CanBeShared(DomainAssembly *pDomainAssembly)
-{
- CONTRACTL
- {
- PRECONDITION(CheckPointer(pDomainAssembly));
- THROWS;
- GC_TRIGGERS;
- INJECT_FAULT(COMPlusThrowOM(););
- }
- CONTRACTL_END;
-
- LOG((LF_CODESHARING,
- LL_INFO100,
- "Checking if we can share: \"%S\" in domain 0x%x.\n",
- GetDebugName(), pDomainAssembly->GetAppDomain()));
-
- STRESS_LOG2(LF_CODESHARING, LL_INFO1000,"Checking whether DomainAssembly %p is compatible with Assembly %p",
- pDomainAssembly,this);
-
- // We must always share the same system assemblies
- if (IsSystem())
- {
- STRESS_LOG0(LF_CODESHARING, LL_INFO1000,"System assembly - sharing");
- return TRUE;
- }
-
- if ((pDomainAssembly->GetDebuggerInfoBits()&~(DACF_PDBS_COPIED|DACF_IGNORE_PDBS|DACF_OBSOLETE_TRACK_JIT_INFO))
- != (m_debuggerFlags&~(DACF_PDBS_COPIED|DACF_IGNORE_PDBS|DACF_OBSOLETE_TRACK_JIT_INFO)))
- {
- LOG((LF_CODESHARING,
- LL_INFO100,
- "We can't share it, desired debugging flags %x are different than %x\n",
- pDomainAssembly->GetDebuggerInfoBits(), (m_debuggerFlags&~(DACF_PDBS_COPIED|DACF_IGNORE_PDBS|DACF_OBSOLETE_TRACK_JIT_INFO))));
- STRESS_LOG2(LF_CODESHARING, LL_INFO100,"Flags diff= %08x [%08x/%08x]",pDomainAssembly->GetDebuggerInfoBits(),
- m_debuggerFlags);
- g_dwLoaderReasonForNotSharing = ReasonForNotSharing_DebuggerFlagMismatch;
- return FALSE;
- }
-
- PEAssembly * pDomainAssemblyFile = pDomainAssembly->GetFile();
- if (pDomainAssemblyFile == NULL)
- {
- g_dwLoaderReasonForNotSharing = ReasonForNotSharing_NullPeassembly;
- return FALSE;
- }
-
- IAssemblyBindingClosure * pContext = GetBindingClosure();
- if (pContext == NULL)
- {
- STRESS_LOG1(LF_CODESHARING, LL_INFO1000,"No context 1 - status=%d",pDomainAssemblyFile->IsSystem());
- if (pDomainAssemblyFile->IsSystem())
- return TRUE;
- else
- {
- g_dwLoaderReasonForNotSharing = ReasonForNotSharing_MissingAssemblyClosure1;
- return FALSE;
- }
- }
-
- IAssemblyBindingClosure * pCurrentContext = pDomainAssembly->GetAssemblyBindingClosure(LEVEL_STARTING);
- if (pCurrentContext == NULL)
- {
- STRESS_LOG1(LF_CODESHARING, LL_INFO1000,"No context 2 - status=%d",pDomainAssemblyFile->IsSystem());
- if (pDomainAssemblyFile->IsSystem())
- return TRUE;
- else
- {
- g_dwLoaderReasonForNotSharing = ReasonForNotSharing_MissingAssemblyClosure2;
- return FALSE;
- }
- }
-
- // ensure the closures are walked
- {
- ReleaseHolder<IBindResult> pWinRTBindResult;
-
- IUnknown * pUnk;
- if (pDomainAssembly->GetFile()->IsWindowsRuntime())
- { // It is .winmd file (WinRT assembly)
- IfFailThrow(CLRPrivAssemblyWinRT::GetIBindResult(pDomainAssembly->GetFile()->GetHostAssembly(), &pWinRTBindResult));
- pUnk = pWinRTBindResult;
- }
- else
- {
- pUnk = pDomainAssembly->GetFile()->GetFusionAssembly();
- }
-
- GCX_PREEMP();
- IfFailThrow(pCurrentContext->EnsureWalked(pUnk, ::GetAppDomain()->GetFusionContext(), LEVEL_COMPLETE));
- }
-
- if ((pContext->HasBeenWalked(LEVEL_COMPLETE) != S_OK) || !MissingDependenciesCheckDone())
- {
- GCX_COOP();
-
- BOOL fMissingDependenciesResolved = FALSE;
-
- ENTER_DOMAIN_PTR(SystemDomain::System()->DefaultDomain(), ADV_DEFAULTAD);
- {
- {
- ReleaseHolder<IBindResult> pWinRTBindResult;
-
- IUnknown * pUnk;
- if (GetManifestFile()->IsWindowsRuntime())
- { // It is .winmd file (WinRT assembly)
- IfFailThrow(CLRPrivAssemblyWinRT::GetIBindResult(GetManifestFile()->GetHostAssembly(), &pWinRTBindResult));
- pUnk = pWinRTBindResult;
- }
- else
- {
- pUnk = GetManifestFile()->GetFusionAssembly();
- }
-
- GCX_PREEMP();
- IfFailThrow(pContext->EnsureWalked(pUnk, ::GetAppDomain()->GetFusionContext(), LEVEL_COMPLETE));
- }
- DomainAssembly * domainAssembly = ::GetAppDomain()->FindDomainAssembly(this);
- if (domainAssembly != NULL)
- {
- if (domainAssembly->CheckMissingDependencies() == CMD_Resolved)
- {
- //cannot share
- fMissingDependenciesResolved = TRUE;
- }
- }
- }
- END_DOMAIN_TRANSITION;
-
- if (fMissingDependenciesResolved)
- {
- STRESS_LOG0(LF_CODESHARING, LL_INFO1000,"Missing dependencies resolved - not sharing");
- g_dwLoaderReasonForNotSharing = ReasonForNotSharing_MissingDependenciesResolved;
- return FALSE;
- }
- }
-
- HRESULT hr = pContext->IsEqual(pCurrentContext);
- IfFailThrow(hr);
- if (hr != S_OK)
- {
- STRESS_LOG1(LF_CODESHARING, LL_INFO1000,"Closure comparison returned %08x - not sharing",hr);
- g_dwLoaderReasonForNotSharing = ReasonForNotSharing_ClosureComparisonFailed;
- return FALSE;
- }
-
- LOG((LF_CODESHARING, LL_INFO100, "We can share it : \"%S\"\n", GetDebugName()));
- STRESS_LOG0(LF_CODESHARING, LL_INFO1000,"Everything is fine - sharing");
- return TRUE;
-}
-#endif
BOOL Assembly::CanBeShared(DomainAssembly *pDomainAssembly)
@@ -3586,11 +3375,7 @@ FriendAssemblyDescriptor::~FriendAssemblyDescriptor()
while (itFullAccessAssemblies.Next())
{
FriendAssemblyName_t *pFriendAssemblyName = static_cast<FriendAssemblyName_t *>(itFullAccessAssemblies.GetElement());
-#ifdef FEATURE_FUSION
- pFriendAssemblyName->Release();
-#else // FEATURE_FUSION
delete pFriendAssemblyName;
-#endif // FEATURE_FUSION
}
}
@@ -3675,9 +3460,6 @@ FriendAssemblyDescriptor *FriendAssemblyDescriptor::CreateFriendAssemblyDescript
// Create an AssemblyNameObject from the string.
FriendAssemblyNameHolder pFriendAssemblyName;
-#ifdef FEATURE_FUSION
- hr = CreateAssemblyNameObject(&pFriendAssemblyName, displayName.GetUnicode(), CANOF_PARSE_FRIEND_DISPLAY_NAME, NULL);
-#else // FEATURE_FUSION
StackScratchBuffer buffer;
pFriendAssemblyName = new FriendAssemblyName_t;
hr = pFriendAssemblyName->Init(displayName.GetUTF8(buffer));
@@ -3686,7 +3468,6 @@ FriendAssemblyDescriptor *FriendAssemblyDescriptor::CreateFriendAssemblyDescript
{
hr = pFriendAssemblyName->CheckFriendAssemblyName();
}
-#endif // FEATURE_FUSION
if (FAILED(hr))
{
@@ -3765,23 +3546,14 @@ bool FriendAssemblyDescriptor::IsAssemblyOnList(PEAssembly *pAssembly, const Arr
}
CONTRACTL_END;
-#ifndef FEATURE_FUSION
AssemblySpec asmDef;
asmDef.InitializeSpec(pAssembly);
-#endif
ArrayList::ConstIterator itAssemblyNames = alAssemblyNames.Iterate();
while (itAssemblyNames.Next())
{
const FriendAssemblyName_t *pFriendAssemblyName = static_cast<const FriendAssemblyName_t *>(itAssemblyNames.GetElement());
-#ifdef FEATURE_FUSION
- // This is a const operation on the pointer, but Fusion is not const-correct.
- // @TODO - propigate const correctness through Fusion and remove this cast
- HRESULT hr = const_cast<FriendAssemblyName_t *>(pFriendAssemblyName)->IsEqual(pAssembly->GetFusionAssemblyName(), ASM_CMPF_DEFAULT);
- IfFailThrow(hr);
-#else
HRESULT hr = AssemblySpec::RefMatchesDef(pFriendAssemblyName, &asmDef) ? S_OK : S_FALSE;
-#endif
if (hr == S_OK)
{