summaryrefslogtreecommitdiff
path: root/src/vm/methodtable.cpp
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2018-08-11 07:43:16 -0700
committerGitHub <noreply@github.com>2018-08-11 07:43:16 -0700
commitaf4ec7c89d0192ad14392da04e8c097da8ec9e48 (patch)
tree0b3018c1c576114d2b5b0f355df6ff48972a6c5d /src/vm/methodtable.cpp
parentf551543427176850c84b9e11c7b8d528c3f282a7 (diff)
downloadcoreclr-af4ec7c89d0192ad14392da04e8c097da8ec9e48.tar.gz
coreclr-af4ec7c89d0192ad14392da04e8c097da8ec9e48.tar.bz2
coreclr-af4ec7c89d0192ad14392da04e8c097da8ec9e48.zip
Make RuntimeType sealed and deleted support for introspection only loads (#19427)
- Sealed Runtime makes `is RuntimeType` and similar checks faster. These checks are fairly common in reflection. - Delete support for introspection only loads from the runtime. We do not plan to use in .NET Core. The support for introspection loads inherited from RuntimeType and thus it is incompatible with sealed RuntimeType.
Diffstat (limited to 'src/vm/methodtable.cpp')
-rw-r--r--src/vm/methodtable.cpp43
1 files changed, 3 insertions, 40 deletions
diff --git a/src/vm/methodtable.cpp b/src/vm/methodtable.cpp
index aeb0c766f1..a768ded29b 100644
--- a/src/vm/methodtable.cpp
+++ b/src/vm/methodtable.cpp
@@ -4029,10 +4029,7 @@ OBJECTREF MethodTable::GetManagedClassObject()
REFLECTCLASSBASEREF refClass = NULL;
GCPROTECT_BEGIN(refClass);
- if (GetAssembly()->IsIntrospectionOnly())
- refClass = (REFLECTCLASSBASEREF) AllocateObject(MscorlibBinder::GetClass(CLASS__CLASS_INTROSPECTION_ONLY));
- else
- refClass = (REFLECTCLASSBASEREF) AllocateObject(g_pRuntimeTypeClass);
+ refClass = (REFLECTCLASSBASEREF) AllocateObject(g_pRuntimeTypeClass);
LoaderAllocator *pLoaderAllocator = GetLoaderAllocator();
@@ -5966,7 +5963,7 @@ void MethodTable::DoFullyLoad(Generics::RecursionGraph * const pVisited, const
SetIsDependenciesLoaded();
#if defined(FEATURE_COMINTEROP) && !defined(DACCESS_COMPILE)
- if (WinRTSupported() && g_fEEStarted && !ContainsIntrospectionOnlyTypes())
+ if (WinRTSupported() && g_fEEStarted)
{
_ASSERTE(GetAppDomain() != NULL);
@@ -9367,7 +9364,7 @@ CHECK MethodTable::CheckActivated()
}
#ifdef _MSC_VER
-// Optimization intended for EnsureInstanceActive, IsIntrospectionOnly, EnsureActive only
+// Optimization intended for EnsureInstanceActive, EnsureActive only
#pragma optimize("t", on)
#endif // _MSC_VER
//==========================================================================================
@@ -9423,40 +9420,6 @@ VOID MethodTable::EnsureInstanceActive()
#endif //!DACCESS_COMPILE
//==========================================================================================
-BOOL MethodTable::IsIntrospectionOnly()
-{
- WRAPPER_NO_CONTRACT;
- return GetAssembly()->IsIntrospectionOnly();
-}
-
-//==========================================================================================
-BOOL MethodTable::ContainsIntrospectionOnlyTypes()
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_ANY;
- }
- CONTRACTL_END
-
- // check this type
- if (IsIntrospectionOnly())
- return TRUE;
-
- // check the instantiation
- Instantiation inst = GetInstantiation();
- for (DWORD i = 0; i < inst.GetNumArgs(); i++)
- {
- CONSISTENCY_CHECK(!inst[i].IsEncodedFixup());
- if (inst[i].ContainsIntrospectionOnlyTypes())
- return TRUE;
- }
-
- return FALSE;
-}
-
-//==========================================================================================
#ifndef DACCESS_COMPILE
VOID MethodTable::EnsureActive()
{