Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion src/coreclr/md/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
add_compile_definitions(FEATURE_METADATA_EMIT)
add_compile_definitions(FEATURE_METADATA_INTERNAL_APIS)
add_compile_definitions($<$<OR:$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>,$<BOOL:$<TARGET_PROPERTY:DBI_COMPONENT>>>:FEATURE_METADATA_EMIT_IN_DEBUGGER>)
add_compile_definitions($<$<NOT:$<OR:$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>,$<BOOL:$<TARGET_PROPERTY:DBI_COMPONENT>>>>:FEATURE_METADATA_IN_VM>)
add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:DBI_COMPONENT>>:FEATURE_METADATA_CUSTOM_DATA_SOURCE>)
add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:DBI_COMPONENT>>:FEATURE_METADATA_DEBUGGEE_DATA_SOURCE>)
add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:DBI_COMPONENT>>:FEATURE_METADATA_LOAD_TRUSTED_IMAGES>)
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/md/compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ set(MDCOMPILER_SOURCES
regmeta_emit.cpp
regmeta_import.cpp
regmeta_imetadatatables.cpp
regmeta_vm.cpp
)

set(MDCOMPILER_HEADERS
Expand Down
9 changes: 0 additions & 9 deletions src/coreclr/md/compiler/assemblymd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
#include "mdlog.h"
#include "importhelper.h"

#ifdef _MSC_VER
#pragma warning(disable: 4102)
#endif

//*******************************************************************************
// Get the properties for the given Assembly token.
//*******************************************************************************
Expand Down Expand Up @@ -582,10 +578,5 @@ STDMETHODIMP RegMeta::FindAssembliesByName( // S_OK or error
ULONG cMax, // [IN] The max number to put
ULONG *pcAssemblies) // [OUT] The number of assemblies returned.
{
#ifdef FEATURE_METADATA_IN_VM
return COR_E_NOTSUPPORTED;
#else //!FEATURE_METADATA_IN_VM
// Calls to fusion are not supported outside VM
return E_NOTIMPL;
#endif //!FEATURE_METADATA_IN_VM
} // RegMeta::FindAssembliesByName
4 changes: 0 additions & 4 deletions src/coreclr/md/compiler/classfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
//*****************************************************************************
#include "stdafx.h"

#ifdef FEATURE_METADATA_IN_VM

#include "classfactory.h"
#include "disp.h"
#include "regmeta.h"
Expand Down Expand Up @@ -143,5 +141,3 @@ MDClassFactory::LockServer(
// @FUTURE: Should we return E_NOTIMPL instead of S_OK?
return S_OK;
}

#endif //FEATURE_METADATA_IN_VM
58 changes: 0 additions & 58 deletions src/coreclr/md/compiler/disp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ Disp::DefineScope(
// Get the requested interface.
IfFailGo(pMeta->QueryInterface(riid, (void **)ppIUnk));

// Add the new RegMeta to the cache.
IfFailGo(pMeta->AddToCache());

LOG((LOGMD, "{%08x} Created new emit scope\n", pMeta));

ErrExit:
Expand Down Expand Up @@ -182,33 +179,10 @@ Disp::OpenRawScope(
_ASSERTE(!IsOfReserved(dwOpenFlags));
#endif //!FEATURE_METADATA_LOAD_TRUSTED_IMAGES

{
}

if (IsOfReadOnly(dwOpenFlags) && IsOfReadWrite(dwOpenFlags))
{ // Invalid combination of flags - ofReadOnly & ofWrite
IfFailGo(E_INVALIDARG);
}
// If open-for-read, and there is already an open-for-read copy, return it.
if (IsOfReadOnly(dwOpenFlags))
{
RegMeta::FindCachedReadOnlyEntry(szFileName, dwOpenFlags, &pMeta);
if (pMeta != NULL)
{
// Return the requested interface.
hr = pMeta->QueryInterface(riid, (void **) ppIUnk);
if (FAILED(hr))
{
pMeta = NULL; // Don't delete cached RegMeta!
}
else
{
pMeta->Release(); // Give back refcount from QI
}

goto ErrExit;
}
}
// Create a new coclass for this guy.
pMeta = new (nothrow) RegMeta();
IfNullGo(pMeta);
Expand All @@ -228,15 +202,6 @@ Disp::OpenRawScope(
// Obtain the requested interface.
IfFailGo(pMeta->QueryInterface(riid, (void **)ppIUnk) );

// Add the new RegMeta to the cache. If this is read-only, any future opens will
// find this entry. If, due to another thread concurrently opening the same file,
// there is already another copy in the cache, well, then there will be two
// read-only copies in the cache. This is considered to be somewhat of a corner
// case, and the only harm is temporary memory usage. All requests will be
// satisfied by one or the other (depending on search algorithm), and eventually,
// the "other" copy will be released.
IfFailGo(pMeta->AddToCache());

#if defined(_DEBUG)
if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_MD_RegMetaDump))
{
Expand Down Expand Up @@ -317,9 +282,6 @@ HRESULT Disp::OpenRawScopeOnMemory( // Return code.
// Return the requested interface.
IfFailGo( pMeta->QueryInterface(riid, (void **) ppIUnk) );

// Add the new RegMeta to the cache.
IfFailGo(pMeta->AddToCache());

#if defined(_DEBUG)
if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_MD_RegMetaDump))
{
Expand Down Expand Up @@ -446,9 +408,6 @@ Disp::DefinePortablePdbScope(
// Get the requested interface.
IfFailGo(pMeta->QueryInterface(riid, (void**)ppIUnk));

// Add the new RegMeta to the cache.
IfFailGo(pMeta->AddToCache());

LOG((LOGMD, "{%08x} Created new emit scope\n", pMeta));

ErrExit:
Expand Down Expand Up @@ -528,9 +487,6 @@ HRESULT Disp::OpenRawScopeOnCustomDataSource( // Return code.
// Return the requested interface.
IfFailGo(pMeta->QueryInterface(riid, (void **)ppIUnk));

// Add the new RegMeta to the cache.
IfFailGo(pMeta->AddToCache());

#if defined(_DEBUG)
if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_MD_RegMetaDump))
{
Expand Down Expand Up @@ -847,20 +803,6 @@ HRESULT Disp::GetOption( // Return code.
return hr;
} // Disp::GetOption

#if defined(FEATURE_METADATA_IN_VM)

//---------------------------------------------------------------------------------------
//
// Process detach destruction.
// Called from DllMain of clr.dll/RoMetadata.dll/MidlrtMd.dll.
//
void DeleteMetaData()
{
LOADEDMODULES::DeleteStatics();
}

#endif //FEATURE_METADATA_IN_VM

//
// This is the entrypoint for usages of MetaData that need to start with the dispenser (e.g.
// mscordbi.dll and profiling API).
Expand Down
16 changes: 16 additions & 0 deletions src/coreclr/md/compiler/emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2933,6 +2933,22 @@ HRESULT RegMeta::SetParamProps( // Return code.
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
} // RegMeta::SetParamProps

//*****************************************************************************
// Persist a set of security custom attributes into a set of permission set
// blobs on the same class or method.
//
// Notes:
// Only in the full version because this is an emit operation.
//*****************************************************************************
HRESULT RegMeta::DefineSecurityAttributeSet(// Return code.
mdToken tkObj, // [IN] Class or method requiring security attributes.
COR_SECATTR rSecAttrs[], // [IN] Array of security attribute descriptions.
ULONG cSecAttrs, // [IN] Count of elements in above array.
ULONG *pulErrorAttr) // [OUT] On error, index of attribute causing problem.
{
return E_NOTIMPL;
} // RegMeta::DefineSecurityAttributeSet

//*****************************************************************************
// Apply edit and continue changes to this metadata.
//*****************************************************************************
Expand Down
Loading
Loading