Cleanup mscorlib references under src\coreclr\src (#39994)
authorJan Kotas <jkotas@microsoft.com>
Tue, 28 Jul 2020 23:10:38 +0000 (16:10 -0700)
committerGitHub <noreply@github.com>
Tue, 28 Jul 2020 23:10:38 +0000 (16:10 -0700)
* s/MscorlibBinder/CoreLibBinder/

* s/g_Mscorlib/g_CoreLib/

* Remaining mscorlib->corelib renames

* Delete unreachable FNV NGen string

167 files changed:
src/coreclr/src/System.Private.CoreLib/CreateRuntimeRootILLinkDescriptorFile.targets
src/coreclr/src/System.Private.CoreLib/src/System/Environment.CoreCLR.cs
src/coreclr/src/System.Private.CoreLib/src/System/Exception.CoreCLR.cs
src/coreclr/src/System.Private.CoreLib/src/System/GC.cs
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Versioning/CompatibilitySwitch.cs
src/coreclr/src/binder/assemblybinder.cpp
src/coreclr/src/binder/assemblyname.cpp
src/coreclr/src/binder/bindertracing.cpp
src/coreclr/src/binder/clrprivbinderassemblyloadcontext.cpp
src/coreclr/src/binder/clrprivbindercoreclr.cpp
src/coreclr/src/binder/inc/assemblyname.hpp
src/coreclr/src/binder/inc/variables.hpp
src/coreclr/src/binder/variables.cpp
src/coreclr/src/classlibnative/bcltype/varargsnative.cpp
src/coreclr/src/debug/daccess/dacdbiimpl.cpp
src/coreclr/src/debug/daccess/enummem.cpp
src/coreclr/src/debug/daccess/inspect.cpp
src/coreclr/src/debug/daccess/nidump.cpp
src/coreclr/src/debug/daccess/nidump.h
src/coreclr/src/debug/daccess/request.cpp
src/coreclr/src/debug/daccess/stack.cpp
src/coreclr/src/debug/di/rstype.cpp
src/coreclr/src/debug/ee/debugger.cpp
src/coreclr/src/debug/inc/dbgipcevents.h
src/coreclr/src/dlls/mscoree/mscoree.cpp
src/coreclr/src/gc/gcinterface.h
src/coreclr/src/inc/corcompile.h
src/coreclr/src/inc/cordebug.idl
src/coreclr/src/inc/corerror.xml
src/coreclr/src/inc/corexcep.h
src/coreclr/src/inc/corpriv.h
src/coreclr/src/inc/dacvars.h
src/coreclr/src/inc/random.h
src/coreclr/src/inc/zapper.h
src/coreclr/src/jit/codegencommon.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/src/jit/importer.cpp
src/coreclr/src/jit/inline.cpp
src/coreclr/src/jit/inlinepolicy.cpp
src/coreclr/src/jit/lowerxarch.cpp
src/coreclr/src/jit/scopeinfo.cpp
src/coreclr/src/jit/ssabuilder.cpp
src/coreclr/src/jit/unwind.h
src/coreclr/src/pal/prebuilt/corerror/mscorurt.rc
src/coreclr/src/pal/prebuilt/inc/corerror.h
src/coreclr/src/pal/src/locale/utf8.cpp
src/coreclr/src/pal/tests/palsuite/common/ResultBuffer.cpp
src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/resultbuffer.cpp
src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/resultbuffer.cpp
src/coreclr/src/tools/Common/Internal/Runtime/CorConstants.cs
src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/VolatileIntrinsics.cs
src/coreclr/src/tools/crossgen/CMakeLists.txt
src/coreclr/src/tools/crossgen/crossgen.cpp
src/coreclr/src/vm/CMakeLists.txt
src/coreclr/src/vm/amd64/asmconstants.h
src/coreclr/src/vm/appdomain.cpp
src/coreclr/src/vm/appdomain.hpp
src/coreclr/src/vm/appdomainnative.cpp
src/coreclr/src/vm/array.cpp
src/coreclr/src/vm/assemblyname.cpp
src/coreclr/src/vm/assemblynative.cpp
src/coreclr/src/vm/assemblyspec.cpp
src/coreclr/src/vm/baseassemblyspec.cpp
src/coreclr/src/vm/baseassemblyspec.h
src/coreclr/src/vm/baseassemblyspec.inl
src/coreclr/src/vm/binder.cpp
src/coreclr/src/vm/binder.h
src/coreclr/src/vm/callhelpers.cpp
src/coreclr/src/vm/callhelpers.h
src/coreclr/src/vm/callsiteinspect.cpp
src/coreclr/src/vm/castcache.cpp
src/coreclr/src/vm/ceeload.cpp
src/coreclr/src/vm/ceeload.h
src/coreclr/src/vm/ceemain.cpp
src/coreclr/src/vm/cgensys.h
src/coreclr/src/vm/classcompat.cpp
src/coreclr/src/vm/classlayoutinfo.cpp
src/coreclr/src/vm/clrex.cpp
src/coreclr/src/vm/clsload.cpp
src/coreclr/src/vm/comcallablewrapper.cpp
src/coreclr/src/vm/comdelegate.cpp
src/coreclr/src/vm/commodule.cpp
src/coreclr/src/vm/common.h
src/coreclr/src/vm/compatibilityswitch.cpp
src/coreclr/src/vm/compatibilityswitch.h
src/coreclr/src/vm/compile.cpp
src/coreclr/src/vm/compile.h
src/coreclr/src/vm/comsynchronizable.cpp
src/coreclr/src/vm/comthreadpool.cpp
src/coreclr/src/vm/comutilnative.cpp
src/coreclr/src/vm/coreassemblyspec.cpp
src/coreclr/src/vm/coreclr/corebindresult.h
src/coreclr/src/vm/coreclr/corebindresult.inl
src/coreclr/src/vm/corelib.cpp [moved from src/coreclr/src/vm/mscorlib.cpp with 88% similarity]
src/coreclr/src/vm/corelib.h [moved from src/coreclr/src/vm/mscorlib.h with 99% similarity]
src/coreclr/src/vm/crossgen/CMakeLists.txt
src/coreclr/src/vm/crossloaderallocatorhash.inl
src/coreclr/src/vm/customattribute.cpp
src/coreclr/src/vm/custommarshalerinfo.cpp
src/coreclr/src/vm/debugdebugger.cpp
src/coreclr/src/vm/dispatchinfo.cpp
src/coreclr/src/vm/dllimport.cpp
src/coreclr/src/vm/domainfile.cpp
src/coreclr/src/vm/domainfile.h
src/coreclr/src/vm/dwreport.cpp
src/coreclr/src/vm/ecall.cpp
src/coreclr/src/vm/ecall.h
src/coreclr/src/vm/ecalllist.h
src/coreclr/src/vm/eedbginterfaceimpl.cpp
src/coreclr/src/vm/encee.cpp
src/coreclr/src/vm/eventpipeevent.cpp
src/coreclr/src/vm/eventtrace.cpp
src/coreclr/src/vm/excep.cpp
src/coreclr/src/vm/field.cpp
src/coreclr/src/vm/fieldmarshaler.cpp
src/coreclr/src/vm/gchelpers.cpp
src/coreclr/src/vm/gdbjit.cpp
src/coreclr/src/vm/genericdict.cpp
src/coreclr/src/vm/ilmarshalers.cpp
src/coreclr/src/vm/ilmarshalers.h
src/coreclr/src/vm/ilstubcache.cpp
src/coreclr/src/vm/interoputil.cpp
src/coreclr/src/vm/interpreter.cpp
src/coreclr/src/vm/invokeutil.cpp
src/coreclr/src/vm/jitinterface.cpp
src/coreclr/src/vm/loaderallocator.cpp
src/coreclr/src/vm/managedmdimport.cpp
src/coreclr/src/vm/memberload.cpp
src/coreclr/src/vm/method.cpp
src/coreclr/src/vm/method.hpp
src/coreclr/src/vm/methodtable.cpp
src/coreclr/src/vm/methodtablebuilder.cpp
src/coreclr/src/vm/mlinfo.cpp
src/coreclr/src/vm/nativeoverlapped.cpp
src/coreclr/src/vm/object.cpp
src/coreclr/src/vm/object.h
src/coreclr/src/vm/olevariant.cpp
src/coreclr/src/vm/olevariant.h
src/coreclr/src/vm/packedfields.inl
src/coreclr/src/vm/pefile.h
src/coreclr/src/vm/perfmap.cpp
src/coreclr/src/vm/prestub.cpp
src/coreclr/src/vm/qcall.cpp
src/coreclr/src/vm/qcall.h
src/coreclr/src/vm/reflectioninvocation.cpp
src/coreclr/src/vm/rexcep.h
src/coreclr/src/vm/runtimecallablewrapper.cpp
src/coreclr/src/vm/runtimehandles.cpp
src/coreclr/src/vm/safehandle.cpp
src/coreclr/src/vm/siginfo.cpp
src/coreclr/src/vm/siginfo.hpp
src/coreclr/src/vm/staticallocationhelpers.inl
src/coreclr/src/vm/stubgen.cpp
src/coreclr/src/vm/tailcallhelp.cpp
src/coreclr/src/vm/threads.cpp
src/coreclr/src/vm/threads.h
src/coreclr/src/vm/typedesc.inl
src/coreclr/src/vm/typehandle.cpp
src/coreclr/src/vm/typehandle.inl
src/coreclr/src/vm/typeparse.cpp
src/coreclr/src/vm/typeparse.h
src/coreclr/src/vm/weakreferencenative.cpp
src/coreclr/src/vm/wks/CMakeLists.txt
src/coreclr/src/zap/zapimage.cpp
src/coreclr/src/zap/zapper.cpp
src/coreclr/src/zap/zapreadytorun.cpp

index bbed0d4..4b232bb 100644 (file)
@@ -7,7 +7,7 @@
   <PropertyGroup>
     <_ILLinkRuntimeRootDescriptorFilePath>$(ILLinkTrimXml)</_ILLinkRuntimeRootDescriptorFilePath>
     <_NamespaceFilePath Condition=" '$(_NamespaceFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\namespace.h</_NamespaceFilePath>
-    <_MscorlibFilePath Condition=" '$(_MscorlibFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\mscorlib.h</_MscorlibFilePath>
+    <_MscorlibFilePath Condition=" '$(_MscorlibFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\corelib.h</_MscorlibFilePath>
     <_CortypeFilePath Condition=" '$(_CortypeFilePath)' == '' ">$(MSBuildThisFileDirectory)..\inc\cortypeinfo.h</_CortypeFilePath>
     <_RexcepFilePath Condition=" '$(_RexcepFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\rexcep.h</_RexcepFilePath>
     <_ILLinkDescriptorsIntermediatePath>$(IntermediateOutputPath)ILLink.Descriptors.Combined.xml</_ILLinkDescriptorsIntermediatePath>
index d2ea1e3..82d9af9 100644 (file)
@@ -83,9 +83,7 @@ namespace System
         [DllImport(RuntimeHelpers.QCall, CharSet = CharSet.Unicode)]
         private static extern int GetProcessorCount();
 
-        // If you change this method's signature then you must change the code that calls it
-        // in excep.cpp and probably you will have to visit mscorlib.h to add the new signature
-        // as well as metasig.h to create the new signature type
+        // Used by VM
         internal static string? GetResourceStringLocal(string key) => SR.GetResourceString(key);
 
         public static string StackTrace
index c3f1e5b..d6bb435 100644 (file)
@@ -266,8 +266,8 @@ namespace System
         }
 
         // This piece of infrastructure exists to help avoid deadlocks
-        // between parts of mscorlib that might throw an exception while
-        // holding a lock that are also used by mscorlib's ResourceManager
+        // between parts of CoreLib that might throw an exception while
+        // holding a lock that are also used by CoreLib's ResourceManager
         // instance.  As a special case of code that may throw while holding
         // a lock, we also need to fix our asynchronous exceptions to use
         // Win32 resources as well (assuming we ever call a managed
index 865600f..1809ea6 100644 (file)
@@ -294,7 +294,7 @@ namespace System
 
         public static void WaitForPendingFinalizers()
         {
-            // QCalls can not be exposed from mscorlib directly, need to wrap it.
+            // QCalls can not be exposed directly, need to wrap it.
             _WaitForPendingFinalizers();
         }
 
index 3b69f78..d90f81d 100644 (file)
@@ -7,24 +7,7 @@ namespace System.Runtime.Versioning
 {
     internal static class CompatibilitySwitch
     {
-        /* This class contains 3 sets of api:
-                * 1. internal apis : These apis are supposed to be used by mscorlib.dll and other assemblies which use the <runtime> section in config
-                *                          These apis query for the value of quirk not only in windows quirk DB but also in runtime section of config files,
-                *                          registry and environment vars.
-                * 2. public apis : These apis are supposed to be used by FX assemblies which do not read the runtime section of config files and have
-                *                       have their own section in config files or do not use configs at all.
-                *
-                * 3. specialized apis: These apis are defined in order to retrieve a specific value defined in CLR Config. That value can have specific look-up rules
-                *                        for the order and location of the config sources used.
-                *
-                *     These apis are for internal use only for FX assemblies. It has not been decided if they can be used by OOB components due to EULA restrictions
-                */
-        internal static string? GetValueInternal(string compatibilitySwitchName)
-        {
-            return GetValueInternalCall(compatibilitySwitchName, false);
-        }
-
         [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern string? GetValueInternalCall(string compatibilitySwitchName, bool onlyDB);
+        internal static extern string? GetValueInternal(string compatibilitySwitchName);
     }
 }
index 5f13adc..02a3646 100644 (file)
@@ -447,25 +447,25 @@ namespace BINDER_SPACE
         // Satellite assembly's path:
         //   * Absolute path when looking for a file on disk
         //   * Bundle-relative path when looking within the single-file bundle.
-        StackSString sMscorlibSatellite;
+        StackSString sCoreLibSatellite;
 
         BinderTracing::PathSource pathSource = BinderTracing::PathSource::Bundle;
         BundleFileLocation bundleFileLocation = Bundle::ProbeAppBundle(relativePath, /*pathIsBundleRelative */ true);
         if (!bundleFileLocation.IsValid())
         {
-            sMscorlibSatellite.Set(systemDirectory);
+            sCoreLibSatellite.Set(systemDirectory);
             pathSource = BinderTracing::PathSource::ApplicationAssemblies;
         }
-        CombinePath(sMscorlibSatellite, relativePath, sMscorlibSatellite);
+        CombinePath(sCoreLibSatellite, relativePath, sCoreLibSatellite);
 
         ReleaseHolder<Assembly> pSystemAssembly;
-        IF_FAIL_GO(AssemblyBinder::GetAssembly(sMscorlibSatellite,
+        IF_FAIL_GO(AssemblyBinder::GetAssembly(sCoreLibSatellite,
                                                TRUE /* fIsInGAC */,
                                                FALSE /* fExplicitBindToNativeImage */,
                                                &pSystemAssembly,
                                                NULL /* szMDAssemblyPath */,
                                                bundleFileLocation));
-        BinderTracing::PathProbed(sMscorlibSatellite, pathSource, hr);
+        BinderTracing::PathProbed(sCoreLibSatellite, pathSource, hr);
 
         *ppSystemAssembly = pSystemAssembly.Extract();
 
index b073dc6..71e7028 100644 (file)
@@ -315,10 +315,10 @@ Exit:
         return ulRef;
     }
 
-    BOOL AssemblyName::IsMscorlib()
+    BOOL AssemblyName::IsCoreLib()
     {
         // TODO: Is this simple comparison enough?
-        return EqualsCaseInsensitive(GetSimpleName(), g_BinderVariables->mscorlib);
+        return EqualsCaseInsensitive(GetSimpleName(), g_BinderVariables->corelib);
     }
 
     ULONG AssemblyName::Hash(DWORD dwIncludeFlags)
index be09ebc..29ba819 100644 (file)
@@ -246,7 +246,7 @@ namespace BinderTracing
 
         // ActivityTracker or EventSource may have triggered the system satellite load.
         // Don't track system satellite binding to avoid potential infinite recursion.
-        m_ignoreBind = m_bindRequest.AssemblySpec->IsMscorlibSatellite();
+        m_ignoreBind = m_bindRequest.AssemblySpec->IsCoreLibSatellite();
         m_checkedIgnoreBind = true;
         return m_ignoreBind;
     }
index f492adf..69d8d83 100644 (file)
@@ -20,8 +20,8 @@ HRESULT CLRPrivBinderAssemblyLoadContext::BindAssemblyByNameWorker(BINDER_SPACE:
     HRESULT hr = S_OK;
 
 #ifdef _DEBUG
-    // MSCORLIB should be bound using BindToSystem
-    _ASSERTE(!pAssemblyName->IsMscorlib());
+    // CoreLib should be bound using BindToSystem
+    _ASSERTE(!pAssemblyName->IsCoreLib());
 #endif
 
     // Do we have the assembly already loaded in the context of the current binder?
@@ -145,7 +145,7 @@ HRESULT CLRPrivBinderAssemblyLoadContext::BindUsingPEImage( /* in */ PEImage *pP
 
         // Disallow attempt to bind to the core library. Aside from that,
         // the LoadContext can load any assembly (even if it was in a different LoadContext like TPA).
-        if (pAssemblyName->IsMscorlib())
+        if (pAssemblyName->IsCoreLib())
         {
             IF_FAIL_GO(HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND));
         }
index 1045cb9..292ad99 100644 (file)
@@ -20,8 +20,8 @@ HRESULT CLRPrivBinderCoreCLR::BindAssemblyByNameWorker(BINDER_SPACE::AssemblyNam
     HRESULT hr = S_OK;
 
 #ifdef _DEBUG
-    // MSCORLIB should be bound using BindToSystem
-    _ASSERTE(!pAssemblyName->IsMscorlib());
+    // CoreLib should be bound using BindToSystem
+    _ASSERTE(!pAssemblyName->IsCoreLib());
 #endif
 
     hr = AssemblyBinder::BindAssembly(&m_appContext,
@@ -155,8 +155,8 @@ HRESULT CLRPrivBinderCoreCLR::BindUsingPEImage( /* in */ PEImage *pPEImage,
             IF_FAIL_GO(HRESULT_FROM_WIN32(ERROR_BAD_FORMAT));
         }
 
-        // Easy out for mscorlib
-        if (pAssemblyName->IsMscorlib())
+        // Easy out for CoreLib
+        if (pAssemblyName->IsCoreLib())
         {
             IF_FAIL_GO(HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND));
         }
index 38590e0..fb66d98 100644 (file)
@@ -65,7 +65,7 @@ namespace BINDER_SPACE
 
         inline void SetHave(DWORD dwIdentityFlags);
 
-        BOOL IsMscorlib();
+        BOOL IsCoreLib();
 
         ULONG Hash(/* in */ DWORD dwIncludeFlags);
         BOOL Equals(/* in */ AssemblyName *pAssemblyName,
index 50f392d..d060a69 100644 (file)
@@ -31,7 +31,7 @@ namespace BINDER_SPACE
 
         // AssemblyName string constants
         SString cultureNeutral;
-        SString mscorlib;
+        SString corelib;
     };
 
     extern Variables *g_BinderVariables;
index d9c3f67..fbdd106 100644 (file)
@@ -40,7 +40,7 @@ namespace BINDER_SPACE
 
             // AssemblyName string constants
             cultureNeutral.SetLiteral(W("neutral"));
-            mscorlib.SetLiteral(CoreLibName_W);
+            corelib.SetLiteral(CoreLibName_W);
         }
         EX_CATCH_HRESULT(hr);
 
index fb2c1ae..3a9ed22 100644 (file)
@@ -502,7 +502,7 @@ TryAgain:
             value->data = (BYTE*)origArgPtr + (sizeof(void*)-1);
         }
 #endif
-        value->type = MscorlibBinder::GetElementType(elemType);
+        value->type = CoreLibBinder::GetElementType(elemType);
         break;
 
         case ELEMENT_TYPE_I2:
@@ -513,7 +513,7 @@ TryAgain:
             value->data = (BYTE*)origArgPtr + (sizeof(void*)-2);
         }
 #endif
-        value->type = MscorlibBinder::GetElementType(elemType);
+        value->type = CoreLibBinder::GetElementType(elemType);
         break;
 
         case ELEMENT_TYPE_I4:
@@ -522,13 +522,13 @@ TryAgain:
         case ELEMENT_TYPE_STRING:
         case ELEMENT_TYPE_I:
         case ELEMENT_TYPE_U:
-        value->type = MscorlibBinder::GetElementType(elemType);
+        value->type = CoreLibBinder::GetElementType(elemType);
         break;
 
         case ELEMENT_TYPE_I8:
         case ELEMENT_TYPE_U8:
         case ELEMENT_TYPE_R8:
-        value->type = MscorlibBinder::GetElementType(elemType);
+        value->type = CoreLibBinder::GetElementType(elemType);
 #if !defined(HOST_64BIT) && (DATA_ALIGNMENT > 4)
         if ( fData && origArgPtr == value->data ) {
             // allocate an aligned copy of the value
index aab4913..c0e0a23 100644 (file)
@@ -2399,7 +2399,7 @@ TypeHandle DacDbiInterfaceImpl::FindLoadedElementType(CorElementType elementType
     // Lookup operations run the class loader in non-load mode.
     ENABLE_FORBID_GC_LOADER_USE_IN_THIS_SCOPE();
 
-    MethodTable * pMethodTable = (&g_Mscorlib)->GetElementType(elementType);
+    MethodTable * pMethodTable = (&g_CoreLib)->GetElementType(elementType);
 
     return TypeHandle(pMethodTable);
 } // DacDbiInterfaceImpl::FindLoadedElementType
@@ -7264,7 +7264,7 @@ HRESULT DacDbiInterfaceImpl::GetArrayLayout(COR_TYPEID id, COR_ARRAY_LAYOUT *pLa
     if (mt->IsString())
     {
         COR_TYPEID token;
-        token.token1 = MscorlibBinder::GetElementType(ELEMENT_TYPE_CHAR).GetAddr();
+        token.token1 = CoreLibBinder::GetElementType(ELEMENT_TYPE_CHAR).GetAddr();
         token.token2 = 0;
 
         pLayout->componentID = token;
index 95909b8..a746aa4 100644 (file)
@@ -276,7 +276,7 @@ HRESULT ClrDataAccess::EnumMemCLRStatic(IN CLRDataEnumMemoryFlags flags)
     }
     CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED( g_pEEDbgInterfaceImpl.EnumMem(); )
     CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED( g_CORDebuggerControlFlags.EnumMem(); )
-    CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED( g_Mscorlib.EnumMem(); )
+    CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED( g_CoreLib.EnumMem(); )
     CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED( g_pPredefinedArrayTypes[ELEMENT_TYPE_OBJECT].EnumMemoryRegions(flags); )
     CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED( StubManager::EnumMemoryRegions(flags); )
     CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED( g_pFinalizerThread.EnumMem(); )
index 75cfcc3..2837586 100644 (file)
@@ -136,7 +136,7 @@ GetTypeFieldValueFlags(TypeHandle typeHandle,
         // Perform extra checks to identify well-known classes.
         //
 
-        if ((&g_Mscorlib)->IsClass(typeHandle.GetMethodTable(), CLASS__STRING))
+        if ((&g_CoreLib)->IsClass(typeHandle.GetMethodTable(), CLASS__STRING))
         {
             otherFlags |= CLRDATA_VALUE_IS_STRING;
         }
index 06a6fff..b385e27 100644 (file)
@@ -477,7 +477,7 @@ NativeImageDumper::NativeImageDumper(PTR_VOID loadedBase,
     m_dis(dis),
     m_MetadataSize(0),
     m_ILHostCopy(NULL),
-    m_isMscorlibHardBound(false),
+    m_isCoreLibHardBound(false),
     m_sectionAlignment(0)
 {
     IfFailThrow(m_display->GetDumpOptions(&m_dumpOptions));
@@ -1132,54 +1132,54 @@ NativeImageDumper::DumpNativeImage()
 
         /* XXX Wed 12/14/2005
          * Now for the real insanity.  I need to initialize static classes in
-         * the DAC.  First I need to find mscorlib's dependency entry.  Search
+         * the DAC.  First I need to find CoreLib's dependency entry.  Search
          * through all of the dependencies to find the one marked as
-         * fIsMscorlib.  If I don't find anything marked that way, then "self"
-         * is mscorlib.
+         * fIsCoreLib.  If I don't find anything marked that way, then "self"
+         * is CoreLib.
          */
-        Dependency * mscorlib = NULL;
+        Dependency * corelib = NULL;
         for( COUNT_T i = 0; i < m_numDependencies; ++i )
         {
-            if( m_dependencies[i].fIsMscorlib )
+            if( m_dependencies[i].fIsCoreLib )
             {
-                mscorlib = &m_dependencies[i];
+                corelib = &m_dependencies[i];
                 break;
             }
         }
 
-        //If we're actually dumping mscorlib, remap the mscorlib dependency to our own native image.
-        if( (mscorlib == NULL) || !wcscmp(m_name, CoreLibName_W))
+        //If we're actually dumping CoreLib, remap the CoreLib dependency to our own native image.
+        if( (corelib == NULL) || !wcscmp(m_name, CoreLibName_W))
         {
-            mscorlib = GetDependency(0);
-            mscorlib->fIsMscorlib = TRUE;
-            _ASSERTE(mscorlib->fIsHardbound);
+            corelib = GetDependency(0);
+            corelib->fIsCoreLib = TRUE;
+            _ASSERTE(corelib->fIsHardbound);
         }
 
-        _ASSERTE(mscorlib != NULL);
-        if( mscorlib->fIsHardbound )
+        _ASSERTE(corelib != NULL);
+        if( corelib->fIsHardbound )
         {
-            m_isMscorlibHardBound = true;
+            m_isCoreLibHardBound = true;
         }
-        if( m_isMscorlibHardBound )
+        if( m_isCoreLibHardBound )
         {
             //go through the module to the binder.
-            PTR_Module mscorlibModule = mscorlib->pModule;
+            PTR_Module corelibModule = corelib->pModule;
 
-            PTR_MscorlibBinder binder = mscorlibModule->m_pBinder;
-            g_Mscorlib = *binder;
+            PTR_CoreLibBinder binder = corelibModule->m_pBinder;
+            g_CoreLib = *binder;
 
-            PTR_MethodTable mt = MscorlibBinder::GetExistingClass(CLASS__OBJECT);
+            PTR_MethodTable mt = CoreLibBinder::GetExistingClass(CLASS__OBJECT);
             g_pObjectClass = mt;
         }
 
 
         if (g_pObjectClass == NULL)
         {
-            //if mscorlib is not hard bound, then warn the user (many features of nidump are shut off)
-            m_display->ErrorPrintF( "Assembly %S is soft bound to mscorlib.  nidump cannot dump MethodTables completely.\n", m_name );
+            //if CoreLib is not hard bound, then warn the user (many features of nidump are shut off)
+            m_display->ErrorPrintF( "Assembly %S is soft bound to CoreLib.  nidump cannot dump MethodTables completely.\n", m_name );
             // TritonTODO: reason?
             // reset "hard bound state"
-            m_isMscorlibHardBound = false;
+            m_isCoreLibHardBound = false;
 
         }
     }
@@ -1267,8 +1267,8 @@ void NativeImageDumper::TraceDumpDependency(int idx, NativeImageDumper::Dependen
         m_display->ErrorPrintF("\tSize: %x (%d)\n", dependency->size, dependency->size);
         m_display->ErrorPrintF("\tModule: P=%p, L=%p\n", DataPtrToDisplay(dac_cast<TADDR>(dependency->pModule)),
                                PTR_TO_TADDR(dependency->pModule));
-        m_display->ErrorPrintF("Mscorlib=%s, Hardbound=%s\n",
-                               (dependency->fIsMscorlib ? "true" : "false"),
+        m_display->ErrorPrintF("CoreLib=%s, Hardbound=%s\n",
+                               (dependency->fIsCoreLib ? "true" : "false"),
                                (dependency->fIsHardbound ? "true" : "false"));
         m_display->ErrorPrintF("Name: %S\n", dependency->name);
     }
@@ -2391,7 +2391,7 @@ mdAssemblyRef NativeImageDumper::MapAssemblyRefToManifest(mdAssemblyRef token, I
             }
             else if (wcscmp(szAssemblyName, CoreLibName_W) == 0)
             {
-                // Mscorlib is special - version number and public key token are ignored.
+                // CoreLib is special - version number and public key token are ignored.
                 ret = currentRef;
                 break;
             }
@@ -2400,7 +2400,7 @@ mdAssemblyRef NativeImageDumper::MapAssemblyRefToManifest(mdAssemblyRef token, I
                      metadata.usBuildNumber == 255 &&
                      metadata.usRevisionNumber == 255)
             {
-                // WinMDs encode all assemblyrefs with version 255.255.255.255 including CLR assembly dependencies (mscorlib, System).
+                // WinMDs encode all assemblyrefs with version 255.255.255.255 including CLR assembly dependencies (corelib, System).
                 ret = currentRef;
             }
             else
@@ -2602,8 +2602,8 @@ NativeImageDumper::Dependency *NativeImageDumper::OpenDependency(int index)
             Dependency& dependency = m_dependencies[index];
             AppendTokenName(entry->dwAssemblyRef, buf, m_manifestImport, true);
             bool isHardBound = !!(entry->signNativeImage != INVALID_NGEN_SIGNATURE);
-            SString mscorlibStr(SString::Literal, CoreLibName_W);
-            bool isMscorlib = (0 == buf.Compare( mscorlibStr ));
+            SString corelibStr(SString::Literal, CoreLibName_W);
+            bool isCoreLib = (0 == buf.Compare( corelibStr ));
             dependency.fIsHardbound = isHardBound;
             wcscpy_s(dependency.name, _countof(dependency.name),
                      (const WCHAR*)buf);
@@ -2703,7 +2703,7 @@ NativeImageDumper::Dependency *NativeImageDumper::OpenDependency(int index)
                                                       ofRead,
                                                       IID_IMetaDataImport2,
                                                       (IUnknown **) &dependency.pImport));
-            dependency.fIsMscorlib = isMscorlib;
+            dependency.fIsCoreLib = isCoreLib;
         }
 
         m_dependencies[index].entry = entry;
@@ -3716,7 +3716,7 @@ void NativeImageDumper::DumpModule( PTR_Module module )
     /* REVISIT_TODO Fri 10/14/2005
      * Dump the binder
      */
-    PTR_MscorlibBinder binder = module->m_pBinder;
+    PTR_CoreLibBinder binder = module->m_pBinder;
     if( NULL != binder )
     {
         DisplayStartStructureWithOffset( m_pBinder, DPtrToPreferredAddr(binder),
@@ -3726,38 +3726,38 @@ void NativeImageDumper::DumpModule( PTR_Module module )
         //these four fields don't have anything useful in ngen images.
         DisplayWriteFieldPointer( m_classDescriptions,
                                   DPtrToPreferredAddr(binder->m_classDescriptions),
-                                  MscorlibBinder, MODULE );
+                                  CoreLibBinder, MODULE );
         DisplayWriteFieldPointer( m_methodDescriptions,
                                   DPtrToPreferredAddr(binder->m_methodDescriptions),
-                                  MscorlibBinder, MODULE );
+                                  CoreLibBinder, MODULE );
         DisplayWriteFieldPointer( m_fieldDescriptions,
                                   DPtrToPreferredAddr(binder->m_fieldDescriptions),
-                                  MscorlibBinder, MODULE );
+                                  CoreLibBinder, MODULE );
         DisplayWriteFieldPointer( m_pModule,
                                   DPtrToPreferredAddr(binder->m_pModule),
-                                  MscorlibBinder, MODULE );
+                                  CoreLibBinder, MODULE );
 
-        DisplayWriteFieldInt( m_cClasses, binder->m_cClasses, MscorlibBinder,
+        DisplayWriteFieldInt( m_cClasses, binder->m_cClasses, CoreLibBinder,
                               MODULE );
         DisplayWriteFieldAddress( m_pClasses,
                                   DPtrToPreferredAddr(binder->m_pClasses),
                                   sizeof(*binder->m_pClasses)
                                   * binder->m_cClasses,
-                                  MscorlibBinder, MODULE );
-        DisplayWriteFieldInt( m_cFields, binder->m_cFields, MscorlibBinder,
+                                  CoreLibBinder, MODULE );
+        DisplayWriteFieldInt( m_cFields, binder->m_cFields, CoreLibBinder,
                               MODULE );
         DisplayWriteFieldAddress( m_pFields,
                                   DPtrToPreferredAddr(binder->m_pFields),
                                   sizeof(*binder->m_pFields)
                                   * binder->m_cFields,
-                                  MscorlibBinder, MODULE );
-        DisplayWriteFieldInt( m_cMethods, binder->m_cMethods, MscorlibBinder,
+                                  CoreLibBinder, MODULE );
+        DisplayWriteFieldInt( m_cMethods, binder->m_cMethods, CoreLibBinder,
                               MODULE );
         DisplayWriteFieldAddress( m_pMethods,
                                   DPtrToPreferredAddr(binder->m_pMethods),
                                   sizeof(*binder->m_pMethods)
                                   * binder->m_cMethods,
-                                  MscorlibBinder, MODULE );
+                                  CoreLibBinder, MODULE );
 
         DisplayEndStructure( MODULE ); //m_pBinder
     }
@@ -6766,11 +6766,11 @@ NativeImageDumper::DumpMethodTable( PTR_MethodTable mt, const char * name,
         MethodTableToString( mt, buf );
         m_display->ErrorPrintF( "WARNING! MethodTable %S is generic but is not hard bound to its EEClass.  Cannot compute generic dictionary sizes.\n", (const WCHAR *)buf );
     }
-    else if( !m_isMscorlibHardBound )
+    else if( !m_isCoreLibHardBound )
     {
         /* REVISIT_TODO Mon 8/20/2007
-         * If we're not hard bound to mscorlib, most things don't work.  They depend on knowing what
-         * g_pObjectClass is.  Without the hard binding to mscorlib, I can't figure that out.
+         * If we're not hard bound to CoreLib, most things don't work.  They depend on knowing what
+         * g_pObjectClass is.  Without the hard binding to CoreLib, I can't figure that out.
          */
         haveCompleteExtents = false;
     }
index b8c0a04..a6e9461 100644 (file)
@@ -305,7 +305,7 @@ public:
         TADDR pMetadataStartTarget;
         TADDR pMetadataStartHost;
         SIZE_T MetadataSize;
-        bool fIsMscorlib;
+        bool fIsCoreLib;
         bool fIsHardbound;
         WCHAR name[128];
     };
@@ -548,9 +548,9 @@ private:
     COUNT_T m_ILSectionSize;
 #endif
 
-    //This is true if we are hard bound to mscorlib.  This enables various forms of generics dumping and MT
+    //This is true if we are hard bound to corelib.  This enables various forms of generics dumping and MT
     //dumping that require g_pObjectClass to be set.
-    bool m_isMscorlibHardBound;
+    bool m_isCoreLibHardBound;
 
 #if 0
     PTR_CCOR_SIGNATURE metadataToHostDAC( PCCOR_SIGNATURE pSig,
index 4c66711..5047421 100644 (file)
@@ -1058,7 +1058,7 @@ HRESULT ClrDataAccess::GetMethodDescData(
                     OBJECTREF value = pResolver->GetManagedResolver();
                     if (value)
                     {
-                        FieldDesc *pField = (&g_Mscorlib)->GetField(FIELD__DYNAMICRESOLVER__DYNAMIC_METHOD);
+                        FieldDesc *pField = (&g_CoreLib)->GetField(FIELD__DYNAMICRESOLVER__DYNAMIC_METHOD);
                         _ASSERTE(pField);
                         value = pField->GetRefValue(value);
                         if (value)
index 09e16b4..94ef49b 100644 (file)
@@ -1391,7 +1391,7 @@ ClrDataFrame::ValueFromDebugInfo(MetaSig* sig,
             // XXX Microsoft - Sometimes types can't be looked
             // up and this at least allows the value to be used,
             // but is it the right behavior?
-            argType = TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_U8));
+            argType = TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_U8));
             valueFlags = 0;
         }
         else
index 36b1379..a7412de 100644 (file)
@@ -683,7 +683,7 @@ HRESULT CordbType::GetType(CorElementType *pType)
         // Determining if something is a VC or not can involve asking the EE.
         // We could do it ourselves based on the metadata but it's non-trivial
         // determining if a class has System.ValueType as a parent (we have
-        // to find and OpenScope the mscorlib.dll which we don't currently do
+        // to find and OpenScope the System.Private.CoreLib.dll which we don't currently do
         // on the right-side).  But the IsValueClass call can fail if the
         // class is not yet loaded on the right side.  In that case we
         // ignore the failure and return ELEMENT_TYPE_CLASS
index 7b2cd48..56ecf03 100644 (file)
@@ -3458,14 +3458,14 @@ void Debugger::getBoundaries(MethodDesc * md,
 
     if (pModule == SystemDomain::SystemModule())
     {
-        // We don't look up PDBs for mscorlib.  This is not quite right, but avoids
+        // We don't look up PDBs for CoreLib.  This is not quite right, but avoids
         // a bootstrapping problem.  When an EXE loads, it has the option of setting
         // the COM apartment model to STA if we need to.  It is important that no
         // other Coinitialize happens before this.  Since loading the PDB reader uses
         // com we can not come first.  However managed code IS run before the COM
         // apartment model is set, and thus we have a problem since this code is
         // called for when JITTing managed code.    We avoid the problem by just
-        // bailing for mscorlib.
+        // bailing for CoreLib.
         return;
     }
 
index eda4029..3bff8cc 100644 (file)
@@ -848,7 +848,7 @@ typedef VMPTR_Base<DT_CONTEXT, void > VMPTR_CONTEXT;
 #endif
 
 // DomainFile is a base-class for a CLR module, with app-domain affinity.
-// For domain-neutral modules (like mscorlib), there is a DomainFile instance
+// For domain-neutral modules (like CoreLib), there is a DomainFile instance
 // for each appdomain the module lives in.
 // This is the canonical handle ICorDebug uses to a CLR module.
 DEFINE_VMPTR(class DomainFile,      PTR_DomainFile,     VMPTR_DomainFile);
index 810a3e8..f9e1e3d 100644 (file)
@@ -444,7 +444,7 @@ HRESULT SetInternalSystemDirectory()
 }
 
 #if defined(CROSSGEN_COMPILE)
-void SetMscorlibPath(LPCWSTR wzSystemDirectory)
+void SetCoreLibPath(LPCWSTR wzSystemDirectory)
 {
     DWORD len = (DWORD)wcslen(wzSystemDirectory);
     bool appendSeparator = wzSystemDirectory[len-1] != DIRECTORY_SEPARATOR_CHAR_W;
index 331f8e1..bfe02b7 100644 (file)
@@ -396,7 +396,7 @@ typedef enum
      * They are currently used for EnC for adding new field members to existing instantiations under EnC modes where
      * the primary object is the original instantiation and the secondary represents the added field.
      *
-     * They are also used to implement the ConditionalWeakTable class in mscorlib.dll. If you want to use
+     * They are also used to implement the managed ConditionalWeakTable class. If you want to use
      * these from managed code, they are exposed to BCL through the managed DependentHandle class.
      *
      *
@@ -587,7 +587,7 @@ public:
 
     /*
     ===========================================================================
-    BCL routines. These are routines that are directly exposed by mscorlib
+    BCL routines. These are routines that are directly exposed by CoreLib
     as a part of the `System.GC` class. These routines behave in the same
     manner as the functions on `System.GC`.
     ===========================================================================
@@ -640,14 +640,14 @@ public:
     virtual int GetGcLatencyMode() = 0;
 
     // Sets the current GC latency mode. newLatencyMode has already been
-    // verified by mscorlib to be valid.
+    // verified by CoreLib to be valid.
     virtual int SetGcLatencyMode(int newLatencyMode) = 0;
 
     // Gets the current LOH compaction mode.
     virtual int GetLOHCompactionMode() = 0;
 
     // Sets the current LOH compaction mode. newLOHCompactionMode has
-    // already been verified by mscorlib to be valid.
+    // already been verified by CoreLib to be valid.
     virtual void SetLOHCompactionMode(int newLOHCompactionMode) = 0;
 
     // Registers for a full GC notification, raising a notification if the gen 2 or
index f02a7a1..82308d7 100644 (file)
@@ -1412,7 +1412,7 @@ class ICorCompileInfo
     // So, the host must call StartupAsCompilationProcess before compiling
     // any code, and Shutdown after finishing.
     //
-    // The arguments control which native image of mscorlib to use.
+    // The arguments control which native image of CoreLib to use.
     // This matters for hardbinding.
     //
 
@@ -1548,8 +1548,8 @@ class ICorCompileInfo
             mdFieldDef             *token
             ) = 0;
 
-    // Get the loader module for mscorlib
-    virtual CORINFO_MODULE_HANDLE GetLoaderModuleForMscorlib() = 0;
+    // Get the loader module for CoreLib
+    virtual CORINFO_MODULE_HANDLE GetLoaderModuleForCoreLib() = 0;
 
     // Get the loader module for a type (where the type is regarded as
     // living for the purposes of loading, unloading, and ngen).
index 02c98f2..efecf3b 100644 (file)
@@ -2361,7 +2361,7 @@ interface ICorDebugAppDomain4 : IUnknown
  * Assembly interface
  * An ICorDebugAssembly instance corresponds to a a managed assembly loaded
  * into a specific AppDomain in the CLR.  For assemblies shared between multiple
- * AppDomains (eg. mscorlib), there will be a separate ICorDebugAssembly instance
+ * AppDomains (eg. CoreLib), there will be a separate ICorDebugAssembly instance
  * per AppDomain in which it is used.
  * ------------------------------------------------------------------------- */
 [
@@ -5220,7 +5220,7 @@ interface ICorDebugRuntimeUnwindableFrame : ICorDebugFrame
  * specific AppDomain.  Normally this is an executable or a DLL, but it may also be
  * some other file of a multi-module assembly.  There is an ICorDebugModule instance
  * for each AppDomain a module is loaded into, even in the case of shared modules like
- * mscorlib.
+ * CoreLib.
  */
 
 [
index 94fe6a1..b1a0b5b 100644 (file)
        <Comment> File is PE32 </Comment>
 </HRESULT>
 
-<HRESULT NumericValue="0x80131f06">
-       <SymbolicName>NGEN_E_SYS_ASM_NI_MISSING</SymbolicName>
-       <Message>"NGen cannot proceed because Mscorlib.dll does not have a native image"</Message>
-       <Comment>Compiling any assembly other than mscorlib in the absence of mscorlib.ni.dll is not allowed.</Comment>
-</HRESULT>
-
 <HRESULT NumericValue="0x80131fff">
        <SymbolicName>CLDB_E_INTERNALERROR</SymbolicName>
 </HRESULT>
 
 <HRESULT NumericValue="0x80132006">
        <SymbolicName>CLR_E_BIND_SYS_ASM_NI_MISSING</SymbolicName>
-       <Message>"Could not use native image because Mscorlib.dll is missing a native image"</Message>
-       <Comment>Returned when loading an assembly that only has a native image and no IL and cannot hardbind to mscorlib.ni.dll.</Comment>
+       <Message>"Could not use native image because System.Private.CoreLib.dll is missing a native image"</Message>
+       <Comment>Returned when loading an assembly that only has a native image and no IL and cannot hardbind to System.Private.CoreLib.ni.dll.</Comment>
 </HRESULT>
 
 <HRESULT NumericValue="0x80132007">
index faca6b4..e1c00b5 100644 (file)
@@ -13,7 +13,7 @@
 
 // All COM+ exceptions are expressed as a RaiseException with this exception
 // code.  If you change this value, you must also change
-// mscorlib\src\system\Exception.cs's _COMPlusExceptionCode value.
+// Exception.cs's _COMPlusExceptionCode value.
 
 #define EXCEPTION_MSVC    0xe06d7363    // 0xe0000000 | 'msc'
 
index 52cf63a..fb0b399 100644 (file)
@@ -235,7 +235,7 @@ typedef enum CorElementTypeZapSig
     // where the encoding/decoding takes place.
     ELEMENT_TYPE_NATIVE_VALUETYPE_ZAPSIG = 0x3d,
 
-    ELEMENT_TYPE_CANON_ZAPSIG            = 0x3e,     // zapsig encoding for [mscorlib]System.__Canon
+    ELEMENT_TYPE_CANON_ZAPSIG            = 0x3e,     // zapsig encoding for System.__Canon
     ELEMENT_TYPE_MODULE_ZAPSIG           = 0x3f,     // zapsig encoding for external module id#
 
 } CorElementTypeZapSig;
index f480851..92f3edf 100644 (file)
@@ -144,7 +144,7 @@ DEFINE_DACVAR(ULONG, PTR_GcNotification, dac__g_pGcNotificationTable, ::g_pGcNot
 
 DEFINE_DACVAR(ULONG, PTR_EEConfig, dac__g_pConfig, ::g_pConfig)
 
-DEFINE_DACVAR(ULONG, MscorlibBinder, dac__g_Mscorlib, ::g_Mscorlib)
+DEFINE_DACVAR(ULONG, CoreLibBinder, dac__g_CoreLib, ::g_CoreLib)
 
 #if defined(PROFILING_SUPPORTED) || defined(PROFILING_SUPPORTED_DATA)
 DEFINE_DACVAR(ULONG, ProfControlBlock, dac__g_profControlBlock, ::g_profControlBlock)
index 53cc17d..f2501c3 100644 (file)
@@ -5,8 +5,7 @@
 //
 
 //
-// Defines a random number generator, initially from the System.Random code in the BCL.  If you notice any problems,
-// please compare to the implementation in src\mscorlib\src\system\random.cs.
+// Defines a random number generator, initially from the System.Random code in the BCL.
 //
 // Main advantages over rand() are:
 //
index ba4f65b..b88d4d5 100644 (file)
@@ -285,7 +285,7 @@ class Zapper
 
     ~Zapper();
 
-    // The arguments control which native image of mscorlib to use.
+    // The arguments control which native image of CoreLib to use.
     // This matters for hardbinding.
     void InitEE(BOOL fForceDebug, BOOL fForceProfile, BOOL fForceInstrument);
     void LoadAndInitializeJITForNgen(LPCWSTR pwzJitName, OUT HINSTANCE* phJit, OUT ICorJitCompiler** ppICorJitCompiler);
index ccfd756..8cb0422 100644 (file)
@@ -4873,7 +4873,7 @@ void          CodeGen::genPushCalleeSavedRegisters()
     // - Generate fully interruptible code for loops that contains calls
     // - Generate fully interruptible code for leaf methods
     //
-    // Given the limited benefit from this optimization (<10k for mscorlib NGen image), the extra complexity
+    // Given the limited benefit from this optimization (<10k for CoreLib NGen image), the extra complexity
     // is not worth it.
     //
     rsPushRegs |= RBM_LR; // We must save the return address (in the LR register)
index 9b7a3d2..e169861 100644 (file)
@@ -9012,7 +9012,7 @@ public:
     {
 #if 0
         // Switching between size & speed has measurable throughput impact
-        // (3.5% on NGen mscorlib when measured). It used to be enabled for
+        // (3.5% on NGen CoreLib when measured). It used to be enabled for
         // DEBUG, but should generate identical code between CHK & RET builds,
         // so that's not acceptable.
         // TODO-Throughput: Figure out what to do about size vs. speed & throughput.
index f09c0e7..f375d11 100644 (file)
@@ -7250,7 +7250,7 @@ bool Compiler::fgIsThrow(GenTree* tree)
         return true;
     }
 
-    // TODO-CQ: there are a bunch of managed methods in [mscorlib]System.ThrowHelper
+    // TODO-CQ: there are a bunch of managed methods in System.ThrowHelper
     // that would be nice to recognize.
 
     return false;
index 6280e1b..9bb5315 100644 (file)
@@ -7768,7 +7768,7 @@ var_types Compiler::impImportCall(OPCODE                  opcode,
         // If this is a call to JitTestLabel.Mark, do "early inlining", and record the test attribute.
 
         // This recognition should really be done by knowing the methHnd of the relevant Mark method(s).
-        // These should be in mscorlib.h, and available through a JIT/EE interface call.
+        // These should be in corelib.h, and available through a JIT/EE interface call.
         const char* modName;
         const char* className;
         const char* methodName;
index 9b4d6f1..759a6e3 100644 (file)
@@ -1624,7 +1624,7 @@ void InlineStrategy::DumpXml(FILE* file, unsigned indent)
 
     // Root context will be null if we're not optimizing the method.
     //
-    // Note there are cases of this in mscorlib even in release builds,
+    // Note there are cases of this in System.Private.CoreLib even in release builds,
     // eg Task.NotifyDebuggerOfWaitCompletion.
     //
     // For such methods there aren't any inlines.
index 8852991..09a029f 100644 (file)
@@ -1700,7 +1700,7 @@ void DiscretionaryPolicy::MethodInfoObservations(CORINFO_METHOD_INFO* methodInfo
 //   0.100 * m_CalleeNativeSizeEstimate +
 //  -0.100 * m_CallsiteNativeSizeEstimate
 //
-// On the inlines in CoreCLR's mscorlib, release windows x64, this
+// On the inlines in CoreCLR's CoreLib, release windows x64, this
 // yields scores of R=0.42, MSE=228, and MAE=7.25.
 //
 // This estimate can be improved slighly by refitting, resulting in
index 5952db7..5266da1 100644 (file)
@@ -592,7 +592,7 @@ void Lowering::LowerPutArgStk(GenTreePutArgStk* putArgStk)
  *
  * TODO-XArch-CQ: (Low-pri): Jit64 generates in-line code of 8 instructions for (i) above.
  * There are hardly any occurrences of this conversion operation in platform
- * assemblies or in CQ perf benchmarks (1 occurrence in mscorlib, microsoft.jscript,
+ * assemblies or in CQ perf benchmarks (1 occurrence in corelib, microsoft.jscript,
  * 1 occurence in Roslyn and no occurrences in system, system.core, system.numerics
  * system.windows.forms, scimark, fractals, bio mums). If we ever find evidence that
  * doing this optimization is a win, should consider generating in-lined code.
index 5fc7bca..77d8233 100644 (file)
@@ -1673,7 +1673,7 @@ void CodeGen::psiEndProlog()
  We still report all the arguments at the very start of the method so that
  the user can see the arguments at the very start of the method (offset=0).
 
- Disabling this decreased the debug maps in mscorlib by 10% (01/2003)
+ Disabling this decreased the debug maps in CoreLib by 10% (01/2003)
  */
 
 #if 0
index d562065..62efd86 100644 (file)
@@ -1656,8 +1656,6 @@ bool SsaBuilder::IncludeInSsa(unsigned lclNum)
         // - SSA doesn't allow a single node to contain multiple SSA definitions.
         // - and PROMOTION_TYPE_DEPENDEDNT fields  are never candidates for a register.
         //
-        // Example mscorlib method: CompatibilitySwitches:IsCompatibilitySwitchSet
-        //
         return false;
     }
     else if (varDsc->lvIsStructField && m_pCompiler->lvaGetDesc(varDsc->lvParentLcl)->lvIsMultiRegRet)
index 5541450..f510eb6 100644 (file)
@@ -150,7 +150,7 @@ public:
 
 class UnwindPrologCodes : public UnwindBase, public UnwindCodesBase
 {
-    // UPC_LOCAL_COUNT is the amount of memory local to this class. For ARM mscorlib.dll, the maximum size is 34.
+    // UPC_LOCAL_COUNT is the amount of memory local to this class. For ARM CoreLib, the maximum size is 34.
     // Here is a histogram of other interesting sizes:
     //     <=16  79%
     //     <=24  96%
@@ -314,7 +314,7 @@ private:
 
 class UnwindEpilogCodes : public UnwindBase, public UnwindCodesBase
 {
-    // UEC_LOCAL_COUNT is the amount of memory local to this class. For ARM mscorlib.dll, the maximum size is 6,
+    // UEC_LOCAL_COUNT is the amount of memory local to this class. For ARM CoreLib, the maximum size is 6,
     // while 89% of epilogs fit in 4. So, set it to 4 to maintain array alignment and hit most cases.
     static const int UEC_LOCAL_COUNT = 4;
 
index f51e77a..783d1ad 100644 (file)
@@ -314,14 +314,13 @@ BEGIN
        MSG_FOR_URT_HR(CORDBG_E_UNSUPPORTED_DELEGATE) "The delegate contains a delegate currently not supported by the API."
        MSG_FOR_URT_HR(PEFMT_E_64BIT) "File is PE32+."
        MSG_FOR_URT_HR(PEFMT_E_32BIT) "File is PE32"
-       MSG_FOR_URT_HR(NGEN_E_SYS_ASM_NI_MISSING) "NGen cannot proceed because Mscorlib.dll does not have a native image"
        MSG_FOR_URT_HR(CLR_E_BIND_ASSEMBLY_VERSION_TOO_LOW) "The bound assembly has a version that is lower than that of the request."
        MSG_FOR_URT_HR(CLR_E_BIND_ASSEMBLY_PUBLIC_KEY_MISMATCH) "The assembly version has a public key token that does not match that of the request."
        MSG_FOR_URT_HR(CLR_E_BIND_IMAGE_UNAVAILABLE) "The requested image was not found or is unavailable."
        MSG_FOR_URT_HR(CLR_E_BIND_UNRECOGNIZED_IDENTITY_FORMAT) "The provided identity format is not recognized."
        MSG_FOR_URT_HR(CLR_E_BIND_ASSEMBLY_NOT_FOUND) "A binding for the specified assembly name was not found."
        MSG_FOR_URT_HR(CLR_E_BIND_TYPE_NOT_FOUND) "A binding for the specified type name was not found."
-       MSG_FOR_URT_HR(CLR_E_BIND_SYS_ASM_NI_MISSING) "Could not use native image because Mscorlib.dll is missing a native image"
+       MSG_FOR_URT_HR(CLR_E_BIND_SYS_ASM_NI_MISSING) "Could not use native image because System.Private.CoreLib.dll is missing a native image"
        MSG_FOR_URT_HR(CLR_E_BIND_NI_SECURITY_FAILURE) "Native image was generated in a different trust level than present at runtime"
        MSG_FOR_URT_HR(CLR_E_BIND_NI_DEP_IDENTITY_MISMATCH) "Native image identity mismatch with respect to its dependencies"
        MSG_FOR_URT_HR(CLR_E_GC_OOM) "Failfast due to an OOM during a GC"
index 31ba2d9..0fe7c75 100644 (file)
 #define CORDBG_E_UNSUPPORTED_DELEGATE EMAKEHR(0x1c68)
 #define PEFMT_E_64BIT EMAKEHR(0x1d02)
 #define PEFMT_E_32BIT EMAKEHR(0x1d0b)
-#define NGEN_E_SYS_ASM_NI_MISSING EMAKEHR(0x1f06)
 #define CLDB_E_INTERNALERROR EMAKEHR(0x1fff)
 #define CLR_E_BIND_ASSEMBLY_VERSION_TOO_LOW EMAKEHR(0x2000)
 #define CLR_E_BIND_ASSEMBLY_PUBLIC_KEY_MISMATCH EMAKEHR(0x2001)
index b8a6f7a..63bfc86 100644 (file)
@@ -10,7 +10,7 @@ Module Name:
     unicode/utf8.c
 
 Abstract:
-    Functions to encode and decode UTF-8 strings. This is a port of the C# version from mscorlib.
+    Functions to encode and decode UTF-8 strings. This is a port of the C# version from Utf8Encoding.cs.
 
 Revision History:
 
index 4119399..36924c3 100644 (file)
@@ -3,11 +3,6 @@
 
 //#include "stdafx.h"
 #include "resultbuffer.h"
-//
-//#using <mscorlib.dll>
-//
-//using namespace System;
-
 
 ResultBuffer:: ResultBuffer(int ThreadCount, int ThreadLogSize)
        {
index 0b9f357..57a3353 100644 (file)
@@ -81,7 +81,7 @@ namespace Internal.CorConstants
         // where the encoding/decoding takes place.
         ELEMENT_TYPE_NATIVE_VALUETYPE_ZAPSIG = 0x3d,
 
-        ELEMENT_TYPE_CANON_ZAPSIG = 0x3e,       // zapsig encoding for [mscorlib]System.__Canon
+        ELEMENT_TYPE_CANON_ZAPSIG = 0x3e,       // zapsig encoding for System.__Canon
         ELEMENT_TYPE_MODULE_ZAPSIG = 0x3f,      // zapsig encoding for external module id#
 
         ELEMENT_TYPE_HANDLE = 64,
index f9ab4c1..35dca86 100644 (file)
@@ -63,7 +63,7 @@ namespace Internal.IL.Stubs
                 //
                 // Ordinary volatile loads and stores only guarantee atomicity for pointer-sized (or smaller) data.
                 // So, on 32-bit platforms we must use Interlocked operations instead for the 64-bit types.
-                // The implementation in mscorlib already does this, so we will only substitute a new
+                // The implementation in CoreLib already does this, so we will only substitute a new
                 // IL body if we're running on a 64-bit platform.
                 //
                 case TypeFlags.Int64 when method.Context.Target.PointerSize == 8:
index bf37a9c..8d861b6 100644 (file)
@@ -50,7 +50,7 @@ target_link_libraries(crossgen
     ${CLRJIT_CROSSGEN}
     gcinfo_crossgen
     corzap_crossgen
-    mscorlib_crossgen
+    corelib_crossgen
     utilcode_crossgen
 )
 
index 41da650..803ea5a 100644 (file)
@@ -35,7 +35,7 @@ enum ReturnValues
 STDAPI CreatePDBWorker(LPCWSTR pwzAssemblyPath, LPCWSTR pwzPlatformAssembliesPaths, LPCWSTR pwzTrustedPlatformAssemblies, LPCWSTR pwzPlatformResourceRoots, LPCWSTR pwzAppPaths, LPCWSTR pwzAppNiPaths, LPCWSTR pwzPdbPath, BOOL fGeneratePDBLinesInfo, LPCWSTR pwzManagedPdbSearchPath, LPCWSTR pwzDiasymreaderPath);
 STDAPI NGenWorker(LPCWSTR pwzFilename, DWORD dwFlags, LPCWSTR pwzPlatformAssembliesPaths, LPCWSTR pwzTrustedPlatformAssemblies, LPCWSTR pwzPlatformResourceRoots, LPCWSTR pwzAppPaths, LPCWSTR pwzOutputFilename=NULL, SIZE_T customBaseAddress=0, ICorSvcLogger *pLogger = NULL, LPCWSTR pwszCLRJITPath = nullptr);
 void SetSvcLogger(ICorSvcLogger *pCorSvcLogger);
-void SetMscorlibPath(LPCWSTR wzSystemDirectory);
+void SetCoreLibPath(LPCWSTR wzSystemDirectory);
 
 /* --------------------------------------------------------------------------- *
  * Console stuff
@@ -257,7 +257,7 @@ bool StringEndsWith(LPCWSTR pwzString, LPCWSTR pwzCandidate)
 // When using the Phone binding model (TrustedPlatformAssemblies), automatically
 // detect which path CoreLib.[ni.]dll lies in.
 //
-bool ComputeMscorlibPathFromTrustedPlatformAssemblies(SString& pwzMscorlibPath, LPCWSTR pwzTrustedPlatformAssemblies)
+bool ComputeCoreLibPathFromTrustedPlatformAssemblies(SString& pwzCoreLibPath, LPCWSTR pwzTrustedPlatformAssemblies)
 {
     LPWSTR wszTrustedPathCopy = new WCHAR[wcslen(pwzTrustedPlatformAssemblies) + 1];
     wcscpy_s(wszTrustedPathCopy, wcslen(pwzTrustedPlatformAssemblies) + 1, pwzTrustedPlatformAssemblies);
@@ -277,11 +277,11 @@ bool ComputeMscorlibPathFromTrustedPlatformAssemblies(SString& pwzMscorlibPath,
         if (StringEndsWith(wszSingleTrustedPath, DIRECTORY_SEPARATOR_STR_W CoreLibName_IL_W) ||
             StringEndsWith(wszSingleTrustedPath, DIRECTORY_SEPARATOR_STR_W CoreLibName_NI_W))
         {
-            pwzMscorlibPath.Set(wszSingleTrustedPath);
-            SString::Iterator pwzSeparator = pwzMscorlibPath.End();
+            pwzCoreLibPath.Set(wszSingleTrustedPath);
+            SString::Iterator pwzSeparator = pwzCoreLibPath.End();
             bool retval = true;
 
-            if (!SUCCEEDED(CopySystemDirectory(pwzMscorlibPath, pwzMscorlibPath)))
+            if (!SUCCEEDED(CopySystemDirectory(pwzCoreLibPath, pwzCoreLibPath)))
             {
                 retval = false;
             }
@@ -318,7 +318,7 @@ void PopulateTPAList(SString path, LPCWSTR pwszMask, SString &refTPAList, bool f
             // No NIs are supported when creating NI images (other than NI of System.Private.CoreLib.dll).
             if (!fCreatePDB)
             {
-                // Only CoreLib's ni.dll should be in the TPAList for the compilation of non-mscorlib assemblies.
+                // Only CoreLib's ni.dll should be in the TPAList for the compilation of non-CoreLib assemblies.
                 if (StringEndsWith((LPWSTR)pwszFilename, W(".ni.dll")))
                 {
                     fAddFileToTPAList = false;
@@ -837,10 +837,10 @@ int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)
 
     if (pwzTrustedPlatformAssemblies != nullptr)
     {
-        if (ComputeMscorlibPathFromTrustedPlatformAssemblies(wzTrustedPathRoot, pwzTrustedPlatformAssemblies))
+        if (ComputeCoreLibPathFromTrustedPlatformAssemblies(wzTrustedPathRoot, pwzTrustedPlatformAssemblies))
         {
             pwzPlatformAssembliesPaths = wzTrustedPathRoot.GetUnicode();
-            SetMscorlibPath(pwzPlatformAssembliesPaths);
+            SetCoreLibPath(pwzPlatformAssembliesPaths);
         }
     }
 
index fb36f5c..23b2e91 100644 (file)
@@ -316,6 +316,7 @@ set(VM_SOURCES_WKS
     comthreadpool.cpp
     comutilnative.cpp
     comwaithandle.cpp
+    corelib.cpp # <DisablePrecompiledHeaders>true</DisablePrecompiledHeaders>
     customattribute.cpp
     custommarshalerinfo.cpp
     autotrace.cpp
@@ -370,7 +371,6 @@ set(VM_SOURCES_WKS
     marshalnative.cpp
     methodtablebuilder.cpp
     mlinfo.cpp
-    mscorlib.cpp # <DisablePrecompiledHeaders>true</DisablePrecompiledHeaders>
     multicorejit.cpp # Condition="'$(FeatureMulticoreJIT)' == 'true'
     multicorejitplayer.cpp # Condition="'$(FeatureMulticoreJIT)' == 'true'
     nativeeventsource.cpp
@@ -491,7 +491,7 @@ set(VM_HEADERS_WKS
     marshalnative.h
     methodtablebuilder.h
     mlinfo.h
-    mscorlib.h
+    corelib.h
     multicorejit.h
     multicorejitimpl.h
     nativeeventsource.h
index a073179..8ef508e 100644 (file)
@@ -486,7 +486,7 @@ ASMCONSTANTS_C_ASSERT(OFFSET__TEB__ThreadLocalStoragePointer == offsetof(TEB, Th
 
 #define                     DELEGATE_FIELD_OFFSET__METHOD_AUX           0x20
 ASMCONSTANTS_RUNTIME_ASSERT(DELEGATE_FIELD_OFFSET__METHOD_AUX == Object::GetOffsetOfFirstField() +
-        MscorlibBinder::GetFieldOffset(FIELD__DELEGATE__METHOD_PTR_AUX));
+        CoreLibBinder::GetFieldOffset(FIELD__DELEGATE__METHOD_PTR_AUX));
 
 
 #define ASM_LARGE_OBJECT_SIZE 85000
index 8f5b415..1ba7c47 100644 (file)
@@ -928,7 +928,7 @@ OBJECTREF AppDomain::GetMissingObject()
     if (!m_hndMissing)
     {
         // Get the field
-        FieldDesc *pValueFD = MscorlibBinder::GetField(FIELD__MISSING__VALUE);
+        FieldDesc *pValueFD = CoreLibBinder::GetField(FIELD__MISSING__VALUE);
 
         pValueFD->CheckRunClassInitThrowing();
 
@@ -1268,7 +1268,7 @@ void SystemDomain::Init()
 
     DWORD size = 0;
 
-    // Get the install directory so we can find mscorlib
+    // Get the install directory so we can find CoreLib
     hr = GetInternalSystemDirectory(NULL, &size);
     if (hr != HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
         ThrowHR(hr);
@@ -1307,7 +1307,7 @@ void SystemDomain::Init()
         }
 #endif
 
-        // Finish loading mscorlib now.
+        // Finish loading CoreLib now.
         m_pSystemAssembly->GetDomainAssembly()->EnsureActive();
     }
 
@@ -1424,36 +1424,36 @@ void SystemDomain::LoadBaseSystemClasses()
     // the globals in this function before finishing the load.
     m_pSystemAssembly = DefaultDomain()->LoadDomainAssembly(NULL, m_pSystemFile, FILE_LOAD_POST_LOADLIBRARY)->GetCurrentAssembly();
 
-    // Set up binder for mscorlib
-    MscorlibBinder::AttachModule(m_pSystemAssembly->GetManifestModule());
+    // Set up binder for CoreLib
+    CoreLibBinder::AttachModule(m_pSystemAssembly->GetManifestModule());
 
     // Load Object
-    g_pObjectClass = MscorlibBinder::GetClass(CLASS__OBJECT);
+    g_pObjectClass = CoreLibBinder::GetClass(CLASS__OBJECT);
 
     // Now that ObjectClass is loaded, we can set up
     // the system for finalizers.  There is no point in deferring this, since we need
     // to know this before we allocate our first object.
-    g_pObjectFinalizerMD = MscorlibBinder::GetMethod(METHOD__OBJECT__FINALIZE);
+    g_pObjectFinalizerMD = CoreLibBinder::GetMethod(METHOD__OBJECT__FINALIZE);
 
 
-    g_pCanonMethodTableClass = MscorlibBinder::GetClass(CLASS____CANON);
+    g_pCanonMethodTableClass = CoreLibBinder::GetClass(CLASS____CANON);
 
     // NOTE: !!!IMPORTANT!!! ValueType and Enum MUST be loaded one immediately after
     //                       the other, because we have coded MethodTable::IsChildValueType
     //                       in such a way that it depends on this behaviour.
     // Load the ValueType class
-    g_pValueTypeClass = MscorlibBinder::GetClass(CLASS__VALUE_TYPE);
+    g_pValueTypeClass = CoreLibBinder::GetClass(CLASS__VALUE_TYPE);
 
     // Load the enum class
-    g_pEnumClass = MscorlibBinder::GetClass(CLASS__ENUM);
+    g_pEnumClass = CoreLibBinder::GetClass(CLASS__ENUM);
     _ASSERTE(!g_pEnumClass->IsValueType());
 
     // Load System.RuntimeType
-    g_pRuntimeTypeClass = MscorlibBinder::GetClass(CLASS__CLASS);
+    g_pRuntimeTypeClass = CoreLibBinder::GetClass(CLASS__CLASS);
     _ASSERTE(g_pRuntimeTypeClass->IsFullyLoaded());
 
     // Load Array class
-    g_pArrayClass = MscorlibBinder::GetClass(CLASS__ARRAY);
+    g_pArrayClass = CoreLibBinder::GetClass(CLASS__ARRAY);
 
     // Calling a method on IList<T> for an array requires redirection to a method on
     // the SZArrayHelper class. Retrieving such methods means calling
@@ -1461,31 +1461,31 @@ void SystemDomain::LoadBaseSystemClasses()
     // the corresponding method on SZArrayHelper. This basically results in a class
     // load due to a method call, which the debugger cannot handle, so we pre-load
     // the SZArrayHelper class here.
-    g_pSZArrayHelperClass = MscorlibBinder::GetClass(CLASS__SZARRAYHELPER);
+    g_pSZArrayHelperClass = CoreLibBinder::GetClass(CLASS__SZARRAYHELPER);
 
     // Load ByReference class
     //
     // NOTE: ByReference<T> must be the first by-ref-like system type to be loaded,
     //       because MethodTable::ClassifyEightBytesWithManagedLayout depends on it.
-    g_pByReferenceClass = MscorlibBinder::GetClass(CLASS__BYREFERENCE);
+    g_pByReferenceClass = CoreLibBinder::GetClass(CLASS__BYREFERENCE);
 
     // Load Nullable class
-    g_pNullableClass = MscorlibBinder::GetClass(CLASS__NULLABLE);
+    g_pNullableClass = CoreLibBinder::GetClass(CLASS__NULLABLE);
 
     // Load the Object array class.
     g_pPredefinedArrayTypes[ELEMENT_TYPE_OBJECT] = ClassLoader::LoadArrayTypeThrowing(TypeHandle(g_pObjectClass));
 
-    // We have delayed allocation of mscorlib's static handles until we load the object class
-    MscorlibBinder::GetModule()->AllocateRegularStaticHandles(DefaultDomain());
+    // We have delayed allocation of CoreLib's static handles until we load the object class
+    CoreLibBinder::GetModule()->AllocateRegularStaticHandles(DefaultDomain());
 
     // Make sure all primitive types are loaded
     for (int et = ELEMENT_TYPE_VOID; et <= ELEMENT_TYPE_R8; et++)
-        MscorlibBinder::LoadPrimitiveType((CorElementType)et);
+        CoreLibBinder::LoadPrimitiveType((CorElementType)et);
 
-    MscorlibBinder::LoadPrimitiveType(ELEMENT_TYPE_I);
-    MscorlibBinder::LoadPrimitiveType(ELEMENT_TYPE_U);
+    CoreLibBinder::LoadPrimitiveType(ELEMENT_TYPE_I);
+    CoreLibBinder::LoadPrimitiveType(ELEMENT_TYPE_U);
 
-    g_TypedReferenceMT = MscorlibBinder::GetClass(CLASS__TYPED_REFERENCE);
+    g_TypedReferenceMT = CoreLibBinder::GetClass(CLASS__TYPED_REFERENCE);
 
     // unfortunately, the following cannot be delay loaded since the jit
     // uses it to compute method attributes within a function that cannot
@@ -1493,8 +1493,8 @@ void SystemDomain::LoadBaseSystemClasses()
     // where a complus exception can be thrown. It is unfortunate, because
     // we know that the delegate class and multidelegate class are always
     // guaranteed to be found.
-    g_pDelegateClass = MscorlibBinder::GetClass(CLASS__DELEGATE);
-    g_pMulticastDelegateClass = MscorlibBinder::GetClass(CLASS__MULTICAST_DELEGATE);
+    g_pDelegateClass = CoreLibBinder::GetClass(CLASS__DELEGATE);
+    g_pMulticastDelegateClass = CoreLibBinder::GetClass(CLASS__MULTICAST_DELEGATE);
 
 #ifndef CROSSGEN_COMPILE
     CrossLoaderAllocatorHashSetup::EnsureTypesLoaded();
@@ -1508,45 +1508,45 @@ void SystemDomain::LoadBaseSystemClasses()
 #endif // CROSSGEN_COMPILE
 
     // used by IsImplicitInterfaceOfSZArray
-    MscorlibBinder::GetClass(CLASS__IENUMERABLEGENERIC);
-    MscorlibBinder::GetClass(CLASS__ICOLLECTIONGENERIC);
-    MscorlibBinder::GetClass(CLASS__ILISTGENERIC);
-    MscorlibBinder::GetClass(CLASS__IREADONLYCOLLECTIONGENERIC);
-    MscorlibBinder::GetClass(CLASS__IREADONLYLISTGENERIC);
+    CoreLibBinder::GetClass(CLASS__IENUMERABLEGENERIC);
+    CoreLibBinder::GetClass(CLASS__ICOLLECTIONGENERIC);
+    CoreLibBinder::GetClass(CLASS__ILISTGENERIC);
+    CoreLibBinder::GetClass(CLASS__IREADONLYCOLLECTIONGENERIC);
+    CoreLibBinder::GetClass(CLASS__IREADONLYLISTGENERIC);
 
     // Load String
-    g_pStringClass = MscorlibBinder::LoadPrimitiveType(ELEMENT_TYPE_STRING);
+    g_pStringClass = CoreLibBinder::LoadPrimitiveType(ELEMENT_TYPE_STRING);
 
 #ifdef FEATURE_UTF8STRING
     // Load Utf8String
-    g_pUtf8StringClass = MscorlibBinder::GetClass(CLASS__UTF8_STRING);
+    g_pUtf8StringClass = CoreLibBinder::GetClass(CLASS__UTF8_STRING);
 #endif // FEATURE_UTF8STRING
 
 #ifndef CROSSGEN_COMPILE
     ECall::PopulateManagedStringConstructors();
 #endif // CROSSGEN_COMPILE
 
-    g_pExceptionClass = MscorlibBinder::GetClass(CLASS__EXCEPTION);
-    g_pOutOfMemoryExceptionClass = MscorlibBinder::GetException(kOutOfMemoryException);
-    g_pStackOverflowExceptionClass = MscorlibBinder::GetException(kStackOverflowException);
-    g_pExecutionEngineExceptionClass = MscorlibBinder::GetException(kExecutionEngineException);
-    g_pThreadAbortExceptionClass = MscorlibBinder::GetException(kThreadAbortException);
+    g_pExceptionClass = CoreLibBinder::GetClass(CLASS__EXCEPTION);
+    g_pOutOfMemoryExceptionClass = CoreLibBinder::GetException(kOutOfMemoryException);
+    g_pStackOverflowExceptionClass = CoreLibBinder::GetException(kStackOverflowException);
+    g_pExecutionEngineExceptionClass = CoreLibBinder::GetException(kExecutionEngineException);
+    g_pThreadAbortExceptionClass = CoreLibBinder::GetException(kThreadAbortException);
 
-    g_pThreadClass = MscorlibBinder::GetClass(CLASS__THREAD);
+    g_pThreadClass = CoreLibBinder::GetClass(CLASS__THREAD);
 
 #ifdef FEATURE_COMINTEROP
-    g_pBaseCOMObject = MscorlibBinder::GetClass(CLASS__COM_OBJECT);
+    g_pBaseCOMObject = CoreLibBinder::GetClass(CLASS__COM_OBJECT);
 #endif
 
-    g_pIDynamicInterfaceCastableInterface = MscorlibBinder::GetClass(CLASS__IDYNAMICINTERFACECASTABLE);
+    g_pIDynamicInterfaceCastableInterface = CoreLibBinder::GetClass(CLASS__IDYNAMICINTERFACECASTABLE);
 
 #ifdef FEATURE_ICASTABLE
-    g_pICastableInterface = MscorlibBinder::GetClass(CLASS__ICASTABLE);
+    g_pICastableInterface = CoreLibBinder::GetClass(CLASS__ICASTABLE);
 #endif // FEATURE_ICASTABLE
 
     // Make sure that FCall mapping for Monitor.Enter is initialized. We need it in case Monitor.Enter is used only as JIT helper.
     // For more details, see comment in code:JITutil_MonEnterWorker around "__me = GetEEFuncEntryPointMacro(JIT_MonEnter)".
-    ECall::GetFCallImpl(MscorlibBinder::GetMethod(METHOD__MONITOR__ENTER));
+    ECall::GetFCallImpl(CoreLibBinder::GetMethod(METHOD__MONITOR__ENTER));
 
 #ifdef PROFILING_SUPPORTED
     // Note that g_profControlBlock.fBaseSystemClassesLoaded must be set to TRUE only after
@@ -1559,7 +1559,7 @@ void SystemDomain::LoadBaseSystemClasses()
 #if defined(_DEBUG) && !defined(CROSSGEN_COMPILE)
     if (!NingenEnabled())
     {
-        g_Mscorlib.Check();
+        g_CoreLib.Check();
     }
 #endif
 
@@ -1567,8 +1567,8 @@ void SystemDomain::LoadBaseSystemClasses()
     if (GCStress<cfg_instr_ngen>::IsEnabled())
     {
         // Setting up gc coverage requires the base system classes
-        //  to be initialized. So we have deferred it until now for mscorlib.
-        Module *pModule = MscorlibBinder::GetModule();
+        //  to be initialized. So we have deferred it until now for CoreLib.
+        Module *pModule = CoreLibBinder::GetModule();
         _ASSERTE(pModule->IsSystem());
         if(pModule->HasNativeImage())
         {
@@ -1666,7 +1666,7 @@ bool SystemDomain::IsReflectionInvocationMethod(MethodDesc* pMeth)
 
     MethodTable* pCaller = pMeth->GetMethodTable();
 
-    // All Reflection Invocation methods are defined in mscorlib.dll
+    // All Reflection Invocation methods are defined in CoreLib
     if (!pCaller->GetModule()->IsSystem())
         return false;
 
@@ -1707,7 +1707,7 @@ bool SystemDomain::IsReflectionInvocationMethod(MethodDesc* pMeth)
         // Make sure all types are loaded so that we can use faster GetExistingClass()
         for (unsigned i = 0; i < NumItems(reflectionInvocationTypes); i++)
         {
-            MscorlibBinder::GetClass(reflectionInvocationTypes[i]);
+            CoreLibBinder::GetClass(reflectionInvocationTypes[i]);
         }
 
         VolatileStore(&fInited, true);
@@ -1717,7 +1717,7 @@ bool SystemDomain::IsReflectionInvocationMethod(MethodDesc* pMeth)
     {
         for (unsigned i = 0; i < NumItems(reflectionInvocationTypes); i++)
         {
-            if (MscorlibBinder::GetExistingClass(reflectionInvocationTypes[i]) == pCaller)
+            if (CoreLibBinder::GetExistingClass(reflectionInvocationTypes[i]) == pCaller)
                 return true;
         }
     }
@@ -1889,7 +1889,7 @@ StackWalkAction SystemDomain::CallersMethodCallbackWithStackMark(CrawlFrame* pCf
 
     // Skipping reflection frames. We don't need to be quite as exhaustive here
     // as the security or reflection stack walking code since we know this logic
-    // is only invoked for selected methods in mscorlib itself. So we're
+    // is only invoked for selected methods in CoreLib itself. So we're
     // reasonably sure we won't have any sensitive methods late bound invoked on
     // constructors, properties or events. This leaves being invoked via
     // MethodInfo, Type or Delegate (and depending on which invoke overload is
@@ -3162,8 +3162,8 @@ DomainFile *AppDomain::LoadDomainFile(FileLoadLock *pLock, FileLoadLevel targetL
     // Make sure we release the lock on exit
     FileLoadLockRefHolder lockRef(pLock);
 
-    // We need to perform the early steps of loading mscorlib without a domain transition.  This is
-    // important for bootstrapping purposes - we need to get mscorlib at least partially loaded
+    // We need to perform the early steps of loading CoreLib without a domain transition.  This is
+    // important for bootstrapping purposes - we need to get CoreLib at least partially loaded
     // into a domain before we can run serialization code to do the transition.
     //
     // Note that we cannot do this in general for all assemblies, because some of the security computations
@@ -3499,7 +3499,7 @@ void AppDomain::SetupSharedStatics()
     // Because we are allocating/referencing objects, need to be in cooperative mode
     GCX_COOP();
 
-    DomainLocalModule *pLocalModule = MscorlibBinder::GetModule()->GetDomainLocalModule();
+    DomainLocalModule *pLocalModule = CoreLibBinder::GetModule()->GetDomainLocalModule();
 
     // This is a convenient place to initialize String.Empty.
     // It is treated as intrinsic by the JIT as so the static constructor would never run.
@@ -3508,7 +3508,7 @@ void AppDomain::SetupSharedStatics()
     // String should not have any static constructors.
     _ASSERTE(g_pStringClass->IsClassPreInited());
 
-    FieldDesc * pEmptyStringFD = MscorlibBinder::GetField(FIELD__STRING__EMPTY);
+    FieldDesc * pEmptyStringFD = CoreLibBinder::GetField(FIELD__STRING__EMPTY);
     OBJECTREF* pEmptyStringHandle = (OBJECTREF*)
         ((TADDR)pLocalModule->GetPrecomputedGCStaticsBasePointer()+pEmptyStringFD->GetOffset());
     SetObjectReference( pEmptyStringHandle, StringObject::GetEmptyString());
@@ -3876,9 +3876,9 @@ BOOL AppDomain::IsCached(AssemblySpec *pSpec)
 {
     WRAPPER_NO_CONTRACT;
 
-    // Check to see if this fits our rather loose idea of a reference to mscorlib.
+    // Check to see if this fits our rather loose idea of a reference to CoreLib.
     // If so, don't use fusion to bind it - do it ourselves.
-    if (pSpec->IsMscorlib())
+    if (pSpec->IsCoreLib())
         return TRUE;
 
     return m_AssemblyCache.Contains(pSpec);
@@ -3906,9 +3906,9 @@ PEAssembly* AppDomain::FindCachedFile(AssemblySpec* pSpec, BOOL fThrow /*=TRUE*/
     }
     CONTRACTL_END;
 
-    // Check to see if this fits our rather loose idea of a reference to mscorlib.
+    // Check to see if this fits our rather loose idea of a reference to CoreLib.
     // If so, don't use fusion to bind it - do it ourselves.
-    if (fThrow && pSpec->IsMscorlib())
+    if (fThrow && pSpec->IsCoreLib())
     {
         CONSISTENCY_CHECK(SystemDomain::System()->SystemAssembly() != NULL);
         PEAssembly *pFile = SystemDomain::System()->SystemFile();
@@ -4002,15 +4002,15 @@ PEAssembly * AppDomain::BindAssemblySpec(
 
                     if (bindResult.Found())
                     {
-                        if (SystemDomain::SystemFile() && bindResult.IsMscorlib())
+                        if (SystemDomain::SystemFile() && bindResult.IsCoreLib())
                         {
-                            // Avoid rebinding to another copy of mscorlib
+                            // Avoid rebinding to another copy of CoreLib
                             result = SystemDomain::SystemFile();
                             result.SuppressRelease(); // Didn't get a refcount
                         }
                         else
                         {
-                            // IsSystem on the PEFile should be false, even for mscorlib satellites
+                            // IsSystem on the PEFile should be false, even for CoreLib satellites
                             result = PEAssembly::Open(&bindResult,
                                                       FALSE);
                         }
@@ -4034,7 +4034,7 @@ PEAssembly * AppDomain::BindAssemblySpec(
                         // return an assembly that does not match, and this can cause recursive resource lookups during error
                         // reporting. The CoreLib satellite assembly is loaded from relative locations based on the culture, see
                         // AssemblySpec::Bind().
-                        if (!pSpec->IsMscorlibSatellite())
+                        if (!pSpec->IsCoreLibSatellite())
                         {
                             // Trigger the resolve event also for non-throw situation.
                             AssemblySpec NewSpec(this);
@@ -4258,7 +4258,7 @@ void AppDomain::RaiseLoadingAssemblyEvent(DomainAssembly *pAssembly)
 
     EX_TRY
     {
-        if (MscorlibBinder::GetField(FIELD__ASSEMBLYLOADCONTEXT__ASSEMBLY_LOAD)->GetStaticOBJECTREF() != NULL)
+        if (CoreLibBinder::GetField(FIELD__ASSEMBLYLOADCONTEXT__ASSEMBLY_LOAD)->GetStaticOBJECTREF() != NULL)
         {
             struct _gc {
                 OBJECTREF    orThis;
@@ -4342,7 +4342,7 @@ AppDomain::RaiseUnhandledExceptionEvent(OBJECTREF *pThrowable, BOOL isTerminatin
 
     _ASSERTE(this == GetThread()->GetDomain());
 
-    OBJECTREF orDelegate = MscorlibBinder::GetField(FIELD__APPCONTEXT__UNHANDLED_EXCEPTION)->GetStaticOBJECTREF();
+    OBJECTREF orDelegate = CoreLibBinder::GetField(FIELD__APPCONTEXT__UNHANDLED_EXCEPTION)->GetStaticOBJECTREF();
     if (orDelegate == NULL)
         return FALSE;
 
@@ -5346,7 +5346,7 @@ HRESULT RuntimeInvokeHostAssemblyResolver(INT_PTR pManagedAssemblyLoadContextToB
         BinderTracing::ResolutionAttemptedOperation tracer{pAssemblyName, 0 /*binderID*/, pManagedAssemblyLoadContextToBindWithin, hr};
 
         // Allocate an AssemblyName managed object
-        _gcRefs.oRefAssemblyName = (ASSEMBLYNAMEREF) AllocateObject(MscorlibBinder::GetClass(CLASS__ASSEMBLY_NAME));
+        _gcRefs.oRefAssemblyName = (ASSEMBLYNAMEREF) AllocateObject(CoreLibBinder::GetClass(CLASS__ASSEMBLY_NAME));
 
         // Initialize the AssemblyName object from the AssemblySpec
         spec.AssemblyNameInit(&_gcRefs.oRefAssemblyName, NULL);
index 8a73d95..a84bd6a 100644 (file)
@@ -2737,7 +2737,6 @@ public:
 #endif // DACCESS_COMPILE
 
     //****************************************************************************************
-    // Routines to deal with the base library (currently mscorlib.dll)
     LPCWSTR BaseLibrary()
     {
         WRAPPER_NO_CONTRACT;
@@ -2750,11 +2749,11 @@ public:
     {
         WRAPPER_NO_CONTRACT;
 
-        // See if it is the installation path to mscorlib
+        // See if it is the installation path to CoreLib
         if (path.EqualsCaseInsensitive(m_BaseLibrary))
             return TRUE;
 
-        // Or, it might be the GAC location of mscorlib
+        // Or, it might be the GAC location of CoreLib
         if (System()->SystemAssembly() != NULL
             && path.EqualsCaseInsensitive(System()->SystemAssembly()->GetManifestFile()->GetPath()))
             return TRUE;
@@ -2766,7 +2765,7 @@ public:
     {
         WRAPPER_NO_CONTRACT;
 
-        // See if it is the installation path to mscorlib.resources
+        // See if it is the installation path to corelib.resources
         SString s(SString::Ascii,g_psBaseLibrarySatelliteAssemblyName);
         if (path.EqualsCaseInsensitive(s))
             return TRUE;
@@ -2842,7 +2841,7 @@ private:
 #ifdef FEATURE_PREJIT
 protected:
 
-    // These flags let the correct native image of mscorlib to be loaded.
+    // These flags let the correct native image of CoreLib to be loaded.
     // This is important for hardbinding to it
 
     SVAL_DECL(BOOL, s_fForceDebug);
index 9df486b..2a2a8c5 100644 (file)
@@ -60,7 +60,7 @@ FCIMPL0(Object*, AppDomainNative::GetLoadedAssemblies)
 
     HELPER_METHOD_FRAME_BEGIN_RET_PROTECT(gc);
 
-    MethodTable * pAssemblyClass = MscorlibBinder::GetClass(CLASS__ASSEMBLY);
+    MethodTable * pAssemblyClass = CoreLibBinder::GetClass(CLASS__ASSEMBLY);
 
     AppDomain * pApp = GetAppDomain();
 
index dd35b49..767c2cc 100644 (file)
@@ -765,7 +765,7 @@ public:
         DWORD dwTotalLocalNum = NewLocal(ELEMENT_TYPE_I4);
         DWORD dwLengthLocalNum = NewLocal(ELEMENT_TYPE_I4);
 
-        mdToken tokRawData = GetToken(MscorlibBinder::GetField(FIELD__RAW_DATA__DATA));
+        mdToken tokRawData = GetToken(CoreLibBinder::GetField(FIELD__RAW_DATA__DATA));
 
         ILCodeLabel * pRangeExceptionLabel = NewCodeLabel();
         ILCodeLabel * pRangeExceptionLabel1 = NewCodeLabel();
@@ -979,14 +979,14 @@ public:
         m_pCode->EmitLabel(pRangeExceptionLabel1); // Assumes that there is one "int" pushed on the stack
         m_pCode->EmitPOP();
 
-        mdToken tokIndexOutOfRangeCtorExcep = GetToken((MscorlibBinder::GetException(kIndexOutOfRangeException))->GetDefaultConstructor());
+        mdToken tokIndexOutOfRangeCtorExcep = GetToken((CoreLibBinder::GetException(kIndexOutOfRangeException))->GetDefaultConstructor());
         m_pCode->EmitLabel(pRangeExceptionLabel);
         m_pCode->EmitNEWOBJ(tokIndexOutOfRangeCtorExcep, 0);
         m_pCode->EmitTHROW();
 
         if(pTypeMismatchExceptionLabel != NULL)
         {
-            mdToken tokTypeMismatchExcepCtor = GetToken((MscorlibBinder::GetException(kArrayTypeMismatchException))->GetDefaultConstructor());
+            mdToken tokTypeMismatchExcepCtor = GetToken((CoreLibBinder::GetException(kArrayTypeMismatchException))->GetDefaultConstructor());
 
             m_pCode->EmitLabel(pTypeMismatchExceptionLabel);
             m_pCode->EmitNEWOBJ(tokTypeMismatchExcepCtor, 0);
@@ -1273,18 +1273,18 @@ BOOL IsImplicitInterfaceOfSZArray(MethodTable *pInterfaceMT)
     PRECONDITION(pInterfaceMT->IsInterface());
     PRECONDITION(pInterfaceMT->HasInstantiation());
 
-    // Is target interface Anything<T> in mscorlib?
+    // Is target interface Anything<T> in CoreLib?
     if (!pInterfaceMT->HasInstantiation() || !pInterfaceMT->GetModule()->IsSystem())
         return FALSE;
 
     unsigned rid = pInterfaceMT->GetTypeDefRid();
 
     // Is target interface IList<T> or one of its ancestors, or IReadOnlyList<T>?
-    return (rid == MscorlibBinder::GetExistingClass(CLASS__ILISTGENERIC)->GetTypeDefRid() ||
-            rid == MscorlibBinder::GetExistingClass(CLASS__ICOLLECTIONGENERIC)->GetTypeDefRid() ||
-            rid == MscorlibBinder::GetExistingClass(CLASS__IENUMERABLEGENERIC)->GetTypeDefRid() ||
-            rid == MscorlibBinder::GetExistingClass(CLASS__IREADONLYCOLLECTIONGENERIC)->GetTypeDefRid() ||
-            rid == MscorlibBinder::GetExistingClass(CLASS__IREADONLYLISTGENERIC)->GetTypeDefRid());
+    return (rid == CoreLibBinder::GetExistingClass(CLASS__ILISTGENERIC)->GetTypeDefRid() ||
+            rid == CoreLibBinder::GetExistingClass(CLASS__ICOLLECTIONGENERIC)->GetTypeDefRid() ||
+            rid == CoreLibBinder::GetExistingClass(CLASS__IENUMERABLEGENERIC)->GetTypeDefRid() ||
+            rid == CoreLibBinder::GetExistingClass(CLASS__IREADONLYCOLLECTIONGENERIC)->GetTypeDefRid() ||
+            rid == CoreLibBinder::GetExistingClass(CLASS__IREADONLYLISTGENERIC)->GetTypeDefRid());
 }
 
 //----------------------------------------------------------------------------------
@@ -1324,10 +1324,10 @@ MethodDesc* GetActualImplementationForArrayGenericIListOrIReadOnlyListMethod(Met
     unsigned int inheritanceDepth = pItfcMeth->GetMethodTable()->GetNumInterfaces() - 1;
     PREFIX_ASSUME(0 <= inheritanceDepth && inheritanceDepth < NumItems(startingMethod));
 
-    MethodDesc *pGenericImplementor = MscorlibBinder::GetMethod((BinderMethodID)(startingMethod[inheritanceDepth] + slot));
+    MethodDesc *pGenericImplementor = CoreLibBinder::GetMethod((BinderMethodID)(startingMethod[inheritanceDepth] + slot));
 
     // The most common reason for this assert is that the order of the SZArrayHelper methods in
-    // mscorlib.h does not match the order they are implemented on the generic interfaces.
+    // corelib.h does not match the order they are implemented on the generic interfaces.
     _ASSERTE(pGenericImplementor == MemberLoader::FindMethodByName(g_pSZArrayHelperClass, pItfcMeth->GetName()));
 
     // OPTIMIZATION: For any method other than GetEnumerator(), we can safely substitute
index 60b46cf..3ccb151 100644 (file)
@@ -45,7 +45,7 @@ FCIMPL1(Object*, AssemblyNameNative::GetFileInformation, StringObject* filenameU
     if (gc.filename->GetStringLength() == 0)
         COMPlusThrow(kArgumentException, W("Argument_EmptyFileName"));
 
-    gc.result = (ASSEMBLYNAMEREF) AllocateObject(MscorlibBinder::GetClass(CLASS__ASSEMBLY_NAME));
+    gc.result = (ASSEMBLYNAMEREF) AllocateObject(CoreLibBinder::GetClass(CLASS__ASSEMBLY_NAME));
 
 
     ///////////////////////////////////////////////
index b5701e8..f73697d 100644 (file)
@@ -170,7 +170,7 @@ Assembly* AssemblyNative::LoadFromPEImage(ICLRPrivBinder* pBinderContext, PEImag
 
     DWORD dwMessageID = IDS_EE_FILELOAD_ERROR_GENERIC;
 
-    // Set the caller's assembly to be mscorlib
+    // Set the caller's assembly to be CoreLib
     DomainAssembly *pCallersAssembly = SystemDomain::System()->SystemAssembly()->GetDomainAssembly();
     PEAssembly *pParentAssembly = pCallersAssembly->GetFile();
 
@@ -705,7 +705,7 @@ void QCALLTYPE AssemblyNative::GetModules(QCall::AssemblyHandle pAssembly, BOOL
         GCPROTECT_BEGIN(orModules);
 
         // Return the modules
-        orModules = (PTRARRAYREF)AllocateObjectArray(modules.GetCount(), MscorlibBinder::GetClass(CLASS__MODULE));
+        orModules = (PTRARRAYREF)AllocateObjectArray(modules.GetCount(), CoreLibBinder::GetClass(CLASS__MODULE));
 
         for(COUNT_T i = 0; i < modules.GetCount(); i++)
         {
@@ -889,7 +889,7 @@ void QCALLTYPE AssemblyNative::GetExportedTypes(QCall::AssemblyHandle pAssembly,
         GCPROTECT_BEGIN(orTypes);
 
         // Return the types
-        orTypes = (PTRARRAYREF)AllocateObjectArray(types.GetCount(), MscorlibBinder::GetClass(CLASS__TYPE));
+        orTypes = (PTRARRAYREF)AllocateObjectArray(types.GetCount(), CoreLibBinder::GetClass(CLASS__TYPE));
 
         for(COUNT_T i = 0; i < types.GetCount(); i++)
         {
@@ -960,7 +960,7 @@ void QCALLTYPE AssemblyNative::GetForwardedTypes(QCall::AssemblyHandle pAssembly
         GCPROTECT_BEGIN(orTypes);
 
         // Return the types
-        orTypes = (PTRARRAYREF)AllocateObjectArray(types.GetCount(), MscorlibBinder::GetClass(CLASS__TYPE));
+        orTypes = (PTRARRAYREF)AllocateObjectArray(types.GetCount(), CoreLibBinder::GetClass(CLASS__TYPE));
 
         for(COUNT_T i = 0; i < types.GetCount(); i++)
         {
@@ -1051,7 +1051,7 @@ FCIMPL1(Object*, AssemblyNative::GetReferencedAssemblies, AssemblyBaseObject * p
 
     IMDInternalImport *pImport = pAssembly->GetAssembly()->GetManifestImport();
 
-    MethodTable* pAsmNameClass = MscorlibBinder::GetClass(CLASS__ASSEMBLY_NAME);
+    MethodTable* pAsmNameClass = CoreLibBinder::GetClass(CLASS__ASSEMBLY_NAME);
 
     HENUMInternalHolder phEnum(pImport);
     DWORD dwCount = 0;
index ad035b2..946f585 100644 (file)
@@ -244,7 +244,7 @@ void AssemblySpec::InitializeSpec(PEAssembly * pFile)
     {
         // We should aways having the binding context in the PEAssembly. The only exception to this are the following:
         //
-        // 1) when we are here during EEStartup and loading mscorlib.dll.
+        // 1) when we are here during EEStartup and loading CoreLib.
         // 2) We are dealing with dynamic assemblies
         _ASSERTE((pExpectedBinder != NULL) || pFile->IsSystem() || pFile->IsDynamic());
         SetBindingContext(pExpectedBinder);
@@ -423,7 +423,7 @@ void AssemblySpec::AssemblyNameInit(ASSEMBLYNAMEREF* pAsmName, PEImage* pImageIn
     if ((m_context.usMajorVersion != (USHORT) -1) &&
         (m_context.usMinorVersion != (USHORT) -1)) {
 
-        MethodTable* pVersion = MscorlibBinder::GetClass(CLASS__VERSION);
+        MethodTable* pVersion = CoreLibBinder::GetClass(CLASS__VERSION);
 
         // version
         gc.Version = AllocateObject(pVersion);
@@ -495,7 +495,7 @@ void AssemblySpec::AssemblyNameInit(ASSEMBLYNAMEREF* pAsmName, PEImage* pImageIn
     // cultureinfo
     if (m_context.szLocale) {
 
-        MethodTable* pCI = MscorlibBinder::GetClass(CLASS__CULTURE_INFO);
+        MethodTable* pCI = CoreLibBinder::GetClass(CLASS__CULTURE_INFO);
         gc.CultureInfo = AllocateObject(pCI);
 
         gc.Locale = StringObject::NewString(m_context.szLocale);
@@ -1029,7 +1029,7 @@ AssemblySpecBindingCache::AssemblyBinding* AssemblySpecBindingCache::LookupInter
 
     // Check if the AssemblySpec already has specified its binding context. This will be set for assemblies that are
     // attempted to be explicitly bound using AssemblyLoadContext LoadFrom* methods.
-    if(!pSpec->IsAssemblySpecForMscorlib())
+    if(!pSpec->IsAssemblySpecForCoreLib())
         pBinderContextForLookup = pSpec->GetBindingContext();
     else
     {
@@ -1046,9 +1046,9 @@ AssemblySpecBindingCache::AssemblyBinding* AssemblySpecBindingCache::LookupInter
 
     if (fGetBindingContextFromParent)
     {
-        // MScorlib does not have a binding context associated with it and its lookup will only be done
+        // CoreLib does not have a binding context associated with it and its lookup will only be done
         // using its AssemblySpec hash.
-        if (!pSpec->IsAssemblySpecForMscorlib())
+        if (!pSpec->IsAssemblySpecForCoreLib())
         {
             pBinderContextForLookup = pSpec->GetBindingContextFromParentAssembly(pSpecDomain);
             pSpec->SetBindingContext(pBinderContextForLookup);
@@ -1453,7 +1453,7 @@ BOOL AssemblySpecBindingCache::StoreException(AssemblySpec *pSpec, Exception* pE
         pBinderToSaveException = pSpec->GetBindingContext();
         if (pBinderToSaveException == NULL)
         {
-            if (!pSpec->IsAssemblySpecForMscorlib())
+            if (!pSpec->IsAssemblySpecForCoreLib())
             {
                 pBinderToSaveException = pSpec->GetBindingContextFromParentAssembly(pSpec->GetAppDomain());
                 UINT_PTR binderID = 0;
index 864dd2e..5a57c0b 100644 (file)
@@ -73,7 +73,7 @@ VOID BaseAssemblySpec::CloneFieldsToStackingAllocator( StackingAllocator* alloc)
 }
 
 #ifndef DACCESS_COMPILE
-BOOL BaseAssemblySpec::IsMscorlib()
+BOOL BaseAssemblySpec::IsCoreLib()
 {
     CONTRACTL
     {
@@ -106,7 +106,7 @@ BOOL BaseAssemblySpec::IsMscorlib()
                ( (iNameLen == CoreLibNameLen) || (m_pAssemblyName[CoreLibNameLen] == ',') ) ) ) );
 }
 
-BOOL BaseAssemblySpec::IsAssemblySpecForMscorlib()
+BOOL BaseAssemblySpec::IsAssemblySpecForCoreLib()
 {
     CONTRACTL
     {
@@ -118,28 +118,28 @@ BOOL BaseAssemblySpec::IsAssemblySpecForMscorlib()
     }
     CONTRACTL_END;
 
-    BOOL fIsAssemblySpecForMscorlib = FALSE;
+    BOOL fIsAssemblySpecForCoreLib = FALSE;
 
     if (m_pAssemblyName)
     {
         size_t iNameLen = strlen(m_pAssemblyName);
-        fIsAssemblySpecForMscorlib = ( (iNameLen >= CoreLibNameLen) &&
+        fIsAssemblySpecForCoreLib = ( (iNameLen >= CoreLibNameLen) &&
                  ( (!_stricmp(m_pAssemblyName, g_psBaseLibrary)) ||
                  ( (!_strnicmp(m_pAssemblyName, g_psBaseLibraryName, CoreLibNameLen)) &&
                    ( (iNameLen == CoreLibNameLen) || (m_pAssemblyName[CoreLibNameLen] == ',') ) ) ) );
     }
 
-    return fIsAssemblySpecForMscorlib;
+    return fIsAssemblySpecForCoreLib;
 }
 
-#define MSCORLIB_PUBLICKEY g_rbTheSilverlightPlatformKey
+#define CORELIB_PUBLICKEY g_rbTheSilverlightPlatformKey
 
 
-// A satellite assembly for mscorlib is named "mscorlib.resources" or
-// mscorlib.debug.resources.dll and uses the same public key as mscorlib.
+// A satellite assembly for CoreLib is named "System.Private.CoreLib.resources" or
+// System.Private.CoreLib.debug.resources.dll and uses the same public key as CoreLib.
 // It does not necessarily have the same version, and the Culture will
 // always be set to something like "jp-JP".
-BOOL BaseAssemblySpec::IsMscorlibSatellite() const
+BOOL BaseAssemblySpec::IsCoreLibSatellite() const
 {
     CONTRACTL
     {
@@ -168,13 +168,13 @@ BOOL BaseAssemblySpec::IsMscorlibSatellite() const
     // <TODO>More of bug 213471</TODO>
     size_t iNameLen = strlen(m_pAssemblyName);
 
-    // we allow name to be of the form mscorlib.resources.dll only
-    BOOL r = ( (m_cbPublicKeyOrToken == sizeof(MSCORLIB_PUBLICKEY)) &&
+    // we allow name to be of the form System.Private.CoreLib.resources.dll only
+    BOOL r = ( (m_cbPublicKeyOrToken == sizeof(CORELIB_PUBLICKEY)) &&
              (iNameLen >= CoreLibSatelliteNameLen) &&
              (!SString::_strnicmp(m_pAssemblyName, g_psBaseLibrarySatelliteAssemblyName, CoreLibSatelliteNameLen)) &&
              ( (iNameLen == CoreLibSatelliteNameLen) || (m_pAssemblyName[CoreLibSatelliteNameLen] == ',') ) );
 
-    r = r && ( memcmp(m_pbPublicKeyOrToken,MSCORLIB_PUBLICKEY,sizeof(MSCORLIB_PUBLICKEY)) == 0);
+    r = r && ( memcmp(m_pbPublicKeyOrToken,CORELIB_PUBLICKEY,sizeof(CORELIB_PUBLICKEY)) == 0);
 
     return r;
 }
index 180ce86..150368c 100644 (file)
@@ -79,7 +79,7 @@ public:
         return m_pBindingContext;
     }
 
-    BOOL IsAssemblySpecForMscorlib();
+    BOOL IsAssemblySpecForCoreLib();
 
     HRESULT ParseName();
     DWORD Hash();
@@ -106,8 +106,8 @@ public:
     BOOL IsStrongNamed() const;
     BOOL HasPublicKey() const;
     BOOL HasPublicKeyToken() const;
-    BOOL IsMscorlibSatellite() const;
-    BOOL IsMscorlib();
+    BOOL IsCoreLibSatellite() const;
+    BOOL IsCoreLib();
 
     // Returns true
     inline BOOL HasUniqueIdentity() const
index 5a67595..5e1496b 100644 (file)
@@ -320,7 +320,7 @@ inline BOOL BaseAssemblySpec::CompareEx(BaseAssemblySpec *pSpec, DWORD dwCompare
 
 
     // If the assemblySpec contains the binding context, then check if they match.
-    if (!(pSpec->IsAssemblySpecForMscorlib() && IsAssemblySpecForMscorlib()))
+    if (!(pSpec->IsAssemblySpecForCoreLib() && IsAssemblySpecForCoreLib()))
     {
         if (!AreSameBinderInstance(pSpec->m_pBindingContext, m_pBindingContext))
         {
index bef7b47..3dbd866 100644 (file)
 //
 // Retrieve structures from ID.
 //
-NOINLINE PTR_MethodTable MscorlibBinder::LookupClass(BinderClassID id)
+NOINLINE PTR_MethodTable CoreLibBinder::LookupClass(BinderClassID id)
 {
     WRAPPER_NO_CONTRACT;
-    return (&g_Mscorlib)->LookupClassLocal(id);
+    return (&g_CoreLib)->LookupClassLocal(id);
 }
 
-PTR_MethodTable MscorlibBinder::GetClassLocal(BinderClassID id)
+PTR_MethodTable CoreLibBinder::GetClassLocal(BinderClassID id)
 {
     WRAPPER_NO_CONTRACT;
 
@@ -44,7 +44,7 @@ PTR_MethodTable MscorlibBinder::GetClassLocal(BinderClassID id)
     return pMT;
 }
 
-PTR_MethodTable MscorlibBinder::LookupClassLocal(BinderClassID id)
+PTR_MethodTable CoreLibBinder::LookupClassLocal(BinderClassID id)
 {
     CONTRACTL
     {
@@ -59,11 +59,11 @@ PTR_MethodTable MscorlibBinder::LookupClassLocal(BinderClassID id)
 
     PTR_MethodTable pMT = NULL;
 
-    // Binder methods are used for loading "known" types from mscorlib.dll. Thus they are unlikely to be part
+    // Binder methods are used for loading "known" types. Thus they are unlikely to be part
     // of a recursive cycle. This is used too broadly to force manual overrides at every callsite.
     OVERRIDE_TYPE_LOAD_LEVEL_LIMIT(CLASS_LOADED);
 
-    const MscorlibClassDescription *d = m_classDescriptions + (int)id;
+    const CoreLibClassDescription *d = m_classDescriptions + (int)id;
 
     pMT = ClassLoader::LoadTypeByNameThrowing(GetModule()->GetAssembly(), d->nameSpace, d->name).AsMethodTable();
 
@@ -76,13 +76,13 @@ PTR_MethodTable MscorlibBinder::LookupClassLocal(BinderClassID id)
     return pMT;
 }
 
-NOINLINE MethodDesc * MscorlibBinder::LookupMethod(BinderMethodID id)
+NOINLINE MethodDesc * CoreLibBinder::LookupMethod(BinderMethodID id)
 {
     WRAPPER_NO_CONTRACT;
-    return (&g_Mscorlib)->LookupMethodLocal(id);
+    return (&g_CoreLib)->LookupMethodLocal(id);
 }
 
-MethodDesc * MscorlibBinder::GetMethodLocal(BinderMethodID id)
+MethodDesc * CoreLibBinder::GetMethodLocal(BinderMethodID id)
 {
     WRAPPER_NO_CONTRACT;
 
@@ -92,7 +92,7 @@ MethodDesc * MscorlibBinder::GetMethodLocal(BinderMethodID id)
     return pMD;
 }
 
-MethodDesc * MscorlibBinder::LookupMethodLocal(BinderMethodID id)
+MethodDesc * CoreLibBinder::LookupMethodLocal(BinderMethodID id)
 {
     CONTRACTL
     {
@@ -108,10 +108,10 @@ MethodDesc * MscorlibBinder::LookupMethodLocal(BinderMethodID id)
 #ifndef DACCESS_COMPILE
     MethodDesc * pMD = NULL;
 
-    const MscorlibMethodDescription *d = m_methodDescriptions + (id - 1);
+    const CoreLibMethodDescription *d = m_methodDescriptions + (id - 1);
 
     MethodTable * pMT = GetClassLocal(d->classID);
-    _ASSERTE(pMT != NULL && "Couldn't find a type in mscorlib!");
+    _ASSERTE(pMT != NULL && "Couldn't find a type in System.Private.CoreLib!");
 
     if (d->sig != NULL)
     {
@@ -136,13 +136,13 @@ MethodDesc * MscorlibBinder::LookupMethodLocal(BinderMethodID id)
 #endif
 }
 
-NOINLINE FieldDesc * MscorlibBinder::LookupField(BinderFieldID id)
+NOINLINE FieldDesc * CoreLibBinder::LookupField(BinderFieldID id)
 {
     WRAPPER_NO_CONTRACT;
-    return (&g_Mscorlib)->LookupFieldLocal(id);
+    return (&g_CoreLib)->LookupFieldLocal(id);
 }
 
-FieldDesc * MscorlibBinder::GetFieldLocal(BinderFieldID id)
+FieldDesc * CoreLibBinder::GetFieldLocal(BinderFieldID id)
 {
     WRAPPER_NO_CONTRACT;
 
@@ -152,7 +152,7 @@ FieldDesc * MscorlibBinder::GetFieldLocal(BinderFieldID id)
     return pFD;
 }
 
-FieldDesc * MscorlibBinder::LookupFieldLocal(BinderFieldID id)
+FieldDesc * CoreLibBinder::LookupFieldLocal(BinderFieldID id)
 {
     CONTRACTL
     {
@@ -167,7 +167,7 @@ FieldDesc * MscorlibBinder::LookupFieldLocal(BinderFieldID id)
 
     FieldDesc * pFD = NULL;
 
-    const MscorlibFieldDescription *d = m_fieldDescriptions + (id - 1);
+    const CoreLibFieldDescription *d = m_fieldDescriptions + (id - 1);
 
     MethodTable * pMT = GetClassLocal(d->classID);
 
@@ -182,7 +182,7 @@ FieldDesc * MscorlibBinder::LookupFieldLocal(BinderFieldID id)
     return pFD;
 }
 
-NOINLINE PTR_MethodTable MscorlibBinder::LookupClassIfExist(BinderClassID id)
+NOINLINE PTR_MethodTable CoreLibBinder::LookupClassIfExist(BinderClassID id)
 {
     CONTRACTL
     {
@@ -192,18 +192,18 @@ NOINLINE PTR_MethodTable MscorlibBinder::LookupClassIfExist(BinderClassID id)
         MODE_ANY;
 
         PRECONDITION(id != CLASS__NIL);
-        PRECONDITION(id <= (&g_Mscorlib)->m_cClasses);
+        PRECONDITION(id <= (&g_CoreLib)->m_cClasses);
     }
     CONTRACTL_END;
 
     // Run the class loader in non-load mode.
     ENABLE_FORBID_GC_LOADER_USE_IN_THIS_SCOPE();
 
-    // Binder methods are used for loading "known" types from mscorlib.dll. Thus they are unlikely to be part
+    // Binder methods are used for loading "known" types. Thus they are unlikely to be part
     // of a recursive cycle. This is used too broadly to force manual overrides at every callsite.
     OVERRIDE_TYPE_LOAD_LEVEL_LIMIT(CLASS_LOADED);
 
-    const MscorlibClassDescription *d = (&g_Mscorlib)->m_classDescriptions + (int)id;
+    const CoreLibClassDescription *d = (&g_CoreLib)->m_classDescriptions + (int)id;
 
     PTR_MethodTable pMT = ClassLoader::LoadTypeByNameThrowing(GetModule()->GetAssembly(), d->nameSpace, d->name,
         ClassLoader::ReturnNullIfNotFound, ClassLoader::DontLoadTypes, CLASS_LOAD_UNRESTOREDTYPEKEY).AsMethodTable();
@@ -212,13 +212,13 @@ NOINLINE PTR_MethodTable MscorlibBinder::LookupClassIfExist(BinderClassID id)
 
 #ifndef DACCESS_COMPILE
     if ((pMT != NULL) && pMT->IsFullyLoaded())
-        VolatileStore(&(g_Mscorlib.m_pClasses[id]), pMT);
+        VolatileStore(&(g_CoreLib.m_pClasses[id]), pMT);
 #endif
 
     return pMT;
 }
 
-Signature MscorlibBinder::GetSignature(LPHARDCODEDMETASIG pHardcodedSig)
+Signature CoreLibBinder::GetSignature(LPHARDCODEDMETASIG pHardcodedSig)
 {
     CONTRACTL
     {
@@ -245,10 +245,10 @@ Signature MscorlibBinder::GetSignature(LPHARDCODEDMETASIG pHardcodedSig)
     }
 #endif
 
-    return (&g_Mscorlib)->GetSignatureLocal(pHardcodedSig);
+    return (&g_CoreLib)->GetSignatureLocal(pHardcodedSig);
 }
 
-Signature MscorlibBinder::GetTargetSignature(LPHARDCODEDMETASIG pHardcodedSig)
+Signature CoreLibBinder::GetTargetSignature(LPHARDCODEDMETASIG pHardcodedSig)
 {
     CONTRACTL
     {
@@ -262,12 +262,12 @@ Signature MscorlibBinder::GetTargetSignature(LPHARDCODEDMETASIG pHardcodedSig)
 #ifdef CROSSGEN_COMPILE
     return GetModule()->m_pBinder->GetSignatureLocal(pHardcodedSig);
 #else
-    return (&g_Mscorlib)->GetSignatureLocal(pHardcodedSig);
+    return (&g_CoreLib)->GetSignatureLocal(pHardcodedSig);
 #endif
 }
 
 // Get the metasig, do a one-time conversion if necessary
-Signature MscorlibBinder::GetSignatureLocal(LPHARDCODEDMETASIG pHardcodedSig)
+Signature CoreLibBinder::GetSignatureLocal(LPHARDCODEDMETASIG pHardcodedSig)
 {
     CONTRACTL
     {
@@ -311,7 +311,7 @@ Signature MscorlibBinder::GetSignatureLocal(LPHARDCODEDMETASIG pHardcodedSig)
 
 #ifndef DACCESS_COMPILE
 
-bool MscorlibBinder::ConvertType(const BYTE*& pSig, SigBuilder * pSigBuilder)
+bool CoreLibBinder::ConvertType(const BYTE*& pSig, SigBuilder * pSigBuilder)
 {
     bool bSomethingResolved = false;
 
@@ -389,7 +389,7 @@ Again:
 // Resolve type references in the hardcoded metasig.
 // Returns a new signature with type refences resolved.
 //------------------------------------------------------------------
-void MscorlibBinder::BuildConvertedSignature(const BYTE* pSig, SigBuilder * pSigBuilder)
+void CoreLibBinder::BuildConvertedSignature(const BYTE* pSig, SigBuilder * pSigBuilder)
 {
     CONTRACTL
     {
@@ -427,7 +427,7 @@ void MscorlibBinder::BuildConvertedSignature(const BYTE* pSig, SigBuilder * pSig
     _ASSERTE(bSomethingResolved);
 }
 
-const BYTE* MscorlibBinder::ConvertSignature(LPHARDCODEDMETASIG pHardcodedSig, const BYTE* pSig)
+const BYTE* CoreLibBinder::ConvertSignature(LPHARDCODEDMETASIG pHardcodedSig, const BYTE* pSig)
 {
     CONTRACTL
     {
@@ -469,7 +469,7 @@ const BYTE* MscorlibBinder::ConvertSignature(LPHARDCODEDMETASIG pHardcodedSig, c
 #endif // #ifndef DACCESS_COMPILE
 
 #ifdef _DEBUG
-void MscorlibBinder::TriggerGCUnderStress()
+void CoreLibBinder::TriggerGCUnderStress()
 {
     CONTRACTL
     {
@@ -498,7 +498,7 @@ void MscorlibBinder::TriggerGCUnderStress()
 }
 #endif // _DEBUG
 
-DWORD MscorlibBinder::GetFieldOffset(BinderFieldID id)
+DWORD CoreLibBinder::GetFieldOffset(BinderFieldID id)
 {
     WRAPPER_NO_CONTRACT;
 
@@ -507,10 +507,10 @@ DWORD MscorlibBinder::GetFieldOffset(BinderFieldID id)
 
 #ifndef DACCESS_COMPILE
 
-CrstStatic MscorlibBinder::s_SigConvertCrst;
+CrstStatic CoreLibBinder::s_SigConvertCrst;
 
 /*static*/
-void MscorlibBinder::Startup()
+void CoreLibBinder::Startup()
 {
     WRAPPER_NO_CONTRACT
     s_SigConvertCrst.Init(CrstSigConvert);
@@ -521,20 +521,20 @@ void MscorlibBinder::Startup()
 // NoClass is used to suppress check for unmanaged and managed size match
 #define NoClass char[USHRT_MAX]
 
-const MscorlibBinder::OffsetAndSizeCheck MscorlibBinder::OffsetsAndSizes[] =
+const CoreLibBinder::OffsetAndSizeCheck CoreLibBinder::OffsetsAndSizes[] =
 {
     #define DEFINE_CLASS_U(nameSpace, stringName, unmanagedType) \
         { PTR_CSTR((TADDR) g_ ## nameSpace ## NS ), PTR_CUTF8((TADDR) # stringName), sizeof(unmanagedType), 0, 0, 0 },
 
     #define DEFINE_FIELD_U(stringName, unmanagedContainingType, unmanagedOffset) \
         { 0, 0, 0, PTR_CUTF8((TADDR) # stringName), offsetof(unmanagedContainingType, unmanagedOffset), sizeof(((unmanagedContainingType*)1)->unmanagedOffset) },
-    #include "mscorlib.h"
+    #include "corelib.h"
 };
 
 //
-// check the basic consistency between mscorlib and mscorwks
+// check the basic consistency between CoreLib and VM
 //
-void MscorlibBinder::Check()
+void CoreLibBinder::Check()
 {
     STANDARD_VM_CONTRACT;
 
@@ -566,7 +566,7 @@ void MscorlibBinder::Check()
         else
         if (p->fieldName != NULL)
         {
-            // This assert will fire if there is DEFINE_FIELD_U macro without preceeding DEFINE_CLASS_U macro in mscorlib.h
+            // This assert will fire if there is DEFINE_FIELD_U macro without preceeding DEFINE_CLASS_U macro in corelib.h
             _ASSERTE(pMT != NULL);
 
             FieldDesc * pFD = MemberLoader::FindField(pMT, p->fieldName, NULL, 0, NULL);
@@ -876,32 +876,32 @@ static void FCallCheckSignature(MethodDesc* pMD, PCODE pImpl)
 #endif // CHECK_FCALL_SIGNATURE
 
 //
-// extended check of consistency between mscorlib and mscorwks:
-//  - verifies that all references from mscorlib to mscorwks are present
-//  - verifies that all references from mscorwks to mscorlib are present
+// extended check of consistency between CoreLib and VM:
+//  - verifies that all references from CoreLib to VM are present
+//  - verifies that all references from VM to CoreLib are present
 //  - limited detection of mismatches between managed and unmanaged fcall signatures
 //
-void MscorlibBinder::CheckExtended()
+void CoreLibBinder::CheckExtended()
 {
     STANDARD_VM_CONTRACT;
 
-    // check the consistency of BCL and VM
+    // check the consistency of CoreLib and VM
     // note: it is not enabled by default because of it is time consuming and
     // changes the bootstrap sequence of the EE
     if (!CLRConfig::GetConfigValue(CLRConfig::INTERNAL_ConsistencyCheck))
         return;
 
     //
-    // VM referencing BCL (mscorlib.h)
+    // VM referencing CoreLib (corelib.h)
     //
     for (BinderClassID cID = (BinderClassID) 1; (int)cID < m_cClasses; cID = (BinderClassID) (cID + 1))
     {
         bool fError = false;
         EX_TRY
         {
-            if (MscorlibBinder::GetClassName(cID) != NULL) // Allow for CorSigElement entries with no classes
+            if (CoreLibBinder::GetClassName(cID) != NULL) // Allow for CorSigElement entries with no classes
             {
-                if (NULL == MscorlibBinder::GetClass(cID))
+                if (NULL == CoreLibBinder::GetClass(cID))
                 {
                     fError = true;
                 }
@@ -915,17 +915,17 @@ void MscorlibBinder::CheckExtended()
 
         if (fError)
         {
-            printf("CheckExtended: VM expects type to exist:  %s.%s\n", MscorlibBinder::GetClassNameSpace(cID), MscorlibBinder::GetClassName(cID));
+            printf("CheckExtended: VM expects type to exist:  %s.%s\n", CoreLibBinder::GetClassNameSpace(cID), CoreLibBinder::GetClassName(cID));
         }
     }
 
-    for (BinderMethodID mID = (BinderMethodID) 1; mID < (BinderMethodID) MscorlibBinder::m_cMethods; mID = (BinderMethodID) (mID + 1))
+    for (BinderMethodID mID = (BinderMethodID) 1; mID < (BinderMethodID) CoreLibBinder::m_cMethods; mID = (BinderMethodID) (mID + 1))
     {
         bool fError = false;
         BinderClassID cID = m_methodDescriptions[mID-1].classID;
         EX_TRY
         {
-            if (NULL == MscorlibBinder::GetMethod(mID))
+            if (NULL == CoreLibBinder::GetMethod(mID))
             {
                 fError = true;
             }
@@ -938,17 +938,17 @@ void MscorlibBinder::CheckExtended()
 
         if (fError)
         {
-            printf("CheckExtended: VM expects method to exist:  %s.%s::%s\n", MscorlibBinder::GetClassNameSpace(cID), MscorlibBinder::GetClassName(cID), MscorlibBinder::GetMethodName(mID));
+            printf("CheckExtended: VM expects method to exist:  %s.%s::%s\n", CoreLibBinder::GetClassNameSpace(cID), CoreLibBinder::GetClassName(cID), CoreLibBinder::GetMethodName(mID));
         }
     }
 
-    for (BinderFieldID fID = (BinderFieldID) 1; fID < (BinderFieldID) MscorlibBinder::m_cFields; fID = (BinderFieldID) (fID + 1))
+    for (BinderFieldID fID = (BinderFieldID) 1; fID < (BinderFieldID) CoreLibBinder::m_cFields; fID = (BinderFieldID) (fID + 1))
     {
         bool fError = false;
         BinderClassID cID = m_fieldDescriptions[fID-1].classID;
         EX_TRY
         {
-            if (NULL == MscorlibBinder::GetField(fID))
+            if (NULL == CoreLibBinder::GetField(fID))
             {
                 fError = true;
             }
@@ -961,17 +961,17 @@ void MscorlibBinder::CheckExtended()
 
         if (fError)
         {
-            printf("CheckExtended: VM expects field to exist:  %s.%s::%s\n", MscorlibBinder::GetClassNameSpace(cID), MscorlibBinder::GetClassName(cID), MscorlibBinder::GetFieldName(fID));
+            printf("CheckExtended: VM expects field to exist:  %s.%s::%s\n", CoreLibBinder::GetClassNameSpace(cID), CoreLibBinder::GetClassName(cID), CoreLibBinder::GetFieldName(fID));
         }
     }
 
     //
-    // BCL referencing VM (ecall.cpp)
+    // CoreLib referencing VM (ecalllist.h)
     //
     SetSHash<DWORD> usedECallIds;
 
     HRESULT hr = S_OK;
-    Module *pModule = MscorlibBinder::m_pModule;
+    Module *pModule = CoreLibBinder::m_pModule;
     IMDInternalImport *pInternalImport = pModule->GetMDImport();
 
     HENUMInternal hEnum;
@@ -1014,7 +1014,7 @@ void MscorlibBinder::CheckExtended()
             {
                 pszClassName = pszNameSpace = "Invalid TypeDef record";
             }
-            printf("CheckExtended: Unable to load class from mscorlib: %s.%s\n", pszNameSpace, pszClassName);
+            printf("CheckExtended: Unable to load class from System.Private.CoreLib: %s.%s\n", pszNameSpace, pszClassName);
         }
         EX_END_CATCH(SwallowAllExceptions)
 
@@ -1099,7 +1099,7 @@ void MscorlibBinder::CheckExtended()
 #define ASMCONSTANTS_RUNTIME_ASSERT(cond) _ASSERTE(cond)
 #include "asmconstants.h"
 
-    _ASSERTE(sizeof(VARIANT) == MscorlibBinder::GetClass(CLASS__NATIVEVARIANT)->GetNativeSize());
+    _ASSERTE(sizeof(VARIANT) == CoreLibBinder::GetClass(CLASS__NATIVEVARIANT)->GetNativeSize());
 
     printf("CheckExtended: completed without exception.\n");
 
@@ -1109,45 +1109,45 @@ ErrExit:
 
 #endif // _DEBUG && !CROSSGEN_COMPILE
 
-extern const MscorlibClassDescription c_rgMscorlibClassDescriptions[];
-extern const USHORT c_nMscorlibClassDescriptions;
+extern const CoreLibClassDescription c_rgCoreLibClassDescriptions[];
+extern const USHORT c_nCoreLibClassDescriptions;
 
-extern const MscorlibMethodDescription c_rgMscorlibMethodDescriptions[];
-extern const USHORT c_nMscorlibMethodDescriptions;
+extern const CoreLibMethodDescription c_rgCoreLibMethodDescriptions[];
+extern const USHORT c_nCoreLibMethodDescriptions;
 
-extern const MscorlibFieldDescription c_rgMscorlibFieldDescriptions[];
-extern const USHORT c_nMscorlibFieldDescriptions;
+extern const CoreLibFieldDescription c_rgCoreLibFieldDescriptions[];
+extern const USHORT c_nCoreLibFieldDescriptions;
 
 #ifdef CROSSGEN_COMPILE
-namespace CrossGenMscorlib
+namespace CrossGenCoreLib
 {
-    extern const MscorlibClassDescription c_rgMscorlibClassDescriptions[];
-    extern const USHORT c_nMscorlibClassDescriptions;
+    extern const CoreLibClassDescription c_rgCoreLibClassDescriptions[];
+    extern const USHORT c_nCoreLibClassDescriptions;
 
-    extern const MscorlibMethodDescription c_rgMscorlibMethodDescriptions[];
-    extern const USHORT c_nMscorlibMethodDescriptions;
+    extern const CoreLibMethodDescription c_rgCoreLibMethodDescriptions[];
+    extern const USHORT c_nCoreLibMethodDescriptions;
 
-    extern const MscorlibFieldDescription c_rgMscorlibFieldDescriptions[];
-    extern const USHORT c_nMscorlibFieldDescriptions;
+    extern const CoreLibFieldDescription c_rgCoreLibFieldDescriptions[];
+    extern const USHORT c_nCoreLibFieldDescriptions;
 };
 #endif
 
-void MscorlibBinder::AttachModule(Module * pModule)
+void CoreLibBinder::AttachModule(Module * pModule)
 {
     STANDARD_VM_CONTRACT;
 
-    MscorlibBinder * pGlobalBinder = &g_Mscorlib;
+    CoreLibBinder * pGlobalBinder = &g_CoreLib;
 
     pGlobalBinder->SetDescriptions(pModule,
-        c_rgMscorlibClassDescriptions,  c_nMscorlibClassDescriptions,
-        c_rgMscorlibMethodDescriptions, c_nMscorlibMethodDescriptions,
-        c_rgMscorlibFieldDescriptions,  c_nMscorlibFieldDescriptions);
+        c_rgCoreLibClassDescriptions,  c_nCoreLibClassDescriptions,
+        c_rgCoreLibMethodDescriptions, c_nCoreLibMethodDescriptions,
+        c_rgCoreLibFieldDescriptions,  c_nCoreLibFieldDescriptions);
 
 #if defined(FEATURE_PREJIT) && !defined(CROSSGEN_COMPILE)
-    MscorlibBinder * pPersistedBinder = pModule->m_pBinder;
+    CoreLibBinder * pPersistedBinder = pModule->m_pBinder;
 
     if (pPersistedBinder != NULL
-        // Do not use persisted binder for profiling native images. See comment in code:MscorlibBinder::Fixup.
+        // Do not use persisted binder for profiling native images. See comment in code:CoreLibBinder::Fixup.
         && !(pModule->GetNativeImage()->GetNativeVersionInfo()->wConfigFlags  & CORCOMPILE_CONFIG_PROFILING))
     {
         pGlobalBinder->m_pClasses = pPersistedBinder->m_pClasses;
@@ -1162,14 +1162,14 @@ void MscorlibBinder::AttachModule(Module * pModule)
     pGlobalBinder->AllocateTables();
 
 #ifdef CROSSGEN_COMPILE
-    MscorlibBinder * pTargetBinder = (MscorlibBinder *)(void *)
+    CoreLibBinder * pTargetBinder = (CoreLibBinder *)(void *)
         pModule->GetAssembly()->GetLowFrequencyHeap()
-            ->AllocMem(S_SIZE_T(sizeof(MscorlibBinder)));
+            ->AllocMem(S_SIZE_T(sizeof(CoreLibBinder)));
 
     pTargetBinder->SetDescriptions(pModule,
-        CrossGenMscorlib::c_rgMscorlibClassDescriptions,  CrossGenMscorlib::c_nMscorlibClassDescriptions,
-        CrossGenMscorlib::c_rgMscorlibMethodDescriptions, CrossGenMscorlib::c_nMscorlibMethodDescriptions,
-        CrossGenMscorlib::c_rgMscorlibFieldDescriptions,  CrossGenMscorlib::c_nMscorlibFieldDescriptions);
+        CrossGenCoreLib::c_rgCoreLibClassDescriptions,  CrossGenCoreLib::c_nCoreLibClassDescriptions,
+        CrossGenCoreLib::c_rgCoreLibMethodDescriptions, CrossGenCoreLib::c_nCoreLibMethodDescriptions,
+        CrossGenCoreLib::c_rgCoreLibFieldDescriptions,  CrossGenCoreLib::c_nCoreLibFieldDescriptions);
 
     pTargetBinder->AllocateTables();
 
@@ -1179,10 +1179,10 @@ void MscorlibBinder::AttachModule(Module * pModule)
 #endif
 }
 
-void MscorlibBinder::SetDescriptions(Module * pModule,
-    const MscorlibClassDescription * pClassDescriptions, USHORT nClasses,
-    const MscorlibMethodDescription * pMethodDescriptions, USHORT nMethods,
-    const MscorlibFieldDescription * pFieldDescriptions, USHORT nFields)
+void CoreLibBinder::SetDescriptions(Module * pModule,
+    const CoreLibClassDescription * pClassDescriptions, USHORT nClasses,
+    const CoreLibMethodDescription * pMethodDescriptions, USHORT nMethods,
+    const CoreLibFieldDescription * pFieldDescriptions, USHORT nFields)
 {
     LIMITED_METHOD_CONTRACT;
 
@@ -1198,7 +1198,7 @@ void MscorlibBinder::SetDescriptions(Module * pModule,
     m_cFields = nFields;
 }
 
-void MscorlibBinder::AllocateTables()
+void CoreLibBinder::AllocateTables()
 {
     STANDARD_VM_CONTRACT;
 
@@ -1220,20 +1220,20 @@ void MscorlibBinder::AllocateTables()
     // ZeroMemory(m_pFields, m_cFieldRIDs * sizeof(*m_pFields));
 }
 
-PTR_MethodTable MscorlibBinder::LoadPrimitiveType(CorElementType et)
+PTR_MethodTable CoreLibBinder::LoadPrimitiveType(CorElementType et)
 {
     STANDARD_VM_CONTRACT;
 
-    PTR_MethodTable pMT = g_Mscorlib.m_pClasses[et];
+    PTR_MethodTable pMT = g_CoreLib.m_pClasses[et];
 
     // Primitive types hit cyclic reference on binder during type loading so we have to load them in two steps
     if (pMT == NULL)
     {
-        const MscorlibClassDescription *d = (&g_Mscorlib)->m_classDescriptions + (int)et;
+        const CoreLibClassDescription *d = (&g_CoreLib)->m_classDescriptions + (int)et;
 
         pMT = ClassLoader::LoadTypeByNameThrowing(GetModule()->GetAssembly(), d->nameSpace, d->name,
             ClassLoader::ThrowIfNotFound, ClassLoader::LoadTypes, CLASS_LOAD_APPROXPARENTS).AsMethodTable();
-        g_Mscorlib.m_pClasses[et] = pMT;
+        g_CoreLib.m_pClasses[et] = pMT;
 
         ClassLoader::EnsureLoaded(pMT);
     }
@@ -1242,7 +1242,7 @@ PTR_MethodTable MscorlibBinder::LoadPrimitiveType(CorElementType et)
 }
 
 #ifdef FEATURE_NATIVE_IMAGE_GENERATION
-void MscorlibBinder::BindAll()
+void CoreLibBinder::BindAll()
 {
     STANDARD_VM_CONTRACT;
 
@@ -1259,11 +1259,11 @@ void MscorlibBinder::BindAll()
         GetFieldLocal(fID);
 }
 
-void MscorlibBinder::Save(DataImage *image)
+void CoreLibBinder::Save(DataImage *image)
 {
     STANDARD_VM_CONTRACT;
 
-    image->StoreStructure(this, sizeof(MscorlibBinder),
+    image->StoreStructure(this, sizeof(CoreLibBinder),
                           DataImage::ITEM_BINDER);
 
     image->StoreStructure(m_pClasses, m_cClasses * sizeof(*m_pClasses),
@@ -1276,15 +1276,15 @@ void MscorlibBinder::Save(DataImage *image)
                           DataImage::ITEM_BINDER_ITEMS);
 }
 
-void MscorlibBinder::Fixup(DataImage *image)
+void CoreLibBinder::Fixup(DataImage *image)
 {
     STANDARD_VM_CONTRACT;
 
-    image->FixupPointerField(this, offsetof(MscorlibBinder, m_pModule));
+    image->FixupPointerField(this, offsetof(CoreLibBinder, m_pModule));
 
     int i;
 
-    image->FixupPointerField(this, offsetof(MscorlibBinder, m_pClasses));
+    image->FixupPointerField(this, offsetof(CoreLibBinder, m_pClasses));
     for (i = 1; i < m_cClasses; i++)
     {
 #if _DEBUG
@@ -1304,7 +1304,7 @@ void MscorlibBinder::Fixup(DataImage *image)
         image->FixupPointerField(m_pClasses, i * sizeof(m_pClasses[0]));
     }
 
-    image->FixupPointerField(this, offsetof(MscorlibBinder, m_pMethods));
+    image->FixupPointerField(this, offsetof(CoreLibBinder, m_pMethods));
     for (i = 1; i < m_cMethods; i++)
     {
 #if _DEBUG
@@ -1318,15 +1318,15 @@ void MscorlibBinder::Fixup(DataImage *image)
         image->FixupPointerField(m_pMethods, i * sizeof(m_pMethods[0]));
     }
 
-    image->FixupPointerField(this, offsetof(MscorlibBinder, m_pFields));
+    image->FixupPointerField(this, offsetof(CoreLibBinder, m_pFields));
     for (i = 1; i < m_cFields; i++)
     {
         image->FixupPointerField(m_pFields, i * sizeof(m_pFields[0]));
     }
 
-    image->ZeroPointerField(this, offsetof(MscorlibBinder, m_classDescriptions));
-    image->ZeroPointerField(this, offsetof(MscorlibBinder, m_methodDescriptions));
-    image->ZeroPointerField(this, offsetof(MscorlibBinder, m_fieldDescriptions));
+    image->ZeroPointerField(this, offsetof(CoreLibBinder, m_classDescriptions));
+    image->ZeroPointerField(this, offsetof(CoreLibBinder, m_methodDescriptions));
+    image->ZeroPointerField(this, offsetof(CoreLibBinder, m_fieldDescriptions));
 }
 #endif // FEATURE_NATIVE_IMAGE_GENERATION
 
@@ -1335,17 +1335,17 @@ void MscorlibBinder::Fixup(DataImage *image)
 #ifdef DACCESS_COMPILE
 
 void
-MscorlibBinder::EnumMemoryRegions(CLRDataEnumMemoryFlags flags)
+CoreLibBinder::EnumMemoryRegions(CLRDataEnumMemoryFlags flags)
 {
     SUPPORTS_DAC;
     DAC_ENUM_DTHIS();
 
     DacEnumMemoryRegion(dac_cast<TADDR>(m_classDescriptions),
-                        m_cClasses * sizeof(MscorlibClassDescription));
+                        m_cClasses * sizeof(CoreLibClassDescription));
     DacEnumMemoryRegion(dac_cast<TADDR>(m_methodDescriptions),
-                        (m_cMethods - 1) * sizeof(MscorlibMethodDescription));
+                        (m_cMethods - 1) * sizeof(CoreLibMethodDescription));
     DacEnumMemoryRegion(dac_cast<TADDR>(m_fieldDescriptions),
-                        (m_cFields - 1) * sizeof(MscorlibFieldDescription));
+                        (m_cFields - 1) * sizeof(CoreLibFieldDescription));
 
     if (m_pModule.IsValid())
     {
@@ -1362,4 +1362,4 @@ MscorlibBinder::EnumMemoryRegions(CLRDataEnumMemoryFlags flags)
 
 #endif // #ifdef DACCESS_COMPILE
 
-GVAL_IMPL(MscorlibBinder, g_Mscorlib);
+GVAL_IMPL(CoreLibBinder, g_CoreLib);
index 24db64e..4ff115d 100644 (file)
@@ -33,7 +33,7 @@ struct HardCodedMetaSig
 // Use the Binder objects to avoid doing unnecessary name lookup
 // (esp. in the prejit case)
 //
-// E.g. MscorlibBinder::GetClass(CLASS__APP_DOMAIN);
+// E.g. CoreLibBinder::GetClass(CLASS__APP_DOMAIN);
 //
 
 // BinderClassIDs are of the form CLASS__XXX
@@ -45,9 +45,9 @@ enum BinderClassID
 #undef TYPEINFO
 
 #define DEFINE_CLASS(i,n,s)         CLASS__ ## i,
-#include "mscorlib.h"
+#include "corelib.h"
 
-    CLASS__MSCORLIB_COUNT,
+    CLASS__CORELIB_COUNT,
 
     // Aliases for element type classids
     CLASS__NIL      = CLASS__ELEMENT_TYPE_END,
@@ -80,9 +80,9 @@ enum BinderMethodID : int
     METHOD__NIL = 0,
 
 #define DEFINE_METHOD(c,i,s,g)      METHOD__ ## c ## __ ## i,
-#include "mscorlib.h"
+#include "corelib.h"
 
-    METHOD__MSCORLIB_COUNT,
+    METHOD__CORELIB_COUNT,
 };
 
 // BinderFieldIDs are of the form FIELD__XXX__YYY,
@@ -93,31 +93,31 @@ enum BinderFieldID
     FIELD__NIL = 0,
 
 #define DEFINE_FIELD(c,i,s)                 FIELD__ ## c ## __ ## i,
-#include "mscorlib.h"
+#include "corelib.h"
 
-    FIELD__MSCORLIB_COUNT,
+    FIELD__CORELIB_COUNT,
 };
 
-struct MscorlibClassDescription
+struct CoreLibClassDescription
 {
     PTR_CSTR nameSpace;
     PTR_CSTR name;
 };
 
-struct MscorlibMethodDescription
+struct CoreLibMethodDescription
 {
     BinderClassID classID;
     PTR_CSTR name;
     PTR_HARDCODEDMETASIG sig;
 };
 
-struct MscorlibFieldDescription
+struct CoreLibFieldDescription
 {
     BinderClassID classID;
     PTR_CSTR name;
 };
 
-class MscorlibBinder
+class CoreLibBinder
 {
   public:
 #ifdef DACCESS_COMPILE
@@ -134,7 +134,7 @@ class MscorlibBinder
     //
     // Retrieve structures from ID.
     //
-    // Note that none of the MscorlibBinder methods trigger static
+    // Note that none of the CoreLibBinder methods trigger static
     // constructors. The JITed code takes care of triggering them.
     //
     static PTR_MethodTable GetClass(BinderClassID id);
@@ -189,24 +189,24 @@ class MscorlibBinder
     static MethodTable *GetException(RuntimeExceptionKind kind)
     {
         WRAPPER_NO_CONTRACT;
-        _ASSERTE(kind <= kLastExceptionInMscorlib);  // Not supported for exceptions defined outside mscorlib.
-        BinderClassID id = (BinderClassID) (kind + CLASS__MSCORLIB_COUNT);
+        _ASSERTE(kind < kLastException);
+        BinderClassID id = (BinderClassID) (kind + CLASS__CORELIB_COUNT);
         return GetClass(id);
     }
 
     static BOOL IsException(MethodTable *pMT, RuntimeExceptionKind kind)
     {
         WRAPPER_NO_CONTRACT;
-        _ASSERTE(kind <= kLastExceptionInMscorlib);  // Not supported for exceptions defined outside mscorlib.
-        BinderClassID id = (BinderClassID) (kind + CLASS__MSCORLIB_COUNT);
+        _ASSERTE(kind < kLastException);
+        BinderClassID id = (BinderClassID) (kind + CLASS__CORELIB_COUNT);
         return dac_cast<TADDR>(GetClassIfExist(id)) == dac_cast<TADDR>(pMT);
     }
 
     static LPCUTF8 GetExceptionName(RuntimeExceptionKind kind)
     {
         WRAPPER_NO_CONTRACT;
-        _ASSERTE(kind <= kLastExceptionInMscorlib);  // Not supported for exceptions defined outside mscorlib.
-        BinderClassID id = (BinderClassID) (kind + CLASS__MSCORLIB_COUNT);
+        _ASSERTE(kind < kLastException);
+        BinderClassID id = (BinderClassID) (kind + CLASS__CORELIB_COUNT);
         return GetClassName(id);
     }
 
@@ -281,9 +281,9 @@ private:
     const BYTE* ConvertSignature(LPHARDCODEDMETASIG pHardcodedSig, const BYTE* pSig);
 
     void SetDescriptions(Module * pModule,
-        const MscorlibClassDescription * pClassDescriptions, USHORT nClasses,
-        const MscorlibMethodDescription * pMethodDescriptions, USHORT nMethods,
-        const MscorlibFieldDescription * pFieldDescriptions, USHORT nFields);
+        const CoreLibClassDescription * pClassDescriptions, USHORT nClasses,
+        const CoreLibMethodDescription * pMethodDescriptions, USHORT nMethods,
+        const CoreLibFieldDescription * pFieldDescriptions, USHORT nFields);
 
     void AllocateTables();
 
@@ -298,9 +298,9 @@ private:
     DPTR(PTR_FieldDesc) m_pFields;
 
     // This is necessary to avoid embeding copy of the descriptions into mscordacwks
-    DPTR(const MscorlibClassDescription) m_classDescriptions;
-    DPTR(const MscorlibMethodDescription) m_methodDescriptions;
-    DPTR(const MscorlibFieldDescription) m_fieldDescriptions;
+    DPTR(const CoreLibClassDescription) m_classDescriptions;
+    DPTR(const CoreLibMethodDescription) m_methodDescriptions;
+    DPTR(const CoreLibFieldDescription) m_fieldDescriptions;
 
     USHORT m_cClasses;
     USHORT m_cMethods;
@@ -330,9 +330,9 @@ private:
 // Global bound modules:
 //
 
-GVAL_DECL(MscorlibBinder, g_Mscorlib);
+GVAL_DECL(CoreLibBinder, g_CoreLib);
 
-FORCEINLINE PTR_MethodTable MscorlibBinder::GetClass(BinderClassID id)
+FORCEINLINE PTR_MethodTable CoreLibBinder::GetClass(BinderClassID id)
 {
     CONTRACTL
     {
@@ -341,21 +341,21 @@ FORCEINLINE PTR_MethodTable MscorlibBinder::GetClass(BinderClassID id)
         INJECT_FAULT(ThrowOutOfMemory());
 
         PRECONDITION(id != CLASS__NIL);
-        PRECONDITION((&g_Mscorlib)->m_cClasses > 0);  // Make sure mscorlib has been loaded.
-        PRECONDITION(id <= (&g_Mscorlib)->m_cClasses);
+        PRECONDITION((&g_CoreLib)->m_cClasses > 0);  // Make sure CoreLib has been loaded.
+        PRECONDITION(id <= (&g_CoreLib)->m_cClasses);
     }
     CONTRACTL_END;
 
     // Force a GC here under stress because type loading could trigger GC nondeterminsticly
     INDEBUG(TriggerGCUnderStress());
 
-    PTR_MethodTable pMT = VolatileLoad(&((&g_Mscorlib)->m_pClasses[id]));
+    PTR_MethodTable pMT = VolatileLoad(&((&g_CoreLib)->m_pClasses[id]));
     if (pMT == NULL)
         return LookupClass(id);
     return pMT;
 }
 
-FORCEINLINE MethodDesc * MscorlibBinder::GetMethod(BinderMethodID id)
+FORCEINLINE MethodDesc * CoreLibBinder::GetMethod(BinderMethodID id)
 {
     CONTRACTL
     {
@@ -364,20 +364,20 @@ FORCEINLINE MethodDesc * MscorlibBinder::GetMethod(BinderMethodID id)
         INJECT_FAULT(ThrowOutOfMemory());
 
         PRECONDITION(id != METHOD__NIL);
-        PRECONDITION(id <= (&g_Mscorlib)->m_cMethods);
+        PRECONDITION(id <= (&g_CoreLib)->m_cMethods);
     }
     CONTRACTL_END;
 
     // Force a GC here under stress because type loading could trigger GC nondeterminsticly
     INDEBUG(TriggerGCUnderStress());
 
-    MethodDesc * pMD = VolatileLoad(&((&g_Mscorlib)->m_pMethods[id]));
+    MethodDesc * pMD = VolatileLoad(&((&g_CoreLib)->m_pMethods[id]));
     if (pMD == NULL)
         return LookupMethod(id);
     return pMD;
 }
 
-FORCEINLINE FieldDesc * MscorlibBinder::GetField(BinderFieldID id)
+FORCEINLINE FieldDesc * CoreLibBinder::GetField(BinderFieldID id)
 {
     CONTRACTL
     {
@@ -386,44 +386,44 @@ FORCEINLINE FieldDesc * MscorlibBinder::GetField(BinderFieldID id)
         INJECT_FAULT(ThrowOutOfMemory());
 
         PRECONDITION(id != FIELD__NIL);
-        PRECONDITION(id <= (&g_Mscorlib)->m_cFields);
+        PRECONDITION(id <= (&g_CoreLib)->m_cFields);
     }
     CONTRACTL_END;
 
     // Force a GC here under stress because type loading could trigger GC nondeterminsticly
     INDEBUG(TriggerGCUnderStress());
 
-    FieldDesc * pFD = VolatileLoad(&((&g_Mscorlib)->m_pFields[id]));
+    FieldDesc * pFD = VolatileLoad(&((&g_CoreLib)->m_pFields[id]));
     if (pFD == NULL)
         return LookupField(id);
     return pFD;
 }
 
-FORCEINLINE PTR_MethodTable MscorlibBinder::GetExistingClass(BinderClassID id)
+FORCEINLINE PTR_MethodTable CoreLibBinder::GetExistingClass(BinderClassID id)
 {
     LIMITED_METHOD_DAC_CONTRACT;
-    PTR_MethodTable pMT = (&g_Mscorlib)->m_pClasses[id];
+    PTR_MethodTable pMT = (&g_CoreLib)->m_pClasses[id];
     _ASSERTE(pMT != NULL);
     return pMT;
 }
 
-FORCEINLINE MethodDesc * MscorlibBinder::GetExistingMethod(BinderMethodID id)
+FORCEINLINE MethodDesc * CoreLibBinder::GetExistingMethod(BinderMethodID id)
 {
     LIMITED_METHOD_DAC_CONTRACT;
-    MethodDesc * pMD = (&g_Mscorlib)->m_pMethods[id];
+    MethodDesc * pMD = (&g_CoreLib)->m_pMethods[id];
     _ASSERTE(pMD != NULL);
     return pMD;
 }
 
-FORCEINLINE FieldDesc * MscorlibBinder::GetExistingField(BinderFieldID id)
+FORCEINLINE FieldDesc * CoreLibBinder::GetExistingField(BinderFieldID id)
 {
     LIMITED_METHOD_DAC_CONTRACT;
-    FieldDesc * pFD = (&g_Mscorlib)->m_pFields[id];
+    FieldDesc * pFD = (&g_CoreLib)->m_pFields[id];
     _ASSERTE(pFD != NULL);
     return pFD;
 }
 
-FORCEINLINE PTR_MethodTable MscorlibBinder::GetClassIfExist(BinderClassID id)
+FORCEINLINE PTR_MethodTable CoreLibBinder::GetClassIfExist(BinderClassID id)
 {
     CONTRACTL
     {
@@ -433,68 +433,68 @@ FORCEINLINE PTR_MethodTable MscorlibBinder::GetClassIfExist(BinderClassID id)
         MODE_ANY;
 
         PRECONDITION(id != CLASS__NIL);
-        PRECONDITION(id <= (&g_Mscorlib)->m_cClasses);
+        PRECONDITION(id <= (&g_CoreLib)->m_cClasses);
     }
     CONTRACTL_END;
 
-    PTR_MethodTable pMT = VolatileLoad(&((&g_Mscorlib)->m_pClasses[id]));
+    PTR_MethodTable pMT = VolatileLoad(&((&g_CoreLib)->m_pClasses[id]));
     if (pMT == NULL)
         return LookupClassIfExist(id);
     return pMT;
 }
 
 
-FORCEINLINE PTR_Module MscorlibBinder::GetModule()
+FORCEINLINE PTR_Module CoreLibBinder::GetModule()
 {
     LIMITED_METHOD_DAC_CONTRACT;
-    PTR_Module pModule = (&g_Mscorlib)->m_pModule;
+    PTR_Module pModule = (&g_CoreLib)->m_pModule;
     _ASSERTE(pModule != NULL);
     return pModule;
 }
 
-FORCEINLINE LPCUTF8 MscorlibBinder::GetClassNameSpace(BinderClassID id)
+FORCEINLINE LPCUTF8 CoreLibBinder::GetClassNameSpace(BinderClassID id)
 {
     LIMITED_METHOD_CONTRACT;
 
     _ASSERTE(id != CLASS__NIL);
-    _ASSERTE(id <= (&g_Mscorlib)->m_cClasses);
-    return (&g_Mscorlib)->m_classDescriptions[id].nameSpace;
+    _ASSERTE(id <= (&g_CoreLib)->m_cClasses);
+    return (&g_CoreLib)->m_classDescriptions[id].nameSpace;
 }
 
-FORCEINLINE LPCUTF8 MscorlibBinder::GetClassName(BinderClassID id)
+FORCEINLINE LPCUTF8 CoreLibBinder::GetClassName(BinderClassID id)
 {
     LIMITED_METHOD_CONTRACT;
 
     _ASSERTE(id != CLASS__NIL);
-    _ASSERTE(id <= (&g_Mscorlib)->m_cClasses);
-    return (&g_Mscorlib)->m_classDescriptions[id].name;
+    _ASSERTE(id <= (&g_CoreLib)->m_cClasses);
+    return (&g_CoreLib)->m_classDescriptions[id].name;
 }
 
-FORCEINLINE LPCUTF8 MscorlibBinder::GetMethodName(BinderMethodID id)
+FORCEINLINE LPCUTF8 CoreLibBinder::GetMethodName(BinderMethodID id)
 {
     LIMITED_METHOD_CONTRACT;
 
     _ASSERTE(id != METHOD__NIL);
-    _ASSERTE(id <= (&g_Mscorlib)->m_cMethods);
-    return (&g_Mscorlib)->m_methodDescriptions[id-1].name;
+    _ASSERTE(id <= (&g_CoreLib)->m_cMethods);
+    return (&g_CoreLib)->m_methodDescriptions[id-1].name;
 }
 
-FORCEINLINE LPHARDCODEDMETASIG MscorlibBinder::GetMethodSig(BinderMethodID id)
+FORCEINLINE LPHARDCODEDMETASIG CoreLibBinder::GetMethodSig(BinderMethodID id)
 {
     LIMITED_METHOD_CONTRACT;
 
     _ASSERTE(id != METHOD__NIL);
-    _ASSERTE(id <= (&g_Mscorlib)->m_cMethods);
-    return (&g_Mscorlib)->m_methodDescriptions[id-1].sig;
+    _ASSERTE(id <= (&g_CoreLib)->m_cMethods);
+    return (&g_CoreLib)->m_methodDescriptions[id-1].sig;
 }
 
-FORCEINLINE LPCUTF8 MscorlibBinder::GetFieldName(BinderFieldID id)
+FORCEINLINE LPCUTF8 CoreLibBinder::GetFieldName(BinderFieldID id)
 {
     LIMITED_METHOD_CONTRACT;
 
     _ASSERTE(id != FIELD__NIL);
-    _ASSERTE(id <= (&g_Mscorlib)->m_cFields);
-    return (&g_Mscorlib)->m_fieldDescriptions[id-1].name;
+    _ASSERTE(id <= (&g_CoreLib)->m_cFields);
+    return (&g_CoreLib)->m_fieldDescriptions[id-1].name;
 }
 
 #endif // _BINDERMODULE_H_
index 25e2cc4..910cc06 100644 (file)
@@ -285,11 +285,11 @@ void MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments, ARG_SLOT *
 
     _ASSERTE(!NingenEnabled() && "You cannot invoke managed code inside the ngen compilation process.");
 
-    // If we're invoking an mscorlib method, lift the restriction on type load limits. Calls into mscorlib are
+    // If we're invoking an CoreLib method, lift the restriction on type load limits. Calls into CoreLib are
     // typically calls into specific and controlled helper methods for security checks and other linktime tasks.
     //
     // @todo: In an ideal world, we would require each of those sites to do the override rather than disabling
-    // the assert broadly here. However, by limiting the override to mscorlib methods, we should still be able
+    // the assert broadly here. However, by limiting the override to CoreLib methods, we should still be able
     // to effectively enforce the more general rule about loader recursion.
     MAYBE_OVERRIDE_TYPE_LOAD_LEVEL_LIMIT(CLASS_LOADED, m_pMD->GetModule()->IsSystem());
 
index a2503f1..4640413 100644 (file)
@@ -154,12 +154,12 @@ public:
 #endif
 
 public:
-    // Used to avoid touching metadata for mscorlib methods.
+    // Used to avoid touching metadata for CoreLib methods.
     // instance methods must pass in the 'this' object
     // static methods must pass null
     MethodDescCallSite(BinderMethodID id, OBJECTREF* porProtectedThis = NULL) :
         m_pMD(
-            MscorlibBinder::GetMethod(id)
+            CoreLibBinder::GetMethod(id)
             ),
         m_methodSig(id),
         m_argIt(&m_methodSig)
@@ -174,12 +174,12 @@ public:
         DefaultInit(porProtectedThis);
     }
 
-    // Used to avoid touching metadata for mscorlib methods.
+    // Used to avoid touching metadata for CoreLib methods.
     // instance methods must pass in the 'this' object
     // static methods must pass null
     MethodDescCallSite(BinderMethodID id, OBJECTHANDLE hThis) :
         m_pMD(
-            MscorlibBinder::GetMethod(id)
+            CoreLibBinder::GetMethod(id)
             ),
         m_methodSig(id),
         m_argIt(&m_methodSig)
@@ -558,14 +558,14 @@ enum DispatchCallSimpleFlags
         PCODE __pSlot = VolatileLoad(&s_pAddr##id);         \
         if ( __pSlot == NULL )                              \
         {                                                   \
-            MethodDesc *pMeth = MscorlibBinder::GetMethod(id);   \
+            MethodDesc *pMeth = CoreLibBinder::GetMethod(id);   \
             _ASSERTE(pMeth);                                \
             __pSlot = pMeth->GetMultiCallableAddrOfCode();  \
             VolatileStore(&s_pAddr##id, __pSlot);           \
         }
 
 #define PREPARE_VIRTUAL_CALLSITE(id, objref)                \
-        MethodDesc *__pMeth = MscorlibBinder::GetMethod(id);     \
+        MethodDesc *__pMeth = CoreLibBinder::GetMethod(id);     \
         PCODE __pSlot = __pMeth->GetCallTarget(&objref);
 
 #define PREPARE_VIRTUAL_CALLSITE_USING_METHODDESC(pMD, objref)                \
@@ -590,7 +590,7 @@ enum DispatchCallSimpleFlags
         WORD __slot = VolatileLoad(&s_slot##id);                                 \
         if (__slot == MethodTable::NO_SLOT)                                      \
         {                                                                        \
-            MethodDesc *pMeth = MscorlibBinder::GetMethod(id);                        \
+            MethodDesc *pMeth = CoreLibBinder::GetMethod(id);                        \
             _ASSERTE(pMeth);                                                     \
             __slot = pMeth->GetSlot();                                           \
             VolatileStore(&s_slot##id, __slot);                                  \
index eeb9678..3773580 100644 (file)
@@ -53,7 +53,7 @@ namespace
                 if (ELEMENT_TYPE_PTR == eType)
                     COMPlusThrow(kNotSupportedException);
 
-                MethodTable *pMT = MscorlibBinder::GetElementType(eType);
+                MethodTable *pMT = CoreLibBinder::GetElementType(eType);
 
                 OBJECTREF pObj = pMT->Allocate();
                 if (fIsByRef)
@@ -337,7 +337,7 @@ void CallsiteInspect::GetCallsiteArgs(
 
         // Allocate all needed arrays for callsite arg details
         gc.Args = (PTRARRAYREF)AllocateObjectArray(numArgs, g_pObjectClass);
-        MethodTable *typeMT = MscorlibBinder::GetClass(CLASS__TYPE);
+        MethodTable *typeMT = CoreLibBinder::GetClass(CLASS__TYPE);
         gc.ArgsTypes = (PTRARRAYREF)AllocateObjectArray(numArgs, typeMT);
         gc.ArgsIsByRef = (BOOLARRAYREF)AllocatePrimitiveArray(ELEMENT_TYPE_BOOLEAN, numArgs);
 
index b4a2016..6613c6f 100644 (file)
@@ -124,7 +124,7 @@ void CastCache::Initialize()
     }
     CONTRACTL_END;
 
-    FieldDesc* pTableField = MscorlibBinder::GetField(FIELD__CASTHELPERS__TABLE);
+    FieldDesc* pTableField = CoreLibBinder::GetField(FIELD__CASTHELPERS__TABLE);
 
     GCX_COOP();
     s_pTableRef = (BASEARRAYREF*)pTableField->GetCurrentStaticAddress();
index 75d1f0b..663c5a4 100644 (file)
@@ -481,7 +481,7 @@ void Module::InitializeNativeImage(AllocMemTracker* pamTracker)
     if (GCStress<cfg_instr_ngen>::IsEnabled())
     {
         // Setting up gc coverage requires the base system classes
-        //  to be initialized. So we must defer this for mscorlib.
+        //  to be initialized. So we must defer this for CoreLib.
         if(!IsSystem())
         {
             SetupGcCoverageForNativeImage(this);
@@ -1512,11 +1512,11 @@ static bool IsLikelyDependencyOf(Module * pModule, Module * pOtherModule)
         if (!pOtherModule->IsLowLevelSystemAssemblyByName())
             return true;
 
-        // Every module depends upon mscorlib
+        // Every module depends upon CoreLib
         if (pModule->IsSystem())
             return true;
 
-        // mscorlib does not depend upon any other module
+        // CoreLib does not depend upon any other module
         if (pOtherModule->IsSystem())
             return false;
     }
@@ -1526,7 +1526,7 @@ static bool IsLikelyDependencyOf(Module * pModule, Module * pOtherModule)
             return false;
     }
 
-    // At this point neither pModule or pOtherModule is mscorlib
+    // At this point neither pModule or pOtherModule is CoreLib
 
 #ifndef DACCESS_COMPILE
     //
@@ -1591,8 +1591,8 @@ PTR_Module Module::ComputePreferredZapModuleHelper(
             RETURN dac_cast<PTR_Module>(pOpenModule);
     }
 
-    // The initial value of pCurrentPZM is the pDefinitionModule or mscorlib
-    Module* pCurrentPZM = (pDefinitionModule != NULL) ? pDefinitionModule : MscorlibBinder::GetModule();
+    // The initial value of pCurrentPZM is the pDefinitionModule or CoreLib
+    Module* pCurrentPZM = (pDefinitionModule != NULL) ? pDefinitionModule : CoreLibBinder::GetModule();
     bool preferredZapModuleBasedOnValueType = false;
 
     for (DWORD i = 0; i < totalArgs; i++)
@@ -1626,7 +1626,7 @@ PTR_Module Module::ComputePreferredZapModuleHelper(
                 //     pCurrentPZM is a dependency of pParamPZM
                 // and pParamPZM is not a dependency of pCurrentPZM
                 //
-                // note that the second condition is alway true when pCurrentPZM is mscorlib
+                // note that the second condition is alway true when pCurrentPZM is CoreLib
                 //
                 if (!IsLikelyDependencyOf(pParamPZM, pCurrentPZM))
                 {
@@ -2691,7 +2691,7 @@ ModuleIndex Module::AllocateModuleIndex()
 
     // For various reasons, the IDs issued by the IdDispenser start at 1.
     // Domain neutral module IDs have historically started at 0, and we
-    // have always assigned ID 0 to mscorlib. Thus, to make it so that
+    // have always assigned ID 0 to CoreLib. Thus, to make it so that
     // domain neutral module IDs start at 0, we will subtract 1 from the
     // ID that we got back from the ID dispenser.
     ModuleIndex index((SIZE_T)(val-1));
@@ -2861,7 +2861,7 @@ void Module::SetDomainFile(DomainFile *pDomainFile)
     m_ModuleID->SetDomainFile(pDomainFile);
 
     // Allocate static handles now.
-    // NOTE: Bootstrapping issue with mscorlib - we will manually allocate later
+    // NOTE: Bootstrapping issue with CoreLib - we will manually allocate later
     // If the assembly is collectible, we don't initialize static handles for them
     // as it is currently initialized through the DomainLocalModule::PopulateClass in MethodTable::CheckRunClassInitThrowing
     // (If we don't do this, it would allocate here unused regular static handles that will be overridden later)
@@ -4207,10 +4207,10 @@ OBJECTHANDLE Module::ResolveStringRef(DWORD token, BaseDomain *pDomain, bool bNe
         }
         /* Unfortunately, this assert won't work in some cases of generics, consider the following scenario:
 
-            1) Generic type in mscorlib.
+            1) Generic type in CoreLib.
             2) Instantiation of generic (1) (via valuetype) in another module
             3) other module now holds a copy of the code of the generic for that particular instantiation
-               however, it is resolving the string literals against mscorlib, which breaks the invariant
+               however, it is resolving the string literals against CoreLib, which breaks the invariant
                this assert was based on (no string fixups against other modules). In fact, with NoStringInterning,
                our behavior is not very intuitive.
         */
@@ -4758,7 +4758,7 @@ DomainAssembly * Module::LoadAssembly(mdAssemblyRef kAssemblyRef)
     if (pDomainAssembly != NULL)
     {
         _ASSERTE(
-            pDomainAssembly->IsSystem() ||                  // GetAssemblyIfLoaded will not find mscorlib (see AppDomain::FindCachedFile)
+            pDomainAssembly->IsSystem() ||                  // GetAssemblyIfLoaded will not find CoreLib (see AppDomain::FindCachedFile)
             !pDomainAssembly->IsLoaded() ||                 // GetAssemblyIfLoaded will not find not-yet-loaded assemblies
             GetAssemblyIfLoaded(kAssemblyRef, NULL, FALSE, pDomainAssembly->GetFile()->GetHostAssembly()) != NULL);     // GetAssemblyIfLoaded should find all remaining cases
 
index 27c4c8f..b963624 100644 (file)
@@ -157,7 +157,7 @@ typedef DPTR(struct LookupMapBase) PTR_LookupMapBase;
 //
 // This still leaves the problem of runtime lookup performance. Touches to the cold section of a LookupMap
 // aren't all that critical (after all the data is meant to be cold), but looking up the last entry of a map
-// with 22 thousand entries (roughly what the MethodDefToDesc map in mscorlib is sized at at the time of
+// with 22 thousand entries (roughly what the MethodDefToDesc map in CoreLib is sized at at the time of
 // writing) is still likely to so inefficient as to be noticeable. Remember that the issue is that we have to
 // decode all predecessor entries in order to compute the value of a given entry in the table.
 //
@@ -170,7 +170,7 @@ typedef DPTR(struct LookupMapBase) PTR_LookupMapBase;
 //
 // The main areas in which this algorithm can be tuned are the number of bits used as an index into the
 // encoding lengths table (kLookupMapLengthBits) and the frequency with which entries are bookmarked in the
-// index (kLookupMapIndexStride). The current values have been set based on looking at models of mscorlib,
+// index (kLookupMapIndexStride). The current values have been set based on looking at models of CoreLib,
 // PresentationCore and PresentationFramework built from the actual ridmap data in their ngen images and
 // methodically trying different values in order to maximize compression or balance size versus likely runtime
 // performance. An alternative strategy was considered using direct (non-length prefix) encoding of the
@@ -1597,8 +1597,8 @@ private:
     PTR_EEClassHashTable    m_pAvailableClassesCaseIns;
 
     // Pointer to binder, if we have one
-    friend class MscorlibBinder;
-    PTR_MscorlibBinder      m_pBinder;
+    friend class CoreLibBinder;
+    PTR_CoreLibBinder      m_pBinder;
 
 public:
     BOOL IsCollectible()
index d121284..4da222c 100644 (file)
@@ -283,8 +283,8 @@ HRESULT EnsureEEStarted()
 
     HRESULT hr = E_FAIL;
 
-    // On non x86 platforms, when we load mscorlib.dll during EEStartup, we will
-    // re-enter _CorDllMain with a DLL_PROCESS_ATTACH for mscorlib.dll. We are
+    // On non x86 platforms, when we load CoreLib during EEStartup, we will
+    // re-enter _CorDllMain with a DLL_PROCESS_ATTACH for CoreLib. We are
     // far enough in startup that this is allowed, however we don't want to
     // re-start the startup code so we need to check to see if startup has
     // been initiated or completed before we call EEStartup.
@@ -824,7 +824,7 @@ void EEStartupHelper()
 
         AccessCheckOptions::Startup();
 
-        MscorlibBinder::Startup();
+        CoreLibBinder::Startup();
 
         Stub::Init();
         StubLinkerCPU::Init();
@@ -1030,8 +1030,8 @@ void EEStartupHelper()
             SystemDomain::SystemModule()->ExpandAll();
         }
 
-        // Perform mscorlib consistency check if requested
-        g_Mscorlib.CheckExtended();
+        // Perform CoreLib consistency check if requested
+        g_CoreLib.CheckExtended();
 
 #endif // _DEBUG
 
@@ -1107,7 +1107,7 @@ LONG FilterStartupException(PEXCEPTION_POINTERS p, PVOID pv)
 // EEStartup is responsible for all the one time intialization of the runtime.  Some of the highlights of
 // what it does include
 //     * Creates the default and shared, appdomains.
-//     * Loads mscorlib.dll and loads up the fundamental types (System.Object ...)
+//     * Loads System.Private.CoreLib and loads up the fundamental types (System.Object ...)
 //
 // see code:EEStartup#TableOfContents for more on the runtime in general.
 // see code:#EEShutdown for a analagous routine run during shutdown.
index 53e2146..7c73231 100644 (file)
@@ -143,7 +143,7 @@ BOOL GetAnyThunkTarget (T_CONTEXT *pctx, TADDR *pTarget, TADDR *pTargetMethodDes
 
 //
 // ResetProcessorStateHolder saves/restores processor state around calls to
-// mscorlib during exception handling.
+// CoreLib during exception handling.
 //
 class ResetProcessorStateHolder
 {
index aab4e63..4f00fbf 100644 (file)
@@ -3010,49 +3010,6 @@ VOID    MethodTableBuilder::AllocateMethodWorkingMemory()
             }
             bmtVT->pParentMethodTable = bmtParent->pParentMethodTable;
         }
-
-#if 0
-        // @<TODO>todo: Figure out the right way to override Equals for value
-        // types only.
-        //
-        // This is broken because
-        // (a) g_pObjectClass->FindMethod("Equals", &gsig_IM_Obj_RetBool); will return
-        //      the EqualsValue method
-        // (b) When mscorlib has been preloaded (and thus the munge already done
-        //      ahead of time), we cannot easily find both methods
-        //      to compute EqualsAddr & EqualsSlot
-        //
-        // For now, the Equals method has a runtime check to see if it's
-        // comparing value types.
-        //</TODO>
-
-        // If it is a value type, over ride a few of the base class methods.
-        if (IsValueClass())
-        {
-            static WORD EqualsSlot;
-
-            // If we haven't been through here yet, get some stuff from the Object class definition.
-            if (EqualsSlot == NULL)
-            {
-                // Get the slot of the Equals method.
-                MethodDesc *pEqualsMD = g_pObjectClass->FindMethod("Equals", &gsig_IM_Obj_RetBool);
-                THROW_BAD_FORMAT_MAYBE(pEqualsMD != NULL, 0, this);
-                EqualsSlot = pEqualsMD->GetSlot();
-
-                // Get the address of the EqualsValue method.
-                MethodDesc *pEqualsValueMD = g_pObjectClass->FindMethod("EqualsValue", &gsig_IM_Obj_RetBool);
-                THROW_BAD_FORMAT_MAYBE(pEqualsValueMD != NULL, 0, this);
-
-                // Patch the EqualsValue method desc in a dangerous way to
-                // look like the Equals method desc.
-                pEqualsValueMD->SetSlot(EqualsSlot);
-                pEqualsValueMD->SetMemberDef(pEqualsMD->GetMemberDef());
-            }
-
-            // Override the valuetype "Equals" with "EqualsValue".
-            bmtVT->SetMethodDescForSlot(EqualsSlot, EqualsSlot);
-        }
-#endif // 0
     }
 
     if (NumDeclaredMethods() > 0)
index a9c9328..e5f9345 100644 (file)
@@ -903,16 +903,16 @@ EEClassNativeLayoutInfo* EEClassNativeLayoutInfo::CollectNativeLayoutFieldMetada
         // from the managed size and alignment.
         // Crossgen scenarios block Vector<T> from even being loaded, so only do this check when not in crossgen.
 #ifndef CROSSGEN_COMPILE
-        if (pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTORT)))
+        if (pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTORT)))
         {
             pNativeLayoutInfo->m_size = pEEClassLayoutInfo->GetManagedSize();
             pNativeLayoutInfo->m_alignmentRequirement = pEEClassLayoutInfo->m_ManagedLargestAlignmentRequirementOfAllMembers;
         }
         else
 #endif
-        if (pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTOR64T)) ||
-            pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTOR128T)) ||
-            pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTOR256T)))
+        if (pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR64T)) ||
+            pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR128T)) ||
+            pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR256T)))
         {
             pNativeLayoutInfo->m_alignmentRequirement = pEEClassLayoutInfo->m_ManagedLargestAlignmentRequirementOfAllMembers;
         }
index 0965a32..04a8d5b 100644 (file)
@@ -189,7 +189,7 @@ OBJECTREF CLRException::GetThrowable()
             //  CreateThrowable() and is being caught in this EX_TRY/EX_CATCH.)
             //  If that exception is the same as the one for which this GetThrowable()
             //  was called, we're in a recursive situation.
-            // Since the CreateThrowable() call should return a type from mscorlib,
+            // Since the CreateThrowable() call should return a type from CoreLib,
             //  there really shouldn't be much opportunity for error.  We could be
             //  out of memory, we could overflow the stack, or the runtime could
             //  be in a weird state(the thread could be aborted as well).
@@ -1071,7 +1071,7 @@ void EEException::GetMessage(SString &result)
         return;
 
     // Otherwise, report the class's generic message
-    LPCUTF8 pszExceptionName = MscorlibBinder::GetExceptionName(m_kind);
+    LPCUTF8 pszExceptionName = CoreLibBinder::GetExceptionName(m_kind);
     result.SetUTF8(pszExceptionName);
 }
 
@@ -1092,7 +1092,7 @@ OBJECTREF EEException::CreateThrowable()
     _ASSERTE(g_pPreallocatedOutOfMemoryException != NULL);
     static int allocCount = 0;
 
-    MethodTable *pMT = MscorlibBinder::GetException(m_kind);
+    MethodTable *pMT = CoreLibBinder::GetException(m_kind);
 
     ThreadPreventAsyncHolder preventAsyncHolder(m_kind == kThreadAbortException);
 
@@ -1218,7 +1218,7 @@ void EEResourceException::GetMessage(SString &result)
     //
 
     result.Printf("%s (message resource %s)",
-                  MscorlibBinder::GetExceptionName(m_kind), m_resourceName.GetUnicode());
+                  CoreLibBinder::GetExceptionName(m_kind), m_resourceName.GetUnicode());
 }
 
 BOOL EEResourceException::GetThrowableMessage(SString &result)
@@ -1420,7 +1420,7 @@ OBJECTREF EEArgumentException::CreateThrowable()
     ResMgrGetString(m_resourceName, &prot.s1);
     GCPROTECT_BEGIN(prot);
 
-    MethodTable *pMT = MscorlibBinder::GetException(m_kind);
+    MethodTable *pMT = CoreLibBinder::GetException(m_kind);
     prot.pThrowable = AllocateObject(pMT);
 
     MethodDesc* pMD = MemberLoader::FindMethod(prot.pThrowable->GetMethodTable(),
@@ -1547,7 +1547,7 @@ OBJECTREF EETypeLoadException::CreateThrowable()
     }
     CONTRACTL_END;
 
-    MethodTable *pMT = MscorlibBinder::GetException(kTypeLoadException);
+    MethodTable *pMT = CoreLibBinder::GetException(kTypeLoadException);
 
     struct _gc {
         OBJECTREF pNewException;
@@ -1752,7 +1752,7 @@ OBJECTREF EEFileLoadException::CreateThrowable()
     GCPROTECT_BEGIN(gc);
 
     gc.pNewFileString = StringObject::NewString(m_name);
-    gc.pNewException = AllocateObject(MscorlibBinder::GetException(m_kind));
+    gc.pNewException = AllocateObject(CoreLibBinder::GetException(m_kind));
 
     MethodDesc* pMD = MemberLoader::FindMethod(gc.pNewException->GetMethodTable(),
                             COR_CTOR_METHOD_NAME, &gsig_IM_Str_Int_RetVoid);
index 2b8165a..01278d3 100644 (file)
@@ -63,7 +63,7 @@
 // Some useful effects of this rule (for ngen purposes) are:
 //
 // * G<object,...,object> lives in the module defining G
-// * non-mscorlib instantiations of mscorlib-defined generic types live in the module
+// * non-CoreLib instantiations of CoreLib-defined generic types live in the module
 //   of the instantiation (when only one module is invloved in the instantiation)
 //
 
@@ -138,9 +138,9 @@ PTR_Module ClassLoader::ComputeLoaderModuleWorker(
 
     if (pLoaderModule == NULL)
     {
-        CONSISTENCY_CHECK(MscorlibBinder::GetModule() && MscorlibBinder::GetModule()->IsSystem());
+        CONSISTENCY_CHECK(CoreLibBinder::GetModule() && CoreLibBinder::GetModule()->IsSystem());
 
-        pLoaderModule = MscorlibBinder::GetModule();
+        pLoaderModule = CoreLibBinder::GetModule();
     }
 
     if (FALSE)
@@ -250,7 +250,7 @@ PTR_Module ClassLoader::ComputeLoaderModuleForCompilation(
 
     // We're a little stuck - we can't force the item into an NGEN image at this point.  So just bail out
     // and use the loader module we've computed without recording the choice. The loader module should always
-    // be mscorlib in this case.
+    // be CoreLib in this case.
     AppDomain * pAppDomain = GetAppDomain();
     if (!pAppDomain->IsCompilationDomain() ||
         !pAppDomain->ToCompilationDomain()->GetTargetModule())
@@ -3282,7 +3282,7 @@ TypeHandle ClassLoader::CreateTypeHandleForTypeKey(TypeKey* pKey, AllocMemTracke
             // let <Type>* type have a method table
             // System.UIntPtr's method table is used for types like int*, void *, string * etc.
             if (kind == ELEMENT_TYPE_PTR)
-                templateMT = MscorlibBinder::GetElementType(ELEMENT_TYPE_U);
+                templateMT = CoreLibBinder::GetElementType(ELEMENT_TYPE_U);
             else
                 templateMT = NULL;
 
index 6fca4a1..aa3068a 100644 (file)
@@ -1253,17 +1253,17 @@ BOOL SimpleComCallWrapper::SupportsIReflect(MethodTable *pClass)
     if (pClass == g_pRuntimeTypeClass)
         return FALSE;
 
-    if (MscorlibBinder::IsClass(pClass, CLASS__TYPE_BUILDER))
+    if (CoreLibBinder::IsClass(pClass, CLASS__TYPE_BUILDER))
         return FALSE;
 
-    if (MscorlibBinder::IsClass(pClass, CLASS__TYPE))
+    if (CoreLibBinder::IsClass(pClass, CLASS__TYPE))
         return FALSE;
 
-    if (MscorlibBinder::IsClass(pClass, CLASS__ENUM_BUILDER))
+    if (CoreLibBinder::IsClass(pClass, CLASS__ENUM_BUILDER))
         return FALSE;
 
     // Check to see if the MethodTable associated with the wrapper implements IExpando.
-    return pClass->ImplementsInterface(MscorlibBinder::GetClass(CLASS__IREFLECT));
+    return pClass->ImplementsInterface(CoreLibBinder::GetClass(CLASS__IREFLECT));
 }
 
 //--------------------------------------------------------------------------
@@ -1282,7 +1282,7 @@ BOOL SimpleComCallWrapper::SupportsIExpando(MethodTable *pClass)
     CONTRACTL_END;
 
     // Check to see if the MethodTable associated with the wrapper implements IExpando.
-    return pClass->ImplementsInterface(MscorlibBinder::GetClass(CLASS__IEXPANDO));
+    return pClass->ImplementsInterface(CoreLibBinder::GetClass(CLASS__IEXPANDO));
 }
 
 // NOINLINE to prevent RCWHolder from forcing caller to push/pop an FS:0 handler
@@ -4480,11 +4480,11 @@ BOOL ComCallWrapperTemplate::IsSafeTypeForMarshalling()
         // System.Reflection.MethodBody, and System.Reflection.ParameterInfo.
         // Some interesting derived types that get blocked as a result are:
         // System.Type, System.Reflection.TypeInfo, System.Reflection.MethodInfo, and System.Reflection.FieldInfo
-        if (pMt->CanCastToClass(MscorlibBinder::GetClass(CLASS__ASSEMBLYBASE)) ||
-        pMt->CanCastToClass(MscorlibBinder::GetClass(CLASS__MEMBER)) ||
-        pMt->CanCastToClass(MscorlibBinder::GetClass(CLASS__MODULEBASE)) ||
-        pMt->CanCastToClass(MscorlibBinder::GetClass(CLASS__RUNTIME_METHOD_BODY)) ||
-        pMt->CanCastToClass(MscorlibBinder::GetClass(CLASS__PARAMETER)))
+        if (pMt->CanCastToClass(CoreLibBinder::GetClass(CLASS__ASSEMBLYBASE)) ||
+        pMt->CanCastToClass(CoreLibBinder::GetClass(CLASS__MEMBER)) ||
+        pMt->CanCastToClass(CoreLibBinder::GetClass(CLASS__MODULEBASE)) ||
+        pMt->CanCastToClass(CoreLibBinder::GetClass(CLASS__RUNTIME_METHOD_BODY)) ||
+        pMt->CanCastToClass(CoreLibBinder::GetClass(CLASS__PARAMETER)))
         {
             isSafe = FALSE;
         }
@@ -5040,7 +5040,7 @@ ComMethodTable *ComCallWrapperTemplate::InitializeForInterface(MethodTable *pPar
 
     // update pItfMT in case code:CreateComMethodTableForInterface decided to redirect the interface
     pItfMT = pItfComMT->GetMethodTable();
-    if (pItfMT == MscorlibBinder::GetExistingClass(CLASS__ICUSTOM_QUERYINTERFACE))
+    if (pItfMT == CoreLibBinder::GetExistingClass(CLASS__ICUSTOM_QUERYINTERFACE))
     {
         m_flags |= enum_ImplementsICustomQueryInterface;
     }
@@ -5152,7 +5152,7 @@ ComCallWrapperTemplate* ComCallWrapperTemplate::CreateTemplate(TypeHandle thClas
         // Eagerly create the interface CMTs.
         // when iterate the interfaces implemented by the methodtable, we can check whether
         // the interface supports ICustomQueryInterface.
-        MscorlibBinder::GetClass(CLASS__ICUSTOM_QUERYINTERFACE);
+        CoreLibBinder::GetClass(CLASS__ICUSTOM_QUERYINTERFACE);
 
         it.Reset();
         while (it.Next())
@@ -5401,7 +5401,7 @@ MethodDesc * ComCallWrapperTemplate::GetICustomQueryInterfaceGetInterfaceMD()
 
     if (m_pICustomQueryInterfaceGetInterfaceMD == NULL)
         m_pICustomQueryInterfaceGetInterfaceMD = m_thClass.GetMethodTable()->GetMethodDescForInterfaceMethod(
-           MscorlibBinder::GetMethod(METHOD__ICUSTOM_QUERYINTERFACE__GET_INTERFACE),
+           CoreLibBinder::GetMethod(METHOD__ICUSTOM_QUERYINTERFACE__GET_INTERFACE),
            TRUE /* throwOnConflict */);
     RETURN m_pICustomQueryInterfaceGetInterfaceMD;
 }
index 625513b..9c5b48c 100644 (file)
@@ -2197,7 +2197,7 @@ FCIMPL1(PCODE, COMDelegate::GetMulticastInvoke, Object* refThisIn)
 
         // Get count of delegates
         pCode->EmitLoadThis();
-        pCode->EmitLDFLD(pCode->GetToken(MscorlibBinder::GetField(FIELD__MULTICAST_DELEGATE__INVOCATION_COUNT)));
+        pCode->EmitLDFLD(pCode->GetToken(CoreLibBinder::GetField(FIELD__MULTICAST_DELEGATE__INVOCATION_COUNT)));
         pCode->EmitSTLOC(dwInvocationCountNum);
 
         // initialize counter
@@ -2220,7 +2220,7 @@ FCIMPL1(PCODE, COMDelegate::GetMulticastInvoke, Object* refThisIn)
 
         // Load next delegate from array using LoopCounter as index
         pCode->EmitLoadThis();
-        pCode->EmitLDFLD(pCode->GetToken(MscorlibBinder::GetField(FIELD__MULTICAST_DELEGATE__INVOCATION_LIST)));
+        pCode->EmitLDFLD(pCode->GetToken(CoreLibBinder::GetField(FIELD__MULTICAST_DELEGATE__INVOCATION_LIST)));
         pCode->EmitLDLOC(dwLoopCounterNum);
         pCode->EmitLDELEM_REF();
 
@@ -2371,7 +2371,7 @@ PCODE COMDelegate::GetWrapperInvoke(MethodDesc* pMD)
 
         // Load the "real" delegate
         pCode->EmitLoadThis();
-        pCode->EmitLDFLD(pCode->GetToken(MscorlibBinder::GetField(FIELD__MULTICAST_DELEGATE__INVOCATION_LIST)));
+        pCode->EmitLDFLD(pCode->GetToken(CoreLibBinder::GetField(FIELD__MULTICAST_DELEGATE__INVOCATION_LIST)));
 
         // Load the arguments
         UINT paramCount = 0;
@@ -2955,17 +2955,17 @@ MethodDesc* COMDelegate::GetDelegateCtor(TypeHandle delegateType, MethodDesc *pT
         {
             // case 3
             if (isCollectible)
-                pRealCtor = MscorlibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_COLLECTIBLE_VIRTUAL_DISPATCH);
+                pRealCtor = CoreLibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_COLLECTIBLE_VIRTUAL_DISPATCH);
             else
-                pRealCtor = MscorlibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_VIRTUAL_DISPATCH);
+                pRealCtor = CoreLibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_VIRTUAL_DISPATCH);
         }
         else
         {
             // case 2, 6
             if (isCollectible)
-                pRealCtor = MscorlibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_COLLECTIBLE_OPENED);
+                pRealCtor = CoreLibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_COLLECTIBLE_OPENED);
             else
-                pRealCtor = MscorlibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_OPENED);
+                pRealCtor = CoreLibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_OPENED);
         }
         Stub *pShuffleThunk = NULL;
         if (!pTargetMethod->IsStatic() && pTargetMethod->HasRetBuffArg() && IsRetBuffPassedAsFirstArg())
@@ -3000,21 +3000,21 @@ MethodDesc* COMDelegate::GetDelegateCtor(TypeHandle delegateType, MethodDesc *pT
                     pTargetMethod->GetMethodTable()->IsValueType() && !pTargetMethod->IsUnboxingStub();
 
         if (needsRuntimeInfo)
-            pRealCtor = MscorlibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_RT_CLOSED);
+            pRealCtor = CoreLibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_RT_CLOSED);
         else
         {
             if (!isStatic)
-                pRealCtor = MscorlibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_CLOSED);
+                pRealCtor = CoreLibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_CLOSED);
             else
             {
                 if (isCollectible)
                 {
-                    pRealCtor = MscorlibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_COLLECTIBLE_CLOSED_STATIC);
+                    pRealCtor = CoreLibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_COLLECTIBLE_CLOSED_STATIC);
                     pCtorData->pArg3 = pTargetMethodLoaderAllocator->GetLoaderAllocatorObjectHandle();
                 }
                 else
                 {
-                    pRealCtor = MscorlibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_CLOSED_STATIC);
+                    pRealCtor = CoreLibBinder::GetMethod(METHOD__MULTICAST_DELEGATE__CTOR_CLOSED_STATIC);
                 }
             }
         }
@@ -3149,7 +3149,7 @@ static void TryConstructUnhandledExceptionArgs(OBJECTREF *pThrowable,
 
     EX_TRY
     {
-        MethodTable *pMT = MscorlibBinder::GetClass(CLASS__UNHANDLED_EVENTARGS);
+        MethodTable *pMT = CoreLibBinder::GetClass(CLASS__UNHANDLED_EVENTARGS);
         *pOutEventArgs = AllocateObject(pMT);
 
         MethodDescCallSite ctor(METHOD__UNHANDLED_EVENTARGS__CTOR, pOutEventArgs);
index 0575cb9..a1f2e27 100644 (file)
@@ -958,7 +958,7 @@ Object* GetTypesInner(Module* pModule)
 
     if (pModule->IsResource())
     {
-        refArrClasses = (PTRARRAYREF) AllocateObjectArray(0, MscorlibBinder::GetClass(CLASS__CLASS));
+        refArrClasses = (PTRARRAYREF) AllocateObjectArray(0, CoreLibBinder::GetClass(CLASS__CLASS));
         RETURN(OBJECTREFToObject(refArrClasses));
     }
 
@@ -976,7 +976,7 @@ Object* GetTypesInner(Module* pModule)
     // Allocate the COM+ array
     bSystemAssembly = (pModule->GetAssembly() == SystemDomain::SystemAssembly());
     AllocSize = dwNumTypeDefs;
-    refArrClasses = (PTRARRAYREF) AllocateObjectArray(AllocSize, MscorlibBinder::GetClass(CLASS__CLASS));
+    refArrClasses = (PTRARRAYREF) AllocateObjectArray(AllocSize, CoreLibBinder::GetClass(CLASS__CLASS));
 
     int curPos = 0;
     OBJECTREF throwable = 0;
index ab73f67..992c6a7 100644 (file)
@@ -144,7 +144,7 @@ typedef DPTR(class MethodDesc)          PTR_MethodDesc;
 typedef DPTR(class MethodDescChunk)     PTR_MethodDescChunk;
 typedef DPTR(class MethodImpl)          PTR_MethodImpl;
 typedef DPTR(class MethodTable)         PTR_MethodTable;
-typedef DPTR(class MscorlibBinder)      PTR_MscorlibBinder;
+typedef DPTR(class CoreLibBinder)      PTR_CoreLibBinder;
 typedef VPTR(class Module)              PTR_Module;
 typedef DPTR(class NDirectMethodDesc)   PTR_NDirectMethodDesc;
 typedef DPTR(class Thread)              PTR_Thread;
index 3b36f58..49ce4a4 100644 (file)
@@ -6,7 +6,7 @@
 #include "clrconfig.h"
 #include "compatibilityswitch.h"
 
-FCIMPL2(StringObject*, CompatibilitySwitch::GetValue, StringObject* switchNameUNSAFE, CLR_BOOL onlyDB) {
+FCIMPL1(StringObject*, CompatibilitySwitch::GetValue, StringObject* switchNameUNSAFE) {
     CONTRACTL {
         FCALL_CHECK;
     }
@@ -23,20 +23,7 @@ FCIMPL2(StringObject*, CompatibilitySwitch::GetValue, StringObject* switchNameUN
     HELPER_METHOD_FRAME_BEGIN_RET_1(name);
     CLRConfig::ConfigStringInfo info;
     info.name = name->GetBuffer();
-    if(onlyDB)
-    {
-        // for public managed apis we ignore checking in registry/config/env
-        // only check in windows appcompat DB
-        info.options = CLRConfig::IgnoreEnv |
-                       CLRConfig::IgnoreHKLM |
-                       CLRConfig::IgnoreHKCU;
-    }
-    else
-    {
-        // for mscorlib (i.e. which use internal apis) also check in
-        // registry/config/env in addition to windows appcompat DB
-        info.options = CLRConfig::EEConfig_default;
-    }
+    info.options = CLRConfig::EEConfig_default;
     LPWSTR strVal = CLRConfig::GetConfigValue(info);
     refName = StringObject::NewString(strVal);
     HELPER_METHOD_FRAME_END();
index 810455e..bd291ee 100644 (file)
@@ -15,7 +15,7 @@
 class CompatibilitySwitch
 {
 public:
-    static FCDECL2(StringObject*, GetValue, StringObject *switchNameUNSAFE, CLR_BOOL onlyDB);
+    static FCDECL1(StringObject*, GetValue, StringObject *switchNameUNSAFE);
 };
 
 
index 2871646..492079e 100644 (file)
@@ -276,7 +276,7 @@ HRESULT CEECompileInfo::LoadAssemblyByPath(
         AssemblySpec spec;
         spec.InitializeSpec(TokenFromRid(1, mdtAssembly), pImage->GetMDImport(), NULL);
 
-        if (spec.IsMscorlib())
+        if (spec.IsCoreLib())
         {
             pAssembly = SystemDomain::System()->SystemAssembly();
         }
@@ -424,18 +424,13 @@ HRESULT CEECompileInfo::SetCompilationTarget(CORINFO_ASSEMBLY_HANDLE     assembl
 
     if (!pAssembly->IsSystem())
     {
-        // It is possible to get through a compile without calling BindAssemblySpec on mscorlib.  This
-        // is because refs to mscorlib are short circuited in a number of places.  So, we will explicitly
+        // It is possible to get through a compile without calling BindAssemblySpec on CoreLib.  This
+        // is because refs to CoreLib are short circuited in a number of places.  So, we will explicitly
         // add it to our dependencies.
 
-        AssemblySpec mscorlib;
-        mscorlib.InitializeSpec(SystemDomain::SystemFile());
-        GetAppDomain()->BindAssemblySpec(&mscorlib,TRUE);
-
-        if (!IsReadyToRunCompilation() && !SystemDomain::SystemFile()->HasNativeImage())
-        {
-            return NGEN_E_SYS_ASM_NI_MISSING;
-        }
+        AssemblySpec corelib;
+        corelib.InitializeSpec(SystemDomain::SystemFile());
+        GetAppDomain()->BindAssemblySpec(&corelib,TRUE);
     }
 
     if (IsReadyToRunCompilation() && !pModule->GetFile()->IsILOnly())
@@ -1326,7 +1321,7 @@ void CEECompileInfo::EncodeClass(
     COOPERATIVE_TRANSITION_END();
 }
 
-CORINFO_MODULE_HANDLE CEECompileInfo::GetLoaderModuleForMscorlib()
+CORINFO_MODULE_HANDLE CEECompileInfo::GetLoaderModuleForCoreLib()
 {
     STANDARD_VM_CONTRACT;
 
@@ -1634,7 +1629,7 @@ void CEECompileInfo::EncodeGenericSignature(
 {
     STANDARD_VM_CONTRACT;
 
-    Module * pInfoModule = MscorlibBinder::GetModule();
+    Module * pInfoModule = CoreLibBinder::GetModule();
 
     SigPointer ptr((PCCOR_SIGNATURE)signature);
 
@@ -4819,7 +4814,7 @@ static void SpecializeComparer(SString& ss, Instantiation& inst)
     // Override the default ObjectComparer for special cases
     //
     if (elemTypeHnd.CanCastTo(
-        TypeHandle(MscorlibBinder::GetClass(CLASS__ICOMPARABLEGENERIC)).Instantiate(Instantiation(&elemTypeHnd, 1))))
+        TypeHandle(CoreLibBinder::GetClass(CLASS__ICOMPARABLEGENERIC)).Instantiate(Instantiation(&elemTypeHnd, 1))))
     {
         ss.Set(W("System.Collections.Generic.GenericComparer`1"));
         return;
@@ -4829,7 +4824,7 @@ static void SpecializeComparer(SString& ss, Instantiation& inst)
     {
         Instantiation nullableInst = elemTypeHnd.AsMethodTable()->GetInstantiation();
         if (nullableInst[0].CanCastTo(
-            TypeHandle(MscorlibBinder::GetClass(CLASS__ICOMPARABLEGENERIC)).Instantiate(nullableInst)))
+            TypeHandle(CoreLibBinder::GetClass(CLASS__ICOMPARABLEGENERIC)).Instantiate(nullableInst)))
         {
             ss.Set(W("System.Collections.Generic.NullableComparer`1"));
             inst = nullableInst;
@@ -4874,7 +4869,7 @@ static void SpecializeEqualityComparer(SString& ss, Instantiation& inst)
     // Override the default ObjectEqualityComparer for special cases
     //
     if (elemTypeHnd.CanCastTo(
-        TypeHandle(MscorlibBinder::GetClass(CLASS__IEQUATABLEGENERIC)).Instantiate(Instantiation(&elemTypeHnd, 1))))
+        TypeHandle(CoreLibBinder::GetClass(CLASS__IEQUATABLEGENERIC)).Instantiate(Instantiation(&elemTypeHnd, 1))))
     {
         ss.Set(W("System.Collections.Generic.GenericEqualityComparer`1"));
         return;
@@ -4884,7 +4879,7 @@ static void SpecializeEqualityComparer(SString& ss, Instantiation& inst)
     {
         Instantiation nullableInst = elemTypeHnd.AsMethodTable()->GetInstantiation();
         if (nullableInst[0].CanCastTo(
-            TypeHandle(MscorlibBinder::GetClass(CLASS__IEQUATABLEGENERIC)).Instantiate(nullableInst)))
+            TypeHandle(CoreLibBinder::GetClass(CLASS__IEQUATABLEGENERIC)).Instantiate(nullableInst)))
         {
             ss.Set(W("System.Collections.Generic.NullableEqualityComparer`1"));
             inst = nullableInst;
@@ -4925,7 +4920,7 @@ void CEEPreloader::ApplyTypeDependencyProductionsForType(TypeHandle t)
 
     pMT = pMT->GetCanonicalMethodTable();
 
-    // The TypeDependencyAttribute attribute is currently only allowed on mscorlib types
+    // The TypeDependencyAttribute attribute is currently only allowed on CoreLib types
     // Don't even look for the attribute on types in other assemblies.
     if(!pMT->GetModule()->IsSystem()) {
         return;
@@ -5004,7 +4999,7 @@ void CEEPreloader::ApplyTypeDependencyProductionsForType(TypeHandle t)
             TypeHandle typicalDepTH = TypeName::GetTypeUsingCASearchRules(ss.GetUnicode(), pMT->GetAssembly());
 
             _ASSERTE(!typicalDepTH.IsNull());
-            // This attribute is currently only allowed to refer to mscorlib types
+            // This attribute is currently only allowed to refer to CoreLib types
             _ASSERTE(typicalDepTH.GetModule()->IsSystem());
             if (!typicalDepTH.GetModule()->IsSystem())
                 continue;
@@ -5012,7 +5007,7 @@ void CEEPreloader::ApplyTypeDependencyProductionsForType(TypeHandle t)
             // For IList<T>, ICollection<T>, IEnumerable<T>, IReadOnlyCollection<T> & IReadOnlyList<T>, include SZArrayHelper's
             // generic methods (or at least the relevant ones) in the ngen image in
             // case someone casts a T[] to an IList<T> (or ICollection<T> or IEnumerable<T>, etc).
-            if (MscorlibBinder::IsClass(typicalDepTH.AsMethodTable(), CLASS__SZARRAYHELPER))
+            if (CoreLibBinder::IsClass(typicalDepTH.AsMethodTable(), CLASS__SZARRAYHELPER))
             {
 #ifdef FEATURE_FULL_NGEN
                 if (pMT->GetNumGenericArgs() != 1 || !pMT->IsInterface()) {
@@ -5091,14 +5086,14 @@ void CEEPreloader::ApplyTypeDependencyForSZArrayHelper(MethodTable * pInterfaceM
         METHOD__SZARRAYHELPER__REMOVEAT, // Last method of IList<T>
     };
 
-    // Assuming the binder ID's are properly laid out in mscorlib.h
+    // Assuming the binder ID's are properly laid out in corelib.h
 #if _DEBUG
     for(unsigned int i=0; i < NumItems(LastMethodOnGenericArrayInterfaces) - 1; i++) {
         _ASSERTE(LastMethodOnGenericArrayInterfaces[i] < LastMethodOnGenericArrayInterfaces[i+1]);
     }
 #endif
 
-    MethodTable* pExactMT = MscorlibBinder::GetClass(CLASS__SZARRAYHELPER);
+    MethodTable* pExactMT = CoreLibBinder::GetClass(CLASS__SZARRAYHELPER);
 
     // Subtract one from the non-generic IEnumerable that the generic IEnumerable<T>
     // inherits from.
@@ -5114,7 +5109,7 @@ void CEEPreloader::ApplyTypeDependencyForSZArrayHelper(MethodTable * pInterfaceM
         if (SZArrayHelperMethodIDs[i] > LastMethodOnGenericArrayInterfaces[inheritanceDepth])
             continue;
 
-        MethodDesc * pPrimaryMD = MscorlibBinder::GetMethod(SZArrayHelperMethodIDs[i]);
+        MethodDesc * pPrimaryMD = CoreLibBinder::GetMethod(SZArrayHelperMethodIDs[i]);
 
         MethodDesc * pInstantiatedMD = MethodDesc::FindOrCreateAssociatedMethodDesc(pPrimaryMD,
                                            pExactMT, false, Instantiation(&elemTypeHnd, 1), false);
@@ -6272,7 +6267,7 @@ CorCompileILRegion CEEPreloader::GetILRegion(mdMethodDef token)
             else
             if (MethodIsVisibleOutsideItsAssembly(pMD))
             {
-                // We are inlining only leaf methods, except for mscorlib. Thus we can assume that only methods
+                // We are inlining only leaf methods, except for CoreLib. Thus we can assume that only methods
                 // visible outside its assembly are likely to be inlined.
                 region = CORCOMPILE_ILREGION_INLINEABLE;
             }
@@ -6611,7 +6606,7 @@ HRESULT CompilationDomain::AddDependencyEntry(PEAssembly *pFile,
     if (pFile)
     {
         DomainAssembly *pAssembly = GetAppDomain()->LoadDomainAssembly(NULL, pFile, FILE_LOAD_CREATE);
-        // Note that this can trigger an assembly load (of mscorlib)
+        // Note that this can trigger an assembly load (of CoreLib)
         pAssembly->GetOptimizedIdentitySignature(&pDependency->signAssemblyDef);
 
 
@@ -6642,17 +6637,17 @@ HRESULT CompilationDomain::AddDependency(AssemblySpec *pRefSpec,
     // This assert prevents dependencies from silently being loaded without being recorded.
     _ASSERTE(m_pEmit);
 
-    // Normalize any reference to mscorlib; we don't want to record other non-canonical
-    // mscorlib references in the ngen image since fusion doesn't understand how to bind them.
+    // Normalize any reference to CoreLib; we don't want to record other non-canonical
+    // CoreLib references in the ngen image since fusion doesn't understand how to bind them.
     // (Not to mention the fact that they are redundant.)
     AssemblySpec spec;
-    if (pRefSpec->IsMscorlib())
+    if (pRefSpec->IsCoreLib())
     {
-        _ASSERTE(pFile); // mscorlib had better not be missing
+        _ASSERTE(pFile); // CoreLib had better not be missing
         if (!pFile)
             return E_UNEXPECTED;
 
-        // Don't store a binding from mscorlib to itself.
+        // Don't store a binding from CoreLib to itself.
         if (m_pTargetAssembly == SystemDomain::SystemAssembly())
             return S_OK;
 
@@ -6661,8 +6656,8 @@ HRESULT CompilationDomain::AddDependency(AssemblySpec *pRefSpec,
     }
     else if (m_pTargetAssembly == NULL && pFile)
     {
-        // If target assembly is still NULL, we must be loading either the target assembly or mscorlib.
-        // Mscorlib is already handled above, so we must be loading the target assembly if we get here.
+        // If target assembly is still NULL, we must be loading either the target assembly or CoreLib.
+        // CoreLib is already handled above, so we must be loading the target assembly if we get here.
         // Use the assembly name given in the target assembly so that the native image is deterministic
         // regardless of how the target assembly is specified on the command line.
         spec.InitializeSpec(pFile);
@@ -6761,7 +6756,7 @@ BOOL CompilationDomain::CanEagerBindToZapFile(Module *targetModule, BOOL limitTo
 
     //
     // CoreCLR does not have attributes for fine grained eager binding control.
-    // We hard bind to mscorlib.dll only.
+    // We hard bind to CoreLib only.
     //
     return targetModule->IsSystem();
 }
index 7e858b1..a04e193 100644 (file)
@@ -303,7 +303,7 @@ class CEECompileInfo : public ICorCompileInfo
                                  LPWSTR *pHardBindList,
                                  DWORD cHardBindList);
 
-    CORINFO_MODULE_HANDLE GetLoaderModuleForMscorlib();
+    CORINFO_MODULE_HANDLE GetLoaderModuleForCoreLib();
     CORINFO_MODULE_HANDLE GetLoaderModuleForEmbeddableType(CORINFO_CLASS_HANDLE classHandle);
     CORINFO_MODULE_HANDLE GetLoaderModuleForEmbeddableMethod(CORINFO_METHOD_HANDLE methodHandle);
     CORINFO_MODULE_HANDLE GetLoaderModuleForEmbeddableField(CORINFO_FIELD_HANDLE fieldHandle);
index d8cdfe8..687dbab 100644 (file)
@@ -227,7 +227,7 @@ void ThreadNative::KickOffThread_Worker(LPVOID ptr)
     _ASSERTE(pMeth);
     MethodDescCallSite invokeMethod(pMeth, &gc.orDelegate);
 
-    if (MscorlibBinder::IsClass(gc.orDelegate->GetMethodTable(), CLASS__PARAMETERIZEDTHREADSTART))
+    if (CoreLibBinder::IsClass(gc.orDelegate->GetMethodTable(), CLASS__PARAMETERIZEDTHREADSTART))
     {
         //Parameterized ThreadStart
         ARG_SLOT arg[2];
@@ -1392,7 +1392,7 @@ FCIMPL1(Object*, ThreadNative::GetThreadDeserializationTracker, StackCrawlMark*
     // To avoid reflection trying to bypass deserialization tracking, check the caller
     // and only allow SerializationInfo to call into this method.
     MethodTable* pCallerMT = SystemDomain::GetCallersType(stackMark);
-    if (pCallerMT != MscorlibBinder::GetClass(CLASS__SERIALIZATION_INFO))
+    if (pCallerMT != CoreLibBinder::GetClass(CLASS__SERIALIZATION_INFO))
     {
         COMPlusThrowArgumentException(W("stackMark"), NULL);
     }
index be3a5a3..edb8e33 100644 (file)
@@ -342,7 +342,7 @@ RegisterWaitForSingleObjectCallback_Worker(LPVOID ptr)
     orState = ObjectFromHandle(((DelegateInfo*) args->delegateInfo)->m_stateHandle);
 
 #ifdef _DEBUG
-    MethodDesc *pMeth = MscorlibBinder::GetMethod(METHOD__TPWAITORTIMER_HELPER__PERFORM_WAITORTIMER_CALLBACK);
+    MethodDesc *pMeth = CoreLibBinder::GetMethod(METHOD__TPWAITORTIMER_HELPER__PERFORM_WAITORTIMER_CALLBACK);
     LogCall(pMeth,"RWSOCallback");
 #endif
 
@@ -601,7 +601,7 @@ VOID BindIoCompletionCallBack_Worker(LPVOID args)
     // we set processed to TRUE, now it's our responsibility to guarantee proper cleanup
 
 #ifdef _DEBUG
-    MethodDesc *pMeth = MscorlibBinder::GetMethod(METHOD__IOCB_HELPER__PERFORM_IOCOMPLETION_CALLBACK);
+    MethodDesc *pMeth = CoreLibBinder::GetMethod(METHOD__IOCB_HELPER__PERFORM_IOCOMPLETION_CALLBACK);
     LogCall(pMeth,"IOCallback");
 #endif
 
@@ -769,7 +769,7 @@ void AppDomainTimerCallback_Worker(LPVOID ptr)
     CONTRACTL_END;
 
 #ifdef _DEBUG
-    MethodDesc *pMeth = MscorlibBinder::GetMethod(METHOD__TIMER_QUEUE__APPDOMAIN_TIMER_CALLBACK);
+    MethodDesc *pMeth = CoreLibBinder::GetMethod(METHOD__TIMER_QUEUE__APPDOMAIN_TIMER_CALLBACK);
     LogCall(pMeth,"AppDomainTimerCallback");
 #endif
 
index 98344d4..5f14ada 100644 (file)
@@ -1750,7 +1750,7 @@ static BOOL HasOverriddenMethod(MethodTable* mt, MethodTable* classMT, WORD meth
 
     if (!classMT->IsZapped())
     {
-        // If mscorlib is JITed, the slots can be patched and thus we need to compare the actual MethodDescs
+        // If CoreLib is JITed, the slots can be patched and thus we need to compare the actual MethodDescs
         // to detect match reliably
         if (MethodTable::GetMethodDescForSlotAddress(actual) == MethodTable::GetMethodDescForSlotAddress(base))
         {
@@ -1784,9 +1784,9 @@ static BOOL CanCompareBitsOrUseFastGetHashCode(MethodTable* mt)
         return FALSE;
     }
 
-    MethodTable* valueTypeMT = MscorlibBinder::GetClass(CLASS__VALUE_TYPE);
-    WORD slotEquals = MscorlibBinder::GetMethod(METHOD__VALUE_TYPE__EQUALS)->GetSlot();
-    WORD slotGetHashCode = MscorlibBinder::GetMethod(METHOD__VALUE_TYPE__GET_HASH_CODE)->GetSlot();
+    MethodTable* valueTypeMT = CoreLibBinder::GetClass(CLASS__VALUE_TYPE);
+    WORD slotEquals = CoreLibBinder::GetMethod(METHOD__VALUE_TYPE__EQUALS)->GetSlot();
+    WORD slotGetHashCode = CoreLibBinder::GetMethod(METHOD__VALUE_TYPE__GET_HASH_CODE)->GetSlot();
 
     // Check the input type.
     if (HasOverriddenMethod(mt, valueTypeMT, slotEquals)
@@ -2116,7 +2116,7 @@ static bool HasOverriddenStreamMethod(MethodTable * pMT, WORD slot)
 
     if (!g_pStreamMT->IsZapped())
     {
-        // If mscorlib is JITed, the slots can be patched and thus we need to compare the actual MethodDescs
+        // If CoreLib is JITed, the slots can be patched and thus we need to compare the actual MethodDescs
         // to detect match reliably
         if (MethodTable::GetMethodDescForSlotAddress(actual) == MethodTable::GetMethodDescForSlotAddress(base))
             return false;
@@ -2135,9 +2135,9 @@ FCIMPL1(FC_BOOL_RET, StreamNative::HasOverriddenBeginEndRead, Object *stream)
     if (g_pStreamMT == NULL || g_slotBeginRead == 0 || g_slotEndRead == 0)
     {
         HELPER_METHOD_FRAME_BEGIN_RET_1(stream);
-        g_pStreamMT = MscorlibBinder::GetClass(CLASS__STREAM);
-        g_slotBeginRead = MscorlibBinder::GetMethod(METHOD__STREAM__BEGIN_READ)->GetSlot();
-        g_slotEndRead = MscorlibBinder::GetMethod(METHOD__STREAM__END_READ)->GetSlot();
+        g_pStreamMT = CoreLibBinder::GetClass(CLASS__STREAM);
+        g_slotBeginRead = CoreLibBinder::GetMethod(METHOD__STREAM__BEGIN_READ)->GetSlot();
+        g_slotEndRead = CoreLibBinder::GetMethod(METHOD__STREAM__END_READ)->GetSlot();
         HELPER_METHOD_FRAME_END();
     }
 
@@ -2157,9 +2157,9 @@ FCIMPL1(FC_BOOL_RET, StreamNative::HasOverriddenBeginEndWrite, Object *stream)
     if (g_pStreamMT == NULL || g_slotBeginWrite == 0 || g_slotEndWrite == 0)
     {
         HELPER_METHOD_FRAME_BEGIN_RET_1(stream);
-        g_pStreamMT = MscorlibBinder::GetClass(CLASS__STREAM);
-        g_slotBeginWrite = MscorlibBinder::GetMethod(METHOD__STREAM__BEGIN_WRITE)->GetSlot();
-        g_slotEndWrite = MscorlibBinder::GetMethod(METHOD__STREAM__END_WRITE)->GetSlot();
+        g_pStreamMT = CoreLibBinder::GetClass(CLASS__STREAM);
+        g_slotBeginWrite = CoreLibBinder::GetMethod(METHOD__STREAM__BEGIN_WRITE)->GetSlot();
+        g_slotEndWrite = CoreLibBinder::GetMethod(METHOD__STREAM__END_WRITE)->GetSlot();
         HELPER_METHOD_FRAME_END();
     }
 
index 0a9471e..e9857a9 100644 (file)
@@ -91,7 +91,7 @@ VOID  AssemblySpec::Bind(AppDomain      *pAppDomain,
         STANDARD_VM_CHECK;
         PRECONDITION(CheckPointer(pResult));
         PRECONDITION(CheckPointer(pAppDomain));
-        PRECONDITION(IsMscorlib() == FALSE); // This should never be called for MSCORLIB (explicit loading)
+        PRECONDITION(IsCoreLib() == FALSE); // This should never be called for CoreLib (explicit loading)
     }
     CONTRACTL_END;
 
@@ -116,7 +116,7 @@ VOID  AssemblySpec::Bind(AppDomain      *pAppDomain,
     ReleaseHolder<ICLRPrivAssembly> pPrivAsm;
     _ASSERTE(pBinder != NULL);
 
-    if (m_wszCodeBase == NULL && IsMscorlibSatellite())
+    if (m_wszCodeBase == NULL && IsCoreLibSatellite())
     {
         StackSString sSystemDirectory(SystemDomain::System()->SystemDirectory());
         StackSString tmpString;
index db6559d..3c8b1cb 100644 (file)
@@ -40,7 +40,7 @@ public:
 
     BOOL Found();
     PEImage* GetPEImage();
-    BOOL IsMscorlib();
+    BOOL IsCoreLib();
     void GetBindAssembly(ICLRPrivAssembly** ppAssembly);
 #ifdef FEATURE_PREJIT
     BOOL HasNativeImage();
index 1568ccb..10f367b 100644 (file)
@@ -18,7 +18,7 @@ inline BOOL CoreBindResult::Found()
     return (m_pAssembly!=NULL);
 };
 
-inline BOOL CoreBindResult::IsMscorlib()
+inline BOOL CoreBindResult::IsCoreLib()
 {
     CONTRACTL
     {
@@ -30,7 +30,7 @@ inline BOOL CoreBindResult::IsMscorlib()
 
     BINDER_SPACE::Assembly* pAssembly = BINDER_SPACE::GetAssemblyFromPrivAssemblyFast(m_pAssembly);
 #ifndef CROSSGEN_COMPILE
-    return pAssembly->GetAssemblyName()->IsMscorlib();
+    return pAssembly->GetAssemblyName()->IsCoreLib();
 #else
     return (pAssembly->GetPath()).EndsWithCaseInsensitive(SString(CoreLibName_IL_W));
 #endif
similarity index 88%
rename from src/coreclr/src/vm/mscorlib.cpp
rename to src/coreclr/src/vm/corelib.cpp
index 70eeb9b..4562e2e 100644 (file)
@@ -4,20 +4,20 @@
 
 
 //
-// This file defines tables for references between VM and mscorlib.
+// This file defines tables for references between VM and corelib.
 //
 // When compiling crossgen, this file is compiled with the FEATURE_XXX define settings matching the target.
 // It allows us to strip features (e.g. refection only load) from crossgen without stripping them from the target.
 //
 
-#ifdef CROSSGEN_MSCORLIB
+#ifdef CROSSGEN_CORELIB
 // Use minimal set of headers for crossgen
 #include "windows.h"
 #include "corinfo.h"
 #else
 #include "common.h"
 #include "ecall.h"
-#endif // CROSSGEN_MSCORLIB
+#endif // CROSSGEN_CORELIB
 
 #ifndef CROSSGEN_COMPILE
 //
 
 #include "tailcallhelp.h"
 
-#endif // CROSSGEN_MSCORLIB
+#endif // CROSSGEN_CORELIB
 
 
-#ifdef CROSSGEN_MSCORLIB
+#ifdef CROSSGEN_CORELIB
 
 ///////////////////////////////////////////////////////////////////////////////
 //
@@ -106,7 +106,7 @@ enum {
     FCFuncFlag_EndOfArray   = 0x01,
     FCFuncFlag_HasSignature = 0x02,
     FCFuncFlag_Unreferenced = 0x04, // Suppress unused fcall check
-    FCFuncFlag_QCall        = 0x08, // QCall - mscorlib.dll to mscorwks.dll transition implemented as PInvoke
+    FCFuncFlag_QCall        = 0x08, // QCall - CoreLib to VM transition implemented as PInvoke
 };
 
 struct ECClass
@@ -129,9 +129,9 @@ enum BinderClassID
 #undef TYPEINFO
 
 #define DEFINE_CLASS(i,n,s)         CLASS__ ## i,
-#include "mscorlib.h"
+#include "corelib.h"
 
-    CLASS__MSCORLIB_COUNT,
+    CLASS__CORELIB_COUNT,
 
     CLASS__VOID     = CLASS__ELEMENT_TYPE_VOID,
     CLASS__BOOLEAN  = CLASS__ELEMENT_TYPE_BOOLEAN,
@@ -153,31 +153,31 @@ enum BinderClassID
     CLASS__OBJECT   = CLASS__ELEMENT_TYPE_OBJECT
 };
 
-struct MscorlibClassDescription
+struct CoreLibClassDescription
 {
     LPCSTR  nameSpace;
     LPCSTR  name;
 };
 
-struct MscorlibMethodDescription
+struct CoreLibMethodDescription
 {
     BinderClassID classID;
     LPCSTR  name;
     const HardCodedMetaSig * sig;
 };
 
-struct MscorlibFieldDescription
+struct CoreLibFieldDescription
 {
     BinderClassID classID;
     LPCSTR  name;
 };
 
-#endif // CROSSGEN_MSCORLIB
+#endif // CROSSGEN_CORELIB
 
 
-#ifdef CROSSGEN_MSCORLIB
+#ifdef CROSSGEN_CORELIB
 // When compiling crossgen this namespace creates the second version of the tables than matches the target
-namespace CrossGenMscorlib {
+namespace CrossGenCoreLib {
 #endif
 
 
@@ -321,20 +321,20 @@ enum _gsigc {
 
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Mscorlib binder
+// CoreLib binder
 //
 
 // Extern definitions so that binder.cpp can see these tables
-extern const MscorlibClassDescription c_rgMscorlibClassDescriptions[];
-extern const USHORT c_nMscorlibClassDescriptions;
+extern const CoreLibClassDescription c_rgCoreLibClassDescriptions[];
+extern const USHORT c_nCoreLibClassDescriptions;
 
-extern const MscorlibMethodDescription c_rgMscorlibMethodDescriptions[];
-extern const USHORT c_nMscorlibMethodDescriptions;
+extern const CoreLibMethodDescription c_rgCoreLibMethodDescriptions[];
+extern const USHORT c_nCoreLibMethodDescriptions;
 
-extern const MscorlibFieldDescription c_rgMscorlibFieldDescriptions[];
-extern const USHORT c_nMscorlibFieldDescriptions;
+extern const CoreLibFieldDescription c_rgCoreLibFieldDescriptions[];
+extern const USHORT c_nCoreLibFieldDescriptions;
 
-const MscorlibClassDescription c_rgMscorlibClassDescriptions[] =
+const CoreLibClassDescription c_rgCoreLibClassDescriptions[] =
 {
     #define TYPEINFO(e,ns,c,s,g,ia,ip,if,im,gv)   { ns, c },
     #include "cortypeinfo.h"
@@ -342,29 +342,29 @@ const MscorlibClassDescription c_rgMscorlibClassDescriptions[] =
 
     #define DEFINE_CLASS(i,n,s)        { g_ ## n ## NS, # s },
     #include "namespace.h"
-    #include "mscorlib.h"
+    #include "corelib.h"
 
-    // Include all exception types here that are defined in mscorlib.  Omit exceptions defined elsewhere.
+    // Include all exception types here that are defined in corelib.  Omit exceptions defined elsewhere.
     #define DEFINE_EXCEPTION(ns, reKind, bHRformessage, ...) { ns , # reKind },
     #include "rexcep.h"
 };
-const USHORT c_nMscorlibClassDescriptions = NumItems(c_rgMscorlibClassDescriptions);
+const USHORT c_nCoreLibClassDescriptions = NumItems(c_rgCoreLibClassDescriptions);
 
 #define gsig_NoSig (*(HardCodedMetaSig *)NULL)
 
-const MscorlibMethodDescription c_rgMscorlibMethodDescriptions[] =
+const CoreLibMethodDescription c_rgCoreLibMethodDescriptions[] =
 {
     #define DEFINE_METHOD(c,i,s,g)          { CLASS__ ## c , # s, & gsig_ ## g },
-    #include "mscorlib.h"
+    #include "corelib.h"
 };
-const USHORT c_nMscorlibMethodDescriptions = NumItems(c_rgMscorlibMethodDescriptions) + 1;
+const USHORT c_nCoreLibMethodDescriptions = NumItems(c_rgCoreLibMethodDescriptions) + 1;
 
-const MscorlibFieldDescription c_rgMscorlibFieldDescriptions[] =
+const CoreLibFieldDescription c_rgCoreLibFieldDescriptions[] =
 {
     #define DEFINE_FIELD(c,i,s)           { CLASS__ ## c , # s },
-    #include "mscorlib.h"
+    #include "corelib.h"
 };
-const USHORT c_nMscorlibFieldDescriptions = NumItems(c_rgMscorlibFieldDescriptions) + 1;
+const USHORT c_nCoreLibFieldDescriptions = NumItems(c_rgCoreLibFieldDescriptions) + 1;
 
 ///////////////////////////////////////////////////////////////////////////////
 //
@@ -375,7 +375,7 @@ const USHORT c_nMscorlibFieldDescriptions = NumItems(c_rgMscorlibFieldDescriptio
 EXTERN_C const LPVOID gPalGlobalizationNative[];
 
 // When compiling crossgen, we only need the target version of the ecall tables
-#if !defined(CROSSGEN_COMPILE) || defined(CROSSGEN_MSCORLIB)
+#if !defined(CROSSGEN_COMPILE) || defined(CROSSGEN_CORELIB)
 
 #ifdef CROSSGEN_COMPILE
 
@@ -433,9 +433,9 @@ const ECClass c_rgECClasses[] =
 
 const int c_nECClasses = NumItems(c_rgECClasses);
 
-#endif // !CROSSGEN_COMPILE && CROSSGEN_MSCORLIB
+#endif // !CROSSGEN_COMPILE && CROSSGEN_CORELIB
 
 
-#ifdef CROSSGEN_MSCORLIB
-}; // namespace CrossGenMscorlib
+#ifdef CROSSGEN_CORELIB
+}; // namespace CrossGenCoreLib
 #endif
similarity index 99%
rename from src/coreclr/src/vm/mscorlib.h
rename to src/coreclr/src/vm/corelib.h
index fd2578f..f6ad66d 100644 (file)
@@ -1,6 +1,6 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the MIT license.
-// This file contains the classes, methods, and field used by the EE from mscorlib
+// This file contains the classes, methods, and field used by the EE from corelib
 
 //
 // To use this, define one of the following macros & include the file like so:
@@ -8,7 +8,7 @@
 // #define DEFINE_CLASS(id, nameSpace, stringName)         CLASS__ ## id,
 // #define DEFINE_METHOD(classId, id, stringName, gSign)
 // #define DEFINE_FIELD(classId, id, stringName)
-// #include "mscorlib.h"
+// #include "corelib.h"
 //
 // Note: To determine if the namespace you want to use in DEFINE_CLASS is supported or not,
 //       examine vm\namespace.h. If it is not present, define it there and then proceed to use it below.
index a0b321a..e8083ca 100644 (file)
@@ -22,6 +22,7 @@ set(VM_CROSSGEN_SOURCES
   ../contractimpl.cpp
   ../coreassemblyspec.cpp
   ../corebindresult.cpp
+  ../corelib.cpp
   ../crossgencompile.cpp
   ../custommarshalerinfo.cpp
   ../dataimage.cpp
@@ -60,7 +61,6 @@ set(VM_CROSSGEN_SOURCES
   ../methodtable.cpp
   ../methodtablebuilder.cpp
   ../mlinfo.cpp
-  ../mscorlib.cpp
   ../nativeimage.cpp
   ../olevariant.cpp
   ../pefile.cpp
@@ -115,6 +115,7 @@ set(VM_CROSSGEN_HEADERS
   ../comdelegate.h
   ../compile.h
   ../contractimpl.h
+  ../corelib.h
   ../custommarshalerinfo.h
   ../dataimage.h
   ../debuginfostore.h
@@ -154,7 +155,6 @@ set(VM_CROSSGEN_HEADERS
   ../methodtablebuilder.h
   ../methodtablebuilder.inl
   ../mlinfo.h
-  ../mscorlib.h
   ../olevariant.h
   ../pefile.h
   ../pefile.inl
@@ -259,18 +259,18 @@ add_dependencies(cee_crossgen eventing_headers)
 set_target_properties(cee_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
 target_precompile_header(TARGET cee_crossgen HEADER common.h)
 if (MSVC)
-  # mscorlib.cpp does not compile with precompiled header file
-  set_source_files_properties(../mscorlib.cpp PROPERTIES COMPILE_FLAGS "/Y-")
+  # corelib.cpp does not compile with precompiled header file
+  set_source_files_properties(../corelib.cpp PROPERTIES COMPILE_FLAGS "/Y-")
 endif()
 
-add_library_clr(mscorlib_crossgen ../mscorlib.cpp)
-add_dependencies(mscorlib_crossgen eventing_headers)
-target_compile_definitions(mscorlib_crossgen
+add_library_clr(corelib_crossgen ../corelib.cpp)
+add_dependencies(corelib_crossgen eventing_headers)
+target_compile_definitions(corelib_crossgen
     PRIVATE
         EnC_SUPPORTED
         FEATURE_EVENT_TRACE
         FEATURE_MULTICOREJIT
-        CROSSGEN_MSCORLIB)
+        CROSSGEN_CORELIB)
 
-set_target_properties(mscorlib_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
+set_target_properties(corelib_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
 
index 1eb5550..dab0f50 100644 (file)
@@ -291,7 +291,7 @@ template<class TRAITS>
     LAHASHKEYTOTRACKERSREF hashKeyToTrackers;
     OBJECTREF keyValueStore;
 
-    if (hashKeyEntry->GetMethodTable() == MscorlibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
+    if (hashKeyEntry->GetMethodTable() == CoreLibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
     {
         hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)hashKeyEntry;
         keyValueStore = hashKeyToTrackers->_laLocalKeyValueStore;
@@ -321,7 +321,7 @@ template<class TKey>
     LAHASHKEYTOTRACKERSREF hashKeyToTrackers;
     OBJECTREF keyValueStore;
 
-    if (hashKeyEntry->GetMethodTable() == MscorlibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
+    if (hashKeyEntry->GetMethodTable() == CoreLibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
     {
         hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)hashKeyEntry;
         keyValueStore = hashKeyToTrackers->_laLocalKeyValueStore;
@@ -376,7 +376,7 @@ void CrossLoaderAllocatorHash<TRAITS>::Add(TKey key, TValue value, LoaderAllocat
 
             if (pLoaderAllocatorOfValue != m_pLoaderAllocator)
             {
-                gc.hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)AllocateObject(MscorlibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS));
+                gc.hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)AllocateObject(CoreLibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS));
                 SetObjectReference(&gc.hashKeyToTrackers->_laLocalKeyValueStore, gc.keyValueStore);
                 gc.hashKeyEntry = gc.hashKeyToTrackers;
             }
@@ -394,7 +394,7 @@ void CrossLoaderAllocatorHash<TRAITS>::Add(TKey key, TValue value, LoaderAllocat
         {
             gc.keyToTrackersHash.GetElement(index, gc.hashKeyEntry);
 
-            if (gc.hashKeyEntry->GetMethodTable() == MscorlibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
+            if (gc.hashKeyEntry->GetMethodTable() == CoreLibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
             {
                 gc.hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)gc.hashKeyEntry;
                 gc.keyValueStore = gc.hashKeyToTrackers->_laLocalKeyValueStore;
@@ -431,7 +431,7 @@ void CrossLoaderAllocatorHash<TRAITS>::Add(TKey key, TValue value, LoaderAllocat
             if (gc.hashKeyToTrackers == NULL)
             {
                 // Nothing has yet caused the trackers proxy object to be setup. Create it now, and update the keyToTrackersHash
-                gc.hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)AllocateObject(MscorlibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS));
+                gc.hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)AllocateObject(CoreLibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS));
                 SetObjectReference(&gc.hashKeyToTrackers->_laLocalKeyValueStore, gc.keyValueStore);
                 gc.hashKeyEntry = gc.hashKeyToTrackers;
                 gc.keyToTrackersHash.SetElement(index, gc.hashKeyEntry);
@@ -508,7 +508,7 @@ void CrossLoaderAllocatorHash<TRAITS>::Remove(TKey key, TValue value, LoaderAllo
         {
             gc.keyToTrackersHash.GetElement(index, gc.hashKeyEntry);
 
-            if (gc.hashKeyEntry->GetMethodTable() == MscorlibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
+            if (gc.hashKeyEntry->GetMethodTable() == CoreLibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
             {
                 gc.hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)gc.hashKeyEntry;
                 gc.keyValueStore = gc.hashKeyToTrackers->_laLocalKeyValueStore;
@@ -602,7 +602,7 @@ bool CrossLoaderAllocatorHash<TRAITS>::VisitValuesOfKey(TKey key, Visitor &visit
             // We have an entry in the hashtable for the key/dependenthandle.
             gc.keyToTrackersHash.GetElement(index, gc.hashKeyEntry);
 
-            if (gc.hashKeyEntry->GetMethodTable() == MscorlibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
+            if (gc.hashKeyEntry->GetMethodTable() == CoreLibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
             {
                 gc.hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)gc.hashKeyEntry;
                 gc.keyValueStore = gc.hashKeyToTrackers->_laLocalKeyValueStore;
@@ -621,7 +621,7 @@ bool CrossLoaderAllocatorHash<TRAITS>::VisitValuesOfKey(TKey key, Visitor &visit
             {
                 // Is there a single dependenttracker here, or a set.
 
-                if (gc.hashKeyToTrackers->_trackerOrTrackerSet->GetMethodTable() == MscorlibBinder::GetExistingClass(CLASS__LAHASHDEPENDENTHASHTRACKER))
+                if (gc.hashKeyToTrackers->_trackerOrTrackerSet->GetMethodTable() == CoreLibBinder::GetExistingClass(CLASS__LAHASHDEPENDENTHASHTRACKER))
                 {
                     gc.dependentTracker = (LAHASHDEPENDENTHASHTRACKERREF)gc.hashKeyToTrackers->_trackerOrTrackerSet;
                     result = VisitTracker(key, gc.dependentTracker, visitor);
@@ -785,7 +785,7 @@ void CrossLoaderAllocatorHash<TRAITS>::RemoveAll(TKey key)
             // We have an entry in the hashtable for the key/dependenthandle.
             gc.keyToTrackersHash.GetElement(index, gc.hashKeyEntry);
 
-            if (gc.hashKeyEntry->GetMethodTable() == MscorlibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
+            if (gc.hashKeyEntry->GetMethodTable() == CoreLibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
             {
                 gc.hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)gc.hashKeyEntry;
                 gc.keyValueStore = gc.hashKeyToTrackers->_laLocalKeyValueStore;
@@ -801,7 +801,7 @@ void CrossLoaderAllocatorHash<TRAITS>::RemoveAll(TKey key)
             {
                 // Is there a single dependenttracker here, or a set.
 
-                if (gc.hashKeyToTrackers->_trackerOrTrackerSet->GetMethodTable() == MscorlibBinder::GetExistingClass(CLASS__LAHASHDEPENDENTHASHTRACKER))
+                if (gc.hashKeyToTrackers->_trackerOrTrackerSet->GetMethodTable() == CoreLibBinder::GetExistingClass(CLASS__LAHASHDEPENDENTHASHTRACKER))
                 {
                     gc.dependentTracker = (LAHASHDEPENDENTHASHTRACKERREF)gc.hashKeyToTrackers->_trackerOrTrackerSet;
                     DeleteEntryTracker(key, gc.dependentTracker);
@@ -972,7 +972,7 @@ template <class Visitor>
 
     GCPROTECT_BEGIN(gc);
     {
-        if (gc.hashKeyEntry->GetMethodTable() == MscorlibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
+        if (gc.hashKeyEntry->GetMethodTable() == CoreLibBinder::GetExistingClass(CLASS__LAHASHKEYTOTRACKERS))
         {
             gc.hashKeyToTrackers = (LAHASHKEYTOTRACKERSREF)gc.hashKeyEntry;
             gc.keyValueStore = gc.hashKeyToTrackers->_laLocalKeyValueStore;
@@ -1028,14 +1028,14 @@ template <class TRAITS>
 {
     STANDARD_VM_CONTRACT;
 
-    // Force these types to be loaded, so that the hashtable logic can use MscorlibBinder::GetExistingClass
+    // Force these types to be loaded, so that the hashtable logic can use CoreLibBinder::GetExistingClass
     // throughout and avoid lock ordering issues
-    MscorlibBinder::GetClass(CLASS__LAHASHKEYTOTRACKERS);
-    MscorlibBinder::GetClass(CLASS__LAHASHDEPENDENTHASHTRACKER);
-    MscorlibBinder::GetClass(CLASS__GCHEAPHASH);
-    TypeHandle elemType = TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_I1));
+    CoreLibBinder::GetClass(CLASS__LAHASHKEYTOTRACKERS);
+    CoreLibBinder::GetClass(CLASS__LAHASHDEPENDENTHASHTRACKER);
+    CoreLibBinder::GetClass(CLASS__GCHEAPHASH);
+    TypeHandle elemType = TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_I1));
     TypeHandle typHnd = ClassLoader::LoadArrayTypeThrowing(elemType, ELEMENT_TYPE_SZARRAY, 0);
-    elemType = TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_OBJECT));
+    elemType = TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_OBJECT));
     typHnd = ClassLoader::LoadArrayTypeThrowing(elemType, ELEMENT_TYPE_SZARRAY, 0);
 }
 
@@ -1052,14 +1052,14 @@ void CrossLoaderAllocatorHash<TRAITS>::EnsureManagedObjectsInitted()
 
     if (m_loaderAllocatorToDependentTrackerHash == NULL)
     {
-        OBJECTREF laToDependentHandleHashObject = AllocateObject(MscorlibBinder::GetExistingClass(CLASS__GCHEAPHASH));
+        OBJECTREF laToDependentHandleHashObject = AllocateObject(CoreLibBinder::GetExistingClass(CLASS__GCHEAPHASH));
         m_loaderAllocatorToDependentTrackerHash = m_pLoaderAllocator->GetDomain()->CreateHandle(laToDependentHandleHashObject);
         m_pLoaderAllocator->RegisterHandleForCleanup(m_loaderAllocatorToDependentTrackerHash);
     }
 
     if (m_keyToDependentTrackersHash == NULL)
     {
-        OBJECTREF m_keyToDependentTrackersHashObject = AllocateObject(MscorlibBinder::GetExistingClass(CLASS__GCHEAPHASH));
+        OBJECTREF m_keyToDependentTrackersHashObject = AllocateObject(CoreLibBinder::GetExistingClass(CLASS__GCHEAPHASH));
         m_keyToDependentTrackersHash = m_pLoaderAllocator->GetDomain()->CreateHandle(m_keyToDependentTrackersHashObject);
         m_pLoaderAllocator->RegisterHandleForCleanup(m_keyToDependentTrackersHash);
     }
@@ -1096,8 +1096,8 @@ LAHASHDEPENDENTHASHTRACKERREF CrossLoaderAllocatorHash<TRAITS>::GetDependentTrac
         }
         else
         {
-            gc.dependentTracker = (LAHASHDEPENDENTHASHTRACKERREF)AllocateObject(MscorlibBinder::GetExistingClass(CLASS__LAHASHDEPENDENTHASHTRACKER));
-            gc.GCHeapHashForKeyToValueStore = (GCHEAPHASHOBJECTREF)AllocateObject(MscorlibBinder::GetExistingClass(CLASS__GCHEAPHASH));
+            gc.dependentTracker = (LAHASHDEPENDENTHASHTRACKERREF)AllocateObject(CoreLibBinder::GetExistingClass(CLASS__LAHASHDEPENDENTHASHTRACKER));
+            gc.GCHeapHashForKeyToValueStore = (GCHEAPHASHOBJECTREF)AllocateObject(CoreLibBinder::GetExistingClass(CLASS__GCHEAPHASH));
 
             OBJECTREF exposedObject = pLoaderAllocator->GetExposedObject();
             if (exposedObject == NULL)
@@ -1105,7 +1105,7 @@ LAHASHDEPENDENTHASHTRACKERREF CrossLoaderAllocatorHash<TRAITS>::GetDependentTrac
                 if (m_globalDependentTrackerRootHandle == NULL)
                 {
                     // Global LoaderAllocator does not have an exposed object, so create a fake one
-                    exposedObject = AllocateObject(MscorlibBinder::GetExistingClass(CLASS__OBJECT));
+                    exposedObject = AllocateObject(CoreLibBinder::GetExistingClass(CLASS__OBJECT));
                     m_globalDependentTrackerRootHandle = GetAppDomain()->CreateHandle(exposedObject);
                     m_pLoaderAllocator->RegisterHandleForCleanup(m_globalDependentTrackerRootHandle);
                 }
@@ -1162,7 +1162,7 @@ GCHEAPHASHOBJECTREF CrossLoaderAllocatorHash<TRAITS>::GetKeyToValueCrossLAHashFo
             gc.dependentTracker = GetDependentTrackerForLoaderAllocator(pValueLoaderAllocator);
             SetObjectReference(&gc.hashKeyToTrackers->_trackerOrTrackerSet, gc.dependentTracker);
         }
-        else if (gc.hashKeyToTrackers->_trackerOrTrackerSet->GetMethodTable() == MscorlibBinder::GetExistingClass(CLASS__LAHASHDEPENDENTHASHTRACKER))
+        else if (gc.hashKeyToTrackers->_trackerOrTrackerSet->GetMethodTable() == CoreLibBinder::GetExistingClass(CLASS__LAHASHDEPENDENTHASHTRACKER))
         {
             gc.dependentTrackerMaybe = (LAHASHDEPENDENTHASHTRACKERREF)gc.hashKeyToTrackers->_trackerOrTrackerSet;
             if (gc.dependentTrackerMaybe->IsTrackerFor(pValueLoaderAllocator))
@@ -1181,7 +1181,7 @@ GCHEAPHASHOBJECTREF CrossLoaderAllocatorHash<TRAITS>::GetKeyToValueCrossLAHashFo
                 {
                     // Allocate the dependent tracker hash
                     // Fill with the existing dependentTrackerMaybe, and gc.DependentTracker
-                    gc.dependentTrackerHash = GCHeapHashDependentHashTrackerHash(AllocateObject(MscorlibBinder::GetExistingClass(CLASS__GCHEAPHASH)));
+                    gc.dependentTrackerHash = GCHeapHashDependentHashTrackerHash(AllocateObject(CoreLibBinder::GetExistingClass(CLASS__GCHEAPHASH)));
                     LoaderAllocator *pLoaderAllocatorKey = gc.dependentTracker->GetLoaderAllocatorUnsafe();
                     gc.dependentTrackerHash.Add(&pLoaderAllocatorKey, [&gc](PTRARRAYREF arr, INT32 index)
                         {
index a06cbf0..b8fe16e 100644 (file)
@@ -169,7 +169,7 @@ CustomAttributeManagedValues Attribute::GetManagedCaValue(CaValue* pCaVal)
 
             if (length != (ULONG)-1)
             {
-                gc.array = (CaValueArrayREF)AllocateSzArray(TypeHandle(MscorlibBinder::GetClass(CLASS__CUSTOM_ATTRIBUTE_ENCODED_ARGUMENT)).MakeSZArray(), length);
+                gc.array = (CaValueArrayREF)AllocateSzArray(TypeHandle(CoreLibBinder::GetClass(CLASS__CUSTOM_ATTRIBUTE_ENCODED_ARGUMENT)).MakeSZArray(), length);
                 CustomAttributeValue* pValues = gc.array->GetDirectPointerToNonObjectElements();
 
                 for (COUNT_T i = 0; i < length; i ++)
@@ -929,9 +929,9 @@ FCIMPL7(void, COMCustomAttribute::GetPropertyOrFieldData, ReflectModuleBaseObjec
                 {
                     // load the proper type so that code in managed knows which property to load
                     if (fieldType == SERIALIZATION_TYPE_STRING)
-                        *pType = MscorlibBinder::GetElementType(ELEMENT_TYPE_STRING)->GetManagedClassObject();
+                        *pType = CoreLibBinder::GetElementType(ELEMENT_TYPE_STRING)->GetManagedClassObject();
                     else if (fieldType == SERIALIZATION_TYPE_TYPE)
-                        *pType = MscorlibBinder::GetClass(CLASS__TYPE)->GetManagedClassObject();
+                        *pType = CoreLibBinder::GetClass(CLASS__TYPE)->GetManagedClassObject();
                 }
                 break;
             case SERIALIZATION_TYPE_SZARRAY:
@@ -942,9 +942,9 @@ FCIMPL7(void, COMCustomAttribute::GetPropertyOrFieldData, ReflectModuleBaseObjec
                 {
                     _ASSERTE(!bObjectCreated);
                     if (arrayType == SERIALIZATION_TYPE_STRING)
-                        nullTH = TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_STRING));
+                        nullTH = TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_STRING));
                     else if (arrayType == SERIALIZATION_TYPE_TYPE)
-                        nullTH = TypeHandle(MscorlibBinder::GetClass(CLASS__TYPE));
+                        nullTH = TypeHandle(CoreLibBinder::GetClass(CLASS__TYPE));
                     else if (arrayType == SERIALIZATION_TYPE_TAGGED_OBJECT)
                         nullTH = TypeHandle(g_pObjectClass);
                     ReadArray(pCtorAssembly, arrayType, arraySize, nullTH, &pBlob, pBlobEnd, pModule, (BASEARRAYREF*)value);
@@ -955,17 +955,17 @@ FCIMPL7(void, COMCustomAttribute::GetPropertyOrFieldData, ReflectModuleBaseObjec
                     switch (arrayType)
                     {
                         case SERIALIZATION_TYPE_STRING:
-                            arrayTH = TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_STRING));
+                            arrayTH = TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_STRING));
                             break;
                         case SERIALIZATION_TYPE_TYPE:
-                            arrayTH = TypeHandle(MscorlibBinder::GetClass(CLASS__TYPE));
+                            arrayTH = TypeHandle(CoreLibBinder::GetClass(CLASS__TYPE));
                             break;
                         case SERIALIZATION_TYPE_TAGGED_OBJECT:
                             arrayTH = TypeHandle(g_pObjectClass);
                             break;
                         default:
                             if (SERIALIZATION_TYPE_BOOLEAN <= arrayType && arrayType <= SERIALIZATION_TYPE_R8)
-                                arrayTH = TypeHandle(MscorlibBinder::GetElementType((CorElementType)arrayType));
+                                arrayTH = TypeHandle(CoreLibBinder::GetElementType((CorElementType)arrayType));
                     }
                     if (!arrayTH.IsNull())
                     {
@@ -977,7 +977,7 @@ FCIMPL7(void, COMCustomAttribute::GetPropertyOrFieldData, ReflectModuleBaseObjec
             }
             default:
                 if (SERIALIZATION_TYPE_BOOLEAN <= fieldType && fieldType <= SERIALIZATION_TYPE_R8)
-                    pMTValue = MscorlibBinder::GetElementType((CorElementType)fieldType);
+                    pMTValue = CoreLibBinder::GetElementType((CorElementType)fieldType);
                 else if(fieldType == SERIALIZATION_TYPE_ENUM)
                     fieldType = (CorSerializationType)pMTValue->GetInternalCorElementType();
                 else
@@ -1027,12 +1027,12 @@ TypeHandle COMCustomAttribute::GetTypeHandleFromBlob(Assembly *pCtorAssembly,
     case SERIALIZATION_TYPE_U8:
     case SERIALIZATION_TYPE_R8:
     case SERIALIZATION_TYPE_STRING:
-        pMTType = MscorlibBinder::GetElementType((CorElementType)objType);
+        pMTType = CoreLibBinder::GetElementType((CorElementType)objType);
         RtnTypeHnd = TypeHandle(pMTType);
         break;
 
     case ELEMENT_TYPE_CLASS:
-        pMTType = MscorlibBinder::GetClass(CLASS__TYPE);
+        pMTType = CoreLibBinder::GetClass(CLASS__TYPE);
         RtnTypeHnd = TypeHandle(pMTType);
         break;
 
@@ -1386,7 +1386,7 @@ ARG_SLOT COMCustomAttribute::GetDataFromBlob(Assembly *pCtorAssembly,
                 goto stringType;
             else if (pMT == g_pObjectClass)
                 goto typeObject;
-            else if (MscorlibBinder::IsClass(pMT, CLASS__TYPE))
+            else if (CoreLibBinder::IsClass(pMT, CLASS__TYPE))
                 goto typeType;
         }
 
index 8396b45..67acbff 100644 (file)
@@ -43,7 +43,7 @@ CustomMarshalerInfo::CustomMarshalerInfo(LoaderAllocator *pLoaderAllocator, Type
 
 
     // Make sure the custom marshaller implements ICustomMarshaler.
-    if (!hndCustomMarshalerType.GetMethodTable()->CanCastToInterface(MscorlibBinder::GetClass(CLASS__ICUSTOM_MARSHALER)))
+    if (!hndCustomMarshalerType.GetMethodTable()->CanCastToInterface(CoreLibBinder::GetClass(CLASS__ICUSTOM_MARSHALER)))
     {
         DefineFullyQualifiedNameForClassW()
         COMPlusThrow(kApplicationException,
@@ -304,7 +304,7 @@ MethodDesc *CustomMarshalerInfo::GetCustomMarshalerMD(EnumCustomMarshalerMethods
 
     MethodTable *pMT = hndCustomMarshalertype.AsMethodTable();
 
-    _ASSERTE(pMT->CanCastToInterface(MscorlibBinder::GetClass(CLASS__ICUSTOM_MARSHALER)));
+    _ASSERTE(pMT->CanCastToInterface(CoreLibBinder::GetClass(CLASS__ICUSTOM_MARSHALER)));
 
     MethodDesc *pMD = NULL;
 
@@ -312,28 +312,28 @@ MethodDesc *CustomMarshalerInfo::GetCustomMarshalerMD(EnumCustomMarshalerMethods
     {
         case CustomMarshalerMethods_MarshalNativeToManaged:
             pMD = pMT->GetMethodDescForInterfaceMethod(
-                       MscorlibBinder::GetMethod(METHOD__ICUSTOM_MARSHALER__MARSHAL_NATIVE_TO_MANAGED),
+                       CoreLibBinder::GetMethod(METHOD__ICUSTOM_MARSHALER__MARSHAL_NATIVE_TO_MANAGED),
                        TRUE /* throwOnConflict */);
             break;
         case CustomMarshalerMethods_MarshalManagedToNative:
             pMD = pMT->GetMethodDescForInterfaceMethod(
-                       MscorlibBinder::GetMethod(METHOD__ICUSTOM_MARSHALER__MARSHAL_MANAGED_TO_NATIVE),
+                       CoreLibBinder::GetMethod(METHOD__ICUSTOM_MARSHALER__MARSHAL_MANAGED_TO_NATIVE),
                        TRUE /* throwOnConflict */);
             break;
         case CustomMarshalerMethods_CleanUpNativeData:
             pMD = pMT->GetMethodDescForInterfaceMethod(
-                        MscorlibBinder::GetMethod(METHOD__ICUSTOM_MARSHALER__CLEANUP_NATIVE_DATA),
+                        CoreLibBinder::GetMethod(METHOD__ICUSTOM_MARSHALER__CLEANUP_NATIVE_DATA),
                         TRUE /* throwOnConflict */);
             break;
 
         case CustomMarshalerMethods_CleanUpManagedData:
             pMD = pMT->GetMethodDescForInterfaceMethod(
-                        MscorlibBinder::GetMethod(METHOD__ICUSTOM_MARSHALER__CLEANUP_MANAGED_DATA),
+                        CoreLibBinder::GetMethod(METHOD__ICUSTOM_MARSHALER__CLEANUP_MANAGED_DATA),
                         TRUE /* throwOnConflict */);
             break;
         case CustomMarshalerMethods_GetNativeDataSize:
             pMD = pMT->GetMethodDescForInterfaceMethod(
-                        MscorlibBinder::GetMethod(METHOD__ICUSTOM_MARSHALER__GET_NATIVE_DATA_SIZE),
+                        CoreLibBinder::GetMethod(METHOD__ICUSTOM_MARSHALER__GET_NATIVE_DATA_SIZE),
                         TRUE /* throwOnConflict */);
             break;
         case CustomMarshalerMethods_GetInstance:
index ad76de4..29e6e3b 100644 (file)
@@ -51,7 +51,7 @@
 //    internal BCL helpful function doing permission check.  From bucketing perspetive it is
 //    more preferable to report the user managed code that invokes Debugger.Break instead.
 //
-//    User managed code is managed code in non-system assembly.   Currently, only mscorlib.dll
+//    User managed code is managed code in non-system assembly.   Currently, only CoreLib
 //    is marked as system assembly.
 //
 //----------------------------------------------------------------------------
@@ -578,7 +578,7 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal,
                     if (pISymUnmanagedReader != NULL)
                     {
                         // Found a ISymUnmanagedReader for the regular PDB so don't attempt to
-                        // read it as a portable PDB in mscorlib's StackFrameHelper.
+                        // read it as a portable PDB in CoreLib's StackFrameHelper.
                         fPortablePDB = FALSE;
 
                         ReleaseHolder<ISymUnmanagedMethod> pISymUnmanagedMethod;
index 76ee48f..b44062c 100644 (file)
@@ -432,7 +432,7 @@ ComMTMethodProps * DispatchMemberInfo::GetMemberProps(OBJECTREF MemberInfoObj, C
     GCPROTECT_BEGIN(MemberInfoObj);
     {
         MethodTable *pMemberInfoClass = MemberInfoObj->GetMethodTable();
-        if (MscorlibBinder::IsClass(pMemberInfoClass, CLASS__METHOD))
+        if (CoreLibBinder::IsClass(pMemberInfoClass, CLASS__METHOD))
         {
             // Retrieve the MethodDesc from the MethodInfo.
             MethodDescCallSite getMethodHandle(METHOD__METHOD_BASE__GET_METHODDESC, &MemberInfoObj);
@@ -441,7 +441,7 @@ ComMTMethodProps * DispatchMemberInfo::GetMemberProps(OBJECTREF MemberInfoObj, C
             if (pMeth)
                 pMemberProps = pMemberMap->GetMethodProps(pMeth->GetMemberDef(), pMeth->GetModule());
         }
-        else if (MscorlibBinder::IsClass(pMemberInfoClass, CLASS__RT_FIELD_INFO))
+        else if (CoreLibBinder::IsClass(pMemberInfoClass, CLASS__RT_FIELD_INFO))
         {
             MethodDescCallSite getFieldHandle(METHOD__RTFIELD__GET_FIELDHANDLE, &MemberInfoObj);
             ARG_SLOT arg = ObjToArgSlot(MemberInfoObj);
@@ -449,7 +449,7 @@ ComMTMethodProps * DispatchMemberInfo::GetMemberProps(OBJECTREF MemberInfoObj, C
             if (pFld)
                 pMemberProps = pMemberMap->GetMethodProps(pFld->GetMemberDef(), pFld->GetModule());
         }
-        else if (MscorlibBinder::IsClass(pMemberInfoClass, CLASS__PROPERTY))
+        else if (CoreLibBinder::IsClass(pMemberInfoClass, CLASS__PROPERTY))
         {
             MethodDescCallSite getToken(METHOD__PROPERTY__GET_TOKEN, &MemberInfoObj);
             ARG_SLOT arg = ObjToArgSlot(MemberInfoObj);
@@ -672,7 +672,7 @@ void DispatchMemberInfo::DetermineCultureAwareness()
     CONTRACTL_END;
 
     // Load the LCIDConversionAttribute type.
-    MethodTable * pLcIdConvAttrClass = MscorlibBinder::GetClass(CLASS__LCID_CONVERSION_TYPE);
+    MethodTable * pLcIdConvAttrClass = CoreLibBinder::GetClass(CLASS__LCID_CONVERSION_TYPE);
 
     // Check to see if the attribute is set.
     OBJECTREF MemberInfoObj = GetMemberInfoObject();
@@ -739,7 +739,7 @@ void DispatchMemberInfo::SetUpParamMarshalerInfo()
     {
         MethodTable *pMemberInfoMT = MemberInfoObj->GetMethodTable();
 
-        if (MscorlibBinder::IsClass(pMemberInfoMT, CLASS__METHOD))
+        if (CoreLibBinder::IsClass(pMemberInfoMT, CLASS__METHOD))
         {
             MethodDescCallSite getMethodHandle(METHOD__METHOD_BASE__GET_METHODDESC, &MemberInfoObj);
             ARG_SLOT arg = ObjToArgSlot(MemberInfoObj);
@@ -747,11 +747,11 @@ void DispatchMemberInfo::SetUpParamMarshalerInfo()
             if (pMeth)
                 SetUpMethodMarshalerInfo(pMeth, FALSE);
         }
-        else if (MscorlibBinder::IsClass(pMemberInfoMT, CLASS__FIELD))
+        else if (CoreLibBinder::IsClass(pMemberInfoMT, CLASS__FIELD))
         {
             // We don't support non-default marshalling behavior for field getter/setter stubs invoked via IDispatch.
         }
-        else if (MscorlibBinder::IsClass(pMemberInfoMT, CLASS__PROPERTY))
+        else if (CoreLibBinder::IsClass(pMemberInfoMT, CLASS__PROPERTY))
         {
             BOOL isGetter = FALSE;
             MethodDescCallSite getSetter(METHOD__PROPERTY__GET_SETTER, &MemberInfoObj);
@@ -2540,7 +2540,7 @@ bool DispatchInfo::IsPropertyAccessorVisible(bool fIsSetter, OBJECTREF* pMemberI
 
     MethodTable *pMemberInfoClass = (*pMemberInfo)->GetMethodTable();
 
-    if (MscorlibBinder::IsClass(pMemberInfoClass, CLASS__PROPERTY))
+    if (CoreLibBinder::IsClass(pMemberInfoClass, CLASS__PROPERTY))
     {
         // Get the property's MethodDesc
         MethodDesc* pMDForProperty = NULL;
@@ -2606,14 +2606,14 @@ MethodDesc* DispatchInfo::GetFieldInfoMD(BinderMethodID Method, TypeHandle hndFi
     MethodDesc *pMD;
 
     // If the current class is the standard implementation then return the cached method desc
-    if (MscorlibBinder::IsClass(hndFieldInfoType.GetMethodTable(), CLASS__FIELD))
+    if (CoreLibBinder::IsClass(hndFieldInfoType.GetMethodTable(), CLASS__FIELD))
     {
-        pMD = MscorlibBinder::GetMethod(Method);
+        pMD = CoreLibBinder::GetMethod(Method);
     }
     else
     {
         pMD = MemberLoader::FindMethod(hndFieldInfoType.GetMethodTable(),
-                MscorlibBinder::GetMethodName(Method), MscorlibBinder::GetMethodSig(Method));
+                CoreLibBinder::GetMethodName(Method), CoreLibBinder::GetMethodSig(Method));
     }
     _ASSERTE(pMD && "Unable to find specified FieldInfo method");
 
@@ -2635,14 +2635,14 @@ MethodDesc* DispatchInfo::GetPropertyInfoMD(BinderMethodID Method, TypeHandle hn
     MethodDesc *pMD;
 
     // If the current class is the standard implementation then return the cached method desc if present.
-    if (MscorlibBinder::IsClass(hndPropInfoType.GetMethodTable(), CLASS__PROPERTY))
+    if (CoreLibBinder::IsClass(hndPropInfoType.GetMethodTable(), CLASS__PROPERTY))
     {
-        pMD = MscorlibBinder::GetMethod(Method);
+        pMD = CoreLibBinder::GetMethod(Method);
     }
     else
     {
         pMD = MemberLoader::FindMethod(hndPropInfoType.GetMethodTable(),
-                MscorlibBinder::GetMethodName(Method), MscorlibBinder::GetMethodSig(Method));
+                CoreLibBinder::GetMethodName(Method), CoreLibBinder::GetMethodSig(Method));
     }
     _ASSERTE(pMD && "Unable to find specified PropertyInfo method");
 
@@ -2664,14 +2664,14 @@ MethodDesc* DispatchInfo::GetMethodInfoMD(BinderMethodID Method, TypeHandle hndM
     MethodDesc *pMD;
 
     // If the current class is the standard implementation then return the cached method desc.
-    if (MscorlibBinder::IsClass(hndMethodInfoType.GetMethodTable(), CLASS__METHOD))
+    if (CoreLibBinder::IsClass(hndMethodInfoType.GetMethodTable(), CLASS__METHOD))
     {
-        pMD = MscorlibBinder::GetMethod(Method);
+        pMD = CoreLibBinder::GetMethod(Method);
     }
     else
     {
         pMD = MemberLoader::FindMethod(hndMethodInfoType.GetMethodTable(),
-                MscorlibBinder::GetMethodName(Method), MscorlibBinder::GetMethodSig(Method));
+                CoreLibBinder::GetMethodName(Method), CoreLibBinder::GetMethodSig(Method));
     }
     _ASSERTE(pMD && "Unable to find specified MethodInfo method");
 
@@ -2691,7 +2691,7 @@ MethodDesc* DispatchInfo::GetCustomAttrProviderMD(TypeHandle hndCustomAttrProvid
     CONTRACT_END;
 
     MethodTable *pMT = hndCustomAttrProvider.AsMethodTable();
-    MethodDesc *pMD = pMT->GetMethodDescForInterfaceMethod(MscorlibBinder::GetMethod(METHOD__ICUSTOM_ATTR_PROVIDER__GET_CUSTOM_ATTRIBUTES), TRUE /* throwOnConflict */);
+    MethodDesc *pMD = pMT->GetMethodDescForInterfaceMethod(CoreLibBinder::GetMethod(METHOD__ICUSTOM_ATTR_PROVIDER__GET_CUSTOM_ATTRIBUTES), TRUE /* throwOnConflict */);
 
     // Return the specified method desc.
     RETURN pMD;
@@ -2889,7 +2889,7 @@ OBJECTREF DispatchInfo::GetOleAutBinder()
     if (m_hndOleAutBinder)
         return ObjectFromHandle(m_hndOleAutBinder);
 
-    MethodTable *pOleAutBinderClass = MscorlibBinder::GetClass(CLASS__OLE_AUT_BINDER);
+    MethodTable *pOleAutBinderClass = CoreLibBinder::GetClass(CLASS__OLE_AUT_BINDER);
 
     // Allocate an instance of the OleAutBinder class.
     OBJECTREF OleAutBinder = AllocateObject(pOleAutBinderClass);
@@ -3021,7 +3021,7 @@ MethodDesc* DispatchInfo::GetInvokeMemberMD()
     }
     CONTRACT_END;
 
-    RETURN MscorlibBinder::GetMethod(METHOD__CLASS__INVOKE_MEMBER);
+    RETURN CoreLibBinder::GetMethod(METHOD__CLASS__INVOKE_MEMBER);
 }
 
 // Virtual method to retrieve the object associated with this DispatchInfo that
@@ -3526,7 +3526,7 @@ MethodDesc* DispatchExInfo::GetIReflectMD(BinderMethodID Method)
     CONTRACT_END;
 
     MethodTable *pMT = m_pSimpleWrapperOwner->GetMethodTable();
-    MethodDesc *pMD = pMT->GetMethodDescForInterfaceMethod(MscorlibBinder::GetMethod(Method), TRUE /* throwOnConflict */);
+    MethodDesc *pMD = pMT->GetMethodDescForInterfaceMethod(CoreLibBinder::GetMethod(Method), TRUE /* throwOnConflict */);
 
     // Return the specified method desc.
     RETURN pMD;
@@ -3546,7 +3546,7 @@ MethodDesc* DispatchExInfo::GetIExpandoMD(BinderMethodID Method)
     CONTRACT_END;
 
     MethodTable *pMT = m_pSimpleWrapperOwner->GetMethodTable();
-    MethodDesc *pMD = pMT->GetMethodDescForInterfaceMethod(MscorlibBinder::GetMethod(Method), TRUE /* throwOnConflict */);
+    MethodDesc *pMD = pMT->GetMethodDescForInterfaceMethod(CoreLibBinder::GetMethod(Method), TRUE /* throwOnConflict */);
 
     // Return the specified method desc.
     RETURN pMD;
index 752fbd0..1802705 100644 (file)
@@ -365,7 +365,7 @@ public:
             pcs->EmitCALL(METHOD__CULTURE_INFO__GET_CURRENT_CULTURE, 0, 1);
 
             // save the current culture
-            LocalDesc locDescCulture(MscorlibBinder::GetClass(CLASS__CULTURE_INFO));
+            LocalDesc locDescCulture(CoreLibBinder::GetClass(CLASS__CULTURE_INFO));
             DWORD dwCultureLocalNum = pcs->NewLocal(locDescCulture);
 
             pcs->EmitSTLOC(dwCultureLocalNum);
@@ -653,7 +653,7 @@ public:
             MetaSig nsig(
                 GetStubTargetMethodSig(),
                 GetStubTargetMethodSigLength(),
-                MscorlibBinder::GetModule(),
+                CoreLibBinder::GetModule(),
                 &typeContext);
 
             CorElementType type;
@@ -881,7 +881,7 @@ public:
             PCCOR_SIGNATURE pManagedSig;
             ULONG           cManagedSig;
 
-            IMDInternalImport* pIMDI = MscorlibBinder::GetModule()->GetMDImport();
+            IMDInternalImport* pIMDI = CoreLibBinder::GetModule()->GetMDImport();
 
             pStubMD->GetSig(&pManagedSig, &cManagedSig);
 
@@ -1246,7 +1246,7 @@ public:
         pCleanupStartLabel = pcsSetup->NewCodeLabel();
         pReturnLabel = pcsSetup->NewCodeLabel();
 
-        dwExceptionDispatchInfoLocal = pcsSetup->NewLocal(MscorlibBinder::GetClass(CLASS__EXCEPTION_DISPATCH_INFO));
+        dwExceptionDispatchInfoLocal = pcsSetup->NewLocal(CoreLibBinder::GetClass(CLASS__EXCEPTION_DISPATCH_INFO));
         pcsSetup->EmitLDNULL();
         pcsSetup->EmitSTLOC(dwExceptionDispatchInfoLocal);
 
@@ -1880,7 +1880,7 @@ void NDirectStubLinker::NeedsCleanupList()
         SetCleanupNeeded();
 
         // we setup a new local that will hold the cleanup work list
-        LocalDesc desc(MscorlibBinder::GetClass(CLASS__CLEANUP_WORK_LIST_ELEMENT));
+        LocalDesc desc(CoreLibBinder::GetClass(CLASS__CLEANUP_WORK_LIST_ELEMENT));
         m_dwCleanupWorkListLocalNum = NewLocal(desc);
     }
 }
@@ -1936,7 +1936,7 @@ void NDirectStubLinker::Begin(DWORD dwStubFlags)
             m_pcsDispatch->EmitADD();
             m_pcsDispatch->EmitLDIND_I();      // get OBJECTHANDLE
             m_pcsDispatch->EmitLDIND_REF();    // get Delegate object
-            m_pcsDispatch->EmitLDFLD(GetToken(MscorlibBinder::GetField(FIELD__DELEGATE__TARGET)));
+            m_pcsDispatch->EmitLDFLD(GetToken(CoreLibBinder::GetField(FIELD__DELEGATE__TARGET)));
         }
     }
 
@@ -2133,7 +2133,7 @@ void NDirectStubLinker::DoNDirect(ILCodeStream *pcsEmit, DWORD dwStubFlags, Meth
     {
         if (SF_IsDelegateStub(dwStubFlags)) // reverse P/Invoke via delegate
         {
-            int tokDelegate_methodPtr = pcsEmit->GetToken(MscorlibBinder::GetField(FIELD__DELEGATE__METHOD_PTR));
+            int tokDelegate_methodPtr = pcsEmit->GetToken(CoreLibBinder::GetField(FIELD__DELEGATE__METHOD_PTR));
 
             EmitLoadStubContext(pcsEmit, dwStubFlags);
             pcsEmit->EmitLDC(offsetof(UMEntryThunk, m_pObjectHandle));
@@ -4341,7 +4341,7 @@ void NDirect::PopulateNDirectMethodDesc(NDirectMethodDesc* pNMD, PInvokeStaticSi
             // so we have to special-case it here.
             // If a type doesn't have a native representation, we won't set this flag.
             // We'll throw an exception later when setting up the marshalling.
-            if (pRetMT != MscorlibBinder::GetClass(CLASS__DATE_TIME) && pRetMT->HasLayout() && IsUnmanagedValueTypeReturnedByRef(pRetMT->GetNativeSize()))
+            if (pRetMT != CoreLibBinder::GetClass(CLASS__DATE_TIME) && pRetMT->HasLayout() && IsUnmanagedValueTypeReturnedByRef(pRetMT->GetNativeSize()))
             {
                 ndirectflags |= NDirectMethodDesc::kStdCallWithRetBuf;
             }
@@ -5170,7 +5170,7 @@ MethodDesc* NDirect::CreateStructMarshalILStub(MethodTable* pMT)
     LocalDesc i4(ELEMENT_TYPE_I4);
     sigBuilder.NewArg(&i4);
 
-    LocalDesc cleanupWorkList(MscorlibBinder::GetClass(CLASS__CLEANUP_WORK_LIST_ELEMENT));
+    LocalDesc cleanupWorkList(CoreLibBinder::GetClass(CLASS__CLEANUP_WORK_LIST_ELEMENT));
     cleanupWorkList.MakeByRef();
     sigBuilder.NewArg(&cleanupWorkList);
 
index 2740c18..a398b1a 100644 (file)
@@ -286,7 +286,7 @@ CHECK DomainFile::CheckLoaded()
     if (IsLoaded())
         CHECK_OK;
 
-    // Mscorlib is allowed to run managed code much earlier than other
+    // CoreLib is allowed to run managed code much earlier than other
     // assemblies for bootstrapping purposes.  This is because it has no
     // dependencies, security checks, and doesn't rely on loader notifications.
 
@@ -314,7 +314,7 @@ CHECK DomainFile::CheckActivated()
     if (IsActive())
         CHECK_OK;
 
-    // Mscorlib is allowed to run managed code much earlier than other
+    // CoreLib is allowed to run managed code much earlier than other
     // assemblies for bootstrapping purposes.  This is because it has no
     // dependencies, security checks, and doesn't rely on loader notifications.
 
@@ -423,11 +423,11 @@ OBJECTREF DomainFile::GetExposedModuleObject()
 
         if (GetFile()->IsDynamic())
         {
-            refClass = (REFLECTMODULEBASEREF) AllocateObject(MscorlibBinder::GetClass(CLASS__MODULE_BUILDER));
+            refClass = (REFLECTMODULEBASEREF) AllocateObject(CoreLibBinder::GetClass(CLASS__MODULE_BUILDER));
         }
         else
         {
-            refClass = (REFLECTMODULEBASEREF) AllocateObject(MscorlibBinder::GetClass(CLASS__MODULE));
+            refClass = (REFLECTMODULEBASEREF) AllocateObject(CoreLibBinder::GetClass(CLASS__MODULE));
         }
         refClass->SetModule(m_pModule);
 
@@ -645,7 +645,7 @@ void DomainFile::VerifyNativeImageDependencies(bool verifyOnly)
 
 
         //
-        // CoreCLR hard binds to mscorlib.dll only. Avoid going through the full load.
+        // CoreCLR hard binds to CoreLib only. Avoid going through the full load.
         //
 
 #ifdef _DEBUG
@@ -653,7 +653,7 @@ void DomainFile::VerifyNativeImageDependencies(bool verifyOnly)
         name.InitializeSpec(pDependency->dwAssemblyRef,
                             ((pManifestNativeImage != NULL) ? pManifestNativeImage : pNativeImage)->GetNativeMDImport(),
                             GetDomainAssembly());
-        _ASSERTE(name.IsMscorlib());
+        _ASSERTE(name.IsCoreLib());
 #endif
 
         PEAssembly * pDependencyFile = SystemDomain::SystemFile();
@@ -753,8 +753,8 @@ BOOL DomainFile::IsZapRequired()
         }
         else if (IsSystem())
         {
-            // mscorlib gets loaded before the CompilationDomain gets created.
-            // However, we may be ngening mscorlib itself
+            // CoreLib gets loaded before the CompilationDomain gets created.
+            // However, we may be ngening CoreLib itself
             fileIsBeingNGened = true;
         }
 
@@ -1226,12 +1226,12 @@ OBJECTREF DomainAssembly::GetExposedAssemblyObject()
             // This is unnecessary because the managed InternalAssemblyBuilder object
             // should have already been created at the time of DefineDynamicAssembly
             OVERRIDE_TYPE_LOAD_LEVEL_LIMIT(CLASS_LOADED);
-            pMT = MscorlibBinder::GetClass(CLASS__INTERNAL_ASSEMBLY_BUILDER);
+            pMT = CoreLibBinder::GetClass(CLASS__INTERNAL_ASSEMBLY_BUILDER);
         }
         else
         {
             OVERRIDE_TYPE_LOAD_LEVEL_LIMIT(CLASS_LOADED);
-            pMT = MscorlibBinder::GetClass(CLASS__ASSEMBLY);
+            pMT = CoreLibBinder::GetClass(CLASS__ASSEMBLY);
         }
 
         // Will be TRUE only if LoaderAllocator managed object was already collected and therefore we should
@@ -1793,7 +1793,7 @@ BOOL DomainAssembly::CheckZapDependencyIdentities(PEImage *pNativeImage)
     spec.InitializeSpec(this->GetFile());
 
     // The assembly spec should have the binding context associated with it
-    _ASSERTE(spec.GetBindingContext()  || spec.IsAssemblySpecForMscorlib());
+    _ASSERTE(spec.GetBindingContext()  || spec.IsAssemblySpecForCoreLib());
 
     CORCOMPILE_VERSION_INFO *pVersionInfo = pNativeImage->GetLoadedLayout()->GetNativeVersionInfo();
 
@@ -1818,7 +1818,7 @@ BOOL DomainAssembly::CheckZapDependencyIdentities(PEImage *pNativeImage)
             AssemblySpec name;
             name.InitializeSpec(pDependencies->dwAssemblyDef, pNativeImage->GetNativeMDImport(), this);
 
-            if (!name.IsAssemblySpecForMscorlib())
+            if (!name.IsAssemblySpecForCoreLib())
             {
                 // We just initialized the assembly spec for the NI dependency. This will not have binding context
                 // associated with it, so set it from that of the parent.
index 2f1439b..b3a0da3 100644 (file)
@@ -445,7 +445,7 @@ enum ReasonForRejectingNativeImage
 {
     ReasonForRejectingNativeImage_NoNiForManifestModule = 0x101,
     ReasonForRejectingNativeImage_DependencyNotNative = 0x102,
-    ReasonForRejectingNativeImage_MscorlibNotNative = 0x103,
+    ReasonForRejectingNativeImage_CoreLibNotNative = 0x103,
     ReasonForRejectingNativeImage_FailedSecurityCheck = 0x104,
     ReasonForRejectingNativeImage_DependencyIdentityMismatch = 0x105,
     ReasonForRejectingNativeImage_CannotShareNiAssemblyNotDomainNeutral = 0x106,
index 895ecbb..58aadd1 100644 (file)
@@ -1096,7 +1096,7 @@ ContractFailureKind GetContractFailureKind(OBJECTREF obj)
 
     PTR_MethodTable pMT = obj->GetMethodTable();
 
-    if (MscorlibBinder::IsException(pMT, kContractException))
+    if (CoreLibBinder::IsException(pMT, kContractException))
         return CONTRACTEXCEPTIONREF(obj)->GetContractFailureKind();
 
     // there are cases where the code contracts rewriter will use a ContractException
@@ -1111,7 +1111,7 @@ ContractFailureKind GetContractFailureKind(OBJECTREF obj)
     ContractFailureKind result = CONTRACT_FAILURE_INVARIANT;
 
     // first compare the exception name.
-    PTR_MethodTable pContractExceptionMT = MscorlibBinder::GetClassIfExist(CLASS__CONTRACTEXCEPTION);
+    PTR_MethodTable pContractExceptionMT = CoreLibBinder::GetClassIfExist(CLASS__CONTRACTEXCEPTION);
     _ASSERTE(pContractExceptionMT);
 
     if (pContractExceptionMT)
index 94a80c3..a86d12c 100644 (file)
 #ifndef DACCESS_COMPILE
 
 #ifdef CROSSGEN_COMPILE
-namespace CrossGenMscorlib
+namespace CrossGenCoreLib
 {
     extern const ECClass c_rgECClasses[];
     extern const int c_nECClasses;
 };
-using namespace CrossGenMscorlib;
+using namespace CrossGenCoreLib;
 #else // CROSSGEN_COMPILE
 extern const ECClass c_rgECClasses[];
 extern const int c_nECClasses;
@@ -53,7 +53,7 @@ Utf8String, but String is similar.)
   add any void-returning metasig declarations if they haven't already been defined elsewhere.
   search "String_RetUtf8Str" for an example of how to do this.
 
-- src/vm/mscorlib.h, search "DEFINE_CLASS(UTF8_STRING" and add the new DEFINE_METHOD
+- src/vm/corelib.h, search "DEFINE_CLASS(UTF8_STRING" and add the new DEFINE_METHOD
   declarations for the Utf8String-returning Ctor methods, referencing the new metasig declarations.
 
 **********/
@@ -118,7 +118,7 @@ void ECall::PopulateManagedStringConstructors()
     _ASSERTE(g_pStringClass != NULL);
     for (int i = 0; i < NumberOfStringConstructors; i++)
     {
-        MethodDesc* pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__STRING__CTORF_FIRST + i));
+        MethodDesc* pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__STRING__CTORF_FIRST + i));
         _ASSERTE(pMD != NULL);
 
         PCODE pDest = pMD->GetMultiCallableAddrOfCode();
@@ -130,7 +130,7 @@ void ECall::PopulateManagedStringConstructors()
     _ASSERTE(g_pUtf8StringClass != NULL);
     for (int i = 0; i < NumberOfUtf8StringConstructors; i++)
     {
-        MethodDesc* pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__UTF8STRING__CTORF_FIRST + i));
+        MethodDesc* pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__UTF8STRING__CTORF_FIRST + i));
         _ASSERTE(pMD != NULL);
 
         PCODE pDest = pMD->GetMultiCallableAddrOfCode();
@@ -148,7 +148,7 @@ void ECall::PopulateManagedCastHelpers()
 
     STANDARD_VM_CONTRACT;
 
-    MethodDesc* pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__ISINSTANCEOFANY));
+    MethodDesc* pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__ISINSTANCEOFANY));
     PCODE pDest = pMD->GetMultiCallableAddrOfCode();
     SetJitHelperFunction(CORINFO_HELP_ISINSTANCEOFANY, pDest);
     // array cast uses the "ANY" helper
@@ -158,16 +158,16 @@ void ECall::PopulateManagedCastHelpers()
     // When interface table uses indirect references, just set interface casts to "ANY" helper
     SetJitHelperFunction(CORINFO_HELP_ISINSTANCEOFINTERFACE, pDest);
 #else
-    pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__ISINSTANCEOFINTERFACE));
+    pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__ISINSTANCEOFINTERFACE));
     pDest = pMD->GetMultiCallableAddrOfCode();
     SetJitHelperFunction(CORINFO_HELP_ISINSTANCEOFINTERFACE, pDest);
 #endif
 
-    pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__ISINSTANCEOFCLASS));
+    pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__ISINSTANCEOFCLASS));
     pDest = pMD->GetMultiCallableAddrOfCode();
     SetJitHelperFunction(CORINFO_HELP_ISINSTANCEOFCLASS, pDest);
 
-    pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__CHKCASTANY));
+    pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__CHKCASTANY));
     pDest = pMD->GetMultiCallableAddrOfCode();
     SetJitHelperFunction(CORINFO_HELP_CHKCASTANY, pDest);
     // array cast uses the "ANY" helper
@@ -177,20 +177,20 @@ void ECall::PopulateManagedCastHelpers()
     // When interface table uses indirect references, just set interface casts to "ANY" handler
     SetJitHelperFunction(CORINFO_HELP_CHKCASTINTERFACE, pDest);
 #else
-    pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__CHKCASTINTERFACE));
+    pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__CHKCASTINTERFACE));
     pDest = pMD->GetMultiCallableAddrOfCode();
     SetJitHelperFunction(CORINFO_HELP_CHKCASTINTERFACE, pDest);
 #endif
 
-    pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__CHKCASTCLASS));
+    pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__CHKCASTCLASS));
     pDest = pMD->GetMultiCallableAddrOfCode();
     SetJitHelperFunction(CORINFO_HELP_CHKCASTCLASS, pDest);
 
-    pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__CHKCASTCLASSSPECIAL));
+    pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__CHKCASTCLASSSPECIAL));
     pDest = pMD->GetMultiCallableAddrOfCode();
     SetJitHelperFunction(CORINFO_HELP_CHKCASTCLASS_SPECIAL, pDest);
 
-    pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__UNBOX));
+    pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__UNBOX));
     pDest = pMD->GetMultiCallableAddrOfCode();
     SetJitHelperFunction(CORINFO_HELP_UNBOX, pDest);
 
@@ -203,14 +203,14 @@ void ECall::PopulateManagedCastHelpers()
     //TODO: revise if this specialcasing is still needed when crossgen supports tailcall optimizations
     //      see: https://github.com/dotnet/runtime/issues/5857
 
-    pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__STELEMREF));
+    pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__STELEMREF));
     pMD->DoPrestub(NULL);
     // This helper is marked AggressiveOptimization and its native code is in its final form.
     // Get the code directly to avoid PreStub indirection.
     pDest = pMD->GetNativeCode();
     SetJitHelperFunction(CORINFO_HELP_ARRADDR_ST, pDest);
 
-    pMD = MscorlibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__LDELEMAREF));
+    pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__CASTHELPERS__LDELEMAREF));
     pMD->DoPrestub(NULL);
     // This helper is marked AggressiveOptimization and its native code is in its final form.
     // Get the code directly to avoid PreStub indirection.
@@ -344,11 +344,11 @@ static INT FindECIndexForMethod(MethodDesc *pMD, const LPVOID* impls)
 
         if (cur->HasSignature())
         {
-            Signature sig = MscorlibBinder::GetTargetSignature(cur->m_pMethodSig);
+            Signature sig = CoreLibBinder::GetTargetSignature(cur->m_pMethodSig);
 
             //@GENERICS: none of these methods belong to generic classes so there is no instantiation info to pass in
             if (!MetaSig::CompareMethodSigs(pMethodSig, cbMethodSigLen, pModule, NULL,
-                                            sig.GetRawSig(), sig.GetRawSigLen(), MscorlibBinder::GetModule(), NULL, FALSE))
+                                            sig.GetRawSig(), sig.GetRawSigLen(), CoreLibBinder::GetModule(), NULL, FALSE))
             {
                 continue;
             }
@@ -461,7 +461,7 @@ PCODE ECall::GetFCallImpl(MethodDesc * pMD, BOOL * pfSharedOrDynamicFCallImpl /*
         // We need to set up the ECFunc properly.  We don't want to use the pMD passed in,
         // since it may disappear.  Instead, use the stable one on Delegate.  Remember
         // that this is 1:M between the FCall and the pMDs.
-        return GetFCallImpl(MscorlibBinder::GetMethod(METHOD__DELEGATE__CONSTRUCT_DELEGATE));
+        return GetFCallImpl(CoreLibBinder::GetMethod(METHOD__DELEGATE__CONSTRUCT_DELEGATE));
     }
 
     // COM imported classes have special constructors
@@ -498,16 +498,16 @@ PCODE ECall::GetFCallImpl(MethodDesc * pMD, BOOL * pfSharedOrDynamicFCallImpl /*
     //
     // You'll see this assert in several situations, almost all being the fault of whomever
     // last touched a particular ecall or fcall method, either here or in the classlibs.
-    // However, you must also ensure you don't have stray copies of mscorlib.dll on your machine.
+    // However, you must also ensure you don't have stray copies of System.Private.CoreLib.dll on your machine.
     // 1) You forgot to add your class to c_rgECClasses, the list of classes w/ ecall & fcall methods.
     // 2) You forgot to add your particular method to the ECFunc array for your class.
     // 3) You misspelled the name of your function and/or classname.
     // 4) The signature of the managed function doesn't match the hardcoded metadata signature
     //    listed in your ECFunc array.  The hardcoded metadata sig is only necessary to disambiguate
     //    overloaded ecall functions - usually you can leave it set to NULL.
-    // 5) Your copy of mscorlib.dll & mscoree.dll are out of sync - rebuild both.
-    // 6) You've loaded the wrong copy of mscorlib.dll.  In msdev's debug menu,
-    //    select the "Modules..." dialog.  Verify the path for mscorlib is right.
+    // 5) Your copy of System.Private.CoreLib.dll & coreclr.dll are out of sync - rebuild both.
+    // 6) You've loaded the wrong copy of System.Private.CoreLib.dll.  In Visual Studio's debug menu,
+    //    select the "Modules..." dialog.  Verify the path for System.Private.CoreLib is right.
     // 7) Someone mucked around with how the signatures in metasig.h are parsed, changing the
     //    interpretation of a part of the signature (this is very rare & extremely unlikely,
     //    but has happened at least once).
@@ -631,7 +631,7 @@ BOOL ECall::CheckUnusedECalls(SetSHash<DWORD>& usedIDs)
 
                 if (!usedIDs.Contains(id))
                 {
-                    printf("CheckMscorlibExtended: Unused ecall found: %s.%s::%s\n", pECClass->m_szNameSpace, c_rgECClasses[ImplsIndex].m_szClassName, ptr->m_szMethodName);
+                    printf("CheckCoreLibExtended: Unused ecall found: %s.%s::%s\n", pECClass->m_szNameSpace, c_rgECClasses[ImplsIndex].m_szClassName, ptr->m_szMethodName);
                     fUnusedFCallsFound = TRUE;
                     continue;
                 }
@@ -641,7 +641,7 @@ BOOL ECall::CheckUnusedECalls(SetSHash<DWORD>& usedIDs)
 
         if (fUnreferencedType)
         {
-            printf("CheckMscorlibExtended: Unused type found: %s.%s\n", c_rgECClasses[ImplsIndex].m_szNameSpace, c_rgECClasses[ImplsIndex].m_szClassName);
+            printf("CheckCoreLibExtended: Unused type found: %s.%s\n", c_rgECClasses[ImplsIndex].m_szNameSpace, c_rgECClasses[ImplsIndex].m_szClassName);
             fUnusedFCallsFound = TRUE;
             continue;
         }
@@ -803,7 +803,7 @@ CorInfoIntrinsics ECall::GetIntrinsicID(MethodDesc* pMD)
         return(CORINFO_INTRINSIC_Illegal);
     }
 
-    // All intrinsic live in mscorlib.dll (FindECFuncForMethod does not work for non-mscorlib intrinsics)
+    // All intrinsic live in CoreLib (FindECFuncForMethod does not work for non-CoreLib intrinsics)
     if (!pMD->GetModule()->IsSystem())
     {
         return(CORINFO_INTRINSIC_Illegal);
index b677cfe..19b8753 100644 (file)
@@ -37,7 +37,7 @@ enum {
     FCFuncFlag_EndOfArray   = 0x01,
     FCFuncFlag_HasSignature = 0x02,
     FCFuncFlag_Unreferenced = 0x04, // Suppress unused fcall check
-    FCFuncFlag_QCall        = 0x08, // QCall - mscorlib.dll to mscorwks.dll transition implemented as PInvoke
+    FCFuncFlag_QCall        = 0x08, // QCall - CoreLib to VM transition implemented as PInvoke
 };
 
 struct ECFunc {
index 3312004..e4896f2 100644 (file)
@@ -415,7 +415,7 @@ FCFuncStart(gCOMClassWriter)
 FCFuncEnd()
 
 FCFuncStart(gCompatibilitySwitchFuncs)
-    FCFuncElement("GetValueInternalCall", CompatibilitySwitch::GetValue)
+    FCFuncElement("GetValueInternal", CompatibilitySwitch::GetValue)
 FCFuncEnd()
 
 FCFuncStart(gMdUtf8String)
index 469c222..002250d 100644 (file)
@@ -930,7 +930,7 @@ TypeHandle EEDbgInterfaceImpl::FindLoadedElementType(CorElementType et)
     // Lookup operations run the class loader in non-load mode.
     ENABLE_FORBID_GC_LOADER_USE_IN_THIS_SCOPE();
 
-    MethodTable *m = MscorlibBinder::GetElementType(et);
+    MethodTable *m = CoreLibBinder::GetElementType(et);
 
     return TypeHandle(m);
 }
@@ -1021,7 +1021,7 @@ TypeHandle EEDbgInterfaceImpl::LoadElementType(CorElementType et)
     }
     CONTRACTL_END;
 
-    MethodTable *m = MscorlibBinder::GetElementType(et);
+    MethodTable *m = CoreLibBinder::GetElementType(et);
 
     if (m == NULL)
     {
index 7852863..a230ae2 100644 (file)
@@ -1107,7 +1107,7 @@ EnCAddedField *EnCAddedField::Allocate(OBJECTREF thisPointer, EnCFieldDesc *pFD)
     // the OBJECTREF address so we need to hand out something else that is hooked up to the handle.
 
     GCPROTECT_BEGIN(thisPointer);
-    MethodTable *pHelperMT = MscorlibBinder::GetClass(CLASS__ENC_HELPER);
+    MethodTable *pHelperMT = CoreLibBinder::GetClass(CLASS__ENC_HELPER);
     pEntry->m_FieldData = pDomain->CreateDependentHandle(thisPointer, AllocateObject(pHelperMT));
     GCPROTECT_END();
 
@@ -1139,7 +1139,7 @@ EnCAddedField *EnCAddedField::Allocate(OBJECTREF thisPointer, EnCFieldDesc *pFD)
         GCPROTECT_BEGIN (obj);
 
         // Get a FieldDesc for the object reference field in the EnC helper object (warning: triggers)
-        FieldDesc *pHelperField = MscorlibBinder::GetField(FIELD__ENC_HELPER__OBJECT_REFERENCE);
+        FieldDesc *pHelperField = CoreLibBinder::GetField(FIELD__ENC_HELPER__OBJECT_REFERENCE);
 
         // store the empty boxed object into the helper object
         IGCHandleManager *mgr = GCHandleUtilities::GetGCHandleManager();
@@ -1260,7 +1260,7 @@ PTR_CBYTE EnCSyncBlockInfo::ResolveField(OBJECTREF thisPointer, EnCFieldDesc *pF
 
     // We _HAVE_ to call GetExistingField b/c (a) we can't throw exceptions, and
     // (b) we _DON'T_ want to run class init code, either.
-    pHelperFieldDesc = MscorlibBinder::GetExistingField(FIELD__ENC_HELPER__OBJECT_REFERENCE);
+    pHelperFieldDesc = CoreLibBinder::GetExistingField(FIELD__ENC_HELPER__OBJECT_REFERENCE);
     if (pHelperFieldDesc == NULL)
     {
         return NULL;
@@ -1348,7 +1348,7 @@ PTR_CBYTE EnCSyncBlockInfo::ResolveOrAllocateField(OBJECTREF thisPointer, EnCFie
 
     FieldDesc * pHelperField = NULL;
     GCPROTECT_BEGIN (pHelper);
-    pHelperField = MscorlibBinder::GetField(FIELD__ENC_HELPER__OBJECT_REFERENCE);
+    pHelperField = CoreLibBinder::GetField(FIELD__ENC_HELPER__OBJECT_REFERENCE);
     GCPROTECT_END ();
 
     return GetEnCFieldAddrFromHelperFieldDesc(pHelperField, pHelper, pFD);
index 62d97c0..79c56d8 100644 (file)
@@ -74,7 +74,7 @@ BYTE *EventPipeEvent::BuildMinimumMetadata()
     BYTE *minmumMetadata = new BYTE[MinimumMetadataLength];
     BYTE *currentPtr = minmumMetadata;
 
-    // the order of fields is defined in coreclr\src\mscorlib\shared\System\Diagnostics\Tracing\EventSource.cs DefineEventPipeEvents method
+    // the order of fields is defined in EventSource.cs DefineEventPipeEvents method
     memcpy(currentPtr, &m_eventID, sizeof(m_eventID));
     currentPtr += sizeof(m_eventID);
 
index 2fe726a..67a1340 100644 (file)
@@ -4729,7 +4729,7 @@ VOID ETW::ExceptionLog::ExceptionThrown(CrawlFrame  *pCf, BOOL bIsReThrownExcept
         _ASSERTE(pExInfo != NULL);
         bIsNestedException = (pExInfo->GetPreviousExceptionTracker() != NULL);
         bIsCLSCompliant = IsException((gc.exceptionObj)->GetMethodTable()) &&
-                          ((gc.exceptionObj)->GetMethodTable() != MscorlibBinder::GetException(kRuntimeWrappedException));
+                          ((gc.exceptionObj)->GetMethodTable() != CoreLibBinder::GetException(kRuntimeWrappedException));
 
         // A rethrown exception is also a nested exception
         // but since we have a separate flag for it, lets unset the nested flag
index 2366aea..258f3ae 100644 (file)
@@ -357,11 +357,11 @@ void SetExceptionAVParameters(              // No return.
     GCPROTECT_BEGIN(throwable)
     {
         // This should only be called for AccessViolationException
-        _ASSERTE(MscorlibBinder::GetException(kAccessViolationException) == throwable->GetMethodTable());
+        _ASSERTE(CoreLibBinder::GetException(kAccessViolationException) == throwable->GetMethodTable());
 
-        FieldDesc *pFD_ip = MscorlibBinder::GetField(FIELD__ACCESS_VIOLATION_EXCEPTION__IP);
-        FieldDesc *pFD_target = MscorlibBinder::GetField(FIELD__ACCESS_VIOLATION_EXCEPTION__TARGET);
-        FieldDesc *pFD_access = MscorlibBinder::GetField(FIELD__ACCESS_VIOLATION_EXCEPTION__ACCESSTYPE);
+        FieldDesc *pFD_ip = CoreLibBinder::GetField(FIELD__ACCESS_VIOLATION_EXCEPTION__IP);
+        FieldDesc *pFD_target = CoreLibBinder::GetField(FIELD__ACCESS_VIOLATION_EXCEPTION__TARGET);
+        FieldDesc *pFD_access = CoreLibBinder::GetField(FIELD__ACCESS_VIOLATION_EXCEPTION__ACCESSTYPE);
 
         _ASSERTE(pFD_ip->GetFieldType() == ELEMENT_TYPE_I);
         _ASSERTE(pFD_target->GetFieldType() == ELEMENT_TYPE_I);
@@ -456,12 +456,12 @@ void WrapNonCompliantException(OBJECTREF *ppThrowable)
     {
         // idempotent operations, so the race condition is okay.
         if (pMT_RuntimeWrappedException == NULL)
-            pMT_RuntimeWrappedException = MscorlibBinder::GetException(kRuntimeWrappedException);
+            pMT_RuntimeWrappedException = CoreLibBinder::GetException(kRuntimeWrappedException);
 
         if (pFD_WrappedException == NULL)
-            pFD_WrappedException = MscorlibBinder::GetField(FIELD__RUNTIME_WRAPPED_EXCEPTION__WRAPPED_EXCEPTION);
+            pFD_WrappedException = CoreLibBinder::GetField(FIELD__RUNTIME_WRAPPED_EXCEPTION__WRAPPED_EXCEPTION);
 
-        OBJECTREF orWrapper = AllocateObject(MscorlibBinder::GetException(kRuntimeWrappedException));
+        OBJECTREF orWrapper = AllocateObject(CoreLibBinder::GetException(kRuntimeWrappedException));
 
         GCPROTECT_BEGIN(orWrapper);
 
@@ -577,7 +577,7 @@ void CreateTypeInitializationExceptionObject(LPCWSTR pTypeThatFailed,
         // in the code that follows.
         if (!isAlreadyCreating.GetValue()) {
             pThread->SetIsCreatingTypeInitException();
-            pMT = MscorlibBinder::GetException(kTypeInitializationException);
+            pMT = CoreLibBinder::GetException(kTypeInitializationException);
             methodID = METHOD__TYPE_INIT_EXCEPTION__STR_EX_CTOR;
         }
         else {
@@ -3490,9 +3490,7 @@ BOOL IsExceptionOfType(RuntimeExceptionKind reKind, OBJECTREF *pThrowable)
 
     MethodTable *pThrowableMT = (*pThrowable)->GetMethodTable();
 
-    // IsExceptionOfType is supported for mscorlib exception types only
-    _ASSERTE(reKind <= kLastExceptionInMscorlib);
-    return MscorlibBinder::IsException(pThrowableMT, reKind);
+    return CoreLibBinder::IsException(pThrowableMT, reKind);
 }
 
 BOOL IsAsyncThreadException(OBJECTREF *pThrowable) {
@@ -10895,7 +10893,7 @@ BOOL IsProcessCorruptedStateException(DWORD dwExceptionCode, OBJECTREF throwable
     switch (dwExceptionCode)
     {
     case STATUS_ACCESS_VIOLATION:
-        if (throwable != NULL && MscorlibBinder::IsException(throwable->GetMethodTable(), kNullReferenceException))
+        if (throwable != NULL && CoreLibBinder::IsException(throwable->GetMethodTable(), kNullReferenceException))
             return FALSE;
         break;
     case STATUS_STACK_OVERFLOW:
@@ -10972,7 +10970,7 @@ void ExceptionNotifications::GetEventArgsForNotification(ExceptionNotificationHa
         switch(notificationType)
         {
             case FirstChanceExceptionHandler:
-                pMTEventArgs = MscorlibBinder::GetClass(CLASS__FIRSTCHANCE_EVENTARGS);
+                pMTEventArgs = CoreLibBinder::GetClass(CLASS__FIRSTCHANCE_EVENTARGS);
                 idEventArgsCtor = METHOD__FIRSTCHANCE_EVENTARGS__CTOR;
                 break;
             default:
@@ -11037,7 +11035,7 @@ BOOL ExceptionNotifications::CanDeliverNotificationToCurrentAppDomain(ExceptionN
     // Do we have handler(s) of the specific type wired up?
     if (notificationType == FirstChanceExceptionHandler)
     {
-        return MscorlibBinder::GetField(FIELD__APPCONTEXT__FIRST_CHANCE_EXCEPTION)->GetStaticOBJECTREF() != NULL;
+        return CoreLibBinder::GetField(FIELD__APPCONTEXT__FIRST_CHANCE_EXCEPTION)->GetStaticOBJECTREF() != NULL;
     }
     else
     {
@@ -11135,7 +11133,7 @@ void ExceptionNotifications::DeliverNotificationInternal(ExceptionNotificationHa
     // Get the reference to the delegate based upon the type of notification
     if (notificationType == FirstChanceExceptionHandler)
     {
-        gc.oNotificationDelegate = MscorlibBinder::GetField(FIELD__APPCONTEXT__FIRST_CHANCE_EXCEPTION)->GetStaticOBJECTREF();
+        gc.oNotificationDelegate = CoreLibBinder::GetField(FIELD__APPCONTEXT__FIRST_CHANCE_EXCEPTION)->GetStaticOBJECTREF();
     }
     else
     {
index b3d4bde..8256640 100644 (file)
@@ -878,7 +878,7 @@ REFLECTFIELDREF FieldDesc::GetStubFieldInfo()
     CONTRACTL_END;
 
     REFLECTFIELDREF retVal;
-    REFLECTFIELDREF fieldRef = (REFLECTFIELDREF)AllocateObject(MscorlibBinder::GetClass(CLASS__STUBFIELDINFO));
+    REFLECTFIELDREF fieldRef = (REFLECTFIELDREF)AllocateObject(CoreLibBinder::GetClass(CLASS__STUBFIELDINFO));
     GCPROTECT_BEGIN(fieldRef);
 
     fieldRef->SetField(this);
index c7b5910..4b1b7ab 100644 (file)
@@ -129,15 +129,15 @@ VOID ParseNativeType(Module*                     pModule,
 #endif
             break;
         case MarshalInfo::MARSHAL_TYPE_CURRENCY:
-            *pNFD = NativeFieldDescriptor(pFD, MscorlibBinder::GetClass(CLASS__CURRENCY));
+            *pNFD = NativeFieldDescriptor(pFD, CoreLibBinder::GetClass(CLASS__CURRENCY));
             break;
         case MarshalInfo::MARSHAL_TYPE_DECIMAL:
             // The decimal type can't be blittable since the managed and native alignment requirements differ.
             // Native needs 8-byte alignment since one field is a 64-bit integer, but managed only needs 4-byte alignment since all fields are ints.
-            *pNFD = NativeFieldDescriptor(pFD, MscorlibBinder::GetClass(CLASS__NATIVEDECIMAL));
+            *pNFD = NativeFieldDescriptor(pFD, CoreLibBinder::GetClass(CLASS__NATIVEDECIMAL));
             break;
         case MarshalInfo::MARSHAL_TYPE_GUID:
-            *pNFD = NativeFieldDescriptor(pFD, MscorlibBinder::GetClass(CLASS__GUID));
+            *pNFD = NativeFieldDescriptor(pFD, CoreLibBinder::GetClass(CLASS__GUID));
             break;
         case MarshalInfo::MARSHAL_TYPE_DATE:
             *pNFD = NativeFieldDescriptor(pFD, NativeFieldCategory::FLOAT, sizeof(double), sizeof(double));
@@ -168,7 +168,7 @@ VOID ParseNativeType(Module*                     pModule,
             break;
 #ifdef FEATURE_COMINTEROP
         case MarshalInfo::MARSHAL_TYPE_OBJECT:
-            *pNFD = NativeFieldDescriptor(pFD, MscorlibBinder::GetClass(CLASS__NATIVEVARIANT));
+            *pNFD = NativeFieldDescriptor(pFD, CoreLibBinder::GetClass(CLASS__NATIVEVARIANT));
             break;
 #endif
         case MarshalInfo::MARSHAL_TYPE_SAFEHANDLE:
@@ -184,17 +184,17 @@ VOID ParseNativeType(Module*                     pModule,
 
             if (pMT->IsEnum())
             {
-                pMT = MscorlibBinder::GetElementType(pMT->GetInternalCorElementType());
+                pMT = CoreLibBinder::GetElementType(pMT->GetInternalCorElementType());
             }
 
             *pNFD = NativeFieldDescriptor(pFD, OleVariant::GetNativeMethodTableForVarType(mops.elementType, pMT), mops.additive);
             break;
         }
         case MarshalInfo::MARSHAL_TYPE_FIXED_CSTR:
-            *pNFD = NativeFieldDescriptor(pFD, MscorlibBinder::GetClass(CLASS__BYTE), pargs->fs.fixedStringLength);
+            *pNFD = NativeFieldDescriptor(pFD, CoreLibBinder::GetClass(CLASS__BYTE), pargs->fs.fixedStringLength);
             break;
         case MarshalInfo::MARSHAL_TYPE_FIXED_WSTR:
-            *pNFD = NativeFieldDescriptor(pFD, MscorlibBinder::GetClass(CLASS__UINT16), pargs->fs.fixedStringLength);
+            *pNFD = NativeFieldDescriptor(pFD, CoreLibBinder::GetClass(CLASS__UINT16), pargs->fs.fixedStringLength);
             break;
         case MarshalInfo::MARSHAL_TYPE_UNKNOWN:
         default:
@@ -269,7 +269,7 @@ bool IsFieldBlittable(
             {
                 isBlittable = false;
             }
-            else if (valueTypeHandle.GetMethodTable() == MscorlibBinder::GetClass(CLASS__DECIMAL))
+            else if (valueTypeHandle.GetMethodTable() == CoreLibBinder::GetClass(CLASS__DECIMAL))
             {
                 // The alignment requirements of the managed System.Decimal type do not match the native DECIMAL type.
                 // As a result, a field of type System.Decimal can't be blittable.
index 5a88774..d08a747 100644 (file)
@@ -757,7 +757,7 @@ OBJECTREF AllocatePrimitiveArray(CorElementType type, DWORD cElements)
     // Fetch the proper array type
     if (g_pPredefinedArrayTypes[type] == NULL)
     {
-        TypeHandle elemType = TypeHandle(MscorlibBinder::GetElementType(type));
+        TypeHandle elemType = TypeHandle(CoreLibBinder::GetElementType(type));
         TypeHandle typHnd = ClassLoader::LoadArrayTypeThrowing(elemType, ELEMENT_TYPE_SZARRAY, 0);
         g_pPredefinedArrayTypes[type] = typHnd;
     }
index 9e12ec4..1f358eb 100644 (file)
@@ -171,7 +171,7 @@ GetTypeInfoFromTypeHandle(TypeHandle typeHandle,
             refTypeInfo.SuppressRelease();
 
             TypeInfoBase* lengthTypeInfo = GetTypeInfoFromTypeHandle(
-                TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_I4)), pTypeMap, method);
+                TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_I4)), pTypeMap, method);
 
             TypeInfoBase* valTypeInfo = GetTypeInfoFromTypeHandle(typeHandle.GetArrayElementTypeHandle(), pTypeMap, method);
             info->m_array_type = new ArrayTypeInfo(typeHandle, 1, valTypeInfo);
@@ -188,7 +188,7 @@ GetTypeInfoFromTypeHandle(TypeHandle typeHandle,
 
             if (pMT->GetRank() != 1)
             {
-                TypeHandle dwordArray(MscorlibBinder::GetElementType(ELEMENT_TYPE_I4));
+                TypeHandle dwordArray(CoreLibBinder::GetElementType(ELEMENT_TYPE_I4));
                 info->m_array_bounds_type = new ArrayTypeInfo(dwordArray.MakeSZArray(), pMT->GetRank(), lengthTypeInfo);
                 info->members[2].m_member_name = new char[9];
                 strcpy(info->members[2].m_member_name, "m_Bounds");
index b378f92..1fb0584 100644 (file)
@@ -977,11 +977,11 @@ Dictionary::PopulateEntry(
 
         Module * pContainingZapModule = ExecutionManager::FindZapModule(dac_cast<TADDR>(signature));
 
-        zapSigContext = ZapSig::Context(MscorlibBinder::GetModule(), (void *)pContainingZapModule, ZapSig::NormalTokens);
+        zapSigContext = ZapSig::Context(CoreLibBinder::GetModule(), (void *)pContainingZapModule, ZapSig::NormalTokens);
         pZapSigContext = (pContainingZapModule != NULL) ? &zapSigContext : NULL;
     }
 
-    Module * pLookupModule = (isReadyToRunModule) ? pZapSigContext->pInfoModule : MscorlibBinder::GetModule();
+    Module * pLookupModule = (isReadyToRunModule) ? pZapSigContext->pInfoModule : CoreLibBinder::GetModule();
 
     if (pMT != NULL)
     {
index 8f57b1c..0e74014 100644 (file)
@@ -19,7 +19,7 @@ LocalDesc ILReflectionObjectMarshaler::GetManagedType()
 {
     STANDARD_VM_CONTRACT;
 
-    return LocalDesc(MscorlibBinder::GetClass(GetManagedTypeBinderID()));
+    return LocalDesc(CoreLibBinder::GetClass(GetManagedTypeBinderID()));
 }
 
 LocalDesc ILReflectionObjectMarshaler::GetNativeType()
@@ -33,7 +33,7 @@ void ILReflectionObjectMarshaler::EmitConvertContentsCLRToNative(ILCodeStream* p
 {
     STANDARD_VM_CONTRACT;
 
-    int tokObject__m_handle = pslILEmit->GetToken(MscorlibBinder::GetField(GetObjectFieldID()));
+    int tokObject__m_handle = pslILEmit->GetToken(CoreLibBinder::GetField(GetObjectFieldID()));
     int tokStruct__m_object = 0;
     BinderFieldID structField = GetStructureFieldID();
 
@@ -41,7 +41,7 @@ void ILReflectionObjectMarshaler::EmitConvertContentsCLRToNative(ILCodeStream* p
     // marshaling a struct referring to an object containing a handle.
     if (structField != 0)
     {
-        tokStruct__m_object = pslILEmit->GetToken(MscorlibBinder::GetField(structField));
+        tokStruct__m_object = pslILEmit->GetToken(CoreLibBinder::GetField(structField));
     }
 
     ILCodeLabel* pNullLabel = pslILEmit->NewCodeLabel();
@@ -379,7 +379,7 @@ void ILWSTRMarshaler::EmitMarshalViaPinning(ILCodeStream* pslILEmit)
     LocalDesc locDesc = GetManagedType();
     locDesc.MakePinned();
     DWORD dwPinnedLocal = pslILEmit->NewLocal(locDesc);
-    int fieldDef = pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__STRING__M_FIRST_CHAR));
+    int fieldDef = pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__STRING__M_FIRST_CHAR));
     ILCodeLabel* pNullRefLabel = pslILEmit->NewCodeLabel();
 
     pslILEmit->EmitLoadNullPtr();
@@ -509,7 +509,7 @@ void ILOptimizedAllocMarshaler::EmitClearNative(ILCodeStream* pslILEmit)
 LocalDesc ILUTF8BufferMarshaler::GetManagedType()
 {
     STANDARD_VM_CONTRACT;
-    return LocalDesc(MscorlibBinder::GetClass(CLASS__STRING_BUILDER));
+    return LocalDesc(CoreLibBinder::GetClass(CLASS__STRING_BUILDER));
 }
 
 void ILUTF8BufferMarshaler::EmitConvertSpaceCLRToNative(ILCodeStream* pslILEmit)
@@ -659,7 +659,7 @@ LocalDesc ILWSTRBufferMarshaler::GetManagedType()
 {
     STANDARD_VM_CONTRACT;
 
-    return LocalDesc(MscorlibBinder::GetClass(CLASS__STRING_BUILDER));
+    return LocalDesc(CoreLibBinder::GetClass(CLASS__STRING_BUILDER));
 }
 
 void ILWSTRBufferMarshaler::EmitConvertSpaceCLRToNative(ILCodeStream* pslILEmit)
@@ -860,7 +860,7 @@ LocalDesc ILCSTRBufferMarshaler::GetManagedType()
 {
     STANDARD_VM_CONTRACT;
 
-    return LocalDesc(MscorlibBinder::GetClass(CLASS__STRING_BUILDER));
+    return LocalDesc(CoreLibBinder::GetClass(CLASS__STRING_BUILDER));
 }
 
 void ILCSTRBufferMarshaler::EmitConvertSpaceCLRToNative(ILCodeStream* pslILEmit)
@@ -885,7 +885,7 @@ void ILCSTRBufferMarshaler::EmitConvertSpaceCLRToNative(ILCodeStream* pslILEmit)
 
     // stack: capacity
 
-    pslILEmit->EmitLDSFLD(pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__MARSHAL__SYSTEM_MAX_DBCS_CHAR_SIZE)));
+    pslILEmit->EmitLDSFLD(pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__MARSHAL__SYSTEM_MAX_DBCS_CHAR_SIZE)));
     pslILEmit->EmitMUL_OVF();
 
     // stack: capacity_in_bytes
@@ -1141,7 +1141,7 @@ LocalDesc ILObjectMarshaler::GetNativeType()
 {
     STANDARD_VM_CONTRACT;
 
-    return LocalDesc(TypeHandle(MscorlibBinder::GetClass(CLASS__NATIVEVARIANT)));
+    return LocalDesc(TypeHandle(CoreLibBinder::GetClass(CLASS__NATIVEVARIANT)));
 }
 
 LocalDesc ILObjectMarshaler::GetManagedType()
@@ -1238,7 +1238,7 @@ LocalDesc ILDateMarshaler::GetManagedType()
 {
     STANDARD_VM_CONTRACT;
 
-    return LocalDesc(MscorlibBinder::GetClass(CLASS__DATE_TIME));
+    return LocalDesc(CoreLibBinder::GetClass(CLASS__DATE_TIME));
 }
 
 void ILDateMarshaler::EmitConvertContentsCLRToNative(ILCodeStream* pslILEmit)
@@ -1279,14 +1279,14 @@ LocalDesc ILCurrencyMarshaler::GetNativeType()
 {
     STANDARD_VM_CONTRACT;
 
-    return LocalDesc(TypeHandle(MscorlibBinder::GetClass(CLASS__CURRENCY)));
+    return LocalDesc(TypeHandle(CoreLibBinder::GetClass(CLASS__CURRENCY)));
 }
 
 LocalDesc ILCurrencyMarshaler::GetManagedType()
 {
     STANDARD_VM_CONTRACT;
 
-    return LocalDesc(TypeHandle(MscorlibBinder::GetClass(CLASS__DECIMAL)));
+    return LocalDesc(TypeHandle(CoreLibBinder::GetClass(CLASS__DECIMAL)));
 }
 
 
@@ -1295,7 +1295,7 @@ void ILCurrencyMarshaler::EmitReInitNative(ILCodeStream* pslILEmit)
     STANDARD_VM_CONTRACT;
 
     EmitLoadNativeHomeAddr(pslILEmit);
-    pslILEmit->EmitINITOBJ(pslILEmit->GetToken(TypeHandle(MscorlibBinder::GetClass(CLASS__CURRENCY))));
+    pslILEmit->EmitINITOBJ(pslILEmit->GetToken(TypeHandle(CoreLibBinder::GetClass(CLASS__CURRENCY))));
 }
 
 void ILCurrencyMarshaler::EmitConvertContentsCLRToNative(ILCodeStream* pslILEmit)
@@ -2075,7 +2075,7 @@ void ILCSTRMarshaler::EmitConvertContentsCLRToNative(ILCodeStream* pslILEmit)
         pslILEmit->EmitADD();
 
         // (String.Length + 2) * GetMaxDBCSCharByteSize()
-        pslILEmit->EmitLDSFLD(pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__MARSHAL__SYSTEM_MAX_DBCS_CHAR_SIZE)));
+        pslILEmit->EmitLDSFLD(pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__MARSHAL__SYSTEM_MAX_DBCS_CHAR_SIZE)));
         pslILEmit->EmitMUL_OVF();
 
         // BufSize = (String.Length + 2) * GetMaxDBCSCharByteSize()
@@ -2336,7 +2336,7 @@ void ILBlittablePtrMarshaler::EmitConvertContentsCLRToNative(ILCodeStream* pslIL
 
     ILCodeLabel* pNullRefLabel = pslILEmit->NewCodeLabel();
     UINT uNativeSize = m_pargs->m_pMT->GetNativeSize();
-    int fieldDef = pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__RAW_DATA__DATA));
+    int fieldDef = pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__RAW_DATA__DATA));
 
     EmitLoadNativeValue(pslILEmit);
     pslILEmit->EmitBRFALSE(pNullRefLabel);
@@ -2358,7 +2358,7 @@ void ILBlittablePtrMarshaler::EmitConvertContentsNativeToCLR(ILCodeStream* pslIL
 
     ILCodeLabel* pNullRefLabel = pslILEmit->NewCodeLabel();
     UINT uNativeSize = m_pargs->m_pMT->GetNativeSize();
-    int fieldDef = pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__RAW_DATA__DATA));
+    int fieldDef = pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__RAW_DATA__DATA));
 
     EmitLoadManagedValue(pslILEmit);
     pslILEmit->EmitBRFALSE(pNullRefLabel);
@@ -2478,7 +2478,7 @@ void ILBlittableLayoutClassMarshaler::EmitConvertContentsCLRToNative(ILCodeStrea
 
     ILCodeLabel* pNullRefLabel = pslILEmit->NewCodeLabel();
     UINT uNativeSize = m_pargs->m_pMT->GetNativeSize();
-    int fieldDef = pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__RAW_DATA__DATA));
+    int fieldDef = pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__RAW_DATA__DATA));
 
     EmitLoadNativeHomeAddr(pslILEmit);
     pslILEmit->EmitLDC(0);
@@ -2504,7 +2504,7 @@ void ILBlittableLayoutClassMarshaler::EmitConvertContentsNativeToCLR(ILCodeStrea
     STANDARD_VM_CONTRACT;
 
     UINT uNativeSize = m_pargs->m_pMT->GetNativeSize();
-    int fieldDef = pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__RAW_DATA__DATA));
+    int fieldDef = pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__RAW_DATA__DATA));
 
     pslILEmit->EmitLDTOKEN(pslILEmit->GetToken(m_pargs->m_pMT));
     pslILEmit->EmitCALL(METHOD__TYPE__GET_TYPE_FROM_HANDLE, 1, 1);
@@ -2550,11 +2550,11 @@ MarshalerOverrideStatus ILHandleRefMarshaler::ArgumentOverride(NDirectStubLinker
 
         // HandleRefs are valuetypes, so pinning is not needed.
         // The argument address is on the stack and will not move.
-        mdFieldDef handleField = pcsDispatch->GetToken(MscorlibBinder::GetField(FIELD__HANDLE_REF__HANDLE));
+        mdFieldDef handleField = pcsDispatch->GetToken(CoreLibBinder::GetField(FIELD__HANDLE_REF__HANDLE));
         pcsDispatch->EmitLDARG(argidx);
         pcsDispatch->EmitLDFLD(handleField);
 
-        mdFieldDef wrapperField = pcsUnmarshal->GetToken(MscorlibBinder::GetField(FIELD__HANDLE_REF__WRAPPER));
+        mdFieldDef wrapperField = pcsUnmarshal->GetToken(CoreLibBinder::GetField(FIELD__HANDLE_REF__WRAPPER));
         pcsUnmarshal->EmitLDARG(argidx);
         pcsUnmarshal->EmitLDFLD(wrapperField);
         pcsUnmarshal->EmitCALL(METHOD__GC__KEEP_ALIVE, 1, 0);
@@ -2606,7 +2606,7 @@ void ILSafeHandleMarshaler::EmitConvertContentsNativeToCLR(ILCodeStream* pslILEm
     EmitLoadManagedValue(pslILEmit);
     pslILEmit->EmitBRFALSE(failureLabel);
     EmitLoadManagedValue(pslILEmit);
-    pslILEmit->EmitLDFLD(pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__SAFE_HANDLE__HANDLE)));
+    pslILEmit->EmitLDFLD(pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__SAFE_HANDLE__HANDLE)));
     EmitLoadNativeValue(pslILEmit);
     pslILEmit->EmitBEQ(successLabel);
     pslILEmit->EmitLabel(failureLabel);
@@ -2659,7 +2659,7 @@ MarshalerOverrideStatus ILSafeHandleMarshaler::ArgumentOverride(NDirectStubLinke
 
             // Grab the token for the native handle field embedded inside the SafeHandle. We'll be using it to direct access the
             // native handle later.
-            mdToken tkNativeHandleField = pslIL->GetToken(MscorlibBinder::GetField(FIELD__SAFE_HANDLE__HANDLE));
+            mdToken tkNativeHandleField = pslIL->GetToken(CoreLibBinder::GetField(FIELD__SAFE_HANDLE__HANDLE));
 
             // The high level logic (note that the parameter may be in, out or both):
             // 1) If this is an input parameter we need to AddRef the SafeHandle and schedule a Release cleanup item.
@@ -2883,7 +2883,7 @@ ILSafeHandleMarshaler::ReturnOverride(
     pslIL->EmitNEWOBJ(pslIL->GetToken(pMDCtor), 0);
     pslIL->EmitSTLOC(dwReturnHandleLocal);
 
-    mdToken tkNativeHandleField = pslPostIL->GetToken(MscorlibBinder::GetField(FIELD__SAFE_HANDLE__HANDLE));
+    mdToken tkNativeHandleField = pslPostIL->GetToken(CoreLibBinder::GetField(FIELD__SAFE_HANDLE__HANDLE));
 
     // 3) create local to hold returned handle
     DWORD dwReturnNativeHandleLocal = pslIL->NewLocal(ELEMENT_TYPE_I);
@@ -2948,7 +2948,7 @@ void ILCriticalHandleMarshaler::EmitConvertContentsCLRToNative(ILCodeStream* psl
     _ASSERTE(IsFieldMarshal(m_dwMarshalFlags));
 
     EmitLoadManagedValue(pslILEmit);
-    pslILEmit->EmitLDFLD(pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__CRITICAL_HANDLE__HANDLE)));
+    pslILEmit->EmitLDFLD(pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__CRITICAL_HANDLE__HANDLE)));
     EmitStoreNativeValue(pslILEmit);
 }
 
@@ -2962,7 +2962,7 @@ void ILCriticalHandleMarshaler::EmitConvertContentsNativeToCLR(ILCodeStream* psl
     EmitLoadManagedValue(pslILEmit);
     pslILEmit->EmitBRFALSE(failureLabel);
     EmitLoadManagedValue(pslILEmit);
-    pslILEmit->EmitLDFLD(pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__CRITICAL_HANDLE__HANDLE)));
+    pslILEmit->EmitLDFLD(pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__CRITICAL_HANDLE__HANDLE)));
     EmitLoadNativeValue(pslILEmit);
     pslILEmit->EmitBEQ(successLabel);
     pslILEmit->EmitLabel(failureLabel);
@@ -3000,7 +3000,7 @@ MarshalerOverrideStatus ILCriticalHandleMarshaler::ArgumentOverride(NDirectStubL
 
         // Grab the token for the native handle field embedded inside the CriticalHandle. We'll be using it to direct access
         // the native handle later.
-        mdToken tkNativeHandleField = pslIL->GetToken(MscorlibBinder::GetField(FIELD__CRITICAL_HANDLE__HANDLE));
+        mdToken tkNativeHandleField = pslIL->GetToken(CoreLibBinder::GetField(FIELD__CRITICAL_HANDLE__HANDLE));
 
         if (byref)
         {
@@ -3218,7 +3218,7 @@ ILCriticalHandleMarshaler::ReturnOverride(
     pslIL->EmitNEWOBJ(pslIL->GetToken(pMDCtor), 0);
     pslIL->EmitSTLOC(dwReturnHandleLocal);
 
-    mdToken tkNativeHandleField = pslPostIL->GetToken(MscorlibBinder::GetField(FIELD__CRITICAL_HANDLE__HANDLE));
+    mdToken tkNativeHandleField = pslPostIL->GetToken(CoreLibBinder::GetField(FIELD__CRITICAL_HANDLE__HANDLE));
 
     // 3) create local to hold returned handle
     DWORD dwReturnNativeHandleLocal = pslIL->NewLocal(ELEMENT_TYPE_I);
@@ -3376,7 +3376,7 @@ LocalDesc ILArgIteratorMarshaler::GetManagedType()
 {
     STANDARD_VM_CONTRACT;
 
-    return LocalDesc(MscorlibBinder::GetClass(CLASS__ARG_ITERATOR));
+    return LocalDesc(CoreLibBinder::GetClass(CLASS__ARG_ITERATOR));
 }
 
 bool ILArgIteratorMarshaler::SupportsArgumentMarshal(DWORD dwMarshalFlags, UINT* pErrorResID)
@@ -3432,7 +3432,7 @@ LocalDesc ILArrayWithOffsetMarshaler::GetManagedType()
 {
     STANDARD_VM_CONTRACT;
 
-    return LocalDesc(MscorlibBinder::GetClass(CLASS__ARRAY_WITH_OFFSET));
+    return LocalDesc(CoreLibBinder::GetClass(CLASS__ARRAY_WITH_OFFSET));
 }
 
 bool ILArrayWithOffsetMarshaler::SupportsArgumentMarshal(DWORD dwMarshalFlags, UINT* pErrorResID)
@@ -3461,8 +3461,8 @@ void ILArrayWithOffsetMarshaler::EmitConvertSpaceAndContentsCLRToNativeTemp(ILCo
     }
     CONTRACTL_END;
 
-    int tokArrayWithOffset_m_array = pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__ARRAY_WITH_OFFSET__M_ARRAY));
-    int tokArrayWithOffset_m_count = pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__ARRAY_WITH_OFFSET__M_COUNT));
+    int tokArrayWithOffset_m_array = pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__ARRAY_WITH_OFFSET__M_ARRAY));
+    int tokArrayWithOffset_m_count = pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__ARRAY_WITH_OFFSET__M_COUNT));
 
     ILCodeLabel* pNonNullLabel = pslILEmit->NewCodeLabel();
     ILCodeLabel* pSlowAllocPathLabel = pslILEmit->NewCodeLabel();
@@ -3507,7 +3507,7 @@ void ILArrayWithOffsetMarshaler::EmitConvertSpaceAndContentsCLRToNativeTemp(ILCo
     // Convert the contents
     //
 
-    int tokArrayWithOffset_m_offset = pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__ARRAY_WITH_OFFSET__M_OFFSET));
+    int tokArrayWithOffset_m_offset = pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__ARRAY_WITH_OFFSET__M_OFFSET));
 
     ILCodeLabel* pNullRefLabel = pslILEmit->NewCodeLabel();
 
@@ -3560,7 +3560,7 @@ void ILArrayWithOffsetMarshaler::EmitConvertContentsNativeToCLR(ILCodeStream* ps
     }
     CONTRACTL_END;
 
-    int tokArrayWithOffset_m_array = pslILEmit->GetToken(MscorlibBinder::GetField(FIELD__ARRAY_WITH_OFFSET__M_ARRAY));
+    int tokArrayWithOffset_m_array = pslILEmit->GetToken(CoreLibBinder::GetField(FIELD__ARRAY_WITH_OFFSET__M_ARRAY));
 
     ILCodeLabel* pNullRefLabel = pslILEmit->NewCodeLabel();
 
@@ -3655,7 +3655,7 @@ void ILAsAnyMarshalerBase::EmitCreateMngdMarshaler(ILCodeStream* pslILEmit)
     }
     CONTRACTL_END;
 
-    LocalDesc marshalerType(MscorlibBinder::GetClass(CLASS__ASANY_MARSHALER));
+    LocalDesc marshalerType(CoreLibBinder::GetClass(CLASS__ASANY_MARSHALER));
     m_dwMngdMarshalerLocalNum = pslILEmit->NewLocal(marshalerType);
     DWORD dwTmpLocalNum = pslILEmit->NewLocal(ELEMENT_TYPE_I);
 
index 2b4e607..c08f4f3 100644 (file)
@@ -1891,14 +1891,14 @@ public:
         STANDARD_VM_CONTRACT;
 
         EmitLoadNativeHomeAddr(pslILEmit);
-        pslILEmit->EmitINITOBJ(pslILEmit->GetToken(MscorlibBinder::GetClass(CLASS__ID)));
+        pslILEmit->EmitINITOBJ(pslILEmit->GetToken(CoreLibBinder::GetClass(CLASS__ID)));
     }
 
     virtual LocalDesc GetNativeType()
     {
         STANDARD_VM_CONTRACT;
 
-        return LocalDesc(MscorlibBinder::GetClass(CLASS__ID));
+        return LocalDesc(CoreLibBinder::GetClass(CLASS__ID));
     }
 };
 
@@ -1972,7 +1972,7 @@ protected:
         // marshaling a struct referring to an object containing a handle.
         if (structField != 0)
         {
-            int tokStruct__m_object = pslILEmit->GetToken(MscorlibBinder::GetField(structField));
+            int tokStruct__m_object = pslILEmit->GetToken(CoreLibBinder::GetField(structField));
             EmitLoadManagedHomeAddr(pslILEmit);
             pslILEmit->EmitLDFLD(tokStruct__m_object);
         }
@@ -2280,7 +2280,7 @@ public:
     LocalDesc GetManagedType() override
     {
         LIMITED_METHOD_CONTRACT;
-        return LocalDesc(MscorlibBinder::GetClass(CLASS__SAFE_HANDLE));
+        return LocalDesc(CoreLibBinder::GetClass(CLASS__SAFE_HANDLE));
     }
 
     LocalDesc GetNativeType() override
@@ -2324,7 +2324,7 @@ public:
     LocalDesc GetManagedType() override
     {
         LIMITED_METHOD_CONTRACT;
-        return LocalDesc(MscorlibBinder::GetClass(CLASS__CRITICAL_HANDLE));
+        return LocalDesc(CoreLibBinder::GetClass(CLASS__CRITICAL_HANDLE));
     }
 
     LocalDesc GetNativeType() override
@@ -2501,7 +2501,7 @@ protected:
         //
         // value class
         //
-        return LocalDesc(MscorlibBinder::GetClass(CLASS__ID));
+        return LocalDesc(CoreLibBinder::GetClass(CLASS__ID));
     }
 
     bool NeedsClearNative() override
@@ -2541,7 +2541,7 @@ protected:
         {
             EmitLoadNativeValue(pslILEmit);     // dest
             EmitLoadManagedHomeAddr(pslILEmit); // src
-            pslILEmit->EmitCPOBJ(pslILEmit->GetToken(MscorlibBinder::GetClass(CLASS__ID)));
+            pslILEmit->EmitCPOBJ(pslILEmit->GetToken(CoreLibBinder::GetClass(CLASS__ID)));
         }
         else
         {
@@ -2554,7 +2554,7 @@ protected:
     {
         STANDARD_VM_CONTRACT;
 
-        int tokType = pslILEmit->GetToken(MscorlibBinder::GetClass(CLASS__ID));
+        int tokType = pslILEmit->GetToken(CoreLibBinder::GetClass(CLASS__ID));
         ILCodeLabel *pNullLabel = pslILEmit->NewCodeLabel();
         ILCodeLabel *pJoinLabel = pslILEmit->NewCodeLabel();
 
@@ -3302,13 +3302,13 @@ protected:
         EmitCallMngdMarshalerMethod(pslILEmit, GetClearManagedMethod());
     }
 
-    virtual MethodDesc *GetConvertSpaceToManagedMethod()    { WRAPPER_NO_CONTRACT; return (m_idConvertSpaceToManaged    == METHOD__NIL ? NULL : MscorlibBinder::GetMethod(m_idConvertSpaceToManaged));    }
-    virtual MethodDesc *GetConvertContentsToManagedMethod() { WRAPPER_NO_CONTRACT; return (m_idConvertContentsToManaged == METHOD__NIL ? NULL : MscorlibBinder::GetMethod(m_idConvertContentsToManaged)); }
-    virtual MethodDesc *GetConvertSpaceToNativeMethod()     { WRAPPER_NO_CONTRACT; return (m_idConvertSpaceToNative     == METHOD__NIL ? NULL : MscorlibBinder::GetMethod(m_idConvertSpaceToNative));     }
-    virtual MethodDesc *GetConvertContentsToNativeMethod()  { WRAPPER_NO_CONTRACT; return (m_idConvertContentsToNative  == METHOD__NIL ? NULL : MscorlibBinder::GetMethod(m_idConvertContentsToNative));  }
-    virtual MethodDesc *GetClearNativeMethod()              { WRAPPER_NO_CONTRACT; return (m_idClearNative              == METHOD__NIL ? NULL : MscorlibBinder::GetMethod(m_idClearNative));              }
-    virtual MethodDesc *GetClearNativeContentsMethod()      { WRAPPER_NO_CONTRACT; return (m_idClearNativeContents      == METHOD__NIL ? NULL : MscorlibBinder::GetMethod(m_idClearNativeContents));      }
-    virtual MethodDesc *GetClearManagedMethod()             { WRAPPER_NO_CONTRACT; return (m_idClearManaged             == METHOD__NIL ? NULL : MscorlibBinder::GetMethod(m_idClearManaged));             }
+    virtual MethodDesc *GetConvertSpaceToManagedMethod()    { WRAPPER_NO_CONTRACT; return (m_idConvertSpaceToManaged    == METHOD__NIL ? NULL : CoreLibBinder::GetMethod(m_idConvertSpaceToManaged));    }
+    virtual MethodDesc *GetConvertContentsToManagedMethod() { WRAPPER_NO_CONTRACT; return (m_idConvertContentsToManaged == METHOD__NIL ? NULL : CoreLibBinder::GetMethod(m_idConvertContentsToManaged)); }
+    virtual MethodDesc *GetConvertSpaceToNativeMethod()     { WRAPPER_NO_CONTRACT; return (m_idConvertSpaceToNative     == METHOD__NIL ? NULL : CoreLibBinder::GetMethod(m_idConvertSpaceToNative));     }
+    virtual MethodDesc *GetConvertContentsToNativeMethod()  { WRAPPER_NO_CONTRACT; return (m_idConvertContentsToNative  == METHOD__NIL ? NULL : CoreLibBinder::GetMethod(m_idConvertContentsToNative));  }
+    virtual MethodDesc *GetClearNativeMethod()              { WRAPPER_NO_CONTRACT; return (m_idClearNative              == METHOD__NIL ? NULL : CoreLibBinder::GetMethod(m_idClearNative));              }
+    virtual MethodDesc *GetClearNativeContentsMethod()      { WRAPPER_NO_CONTRACT; return (m_idClearNativeContents      == METHOD__NIL ? NULL : CoreLibBinder::GetMethod(m_idClearNativeContents));      }
+    virtual MethodDesc *GetClearManagedMethod()             { WRAPPER_NO_CONTRACT; return (m_idClearManaged             == METHOD__NIL ? NULL : CoreLibBinder::GetMethod(m_idClearManaged));             }
 
     const BinderMethodID m_idConvertSpaceToManaged;
     const BinderMethodID m_idConvertContentsToManaged;
index fb9e0ea..64bd551 100644 (file)
@@ -421,7 +421,7 @@ MethodTable* ILStubCache::GetOrCreateStubMethodTable(Module* pModule)
 //
 // We're relying on the fact that a VASigCookie may only mention types within the
 // corresponding module used to qualify the signature and the fact that interop
-// stubs may only reference mscorlib code or code related to a type mentioned in
+// stubs may only reference CoreLib code or code related to a type mentioned in
 // the signature.  Both of these are true unless the sig is allowed to contain
 // ELEMENT_TYPE_INTERNAL, which may refer to any type.
 //
index 0a58c81..fc2fb3c 100644 (file)
@@ -317,7 +317,7 @@ void GetCultureInfoForLCID(LCID lcid, OBJECTREF *pCultureObj)
     GCPROTECT_BEGIN(CultureObj)
     {
         // Allocate a CultureInfo with the specified LCID.
-        CultureObj = AllocateObject(MscorlibBinder::GetClass(CLASS__CULTURE_INFO));
+        CultureObj = AllocateObject(CoreLibBinder::GetClass(CLASS__CULTURE_INFO));
 
         MethodDescCallSite cultureInfoCtor(METHOD__CULTURE_INFO__INT_CTOR, &CultureObj);
 
@@ -3145,7 +3145,7 @@ void DispInvokeConvertObjectToVariant(OBJECTREF *pSrcObj, VARIANT *pDestVar, Byr
             V_VT(pDestVar) = VT_VARIANT | VT_BYREF;
             pDestVar->pvarVal = &pByrefArgInfo->m_Val;
         }
-        else if (MscorlibBinder::IsClass((*pSrcObj)->GetMethodTable(), CLASS__VARIANT_WRAPPER))
+        else if (CoreLibBinder::IsClass((*pSrcObj)->GetMethodTable(), CLASS__VARIANT_WRAPPER))
         {
             OBJECTREF WrappedObj = (*((VARIANTWRAPPEROBJECTREF*)pSrcObj))->GetWrappedObject();
             GCPROTECT_BEGIN(WrappedObj)
index b4f5a0d..ef14373 100644 (file)
@@ -9077,7 +9077,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T
         }
 
         // Plus some other calls that we're going to treat "like" intrinsics...
-        if (methToCall == MscorlibBinder::GetMethod(METHOD__STUBHELPERS__SET_LAST_ERROR))
+        if (methToCall == CoreLibBinder::GetMethod(METHOD__STUBHELPERS__SET_LAST_ERROR))
         {
             // If we're interpreting a method that calls "SetLastError", it's very likely that the call(i) whose
             // error we're trying to capture was performed with MethodDescCallSite machinery that itself trashes
@@ -10281,7 +10281,7 @@ void Interpreter::CallI()
             }
             else
             {
-                pMD = MscorlibBinder::GetMethod(METHOD__INTERLOCKED__COMPARE_EXCHANGE_OBJECT);  // A random static method.
+                pMD = CoreLibBinder::GetMethod(METHOD__INTERLOCKED__COMPARE_EXCHANGE_OBJECT);  // A random static method.
             }
             MethodDescCallSite mdcs(pMD, &mSig, ftnPtr);
 #if 0
index 7c17908..44ef6b9 100644 (file)
@@ -53,7 +53,7 @@ BOOL InvokeUtil::IsVoidPtr(TypeHandle th)
     if (!th.IsPointer())
         return FALSE;
 
-    return th.AsTypeDesc()->GetTypeParam() == MscorlibBinder::GetElementType(ELEMENT_TYPE_VOID);
+    return th.AsTypeDesc()->GetTypeParam() == CoreLibBinder::GetElementType(ELEMENT_TYPE_VOID);
 }
 
 OBJECTREF InvokeUtil::CreatePointer(TypeHandle th, void * p)
@@ -70,7 +70,7 @@ OBJECTREF InvokeUtil::CreatePointer(TypeHandle th, void * p)
     OBJECTREF refObj = NULL;
     GCPROTECT_BEGIN(refObj);
 
-    refObj = AllocateObject(MscorlibBinder::GetClass(CLASS__POINTER));
+    refObj = AllocateObject(CoreLibBinder::GetClass(CLASS__POINTER));
 
     ((ReflectionPointer *)OBJECTREFToObject(refObj))->_ptr = p;
 
@@ -299,9 +299,9 @@ void InvokeUtil::CopyArg(TypeHandle th, OBJECTREF *pObjUNSAFE, ArgDestination *a
             *(PVOID *)pArgDst = 0;
         }
         else {
-            if (rObj->GetMethodTable() == MscorlibBinder::GetClassIfExist(CLASS__POINTER) && type == ELEMENT_TYPE_PTR)
+            if (rObj->GetMethodTable() == CoreLibBinder::GetClassIfExist(CLASS__POINTER) && type == ELEMENT_TYPE_PTR)
                 *(PVOID *)pArgDst = GetPointerValue(rObj);
-            else if (rObj->GetTypeHandle().AsMethodTable() == MscorlibBinder::GetElementType(ELEMENT_TYPE_I))
+            else if (rObj->GetTypeHandle().AsMethodTable() == CoreLibBinder::GetElementType(ELEMENT_TYPE_I))
             {
                 ARG_SLOT slot;
                 CreatePrimitiveValue(oType, oType, rObj, &slot);
@@ -592,7 +592,7 @@ void InvokeUtil::ValidField(TypeHandle th, OBJECTREF* value)
 
     // handle pointers
     if (type == ELEMENT_TYPE_PTR || type == ELEMENT_TYPE_FNPTR) {
-        if (MscorlibBinder::IsClass((*value)->GetMethodTable(), CLASS__POINTER) && type == ELEMENT_TYPE_PTR) {
+        if (CoreLibBinder::IsClass((*value)->GetMethodTable(), CLASS__POINTER) && type == ELEMENT_TYPE_PTR) {
             TypeHandle srcTH = GetPointerType(*value);
 
             if (!IsVoidPtr(th)) {
@@ -601,7 +601,7 @@ void InvokeUtil::ValidField(TypeHandle th, OBJECTREF* value)
             }
             return;
         }
-        else if (MscorlibBinder::IsClass((*value)->GetMethodTable(), CLASS__INTPTR)) {
+        else if (CoreLibBinder::IsClass((*value)->GetMethodTable(), CLASS__INTPTR)) {
             return;
         }
 
@@ -696,7 +696,7 @@ OBJECTREF InvokeUtil::CreateObjectAfterInvoke(TypeHandle th, void * pValue) {
         {
             LPVOID capturedValue = *(LPVOID*)pValue;
             INDEBUG(pValue = (LPVOID)(size_t)0xcccccccc); // We're about to allocate a GC object - can no longer trust pValue
-            obj = AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_I));
+            obj = AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_I));
             *(LPVOID*)(obj->UnBox()) = capturedValue;
         }
         break;
@@ -736,7 +736,7 @@ OBJECTREF InvokeUtil::CreateClassLoadExcept(OBJECTREF* classes, OBJECTREF* excep
     } gc;
     ZeroMemory(&gc, sizeof(gc));
 
-    MethodTable *pVMClassLoadExcept = MscorlibBinder::GetException(kReflectionTypeLoadException);
+    MethodTable *pVMClassLoadExcept = CoreLibBinder::GetException(kReflectionTypeLoadException);
     gc.o = AllocateObject(pVMClassLoadExcept);
     GCPROTECT_BEGIN(gc);
     ARG_SLOT args[4];
@@ -786,7 +786,7 @@ OBJECTREF InvokeUtil::CreateTargetExcept(OBJECTREF* except) {
     OBJECTREF o;
     OBJECTREF oRet = 0;
 
-    MethodTable *pVMTargetExcept = MscorlibBinder::GetException(kTargetInvocationException);
+    MethodTable *pVMTargetExcept = CoreLibBinder::GetException(kTargetInvocationException);
     o = AllocateObject(pVMTargetExcept);
     GCPROTECT_BEGIN(o);
     ARG_SLOT args[2];
@@ -1055,7 +1055,7 @@ void InvokeUtil::SetValidField(CorElementType fldType,
         break;
 
     case ELEMENT_TYPE_PTR:      // pointers
-        if (*valueObj != 0 && MscorlibBinder::IsClass((*valueObj)->GetMethodTable(), CLASS__POINTER)) {
+        if (*valueObj != 0 && CoreLibBinder::IsClass((*valueObj)->GetMethodTable(), CLASS__POINTER)) {
             valueptr = GetPointerValue(*valueObj);
             if (pField->IsStatic())
                 pField->SetStaticValuePtr(valueptr);
@@ -1291,7 +1291,7 @@ OBJECTREF InvokeUtil::GetFieldValue(FieldDesc* pField, TypeHandle fieldType, OBJ
         else
             value = pField->GetValuePtr(*target);
 
-        MethodTable *pIntPtrMT = MscorlibBinder::GetClass(CLASS__INTPTR);
+        MethodTable *pIntPtrMT = CoreLibBinder::GetClass(CLASS__INTPTR);
         obj = AllocateObject(pIntPtrMT);
         CopyValueClass(obj->UnBox(), &value, pIntPtrMT);
         break;
index e955b3d..9e3c918 100644 (file)
@@ -626,7 +626,7 @@ CORINFO_CLASS_HANDLE CEEInfo::getTokenTypeAsHandle (CORINFO_RESOLVED_TOKEN * pRe
         classID = CLASS__FIELD_HANDLE;
     }
 
-    tokenType = CORINFO_CLASS_HANDLE(MscorlibBinder::GetClass(classID));
+    tokenType = CORINFO_CLASS_HANDLE(CoreLibBinder::GetClass(classID));
 
     EE_TO_JIT_TRANSITION();
 
@@ -1365,25 +1365,25 @@ bool CEEInfo::tryResolveToken(CORINFO_RESOLVED_TOKEN* resolvedToken)
 }
 
 /*********************************************************************/
-// We have a few frequently used constants in mscorlib that are defined as
+// We have a few frequently used constants in CoreLib that are defined as
 // readonly static fields for historic reasons. Check for them here and
 // allow them to be treated as actual constants by the JIT.
 static CORINFO_FIELD_ACCESSOR getFieldIntrinsic(FieldDesc * field)
 {
     STANDARD_VM_CONTRACT;
 
-    if (MscorlibBinder::GetField(FIELD__STRING__EMPTY) == field)
+    if (CoreLibBinder::GetField(FIELD__STRING__EMPTY) == field)
     {
         return CORINFO_FIELD_INTRINSIC_EMPTY_STRING;
     }
     else
-    if ((MscorlibBinder::GetField(FIELD__INTPTR__ZERO) == field) ||
-        (MscorlibBinder::GetField(FIELD__UINTPTR__ZERO) == field))
+    if ((CoreLibBinder::GetField(FIELD__INTPTR__ZERO) == field) ||
+        (CoreLibBinder::GetField(FIELD__UINTPTR__ZERO) == field))
     {
         return CORINFO_FIELD_INTRINSIC_ZERO;
     }
     else
-    if (MscorlibBinder::GetField(FIELD__BITCONVERTER__ISLITTLEENDIAN) == field)
+    if (CoreLibBinder::GetField(FIELD__BITCONVERTER__ISLITTLEENDIAN) == field)
     {
         return CORINFO_FIELD_INTRINSIC_ISLITTLEENDIAN;
     }
@@ -4247,16 +4247,16 @@ CORINFO_CLASS_HANDLE CEEInfo::getBuiltinClass(CorInfoClassId classId)
         result = CORINFO_CLASS_HANDLE(g_TypedReferenceMT);
         break;
     case CLASSID_TYPE_HANDLE:
-        result = CORINFO_CLASS_HANDLE(MscorlibBinder::GetClass(CLASS__TYPE_HANDLE));
+        result = CORINFO_CLASS_HANDLE(CoreLibBinder::GetClass(CLASS__TYPE_HANDLE));
         break;
     case CLASSID_FIELD_HANDLE:
-        result = CORINFO_CLASS_HANDLE(MscorlibBinder::GetClass(CLASS__FIELD_HANDLE));
+        result = CORINFO_CLASS_HANDLE(CoreLibBinder::GetClass(CLASS__FIELD_HANDLE));
         break;
     case CLASSID_METHOD_HANDLE:
-        result = CORINFO_CLASS_HANDLE(MscorlibBinder::GetClass(CLASS__METHOD_HANDLE));
+        result = CORINFO_CLASS_HANDLE(CoreLibBinder::GetClass(CLASS__METHOD_HANDLE));
         break;
     case CLASSID_ARGUMENT_HANDLE:
-        result = CORINFO_CLASS_HANDLE(MscorlibBinder::GetClass(CLASS__ARGUMENT_HANDLE));
+        result = CORINFO_CLASS_HANDLE(CoreLibBinder::GetClass(CLASS__ARGUMENT_HANDLE));
         break;
     case CLASSID_STRING:
         result = CORINFO_CLASS_HANDLE(g_pStringClass);
@@ -5193,10 +5193,10 @@ void CEEInfo::getCallInfo(
             // null since the virtual method resolves to System.Enum's implementation and that's a reference type.
             // We can't do this for any other method since ToString and Equals have different semantics for enums
             // and their underlying type.
-            if (pMD->GetSlot() == MscorlibBinder::GetMethod(METHOD__OBJECT__GET_HASH_CODE)->GetSlot())
+            if (pMD->GetSlot() == CoreLibBinder::GetMethod(METHOD__OBJECT__GET_HASH_CODE)->GetSlot())
             {
                 // Pretend this was a "constrained. UnderlyingType" instruction prefix
-                constrainedType = TypeHandle(MscorlibBinder::GetElementType(constrainedType.GetVerifierCorElementType()));
+                constrainedType = TypeHandle(CoreLibBinder::GetElementType(constrainedType.GetVerifierCorElementType()));
 
                 // Native image signature encoder will use this field. It needs to match that pretended type, a bogus signature
                 // would be produced otherwise.
@@ -6817,8 +6817,8 @@ void CEEInfo::setMethodAttribs (
             }
             else
             {
-                // Don't cache inlining hints inside mscorlib during NGen of other assemblies,
-                // since mscorlib is loaded domain neutral and will survive worker process recycling,
+                // Don't cache inlining hints inside CoreLib during NGen of other assemblies,
+                // since CoreLib is loaded domain neutral and will survive worker process recycling,
                 // causing determinism problems.
                 Module * pModule = ftn->GetModule();
                 if (pModule->IsSystem() && pModule->HasNativeImage())
@@ -6903,8 +6903,8 @@ mdToken FindGenericMethodArgTypeSpec(IMDInternalImport* pInternalImport)
 /*********************************************************************
 
 IL is the most efficient and portable way to implement certain low level methods
-in mscorlib.dll. Unfortunately, there is no good way to link IL into mscorlib.dll today.
-Until we find a good way to link IL into mscorlib.dll, we will provide the IL implementation here.
+in CoreLib. Unfortunately, there is no good way to link IL into CoreLib today.
+Until we find a good way to link IL into CoreLib, we will provide the IL implementation here.
 
 - All IL intrinsincs are members of System.Runtime.CompilerServices.JitHelpers class
 - All IL intrinsincs should be kept very simple. Implement the minimal reusable version of
@@ -6919,11 +6919,11 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
 {
     STANDARD_VM_CONTRACT;
 
-    _ASSERTE(MscorlibBinder::IsClass(ftn->GetMethodTable(), CLASS__UNSAFE));
+    _ASSERTE(CoreLibBinder::IsClass(ftn->GetMethodTable(), CLASS__UNSAFE));
 
     mdMethodDef tk = ftn->GetMemberDef();
 
-    if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__AS_POINTER)->GetMemberDef())
+    if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__AS_POINTER)->GetMemberDef())
     {
         // Return the argument that was passed in.
         static const BYTE ilcode[] = { CEE_LDARG_0, CEE_CONV_U, CEE_RET };
@@ -6934,13 +6934,13 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__SIZEOF)->GetMemberDef())
+    if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__SIZEOF)->GetMemberDef())
     {
         _ASSERTE(ftn->HasMethodInstantiation());
         Instantiation inst = ftn->GetMethodInstantiation();
 
         _ASSERTE(ftn->GetNumGenericMethodArgs() == 1);
-        mdToken tokGenericArg = FindGenericMethodArgTypeSpec(MscorlibBinder::GetModule()->GetMDImport());
+        mdToken tokGenericArg = FindGenericMethodArgTypeSpec(CoreLibBinder::GetModule()->GetMDImport());
 
         static BYTE ilcode[] = { CEE_PREFIX1, (CEE_SIZEOF & 0xFF), 0,0,0,0, CEE_RET };
 
@@ -6956,10 +6956,10 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_AS)->GetMemberDef() ||
-             tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__OBJECT_AS)->GetMemberDef() ||
-             tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__AS_REF_POINTER)->GetMemberDef() ||
-             tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__AS_REF_IN)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_AS)->GetMemberDef() ||
+             tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__OBJECT_AS)->GetMemberDef() ||
+             tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__AS_REF_POINTER)->GetMemberDef() ||
+             tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__AS_REF_IN)->GetMemberDef())
     {
         // Return the argument that was passed in.
         static const BYTE ilcode[] = { CEE_LDARG_0, CEE_RET };
@@ -6970,10 +6970,10 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_ADD)->GetMemberDef() ||
-             tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__PTR_ADD)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_ADD)->GetMemberDef() ||
+             tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__PTR_ADD)->GetMemberDef())
     {
-        mdToken tokGenericArg = FindGenericMethodArgTypeSpec(MscorlibBinder::GetModule()->GetMDImport());
+        mdToken tokGenericArg = FindGenericMethodArgTypeSpec(CoreLibBinder::GetModule()->GetMDImport());
 
         static BYTE ilcode[] = { CEE_LDARG_1,
             CEE_PREFIX1, (CEE_SIZEOF & 0xFF), 0,0,0,0,
@@ -6995,9 +6995,9 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_INTPTR_ADD)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_INTPTR_ADD)->GetMemberDef())
     {
-        mdToken tokGenericArg = FindGenericMethodArgTypeSpec(MscorlibBinder::GetModule()->GetMDImport());
+        mdToken tokGenericArg = FindGenericMethodArgTypeSpec(CoreLibBinder::GetModule()->GetMDImport());
 
         static BYTE ilcode[] = { CEE_LDARG_1,
             CEE_PREFIX1, (CEE_SIZEOF & 0xFF), 0,0,0,0,
@@ -7018,7 +7018,7 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_ADD_BYTE_OFFSET)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_ADD_BYTE_OFFSET)->GetMemberDef())
     {
         static BYTE ilcode[] = { CEE_LDARG_0, CEE_LDARG_1, CEE_ADD, CEE_RET };
 
@@ -7029,7 +7029,7 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_ARE_SAME)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_ARE_SAME)->GetMemberDef())
     {
         // Compare the two arguments
         static const BYTE ilcode[] = { CEE_LDARG_0, CEE_LDARG_1, CEE_PREFIX1, (CEE_CEQ & 0xFF), CEE_RET };
@@ -7040,7 +7040,7 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_IS_ADDRESS_GREATER_THAN)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_IS_ADDRESS_GREATER_THAN)->GetMemberDef())
     {
         // Compare the two arguments
         static const BYTE ilcode[] = { CEE_LDARG_0, CEE_LDARG_1, CEE_PREFIX1, (CEE_CGT_UN & 0xFF), CEE_RET };
@@ -7051,7 +7051,7 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_IS_ADDRESS_LESS_THAN)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_IS_ADDRESS_LESS_THAN)->GetMemberDef())
     {
         // Compare the two arguments
         static const BYTE ilcode[] = { CEE_LDARG_0, CEE_LDARG_1, CEE_PREFIX1, (CEE_CLT_UN & 0xFF), CEE_RET };
@@ -7062,7 +7062,7 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_NULLREF)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_NULLREF)->GetMemberDef())
     {
         static const BYTE ilcode[] = { CEE_LDC_I4_0, CEE_CONV_U, CEE_RET };
         methInfo->ILCode = const_cast<BYTE*>(ilcode);
@@ -7072,7 +7072,7 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_IS_NULL)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_IS_NULL)->GetMemberDef())
     {
         // 'ldnull' opcode would produce type o, and we can't compare & against o (ECMA-335, Table III.4).
         // However, we can compare & against native int, so we'll use that instead.
@@ -7085,7 +7085,7 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_INIT_BLOCK_UNALIGNED)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_INIT_BLOCK_UNALIGNED)->GetMemberDef())
     {
         static const BYTE ilcode[] = { CEE_LDARG_0, CEE_LDARG_1, CEE_LDARG_2, CEE_PREFIX1, (CEE_UNALIGNED & 0xFF), 0x01, CEE_PREFIX1, (CEE_INITBLK & 0xFF), CEE_RET };
         methInfo->ILCode = const_cast<BYTE*>(ilcode);
@@ -7095,7 +7095,7 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_BYTE_OFFSET)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_BYTE_OFFSET)->GetMemberDef())
     {
         static const BYTE ilcode[] =
         {
@@ -7112,13 +7112,13 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_READ_UNALIGNED)->GetMemberDef() ||
-             tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__PTR_READ_UNALIGNED)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_READ_UNALIGNED)->GetMemberDef() ||
+             tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__PTR_READ_UNALIGNED)->GetMemberDef())
     {
         _ASSERTE(ftn->HasMethodInstantiation());
         Instantiation inst = ftn->GetMethodInstantiation();
         _ASSERTE(ftn->GetNumGenericMethodArgs() == 1);
-        mdToken tokGenericArg = FindGenericMethodArgTypeSpec(MscorlibBinder::GetModule()->GetMDImport());
+        mdToken tokGenericArg = FindGenericMethodArgTypeSpec(CoreLibBinder::GetModule()->GetMDImport());
 
         static const BYTE ilcode[]
         {
@@ -7135,13 +7135,13 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__BYREF_WRITE_UNALIGNED)->GetMemberDef() ||
-             tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__PTR_WRITE_UNALIGNED)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__BYREF_WRITE_UNALIGNED)->GetMemberDef() ||
+             tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__PTR_WRITE_UNALIGNED)->GetMemberDef())
     {
         _ASSERTE(ftn->HasMethodInstantiation());
         Instantiation inst = ftn->GetMethodInstantiation();
         _ASSERTE(ftn->GetNumGenericMethodArgs() == 1);
-        mdToken tokGenericArg = FindGenericMethodArgTypeSpec(MscorlibBinder::GetModule()->GetMDImport());
+        mdToken tokGenericArg = FindGenericMethodArgTypeSpec(CoreLibBinder::GetModule()->GetMDImport());
 
         static const BYTE ilcode[]
         {
@@ -7159,7 +7159,7 @@ bool getILIntrinsicImplementationForUnsafe(MethodDesc * ftn,
         methInfo->options = (CorInfoOptions)0;
         return true;
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__UNSAFE__SKIPINIT)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__UNSAFE__SKIPINIT)->GetMemberDef())
     {
         static BYTE ilcode[] = { CEE_RET };
 
@@ -7179,13 +7179,13 @@ bool getILIntrinsicImplementationForMemoryMarshal(MethodDesc * ftn,
 {
     STANDARD_VM_CONTRACT;
 
-    _ASSERTE(MscorlibBinder::IsClass(ftn->GetMethodTable(), CLASS__MEMORY_MARSHAL));
+    _ASSERTE(CoreLibBinder::IsClass(ftn->GetMethodTable(), CLASS__MEMORY_MARSHAL));
 
     mdMethodDef tk = ftn->GetMemberDef();
 
-    if (tk == MscorlibBinder::GetMethod(METHOD__MEMORY_MARSHAL__GET_ARRAY_DATA_REFERENCE)->GetMemberDef())
+    if (tk == CoreLibBinder::GetMethod(METHOD__MEMORY_MARSHAL__GET_ARRAY_DATA_REFERENCE)->GetMemberDef())
     {
-        mdToken tokRawSzArrayData = MscorlibBinder::GetField(FIELD__RAW_ARRAY_DATA__DATA)->GetMemberDef();
+        mdToken tokRawSzArrayData = CoreLibBinder::GetField(FIELD__RAW_ARRAY_DATA__DATA)->GetMemberDef();
 
         static BYTE ilcode[] = { CEE_LDARG_0,
                                  CEE_LDFLDA,0,0,0,0,
@@ -7213,7 +7213,7 @@ bool getILIntrinsicImplementationForVolatile(MethodDesc * ftn,
     STANDARD_VM_CONTRACT;
 
     //
-    // This replaces the implementations of Volatile.* in mscorlib with more efficient ones.
+    // This replaces the implementations of Volatile.* in CoreLib with more efficient ones.
     // We do this because we cannot otherwise express these in C#.  What we *want* to do is
     // to treat the byref args to these methods as "volatile."  In pseudo-C#, this would look
     // like:
@@ -7227,7 +7227,7 @@ bool getILIntrinsicImplementationForVolatile(MethodDesc * ftn,
     // we substitute raw IL bodies for these methods that use the correct volatile instructions.
     //
 
-    _ASSERTE(MscorlibBinder::IsClass(ftn->GetMethodTable(), CLASS__VOLATILE));
+    _ASSERTE(CoreLibBinder::IsClass(ftn->GetMethodTable(), CLASS__VOLATILE));
 
     const size_t VolatileMethodBodySize = 6;
 
@@ -7276,7 +7276,7 @@ bool getILIntrinsicImplementationForVolatile(MethodDesc * ftn,
         //
         // Ordinary volatile loads and stores only guarantee atomicity for pointer-sized (or smaller) data.
         // So, on 32-bit platforms we must use Interlocked operations instead for the 64-bit types.
-        // The implementation in mscorlib already does this, so we will only substitute a new
+        // The implementation in CoreLib already does this, so we will only substitute a new
         // IL body if we're running on a 64-bit platform.
         //
         IN_TARGET_64BIT(VOLATILE_IMPL(Long,  CEE_LDIND_I8, CEE_STIND_I8))
@@ -7287,7 +7287,7 @@ bool getILIntrinsicImplementationForVolatile(MethodDesc * ftn,
     mdMethodDef md = ftn->GetMemberDef();
     for (unsigned i = 0; i < NumItems(volatileImpls); i++)
     {
-        if (md == MscorlibBinder::GetMethod(volatileImpls[i].methodId)->GetMemberDef())
+        if (md == CoreLibBinder::GetMethod(volatileImpls[i].methodId)->GetMemberDef())
         {
             methInfo->ILCode = const_cast<BYTE*>(volatileImpls[i].body);
             methInfo->ILCodeSize = VolatileMethodBodySize;
@@ -7306,14 +7306,14 @@ bool getILIntrinsicImplementationForInterlocked(MethodDesc * ftn,
 {
     STANDARD_VM_CONTRACT;
 
-    _ASSERTE(MscorlibBinder::IsClass(ftn->GetMethodTable(), CLASS__INTERLOCKED));
+    _ASSERTE(CoreLibBinder::IsClass(ftn->GetMethodTable(), CLASS__INTERLOCKED));
 
     // We are only interested if ftn's token and CompareExchange<T> token match
-    if (ftn->GetMemberDef() != MscorlibBinder::GetMethod(METHOD__INTERLOCKED__COMPARE_EXCHANGE_T)->GetMemberDef())
+    if (ftn->GetMemberDef() != CoreLibBinder::GetMethod(METHOD__INTERLOCKED__COMPARE_EXCHANGE_T)->GetMemberDef())
         return false;
 
     // Get MethodDesc for non-generic System.Threading.Interlocked.CompareExchange()
-    MethodDesc* cmpxchgObject = MscorlibBinder::GetMethod(METHOD__INTERLOCKED__COMPARE_EXCHANGE_OBJECT);
+    MethodDesc* cmpxchgObject = CoreLibBinder::GetMethod(METHOD__INTERLOCKED__COMPARE_EXCHANGE_OBJECT);
 
     // Setup up the body of the method
     static BYTE il[] = {
@@ -7346,11 +7346,11 @@ bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn,
 {
     STANDARD_VM_CONTRACT;
 
-    _ASSERTE(MscorlibBinder::IsClass(ftn->GetMethodTable(), CLASS__RUNTIME_HELPERS));
+    _ASSERTE(CoreLibBinder::IsClass(ftn->GetMethodTable(), CLASS__RUNTIME_HELPERS));
 
     mdMethodDef tk = ftn->GetMemberDef();
 
-    if (tk == MscorlibBinder::GetMethod(METHOD__RUNTIME_HELPERS__IS_REFERENCE_OR_CONTAINS_REFERENCES)->GetMemberDef())
+    if (tk == CoreLibBinder::GetMethod(METHOD__RUNTIME_HELPERS__IS_REFERENCE_OR_CONTAINS_REFERENCES)->GetMemberDef())
     {
         _ASSERTE(ftn->HasMethodInstantiation());
         Instantiation inst = ftn->GetMethodInstantiation();
@@ -7378,7 +7378,7 @@ bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn,
         return true;
     }
 
-    if (tk == MscorlibBinder::GetMethod(METHOD__RUNTIME_HELPERS__IS_BITWISE_EQUATABLE)->GetMemberDef())
+    if (tk == CoreLibBinder::GetMethod(METHOD__RUNTIME_HELPERS__IS_BITWISE_EQUATABLE)->GetMemberDef())
     {
         _ASSERTE(ftn->HasMethodInstantiation());
         Instantiation inst = ftn->GetMethodInstantiation();
@@ -7396,22 +7396,22 @@ bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn,
         // n.b. This doesn't imply that the type's CompareTo method can be memcmp-implemented,
         // as a method like CompareTo may need to take a type's signedness into account.
 
-        if (methodTable == MscorlibBinder::GetClass(CLASS__BOOLEAN)
-            || methodTable == MscorlibBinder::GetClass(CLASS__BYTE)
-            || methodTable == MscorlibBinder::GetClass(CLASS__SBYTE)
+        if (methodTable == CoreLibBinder::GetClass(CLASS__BOOLEAN)
+            || methodTable == CoreLibBinder::GetClass(CLASS__BYTE)
+            || methodTable == CoreLibBinder::GetClass(CLASS__SBYTE)
 #ifdef FEATURE_UTF8STRING
-            || methodTable == MscorlibBinder::GetClass(CLASS__CHAR8)
+            || methodTable == CoreLibBinder::GetClass(CLASS__CHAR8)
 #endif // FEATURE_UTF8STRING
-            || methodTable == MscorlibBinder::GetClass(CLASS__CHAR)
-            || methodTable == MscorlibBinder::GetClass(CLASS__INT16)
-            || methodTable == MscorlibBinder::GetClass(CLASS__UINT16)
-            || methodTable == MscorlibBinder::GetClass(CLASS__INT32)
-            || methodTable == MscorlibBinder::GetClass(CLASS__UINT32)
-            || methodTable == MscorlibBinder::GetClass(CLASS__INT64)
-            || methodTable == MscorlibBinder::GetClass(CLASS__UINT64)
-            || methodTable == MscorlibBinder::GetClass(CLASS__INTPTR)
-            || methodTable == MscorlibBinder::GetClass(CLASS__UINTPTR)
-            || methodTable == MscorlibBinder::GetClass(CLASS__RUNE)
+            || methodTable == CoreLibBinder::GetClass(CLASS__CHAR)
+            || methodTable == CoreLibBinder::GetClass(CLASS__INT16)
+            || methodTable == CoreLibBinder::GetClass(CLASS__UINT16)
+            || methodTable == CoreLibBinder::GetClass(CLASS__INT32)
+            || methodTable == CoreLibBinder::GetClass(CLASS__UINT32)
+            || methodTable == CoreLibBinder::GetClass(CLASS__INT64)
+            || methodTable == CoreLibBinder::GetClass(CLASS__UINT64)
+            || methodTable == CoreLibBinder::GetClass(CLASS__INTPTR)
+            || methodTable == CoreLibBinder::GetClass(CLASS__UINTPTR)
+            || methodTable == CoreLibBinder::GetClass(CLASS__RUNE)
             || methodTable->IsEnum())
         {
             methInfo->ILCode = const_cast<BYTE*>(returnTrue);
@@ -7428,9 +7428,9 @@ bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn,
         return true;
     }
 
-    if (tk == MscorlibBinder::GetMethod(METHOD__RUNTIME_HELPERS__GET_METHOD_TABLE)->GetMemberDef())
+    if (tk == CoreLibBinder::GetMethod(METHOD__RUNTIME_HELPERS__GET_METHOD_TABLE)->GetMemberDef())
     {
-        mdToken tokRawData = MscorlibBinder::GetField(FIELD__RAW_DATA__DATA)->GetMemberDef();
+        mdToken tokRawData = CoreLibBinder::GetField(FIELD__RAW_DATA__DATA)->GetMemberDef();
 
         // In the CLR, an object is laid out as follows.
         // [ object_header || MethodTable* (64-bit pointer) || instance_data ]
@@ -7465,7 +7465,7 @@ bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn,
         return true;
     }
 
-    if (tk == MscorlibBinder::GetMethod(METHOD__RUNTIME_HELPERS__ENUM_EQUALS)->GetMemberDef())
+    if (tk == CoreLibBinder::GetMethod(METHOD__RUNTIME_HELPERS__ENUM_EQUALS)->GetMemberDef())
     {
         // Normally we would follow the above pattern and unconditionally replace the IL,
         // relying on generic type constraints to guarantee that it will only ever be instantiated
@@ -7505,7 +7505,7 @@ bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn,
             return true;
         }
     }
-    else if (tk == MscorlibBinder::GetMethod(METHOD__RUNTIME_HELPERS__ENUM_COMPARE_TO)->GetMemberDef())
+    else if (tk == CoreLibBinder::GetMethod(METHOD__RUNTIME_HELPERS__ENUM_COMPARE_TO)->GetMemberDef())
     {
         // The the comment above on why this is is not an unconditional replacement.  This case handles
         // Enums backed by 8 byte values.
@@ -7526,12 +7526,12 @@ bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn,
         {
             static BYTE ilcode[8][9];
 
-            TypeHandle thUnderlyingType = MscorlibBinder::GetElementType(et);
+            TypeHandle thUnderlyingType = CoreLibBinder::GetElementType(et);
 
-            TypeHandle thIComparable = TypeHandle(MscorlibBinder::GetClass(CLASS__ICOMPARABLEGENERIC)).Instantiate(Instantiation(&thUnderlyingType, 1));
+            TypeHandle thIComparable = TypeHandle(CoreLibBinder::GetClass(CLASS__ICOMPARABLEGENERIC)).Instantiate(Instantiation(&thUnderlyingType, 1));
 
             MethodDesc* pCompareToMD = thUnderlyingType.AsMethodTable()->GetMethodDescForInterfaceMethod(
-                thIComparable, MscorlibBinder::GetMethod(METHOD__ICOMPARABLEGENERIC__COMPARE_TO), TRUE /* throwOnConflict */);
+                thIComparable, CoreLibBinder::GetMethod(METHOD__ICOMPARABLEGENERIC__COMPARE_TO), TRUE /* throwOnConflict */);
 
             // Call CompareTo method on the primitive type
             int tokCompareTo = pCompareToMD->GetMemberDef();
@@ -7567,10 +7567,10 @@ bool getILIntrinsicImplementationForActivator(MethodDesc* ftn,
 {
     STANDARD_VM_CONTRACT;
 
-    _ASSERTE(MscorlibBinder::IsClass(ftn->GetMethodTable(), CLASS__ACTIVATOR));
+    _ASSERTE(CoreLibBinder::IsClass(ftn->GetMethodTable(), CLASS__ACTIVATOR));
 
     // We are only interested if ftn's token and CreateInstance<T> token match
-    if (ftn->GetMemberDef() != MscorlibBinder::GetMethod(METHOD__ACTIVATOR__CREATE_INSTANCE_OF_T)->GetMemberDef())
+    if (ftn->GetMemberDef() != CoreLibBinder::GetMethod(METHOD__ACTIVATOR__CREATE_INSTANCE_OF_T)->GetMemberDef())
         return false;
 
     _ASSERTE(ftn->HasMethodInstantiation());
@@ -7584,7 +7584,7 @@ bool getILIntrinsicImplementationForActivator(MethodDesc* ftn,
         return false;
 
     // Replace the body with implementation that just returns "default"
-    MethodDesc* createDefaultInstance = MscorlibBinder::GetMethod(METHOD__ACTIVATOR__CREATE_DEFAULT_INSTANCE_OF_T);
+    MethodDesc* createDefaultInstance = CoreLibBinder::GetMethod(METHOD__ACTIVATOR__CREATE_DEFAULT_INSTANCE_OF_T);
     COR_ILMETHOD_DECODER header(createDefaultInstance->GetILHeader(FALSE), createDefaultInstance->GetMDImport(), NULL);
     getMethodInfoILMethodHeaderHelper(&header, methInfo);
     *pSig = SigPointer(header.LocalVarSig, header.cbLocalVarSig);
@@ -7627,27 +7627,27 @@ getMethodInfoHelper(
 
         if (ftn->IsJitIntrinsic())
         {
-            if (MscorlibBinder::IsClass(pMT, CLASS__UNSAFE))
+            if (CoreLibBinder::IsClass(pMT, CLASS__UNSAFE))
             {
                 fILIntrinsic = getILIntrinsicImplementationForUnsafe(ftn, methInfo);
             }
-            else if (MscorlibBinder::IsClass(pMT, CLASS__MEMORY_MARSHAL))
+            else if (CoreLibBinder::IsClass(pMT, CLASS__MEMORY_MARSHAL))
             {
                 fILIntrinsic = getILIntrinsicImplementationForMemoryMarshal(ftn, methInfo);
             }
-            else if (MscorlibBinder::IsClass(pMT, CLASS__INTERLOCKED))
+            else if (CoreLibBinder::IsClass(pMT, CLASS__INTERLOCKED))
             {
                 fILIntrinsic = getILIntrinsicImplementationForInterlocked(ftn, methInfo);
             }
-            else if (MscorlibBinder::IsClass(pMT, CLASS__VOLATILE))
+            else if (CoreLibBinder::IsClass(pMT, CLASS__VOLATILE))
             {
                 fILIntrinsic = getILIntrinsicImplementationForVolatile(ftn, methInfo);
             }
-            else if (MscorlibBinder::IsClass(pMT, CLASS__RUNTIME_HELPERS))
+            else if (CoreLibBinder::IsClass(pMT, CLASS__RUNTIME_HELPERS))
             {
                 fILIntrinsic = getILIntrinsicImplementationForRuntimeHelpers(ftn, methInfo);
             }
-            else if (MscorlibBinder::IsClass(pMT, CLASS__ACTIVATOR))
+            else if (CoreLibBinder::IsClass(pMT, CLASS__ACTIVATOR))
             {
                 SigPointer localSig;
                 fILIntrinsic = getILIntrinsicImplementationForActivator(ftn, methInfo, &localSig);
@@ -7879,8 +7879,8 @@ bool containsStackCrawlMarkLocal(MethodDesc* ftn)
         mdToken token;
         IfFailThrow(ptr.GetToken(&token));
 
-        // We are inside mscorlib - simple token match is sufficient
-        if (token == MscorlibBinder::GetClass(CLASS__STACKCRAWMARK)->GetCl())
+        // We are inside CoreLib - simple token match is sufficient
+        if (token == CoreLibBinder::GetClass(CLASS__STACKCRAWMARK)->GetCl())
             return TRUE;
     }
 
@@ -8785,16 +8785,16 @@ CorInfoIntrinsics CEEInfo::getIntrinsicID(CORINFO_METHOD_HANDLE methodHnd,
                     *pMustExpand = true;
                 }
             }
-            else if (pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__SPAN)))
+            else if (pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__SPAN)))
             {
-                if (method->HasSameMethodDefAs(MscorlibBinder::GetMethod(METHOD__SPAN__GET_ITEM)))
+                if (method->HasSameMethodDefAs(CoreLibBinder::GetMethod(METHOD__SPAN__GET_ITEM)))
                 {
                     result = CORINFO_INTRINSIC_Span_GetItem;
                 }
             }
-            else if (pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__READONLY_SPAN)))
+            else if (pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__READONLY_SPAN)))
             {
-                if (method->HasSameMethodDefAs(MscorlibBinder::GetMethod(METHOD__READONLY_SPAN__GET_ITEM)))
+                if (method->HasSameMethodDefAs(CoreLibBinder::GetMethod(METHOD__READONLY_SPAN__GET_ITEM)))
                 {
                     result = CORINFO_INTRINSIC_ReadOnlySpan_GetItem;
                 }
@@ -9117,18 +9117,18 @@ CORINFO_CLASS_HANDLE CEEInfo::getDefaultEqualityComparerClassHelper(CORINFO_CLAS
     TypeHandle elemTypeHnd(elemType);
 
     // Special case for byte
-    if (elemTypeHnd.AsMethodTable()->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__ELEMENT_TYPE_U1)))
+    if (elemTypeHnd.AsMethodTable()->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__ELEMENT_TYPE_U1)))
     {
-        return CORINFO_CLASS_HANDLE(MscorlibBinder::GetClass(CLASS__BYTE_EQUALITYCOMPARER));
+        return CORINFO_CLASS_HANDLE(CoreLibBinder::GetClass(CLASS__BYTE_EQUALITYCOMPARER));
     }
 
     // Else we'll need to find the appropriate instantation
     Instantiation inst(&elemTypeHnd, 1);
 
     // If T implements IEquatable<T>
-    if (elemTypeHnd.CanCastTo(TypeHandle(MscorlibBinder::GetClass(CLASS__IEQUATABLEGENERIC)).Instantiate(inst)))
+    if (elemTypeHnd.CanCastTo(TypeHandle(CoreLibBinder::GetClass(CLASS__IEQUATABLEGENERIC)).Instantiate(inst)))
     {
-        TypeHandle resultTh = ((TypeHandle)MscorlibBinder::GetClass(CLASS__GENERIC_EQUALITYCOMPARER)).Instantiate(inst);
+        TypeHandle resultTh = ((TypeHandle)CoreLibBinder::GetClass(CLASS__GENERIC_EQUALITYCOMPARER)).Instantiate(inst);
         return CORINFO_CLASS_HANDLE(resultTh.GetMethodTable());
     }
 
@@ -9136,7 +9136,7 @@ CORINFO_CLASS_HANDLE CEEInfo::getDefaultEqualityComparerClassHelper(CORINFO_CLAS
     if (Nullable::IsNullableType(elemTypeHnd))
     {
         Instantiation nullableInst = elemTypeHnd.AsMethodTable()->GetInstantiation();
-        TypeHandle nullableComparer = TypeHandle(MscorlibBinder::GetClass(CLASS__IEQUATABLEGENERIC)).Instantiate(nullableInst);
+        TypeHandle nullableComparer = TypeHandle(CoreLibBinder::GetClass(CLASS__IEQUATABLEGENERIC)).Instantiate(nullableInst);
         if (nullableInst[0].CanCastTo(nullableComparer))
         {
             return CORINFO_CLASS_HANDLE(nullableComparer.GetMethodTable());
@@ -9163,7 +9163,7 @@ CORINFO_CLASS_HANDLE CEEInfo::getDefaultEqualityComparerClassHelper(CORINFO_CLAS
             case ELEMENT_TYPE_I8:
             case ELEMENT_TYPE_U8:
             {
-                targetClass = MscorlibBinder::GetClass(CLASS__ENUM_EQUALITYCOMPARER);
+                targetClass = CoreLibBinder::GetClass(CLASS__ENUM_EQUALITYCOMPARER);
                 break;
             }
 
@@ -9179,7 +9179,7 @@ CORINFO_CLASS_HANDLE CEEInfo::getDefaultEqualityComparerClassHelper(CORINFO_CLAS
     }
 
     // Default case
-    TypeHandle resultTh = ((TypeHandle)MscorlibBinder::GetClass(CLASS__OBJECT_EQUALITYCOMPARER)).Instantiate(inst);
+    TypeHandle resultTh = ((TypeHandle)CoreLibBinder::GetClass(CLASS__OBJECT_EQUALITYCOMPARER)).Instantiate(inst);
 
     return CORINFO_CLASS_HANDLE(resultTh.GetMethodTable());
 }
@@ -13551,7 +13551,7 @@ BOOL LoadDynamicInfoEntry(Module *currentModule,
             if (CORCOMPILE_IS_PCODE_TAGGED(result))
             {
                 // There is a rare case where the function entrypoint may not be aligned. This could happen only for FCalls,
-                // only on x86 and only if we failed to hardbind the fcall (e.g. ngen image for mscorlib.dll does not exist
+                // only on x86 and only if we failed to hardbind the fcall (e.g. ngen image for CoreLib does not exist
                 // and /nodependencies flag for ngen was used). The function entrypoints should be aligned in all other cases.
                 //
                 // We will wrap the unaligned method entrypoint by funcptr stub with aligned entrypoint.
index 0119f65..71f4a81 100644 (file)
@@ -1008,7 +1008,7 @@ void LoaderAllocator::SetupManagedTracking(LOADERALLOCATORREF * pKeepLoaderAlloc
     // Initialize managed loader allocator reference holder
     //
 
-    MethodTable *pMT = MscorlibBinder::GetClass(CLASS__LOADERALLOCATOR);
+    MethodTable *pMT = CoreLibBinder::GetClass(CLASS__LOADERALLOCATOR);
 
     *pKeepLoaderAllocatorAlive = (LOADERALLOCATORREF)AllocateObject(pMT);
 
index 973fa8a..6bea537 100644 (file)
@@ -1,9 +1,6 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the MIT license.
 
-// TODO: Re-implement with MC++ if we ever compile any mscorlib code with that
-
-
 
 #include "common.h"
 #include "mlinfo.h"
index 8df00c9..eec2319 100644 (file)
@@ -1198,9 +1198,9 @@ MemberLoader::FindMethod(MethodTable * pMT, LPCUTF8 pwzName, LPHARDCODEDMETASIG
         MODE_ANY;
     } CONTRACTL_END;
 
-    Signature sig = MscorlibBinder::GetSignature(pwzSignature);
+    Signature sig = CoreLibBinder::GetSignature(pwzSignature);
 
-    return FindMethod(pMT, pwzName, sig.GetRawSig(), sig.GetRawSigLen(), MscorlibBinder::GetModule(), flags);
+    return FindMethod(pMT, pwzName, sig.GetRawSig(), sig.GetRawSigLen(), CoreLibBinder::GetModule(), flags);
 }
 
 //*******************************************************************************
@@ -1389,9 +1389,9 @@ MemberLoader::FindConstructor(MethodTable * pMT, LPHARDCODEDMETASIG pwzSignature
     }
     CONTRACTL_END
 
-    Signature sig = MscorlibBinder::GetSignature(pwzSignature);
+    Signature sig = CoreLibBinder::GetSignature(pwzSignature);
 
-    return FindConstructor(pMT, sig.GetRawSig(), sig.GetRawSigLen(), MscorlibBinder::GetModule());
+    return FindConstructor(pMT, sig.GetRawSig(), sig.GetRawSigLen(), CoreLibBinder::GetModule());
 }
 
 //*******************************************************************************
index 72d0159..e378fad 100644 (file)
@@ -5750,7 +5750,7 @@ REFLECTMETHODREF MethodDesc::GetStubMethodInfo()
     CONTRACTL_END;
 
     REFLECTMETHODREF retVal;
-    REFLECTMETHODREF methodRef = (REFLECTMETHODREF)AllocateObject(MscorlibBinder::GetClass(CLASS__STUBMETHODINFO));
+    REFLECTMETHODREF methodRef = (REFLECTMETHODREF)AllocateObject(CoreLibBinder::GetClass(CLASS__STUBMETHODINFO));
     GCPROTECT_BEGIN(methodRef);
 
     methodRef->SetMethod(this);
index c19dcc7..2d7fdc6 100644 (file)
@@ -2511,7 +2511,7 @@ class StoredSigMethodDesc : public MethodDesc
 {
   public:
     // Put the sig RVA in here - this allows us to avoid
-    // touching the method desc table when mscorlib is prejitted.
+    // touching the method desc table when CoreLib is prejitted.
 
     RelativePointer<TADDR>           m_pSig;
     DWORD           m_cSig;
@@ -3071,7 +3071,7 @@ public:
         return (ndirect.m_wFlags & kThisCall) != 0;
     }
 
-    // Returns TRUE if this MethodDesc is internal call from mscorlib to mscorwks
+    // Returns TRUE if this MethodDesc is internal call from CoreLib to VM
     BOOL IsQCall() const
     {
         LIMITED_METHOD_DAC_CONTRACT;
index 6c68734..485b826 100644 (file)
@@ -3246,7 +3246,7 @@ void MethodTable::DoRunClassInitThrowing()
         // managed code to re-enter into this codepath, causing a locking order violation.
         pInitLock.Release();
 
-        if (MscorlibBinder::GetException(kTypeInitializationException) != gc.pInitException->GetMethodTable())
+        if (CoreLibBinder::GetException(kTypeInitializationException) != gc.pInitException->GetMethodTable())
         {
             DefineFullyQualifiedNameForClassWOnStack();
             LPCWSTR wszName = GetFullyQualifiedNameForClassW(this);
@@ -3350,7 +3350,7 @@ void MethodTable::DoRunClassInitThrowing()
                                 GetLoaderAllocator()->RegisterFailedTypeInitForCleanup(pEntry);
                             }
 
-                            _ASSERTE(g_pThreadAbortExceptionClass == MscorlibBinder::GetException(kThreadAbortException));
+                            _ASSERTE(g_pThreadAbortExceptionClass == CoreLibBinder::GetException(kThreadAbortException));
 
                             if(gc.pInnerException->GetMethodTable() == g_pThreadAbortExceptionClass)
                             {
@@ -5964,7 +5964,7 @@ CorElementType MethodTable::GetInternalCorElementType()
         break;
 
     case enum_flag_Category_PrimitiveValueType:
-        // This path should only be taken for the builtin mscorlib types
+        // This path should only be taken for the builtin CoreLib types
         // and primitive valuetypes
         ret = GetClass()->GetInternalCorElementType();
         _ASSERTE((ret != ELEMENT_TYPE_CLASS) &&
index 82a4b50..aa72eb1 100644 (file)
@@ -565,9 +565,9 @@ MethodTableBuilder::LoadApproxInterfaceMap()
             bmtGenerics->Debug_GetTypicalMethodTable()->Debug_HasInjectedInterfaceDuplicates();
 
         if (GetModule() == g_pObjectClass->GetModule())
-        {   // mscorlib has some weird hardcoded information about interfaces (e.g.
+        {   // CoreLib has some weird hardcoded information about interfaces (e.g.
             // code:CEEPreloader::ApplyTypeDependencyForSZArrayHelper), so we don't inject duplicates into
-            // mscorlib types
+            // CoreLib types
             bmtInterface->dbg_fShouldInjectInterfaceDuplicates = FALSE;
         }
     }
@@ -1350,7 +1350,7 @@ MethodTableBuilder::BuildMethodTableThrowing(
     ));
 #endif // _DEBUG
 
-    // If this is mscorlib, then don't perform some sanity checks on the layout
+    // If this is CoreLib, then don't perform some sanity checks on the layout
     bmtProp->fNoSanityChecks = pModule->IsSystem() ||
 #ifdef FEATURE_READYTORUN
         // No sanity checks for ready-to-run compiled images if possible
@@ -3004,7 +3004,7 @@ MethodTableBuilder::EnumerateClassMethods()
             }
             //@GENERICS:
             // Generic methods or methods in generic classes
-            // may not be part of a COM Import class, PInvoke, internal call outside mscorlib.
+            // may not be part of a COM Import class, PInvoke, internal call outside CoreLib.
             if ((bmtGenerics->GetNumGenericArgs() != 0 || numGenericMethodArgs != 0) &&
                 (
 #ifdef FEATURE_COMINTEROP
@@ -3514,7 +3514,7 @@ VOID    MethodTableBuilder::AllocateWorkingSlotTables()
         // This is broken because
         // (a) g_pObjectClass->FindMethod("Equals", &gsig_IM_Obj_RetBool); will return
         //      the EqualsValue method
-        // (b) When mscorlib has been preloaded (and thus the munge already done
+        // (b) When CoreLib has been preloaded (and thus the munge already done
         //      ahead of time), we cannot easily find both methods
         //      to compute EqualsAddr & EqualsSlot
         //
@@ -4871,15 +4871,15 @@ MethodTableBuilder::ValidateMethods()
 
     Signature sig;
 
-    sig = MscorlibBinder::GetSignature(&gsig_SM_RetVoid);
+    sig = CoreLibBinder::GetSignature(&gsig_SM_RetVoid);
 
-    MethodSignature cctorSig(MscorlibBinder::GetModule(),
+    MethodSignature cctorSig(CoreLibBinder::GetModule(),
                              COR_CCTOR_METHOD_NAME,
                              sig.GetRawSig(), sig.GetRawSigLen());
 
-    sig = MscorlibBinder::GetSignature(&gsig_IM_RetVoid);
+    sig = CoreLibBinder::GetSignature(&gsig_IM_RetVoid);
 
-    MethodSignature defaultCtorSig(MscorlibBinder::GetModule(),
+    MethodSignature defaultCtorSig(CoreLibBinder::GetModule(),
                                    COR_CTOR_METHOD_NAME,
                                    sig.GetRawSig(), sig.GetRawSigLen());
 
@@ -10396,7 +10396,6 @@ MethodTableBuilder::SetupMethodTable2(
 
     if (GetModule()->IsSystem())
     {
-        // we are in mscorlib
         CheckForSystemTypes();
     }
 
@@ -11041,7 +11040,7 @@ VOID MethodTableBuilder::CheckForSpecialTypes()
     IMDInternalImport *pMDImport = pModule->GetMDImport();
 
     // Check to see if this type is a managed standard interface. All the managed
-    // standard interfaces live in mscorlib.dll so checking for that first
+    // standard interfaces live in CoreLib so checking for that first
     // makes the strcmp that comes afterwards acceptable.
     if (pModule->IsSystem())
     {
index c4c479c..36b07ed 100644 (file)
@@ -1929,7 +1929,7 @@ MarshalInfo::MarshalInfo(Module* pModule,
                     }
                 }
 #endif // FEATURE_COMINTEROP
-                else if (sigTH.CanCastTo(TypeHandle(MscorlibBinder::GetClass(CLASS__SAFE_HANDLE))))
+                else if (sigTH.CanCastTo(TypeHandle(CoreLibBinder::GetClass(CLASS__SAFE_HANDLE))))
                 {
                     if (nativeType != NATIVE_TYPE_DEFAULT)
                     {
@@ -1939,7 +1939,7 @@ MarshalInfo::MarshalInfo(Module* pModule,
                     m_args.m_pMT = m_pMT;
                     m_type = MARSHAL_TYPE_SAFEHANDLE;
                 }
-                else if (sigTH.CanCastTo(TypeHandle(MscorlibBinder::GetClass(CLASS__CRITICAL_HANDLE))))
+                else if (sigTH.CanCastTo(TypeHandle(CoreLibBinder::GetClass(CLASS__CRITICAL_HANDLE))))
                 {
                     if (nativeType != NATIVE_TYPE_DEFAULT)
                     {
@@ -2304,14 +2304,14 @@ MarshalInfo::MarshalInfo(Module* pModule,
                     && (!m_pMT->IsBlittable()
                         || (m_pMT->HasSameTypeDefAs(g_pNullableClass)
                         || m_pMT->HasSameTypeDefAs(g_pByReferenceClass)
-                        || m_pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__SPAN))
-                        || m_pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__READONLY_SPAN))
-                        || m_pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTOR64T))
-                        || m_pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTOR128T))
-                        || m_pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTOR256T))
+                        || m_pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__SPAN))
+                        || m_pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__READONLY_SPAN))
+                        || m_pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR64T))
+                        || m_pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR128T))
+                        || m_pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR256T))
 #ifndef CROSSGEN_COMPILE
                             // Crossgen scenarios block Vector<T> from even being loaded
-                            || m_pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTORT))
+                            || m_pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTORT))
 #endif // !CROSSGEN_COMPILE
                     )))
                 {
@@ -4359,26 +4359,26 @@ void ArrayMarshalInfo::InitElementInfo(CorNativeType arrayNativeType, MarshalInf
             }
 #endif // FEATURE_COMINTEROP
         }
-        else if (m_thElement.CanCastTo(TypeHandle(MscorlibBinder::GetClass(CLASS__SAFE_HANDLE))))
+        else if (m_thElement.CanCastTo(TypeHandle(CoreLibBinder::GetClass(CLASS__SAFE_HANDLE))))
         {
             // Array's of SAFEHANDLEs are not supported.
             ReportInvalidArrayMarshalInfo(IDS_EE_BADMARSHAL_SAFEHANDLEARRAY);
         }
-        else if (m_thElement.CanCastTo(TypeHandle(MscorlibBinder::GetClass(CLASS__CRITICAL_HANDLE))))
+        else if (m_thElement.CanCastTo(TypeHandle(CoreLibBinder::GetClass(CLASS__CRITICAL_HANDLE))))
         {
             // Array's of CRITICALHANDLEs are not supported.
             ReportInvalidArrayMarshalInfo(IDS_EE_BADMARSHAL_CRITICALHANDLEARRAY);
         }
         else if (etElement == ELEMENT_TYPE_VALUETYPE)
         {
-            if (m_thElement == TypeHandle(MscorlibBinder::GetClass(CLASS__DATE_TIME)))
+            if (m_thElement == TypeHandle(CoreLibBinder::GetClass(CLASS__DATE_TIME)))
             {
                 if (ntElement == NATIVE_TYPE_STRUCT || ntElement == NATIVE_TYPE_DEFAULT)
                     m_vtElement = VT_DATE;
                 else
                     ReportInvalidArrayMarshalInfo(IDS_EE_BADMARSHAL_DATETIMEARRAY);
             }
-            else if (m_thElement == TypeHandle(MscorlibBinder::GetClass(CLASS__DECIMAL)))
+            else if (m_thElement == TypeHandle(CoreLibBinder::GetClass(CLASS__DECIMAL)))
             {
                 if (ntElement == NATIVE_TYPE_STRUCT || ntElement == NATIVE_TYPE_DEFAULT)
                     m_vtElement = VT_DECIMAL;
@@ -4395,7 +4395,7 @@ void ArrayMarshalInfo::InitElementInfo(CorNativeType arrayNativeType, MarshalInf
             }
         }
 #ifdef FEATURE_COMINTEROP
-        else if (m_thElement == TypeHandle(MscorlibBinder::GetClass(CLASS__ERROR_WRAPPER)))
+        else if (m_thElement == TypeHandle(CoreLibBinder::GetClass(CLASS__ERROR_WRAPPER)))
         {
             m_vtElement = VT_ERROR;
         }
index 0657feb..46a8600 100644 (file)
@@ -102,7 +102,7 @@ FCIMPL1(LPOVERLAPPED, AllocateNativeOverlapped, OverlappedDataObject* overlapped
 
     if (g_pOverlappedDataClass == NULL)
     {
-        g_pOverlappedDataClass = MscorlibBinder::GetClass(CLASS__OVERLAPPEDDATA);
+        g_pOverlappedDataClass = CoreLibBinder::GetClass(CLASS__OVERLAPPEDDATA);
         // We have optimization to avoid creating event if IO is in default domain.  This depends on default domain
         // can not be unloaded.
     }
index 8966075..5537573 100644 (file)
@@ -187,9 +187,7 @@ TypeHandle Object::GetGCSafeTypeHandleIfPossible() const
     //         MT of the innermost element is not getting unloaded. This then ensures the
     //         MT of the original object (i.e., array) itself must not be getting
     //         unloaded either, since the MTs of arrays and of their elements are
-    //         allocated on the same loader heap, except the case where the array is
-    //         Object[], in which case its MT is in mscorlib and thus doesn't unload.
-
+    //         allocated on the same loader allocator.
     Module * pLoaderModule = pMT->GetLoaderModule();
 
     // Don't look up types that are unloading due to Collectible Assemblies. Haven't been
@@ -1536,7 +1534,7 @@ void Nullable::CheckFieldOffsets(TypeHandle nullableType)
     MethodTable* nullableMT = nullableType.GetMethodTable();
 
         // insure that the managed version of the table is the same as the
-        // unmanaged.  Note that we can't do this in mscorlib.h because this
+        // unmanaged.  Note that we can't do this in corelib.h because this
         // class is generic and field layout depends on the instantiation.
 
     _ASSERTE(nullableMT->GetNumInstanceFields() == 2);
index 5d6c3c3..2acb6e3 100644 (file)
@@ -993,7 +993,7 @@ class BaseObjectWithCachedData : public Object
 //      this hasn't yet been defined.
 class ReflectClassBaseObject : public BaseObjectWithCachedData
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 protected:
     OBJECTREF           m_keepalive;
@@ -1123,7 +1123,7 @@ public:
 // type that does not sufficiently match this data structure.
 class ReflectMethodObject : public BaseObjectWithCachedData
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 protected:
     OBJECTREF           m_object;
@@ -1166,7 +1166,7 @@ public:
 // type that does not sufficiently match this data structure.
 class ReflectFieldObject : public BaseObjectWithCachedData
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 protected:
     OBJECTREF           m_object;
@@ -1204,7 +1204,7 @@ public:
 //
 class ReflectModuleBaseObject : public Object
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
   protected:
     // READ ME:
@@ -1255,7 +1255,7 @@ typedef SafeHandle * SAFEHANDLEREF;
 class ThreadBaseObject;
 class SynchronizationContextObject: public Object
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 private:
     // These field are also defined in the managed representation.  (SecurityContext.cs)If you
     // add or change these field you must also change the managed code so that
@@ -1304,7 +1304,7 @@ __inline bool IsCultureEnglishOrInvariant(LPCWSTR localeName)
 
 class CultureInfoBaseObject : public Object
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 private:
     OBJECTREF _compareInfo;
@@ -1342,7 +1342,7 @@ class ThreadBaseObject : public Object
 {
     friend class ClrDataAccess;
     friend class ThreadNative;
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
     friend class Object;
 
 private:
@@ -1459,7 +1459,7 @@ class MarshalByRefObjectBaseObject : public Object
 class AssemblyBaseObject : public Object
 {
     friend class Assembly;
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
   protected:
     // READ ME:
@@ -1507,7 +1507,7 @@ NOINLINE AssemblyBaseObject* GetRuntimeAssemblyHelper(LPVOID __me, DomainAssembl
 #endif // defined(TARGET_X86) && !defined(TARGET_UNIX)
 class AssemblyLoadContextBaseObject : public Object
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
   protected:
     // READ ME:
@@ -1553,7 +1553,7 @@ class AssemblyNameBaseObject : public Object
 {
     friend class AssemblyNative;
     friend class AppDomainNative;
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
   protected:
     // READ ME:
@@ -1592,7 +1592,7 @@ class AssemblyNameBaseObject : public Object
 //
 class VersionBaseObject : public Object
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
   protected:
     // READ ME:
@@ -1720,7 +1720,7 @@ CHARARRAYREF AllocateCharArray(DWORD dwArrayLength);
 //-------------------------------------------------------------
 class ComObject : public MarshalByRefObjectBaseObject
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 protected:
 
@@ -1992,7 +1992,7 @@ typedef BStrWrapper*     BSTRWRAPPEROBJECTREF;
 
 class SafeHandle : public Object
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
   private:
     // READ ME:
@@ -2042,7 +2042,7 @@ typedef Holder<SAFEHANDLEREF*, AcquireSafeHandle, ReleaseSafeHandle> SafeHandleH
 
 class CriticalHandle : public Object
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
   private:
     // READ ME:
@@ -2072,7 +2072,7 @@ typedef CriticalHandle * CRITICALHANDLEREF;
 // Base class for WaitHandle
 class WaitHandleBase :public MarshalByRefObjectBaseObject
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 public:
     __inline LPVOID GetWaitHandle() {
@@ -2096,7 +2096,7 @@ typedef WaitHandleBase* WAITHANDLEREF;
 class DelegateObject : public Object
 {
     friend class CheckAsmOffsets;
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 public:
     BOOL IsWrapperDelegate() { LIMITED_METHOD_CONTRACT; return _methodPtrAux == NULL; }
@@ -2316,7 +2316,7 @@ private:
 
 class LoaderAllocatorScoutObject : public Object
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
     friend class LoaderAllocatorObject;
 
 protected:
@@ -2331,7 +2331,7 @@ typedef LoaderAllocatorScoutObject* LOADERALLOCATORSCOUTREF;
 
 class LoaderAllocatorObject : public Object
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 public:
     PTRARRAYREF GetHandleTable()
@@ -2393,7 +2393,7 @@ typedef DPTR(class ExceptionObject) PTR_ExceptionObject;
 #include "pshpack4.h"
 class ExceptionObject : public Object
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 public:
     void SetHResult(HRESULT hr)
@@ -2617,7 +2617,7 @@ enum ContractFailureKind
 typedef DPTR(class ContractExceptionObject) PTR_ContractExceptionObject;
 class ContractExceptionObject : public ExceptionObject
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 public:
     ContractFailureKind GetContractFailureKind()
@@ -2742,7 +2742,7 @@ class GCHeapHashObject : public Object
     friend class JIT_TrialAlloc;
     friend class CheckAsmOffsets;
     friend class COMString;
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
     private:
     BASEARRAYREF _data;
@@ -2799,7 +2799,7 @@ class LAHashDependentHashTrackerObject : public Object
     friend class ClrDataAccess;
 #endif
     friend class CheckAsmOffsets;
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
     private:
     OBJECTHANDLE _dependentHandle;
@@ -2837,7 +2837,7 @@ class LAHashKeyToTrackersObject : public Object
     friend class ClrDataAccess;
 #endif
     friend class CheckAsmOffsets;
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
     public:
     // _trackerOrTrackerSet is either a reference to a LAHashDependentHashTracker, or to a GCHeapHash of LAHashDependentHashTracker objects.
index 1755add..d4d256e 100644 (file)
@@ -260,13 +260,13 @@ VARTYPE OleVariant::GetVarTypeForComVariant(VariantData *pComVariant)
 
 #ifdef FEATURE_COMINTEROP
         // SafeHandle's or CriticalHandle's cannot be stored in VARIANT's.
-        if (pMT->CanCastToClass(MscorlibBinder::GetClass(CLASS__SAFE_HANDLE)))
+        if (pMT->CanCastToClass(CoreLibBinder::GetClass(CLASS__SAFE_HANDLE)))
             COMPlusThrow(kArgumentException, IDS_EE_SH_IN_VARIANT_NOT_SUPPORTED);
-        if (pMT->CanCastToClass(MscorlibBinder::GetClass(CLASS__CRITICAL_HANDLE)))
+        if (pMT->CanCastToClass(CoreLibBinder::GetClass(CLASS__CRITICAL_HANDLE)))
             COMPlusThrow(kArgumentException, IDS_EE_CH_IN_VARIANT_NOT_SUPPORTED);
 
         // VariantWrappers cannot be stored in VARIANT's.
-        if (MscorlibBinder::IsClass(pMT, CLASS__VARIANT_WRAPPER))
+        if (CoreLibBinder::IsClass(pMT, CLASS__VARIANT_WRAPPER))
             COMPlusThrow(kArgumentException, IDS_EE_VAR_WRAP_IN_VAR_NOT_SUPPORTED);
 
         // We are dealing with a normal object (not a wrapper) so we will
@@ -311,37 +311,37 @@ VARTYPE OleVariant::GetVarTypeForTypeHandle(TypeHandle type)
         return VT_VARIANT;
 
     // We need to make sure the CVClasses table is populated.
-    if(MscorlibBinder::IsClass(pMT, CLASS__DATE_TIME))
+    if(CoreLibBinder::IsClass(pMT, CLASS__DATE_TIME))
         return VT_DATE;
-    if(MscorlibBinder::IsClass(pMT, CLASS__DECIMAL))
+    if(CoreLibBinder::IsClass(pMT, CLASS__DECIMAL))
         return VT_DECIMAL;
 
 #ifdef HOST_64BIT
-    if (MscorlibBinder::IsClass(pMT, CLASS__INTPTR))
+    if (CoreLibBinder::IsClass(pMT, CLASS__INTPTR))
         return VT_I8;
-    if (MscorlibBinder::IsClass(pMT, CLASS__UINTPTR))
+    if (CoreLibBinder::IsClass(pMT, CLASS__UINTPTR))
         return VT_UI8;
 #else
-    if (MscorlibBinder::IsClass(pMT, CLASS__INTPTR))
+    if (CoreLibBinder::IsClass(pMT, CLASS__INTPTR))
         return VT_INT;
-    if (MscorlibBinder::IsClass(pMT, CLASS__UINTPTR))
+    if (CoreLibBinder::IsClass(pMT, CLASS__UINTPTR))
         return VT_UINT;
 #endif
 
 #ifdef FEATURE_COMINTEROP
-    if (MscorlibBinder::IsClass(pMT, CLASS__DISPATCH_WRAPPER))
+    if (CoreLibBinder::IsClass(pMT, CLASS__DISPATCH_WRAPPER))
         return VT_DISPATCH;
-    if (MscorlibBinder::IsClass(pMT, CLASS__UNKNOWN_WRAPPER))
+    if (CoreLibBinder::IsClass(pMT, CLASS__UNKNOWN_WRAPPER))
         return VT_UNKNOWN;
-    if (MscorlibBinder::IsClass(pMT, CLASS__ERROR_WRAPPER))
+    if (CoreLibBinder::IsClass(pMT, CLASS__ERROR_WRAPPER))
         return VT_ERROR;
-    if (MscorlibBinder::IsClass(pMT, CLASS__CURRENCY_WRAPPER))
+    if (CoreLibBinder::IsClass(pMT, CLASS__CURRENCY_WRAPPER))
         return VT_CY;
-    if (MscorlibBinder::IsClass(pMT, CLASS__BSTR_WRAPPER))
+    if (CoreLibBinder::IsClass(pMT, CLASS__BSTR_WRAPPER))
         return VT_BSTR;
 
     // VariantWrappers cannot be stored in VARIANT's.
-    if (MscorlibBinder::IsClass(pMT, CLASS__VARIANT_WRAPPER))
+    if (CoreLibBinder::IsClass(pMT, CLASS__VARIANT_WRAPPER))
         COMPlusThrow(kArgumentException, IDS_EE_COM_UNSUPPORTED_SIG);
 #endif // FEATURE_COMINTEROP
 
@@ -357,9 +357,9 @@ VARTYPE OleVariant::GetVarTypeForTypeHandle(TypeHandle type)
 #ifdef FEATURE_COMINTEROP
     // There is no VT corresponding to SafeHandles as they cannot be stored in
     // VARIANTs or Arrays. The same applies to CriticalHandle.
-    if (type.CanCastTo(TypeHandle(MscorlibBinder::GetClass(CLASS__SAFE_HANDLE))))
+    if (type.CanCastTo(TypeHandle(CoreLibBinder::GetClass(CLASS__SAFE_HANDLE))))
         COMPlusThrow(kArgumentException, IDS_EE_COM_UNSUPPORTED_SIG);
-    if (type.CanCastTo(TypeHandle(MscorlibBinder::GetClass(CLASS__CRITICAL_HANDLE))))
+    if (type.CanCastTo(TypeHandle(CoreLibBinder::GetClass(CLASS__CRITICAL_HANDLE))))
         COMPlusThrow(kArgumentException, IDS_EE_COM_UNSUPPORTED_SIG);
 
     if (pMT->IsInterface())
@@ -639,15 +639,15 @@ TypeHandle OleVariant::GetArrayForVarType(VARTYPE vt, TypeHandle elemType, unsig
             break;
 
         case VT_CY:
-            baseType = TypeHandle(MscorlibBinder::GetClass(CLASS__DECIMAL));
+            baseType = TypeHandle(CoreLibBinder::GetClass(CLASS__DECIMAL));
             break;
 
         case VT_DATE:
-            baseType = TypeHandle(MscorlibBinder::GetClass(CLASS__DATE_TIME));
+            baseType = TypeHandle(CoreLibBinder::GetClass(CLASS__DATE_TIME));
             break;
 
         case VT_DECIMAL:
-            baseType = TypeHandle(MscorlibBinder::GetClass(CLASS__DECIMAL));
+            baseType = TypeHandle(CoreLibBinder::GetClass(CLASS__DECIMAL));
             break;
 
         case VT_VARIANT:
@@ -702,7 +702,7 @@ TypeHandle OleVariant::GetArrayForVarType(VARTYPE vt, TypeHandle elemType, unsig
     }
 
     if (baseType.IsNull())
-        baseType = TypeHandle(MscorlibBinder::GetElementType(baseElement));
+        baseType = TypeHandle(CoreLibBinder::GetElementType(baseElement));
 
     _ASSERTE(!baseType.IsNull());
 
@@ -806,21 +806,21 @@ MethodTable* OleVariant::GetNativeMethodTableForVarType(VARTYPE vt, MethodTable*
 
     if (vt & VT_ARRAY)
     {
-        return MscorlibBinder::GetClass(CLASS__INTPTR);
+        return CoreLibBinder::GetClass(CLASS__INTPTR);
     }
 
     switch (vt)
     {
         case VT_DATE:
-            return MscorlibBinder::GetClass(CLASS__DOUBLE);
+            return CoreLibBinder::GetClass(CLASS__DOUBLE);
         case VT_CY:
-            return MscorlibBinder::GetClass(CLASS__CURRENCY);
+            return CoreLibBinder::GetClass(CLASS__CURRENCY);
         case VTHACK_WINBOOL:
-            return MscorlibBinder::GetClass(CLASS__INT32);
+            return CoreLibBinder::GetClass(CLASS__INT32);
         case VT_BOOL:
-            return MscorlibBinder::GetClass(CLASS__INT16);
+            return CoreLibBinder::GetClass(CLASS__INT16);
         case VTHACK_CBOOL:
-            return MscorlibBinder::GetClass(CLASS__BYTE);
+            return CoreLibBinder::GetClass(CLASS__BYTE);
         case VT_DISPATCH:
         case VT_UNKNOWN:
         case VT_LPSTR:
@@ -829,19 +829,19 @@ MethodTable* OleVariant::GetNativeMethodTableForVarType(VARTYPE vt, MethodTable*
         case VT_USERDEFINED:
         case VT_SAFEARRAY:
         case VT_CARRAY:
-            return MscorlibBinder::GetClass(CLASS__INTPTR);
+            return CoreLibBinder::GetClass(CLASS__INTPTR);
         case VT_VARIANT:
-            return MscorlibBinder::GetClass(CLASS__NATIVEVARIANT);
+            return CoreLibBinder::GetClass(CLASS__NATIVEVARIANT);
         case VTHACK_ANSICHAR:
-            return MscorlibBinder::GetClass(CLASS__BYTE);
+            return CoreLibBinder::GetClass(CLASS__BYTE);
         case VT_UI2:
             // When CharSet = CharSet.Unicode, System.Char arrays are marshaled as VT_UI2.
             // However, since System.Char itself is CharSet.Ansi, the native size of
             // System.Char is 1 byte instead of 2. So here we explicitly return System.UInt16's
             // MethodTable to ensure the correct size.
-            return MscorlibBinder::GetClass(CLASS__UINT16);
+            return CoreLibBinder::GetClass(CLASS__UINT16);
         case VT_DECIMAL:
-            return MscorlibBinder::GetClass(CLASS__NATIVEDECIMAL);
+            return CoreLibBinder::GetClass(CLASS__NATIVEDECIMAL);
         default:
             PREFIX_ASSUME(pManagedMT != NULL);
             return pManagedMT;
@@ -1136,7 +1136,7 @@ void VariantData::NewVariant(VariantData * const& dest, const CVTypes type, INT6
 
         case CV_NULL:
         {
-            FieldDesc * pFD = MscorlibBinder::GetField(FIELD__NULL__VALUE);
+            FieldDesc * pFD = CoreLibBinder::GetField(FIELD__NULL__VALUE);
             _ASSERTE(pFD);
 
             pFD->CheckRunClassInitThrowing();
@@ -2520,7 +2520,7 @@ void OleVariant::MarshalDecimalVariantOleToCom(VARIANT *pOleVariant,
     }
     CONTRACTL_END;
 
-    OBJECTREF pDecimalRef = AllocateObject(MscorlibBinder::GetClass(CLASS__DECIMAL));
+    OBJECTREF pDecimalRef = AllocateObject(CoreLibBinder::GetClass(CLASS__DECIMAL));
 
     DECIMAL* pDecimal = (DECIMAL *) pDecimalRef->UnBox();
     *pDecimal = V_DECIMAL(pOleVariant);
@@ -2563,7 +2563,7 @@ void OleVariant::MarshalDecimalVariantOleRefToCom(VARIANT *pOleVariant,
     }
     CONTRACTL_END;
 
-    OBJECTREF pDecimalRef = AllocateObject(MscorlibBinder::GetClass(CLASS__DECIMAL));
+    OBJECTREF pDecimalRef = AllocateObject(CoreLibBinder::GetClass(CLASS__DECIMAL));
 
     DECIMAL* pDecimal = (DECIMAL *) pDecimalRef->UnBox();
     *pDecimal = *V_DECIMALREF(pOleVariant);
@@ -2781,7 +2781,7 @@ void OleVariant::MarshalOleVariantForObject(OBJECTREF * const & pObj, VARIANT *p
     else
     {
         MethodTable *pMT = (*pObj)->GetMethodTable();
-        if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_I4))
+        if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_I4))
         {
             V_I4(pOle) = *(LONG*)( (*pObj)->GetData() );
             V_VT(pOle) = VT_I4;
@@ -2802,52 +2802,52 @@ void OleVariant::MarshalOleVariantForObject(OBJECTREF * const & pObj, VARIANT *p
 
             V_VT(pOle) = VT_BSTR;
         }
-        else if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_I2))
+        else if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_I2))
         {
             V_I2(pOle) = *(SHORT*)( (*pObj)->GetData() );
             V_VT(pOle) = VT_I2;
         }
-        else if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_I1))
+        else if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_I1))
         {
             V_I1(pOle) = *(CHAR*)( (*pObj)->GetData() );
             V_VT(pOle) = VT_I1;
         }
-        else if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_U4))
+        else if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_U4))
         {
             V_UI4(pOle) = *(ULONG*)( (*pObj)->GetData() );
             V_VT(pOle) = VT_UI4;
         }
-        else if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_U2))
+        else if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_U2))
         {
             V_UI2(pOle) = *(USHORT*)( (*pObj)->GetData() );
             V_VT(pOle) = VT_UI2;
         }
-        else if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_U1))
+        else if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_U1))
         {
             V_UI1(pOle) = *(BYTE*)( (*pObj)->GetData() );
             V_VT(pOle) = VT_UI1;
         }
-        else if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_R4))
+        else if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_R4))
         {
             V_R4(pOle) = *(FLOAT*)( (*pObj)->GetData() );
             V_VT(pOle) = VT_R4;
         }
-        else if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_R8))
+        else if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_R8))
         {
             V_R8(pOle) = *(DOUBLE*)( (*pObj)->GetData() );
             V_VT(pOle) = VT_R8;
         }
-        else if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_BOOLEAN))
+        else if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_BOOLEAN))
         {
             V_BOOL(pOle) = *(U1*)( (*pObj)->GetData() ) ? VARIANT_TRUE : VARIANT_FALSE;
             V_VT(pOle) = VT_BOOL;
         }
-        else if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_I))
+        else if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_I))
         {
             *(LPVOID*)&(V_INT(pOle)) = *(LPVOID*)( (*pObj)->GetData() );
             V_VT(pOle) = VT_INT;
         }
-        else if (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_U))
+        else if (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_U))
         {
             *(LPVOID*)&(V_UINT(pOle)) = *(LPVOID*)( (*pObj)->GetData() );
             V_VT(pOle) = VT_UINT;
@@ -2972,49 +2972,49 @@ HRESULT OleVariant::MarshalCommonOleRefVariantForObject(OBJECTREF *pObj, VARIANT
     // Let's try to handle the common trivial cases quickly first before
     // running the generalized stuff.
     MethodTable *pMT = (*pObj) == NULL ? NULL : (*pObj)->GetMethodTable();
-    if ( (V_VT(pOle) == (VT_BYREF | VT_I4) || V_VT(pOle) == (VT_BYREF | VT_UI4)) && (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_I4) || pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_U4)) )
+    if ( (V_VT(pOle) == (VT_BYREF | VT_I4) || V_VT(pOle) == (VT_BYREF | VT_UI4)) && (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_I4) || pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_U4)) )
     {
         // deallocation of old value optimized away since there's nothing to
         // deallocate for this vartype.
 
         *(V_I4REF(pOle)) = *(LONG*)( (*pObj)->GetData() );
     }
-    else if ( (V_VT(pOle) == (VT_BYREF | VT_I2) || V_VT(pOle) == (VT_BYREF | VT_UI2)) && (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_I2) || pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_U2)) )
+    else if ( (V_VT(pOle) == (VT_BYREF | VT_I2) || V_VT(pOle) == (VT_BYREF | VT_UI2)) && (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_I2) || pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_U2)) )
     {
         // deallocation of old value optimized away since there's nothing to
         // deallocate for this vartype.
 
         *(V_I2REF(pOle)) = *(SHORT*)( (*pObj)->GetData() );
     }
-    else if ( (V_VT(pOle) == (VT_BYREF | VT_I1) || V_VT(pOle) == (VT_BYREF | VT_UI1)) && (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_I1) || pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_U1)) )
+    else if ( (V_VT(pOle) == (VT_BYREF | VT_I1) || V_VT(pOle) == (VT_BYREF | VT_UI1)) && (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_I1) || pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_U1)) )
     {
         // deallocation of old value optimized away since there's nothing to
         // deallocate for this vartype.
 
         *(V_I1REF(pOle)) = *(CHAR*)( (*pObj)->GetData() );
     }
-    else if ( V_VT(pOle) == (VT_BYREF | VT_R4) && pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_R4) )
+    else if ( V_VT(pOle) == (VT_BYREF | VT_R4) && pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_R4) )
     {
         // deallocation of old value optimized away since there's nothing to
         // deallocate for this vartype.
 
         *(V_R4REF(pOle)) = *(FLOAT*)( (*pObj)->GetData() );
     }
-    else if ( V_VT(pOle) == (VT_BYREF | VT_R8) && pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_R8) )
+    else if ( V_VT(pOle) == (VT_BYREF | VT_R8) && pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_R8) )
     {
         // deallocation of old value optimized away since there's nothing to
         // deallocate for this vartype.
 
         *(V_R8REF(pOle)) = *(DOUBLE*)( (*pObj)->GetData() );
     }
-    else if ( V_VT(pOle) == (VT_BYREF | VT_BOOL) && pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_BOOLEAN) )
+    else if ( V_VT(pOle) == (VT_BYREF | VT_BOOL) && pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_BOOLEAN) )
     {
         // deallocation of old value optimized away since there's nothing to
         // deallocate for this vartype.
 
         *(V_BOOLREF(pOle)) =  ( *(U1*)( (*pObj)->GetData() ) ) ? VARIANT_TRUE : VARIANT_FALSE;
     }
-    else if ( (V_VT(pOle) == (VT_BYREF | VT_INT) || V_VT(pOle) == (VT_BYREF | VT_UINT)) && (pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_I4) || pMT == MscorlibBinder::GetElementType(ELEMENT_TYPE_U4)) )
+    else if ( (V_VT(pOle) == (VT_BYREF | VT_INT) || V_VT(pOle) == (VT_BYREF | VT_UINT)) && (pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_I4) || pMT == CoreLibBinder::GetElementType(ELEMENT_TYPE_U4)) )
     {
         // deallocation of old value optimized away since there's nothing to
         // deallocate for this vartype.
@@ -3122,112 +3122,112 @@ void OleVariant::MarshalObjectForOleVariant(const VARIANT * pOle, OBJECTREF * co
         case VT_I4:
         case VT_INT:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_I4)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_I4)) );
             *(LONG*)((*pObj)->GetData()) = V_I4(pOle);
             break;
 
         case VT_BYREF|VT_I4:
         case VT_BYREF|VT_INT:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_I4)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_I4)) );
             *(LONG*)((*pObj)->GetData()) = *(V_I4REF(pOle));
             break;
 
         case VT_UI4:
         case VT_UINT:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_U4)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_U4)) );
             *(ULONG*)((*pObj)->GetData()) = V_UI4(pOle);
             break;
 
         case VT_BYREF|VT_UI4:
         case VT_BYREF|VT_UINT:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_U4)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_U4)) );
             *(ULONG*)((*pObj)->GetData()) = *(V_UI4REF(pOle));
             break;
 
         case VT_I2:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_I2)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_I2)) );
             (*(SHORT*)((*pObj)->GetData())) = V_I2(pOle);
             break;
 
         case VT_BYREF|VT_I2:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_I2)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_I2)) );
             *(SHORT*)((*pObj)->GetData()) = *(V_I2REF(pOle));
             break;
 
         case VT_UI2:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_U2)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_U2)) );
             *(USHORT*)((*pObj)->GetData()) = V_UI2(pOle);
             break;
 
         case VT_BYREF|VT_UI2:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_U2)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_U2)) );
             *(USHORT*)((*pObj)->GetData()) = *(V_UI2REF(pOle));
             break;
 
         case VT_I1:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_I1)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_I1)) );
             *(CHAR*)((*pObj)->GetData()) = V_I1(pOle);
             break;
 
         case VT_BYREF|VT_I1:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_I1)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_I1)) );
             *(CHAR*)((*pObj)->GetData()) = *(V_I1REF(pOle));
             break;
 
         case VT_UI1:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_U1)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_U1)) );
             *(BYTE*)((*pObj)->GetData()) = V_UI1(pOle);
             break;
 
         case VT_BYREF|VT_UI1:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_U1)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_U1)) );
             *(BYTE*)((*pObj)->GetData()) = *(V_UI1REF(pOle));
             break;
 
         case VT_R4:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_R4)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_R4)) );
             *(FLOAT*)((*pObj)->GetData()) = V_R4(pOle);
             break;
 
         case VT_BYREF|VT_R4:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_R4)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_R4)) );
             *(FLOAT*)((*pObj)->GetData()) = *(V_R4REF(pOle));
             break;
 
         case VT_R8:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_R8)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_R8)) );
             *(DOUBLE*)((*pObj)->GetData()) = V_R8(pOle);
             break;
 
         case VT_BYREF|VT_R8:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_R8)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_R8)) );
             *(DOUBLE*)((*pObj)->GetData()) = *(V_R8REF(pOle));
             break;
 
         case VT_BOOL:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_BOOLEAN)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_BOOLEAN)) );
             *(VARIANT_BOOL*)((*pObj)->GetData()) = V_BOOL(pOle) ? 1 : 0;
             break;
 
         case VT_BYREF|VT_BOOL:
             SetObjectReference( pObj,
-                                AllocateObject(MscorlibBinder::GetElementType(ELEMENT_TYPE_BOOLEAN)) );
+                                AllocateObject(CoreLibBinder::GetElementType(ELEMENT_TYPE_BOOLEAN)) );
             *(VARIANT_BOOL*)((*pObj)->GetData()) = *(V_BOOLREF(pOle)) ? 1 : 0;
             break;
 
@@ -3800,7 +3800,7 @@ void OleVariant::MarshalCurrencyVariantOleToCom(VARIANT *pOleVariant,
     }
     CONTRACTL_END;
 
-    OBJECTREF pDecimalRef = AllocateObject(MscorlibBinder::GetClass(CLASS__DECIMAL));
+    OBJECTREF pDecimalRef = AllocateObject(CoreLibBinder::GetClass(CLASS__DECIMAL));
     DECIMAL DecVal;
 
     // Convert the currency to a decimal.
@@ -3848,7 +3848,7 @@ void OleVariant::MarshalCurrencyVariantOleRefToCom(VARIANT *pOleVariant,
     }
     CONTRACTL_END;
 
-    OBJECTREF pDecimalRef = AllocateObject(MscorlibBinder::GetClass(CLASS__DECIMAL));
+    OBJECTREF pDecimalRef = AllocateObject(CoreLibBinder::GetClass(CLASS__DECIMAL));
     DECIMAL DecVal;
 
     // Convert the currency to a decimal.
@@ -4867,16 +4867,16 @@ BOOL OleVariant::IsArrayOfWrappers(BASEARRAYREF *pArray, BOOL *pbOfInterfaceWrap
 
     if (!hndElemType.IsTypeDesc())
     {
-        if (hndElemType == TypeHandle(MscorlibBinder::GetClass(CLASS__DISPATCH_WRAPPER)) ||
-            hndElemType == TypeHandle(MscorlibBinder::GetClass(CLASS__UNKNOWN_WRAPPER)))
+        if (hndElemType == TypeHandle(CoreLibBinder::GetClass(CLASS__DISPATCH_WRAPPER)) ||
+            hndElemType == TypeHandle(CoreLibBinder::GetClass(CLASS__UNKNOWN_WRAPPER)))
         {
             *pbOfInterfaceWrappers = TRUE;
             return TRUE;
         }
 
-        if (hndElemType == TypeHandle(MscorlibBinder::GetClass(CLASS__ERROR_WRAPPER)) ||
-            hndElemType == TypeHandle(MscorlibBinder::GetClass(CLASS__CURRENCY_WRAPPER)) ||
-            hndElemType == TypeHandle(MscorlibBinder::GetClass(CLASS__BSTR_WRAPPER)))
+        if (hndElemType == TypeHandle(CoreLibBinder::GetClass(CLASS__ERROR_WRAPPER)) ||
+            hndElemType == TypeHandle(CoreLibBinder::GetClass(CLASS__CURRENCY_WRAPPER)) ||
+            hndElemType == TypeHandle(CoreLibBinder::GetClass(CLASS__BSTR_WRAPPER)))
         {
             *pbOfInterfaceWrappers = FALSE;
             return TRUE;
@@ -4906,20 +4906,20 @@ BASEARRAYREF OleVariant::ExtractWrappedObjectsFromArray(BASEARRAYREF *pArray)
     BASEARRAYREF RetArray = NULL;
 
     // Retrieve the element type handle for the array to create.
-    if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__DISPATCH_WRAPPER)))
+    if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__DISPATCH_WRAPPER)))
         hndElemType = TypeHandle(g_pObjectClass);
 
-    else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__UNKNOWN_WRAPPER)))
+    else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__UNKNOWN_WRAPPER)))
         hndElemType = TypeHandle(g_pObjectClass);
 
-    else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__BSTR_WRAPPER)))
+    else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__BSTR_WRAPPER)))
         hndElemType = TypeHandle(g_pStringClass);
 
-    else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__ERROR_WRAPPER)))
-        hndElemType = TypeHandle(MscorlibBinder::GetClass(CLASS__INT32));
+    else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__ERROR_WRAPPER)))
+        hndElemType = TypeHandle(CoreLibBinder::GetClass(CLASS__INT32));
 
-    else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__CURRENCY_WRAPPER)))
-        hndElemType = TypeHandle(MscorlibBinder::GetClass(CLASS__DECIMAL));
+    else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__CURRENCY_WRAPPER)))
+        hndElemType = TypeHandle(CoreLibBinder::GetClass(CLASS__DECIMAL));
 
     else
         _ASSERTE(!"Invalid wrapper type");
@@ -4961,7 +4961,7 @@ BASEARRAYREF OleVariant::ExtractWrappedObjectsFromArray(BASEARRAYREF *pArray)
     {
         SIZE_T NumComponents = (*pArray)->GetNumComponents();
 
-        if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__DISPATCH_WRAPPER)))
+        if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__DISPATCH_WRAPPER)))
         {
             DISPATCHWRAPPEROBJECTREF *pSrc = (DISPATCHWRAPPEROBJECTREF *)(*pArray)->GetDataPtr();
             DISPATCHWRAPPEROBJECTREF *pSrcEnd = pSrc + NumComponents;
@@ -4969,7 +4969,7 @@ BASEARRAYREF OleVariant::ExtractWrappedObjectsFromArray(BASEARRAYREF *pArray)
             for (; pSrc < pSrcEnd; pSrc++, pDest++)
                 SetObjectReference(pDest, (*pSrc) != NULL ? (*pSrc)->GetWrappedObject() : NULL);
         }
-        else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__UNKNOWN_WRAPPER)))
+        else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__UNKNOWN_WRAPPER)))
         {
             UNKNOWNWRAPPEROBJECTREF *pSrc = (UNKNOWNWRAPPEROBJECTREF *)(*pArray)->GetDataPtr();
             UNKNOWNWRAPPEROBJECTREF *pSrcEnd = pSrc + NumComponents;
@@ -4977,7 +4977,7 @@ BASEARRAYREF OleVariant::ExtractWrappedObjectsFromArray(BASEARRAYREF *pArray)
             for (; pSrc < pSrcEnd; pSrc++, pDest++)
                 SetObjectReference(pDest, (*pSrc) != NULL ? (*pSrc)->GetWrappedObject() : NULL);
         }
-        else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__ERROR_WRAPPER)))
+        else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__ERROR_WRAPPER)))
         {
             ERRORWRAPPEROBJECTREF *pSrc = (ERRORWRAPPEROBJECTREF *)(*pArray)->GetDataPtr();
             ERRORWRAPPEROBJECTREF *pSrcEnd = pSrc + NumComponents;
@@ -4985,7 +4985,7 @@ BASEARRAYREF OleVariant::ExtractWrappedObjectsFromArray(BASEARRAYREF *pArray)
             for (; pSrc < pSrcEnd; pSrc++, pDest++)
                 *pDest = (*pSrc) != NULL ? (*pSrc)->GetErrorCode() : NULL;
         }
-        else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__CURRENCY_WRAPPER)))
+        else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__CURRENCY_WRAPPER)))
         {
             CURRENCYWRAPPEROBJECTREF *pSrc = (CURRENCYWRAPPEROBJECTREF *)(*pArray)->GetDataPtr();
             CURRENCYWRAPPEROBJECTREF *pSrcEnd = pSrc + NumComponents;
@@ -4998,7 +4998,7 @@ BASEARRAYREF OleVariant::ExtractWrappedObjectsFromArray(BASEARRAYREF *pArray)
                     memset(pDest, 0, sizeof(DECIMAL));
             }
         }
-        else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__BSTR_WRAPPER)))
+        else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__BSTR_WRAPPER)))
         {
             BSTRWRAPPEROBJECTREF *pSrc = (BSTRWRAPPEROBJECTREF *)(*pArray)->GetDataPtr();
             BSTRWRAPPEROBJECTREF *pSrcEnd = pSrc + NumComponents;
@@ -5034,22 +5034,22 @@ TypeHandle OleVariant::GetWrappedArrayElementType(BASEARRAYREF *pArray)
     TypeHandle hndWrapperType = (*pArray)->GetArrayElementTypeHandle();
     TypeHandle pWrappedObjType;
 
-    if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__DISPATCH_WRAPPER)) ||
-        hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__UNKNOWN_WRAPPER)))
+    if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__DISPATCH_WRAPPER)) ||
+        hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__UNKNOWN_WRAPPER)))
     {
         // There's no need to traverse the array up front. We'll use the default interface
         // for each element in code:OleVariant::MarshalInterfaceArrayComToOleHelper.
         pWrappedObjType = TypeHandle(g_pObjectClass);
     }
-    else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__ERROR_WRAPPER)))
+    else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__ERROR_WRAPPER)))
     {
-        pWrappedObjType = TypeHandle(MscorlibBinder::GetClass(CLASS__INT32));
+        pWrappedObjType = TypeHandle(CoreLibBinder::GetClass(CLASS__INT32));
     }
-    else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__CURRENCY_WRAPPER)))
+    else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__CURRENCY_WRAPPER)))
     {
-        pWrappedObjType = TypeHandle(MscorlibBinder::GetClass(CLASS__DECIMAL));
+        pWrappedObjType = TypeHandle(CoreLibBinder::GetClass(CLASS__DECIMAL));
     }
-    else if (hndWrapperType == TypeHandle(MscorlibBinder::GetClass(CLASS__BSTR_WRAPPER)))
+    else if (hndWrapperType == TypeHandle(CoreLibBinder::GetClass(CLASS__BSTR_WRAPPER)))
     {
         pWrappedObjType = TypeHandle(g_pStringClass);
     }
index dfc846e..d8f49f7 100644 (file)
@@ -75,7 +75,7 @@ inline TypeHandle GetTypeHandleForCVType(CVTypes elemType)
     }
     CONTRACT_END;
 
-    RETURN TypeHandle(MscorlibBinder::GetClass(CVTypeToBinderClassID[elemType]));
+    RETURN TypeHandle(CoreLibBinder::GetClass(CVTypeToBinderClassID[elemType]));
 }
 
 // Use this very carefully.  There is not a direct mapping between
@@ -116,7 +116,7 @@ extern CVTypes CorElementTypeToCVTypes(CorElementType type);
 
 struct VariantData
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
 public:
     static void NewVariant(VariantData * const& dest, const CVTypes type, INT64 data
index 16544ac..aa070fd 100644 (file)
@@ -144,7 +144,7 @@ public:
             // to encode zero-valued fields with zero bits. Is this is deemed an important optimization in the
             // future we could always given up on a simple linear mapping of the size field and use a lookup
             // table to map values encoded into the real sizes. Experiments with EEClass packed fields over
-            // mscorlib show that this currently doesn't yield us much benefit, primarily due to the DWORD
+            // CoreLib show that this currently doesn't yield us much benefit, primarily due to the DWORD
             // round-up size semantic, which implies we'd need a lot more optimization than this to reduce the
             // average structure size below the next DWORD threshhold.
             BitVectorSet(dwOffset, kMaxLengthBits, dwFieldLength - 1);
index 2ee6252..383fb53 100644 (file)
@@ -626,7 +626,7 @@ class PEAssembly : public PEFile
         PEImage *          pPEImageNI,
         ICLRPrivAssembly * pHostAssembly);
 
-    // This opens the canonical mscorlib.dll
+    // This opens the canonical System.Private.CoreLib.dll
     static PEAssembly *OpenSystem(IUnknown *pAppCtx);
 #ifdef DACCESS_COMPILE
     virtual void EnumMemoryRegions(CLRDataEnumMemoryFlags flags);
index 9fa9af7..8eb8925 100644 (file)
@@ -401,7 +401,7 @@ NativeImagePerfMap::NativeImagePerfMap(Assembly * pAssembly, BSTR pDestPath)
     GetNativeImageSignature(pAssembly->GetManifestFile(), wszSignature, lengthof(wszSignature));
 
     // Build the path to the perfmap file, which consists of <inputpath><imagesimplename>.ni.<signature>.map.
-    // Example: /tmp/mscorlib.ni.{GUID}.map
+    // Example: /tmp/System.Private.CoreLib.ni.{GUID}.map
     SString sDestPerfMapPath;
     sDestPerfMapPath.Printf("%S%s.ni.%S.map", pDestPath, lpcSimpleName, wszSignature);
 
index dd7ca44..e6ff77a 100644 (file)
@@ -1485,7 +1485,7 @@ Stub * CreateUnboxingILStubForSharedGenericValueTypeMethods(MethodDesc* pTargetM
     CreateInstantiatingILStubTargetSig(pTargetMD, typeContext, &stubSigBuilder);
 
     // 2. Emit the method body
-    mdToken tokRawData = pCode->GetToken(MscorlibBinder::GetField(FIELD__RAW_DATA__DATA));
+    mdToken tokRawData = pCode->GetToken(CoreLibBinder::GetField(FIELD__RAW_DATA__DATA));
 
     // 2.1 Push the thisptr
     // We need to skip over the MethodTable*
@@ -2412,7 +2412,7 @@ EXTERN_C PCODE STDCALL ExternalMethodFixupWorker(TransitionBlock * pTransitionBl
     //
     // In this IL stub implementation we call the native method kernel32!GetFileAttributes,
     // and then we immediately try to save the Last Error code by calling the
-    // mscorlib method System.StubHelpers.StubHelpers.SetLastError().
+    // CoreLib method System.StubHelpers.StubHelpers.SetLastError().
     //
     // However when we are coming from a precompiled IL Stub in an ngen image
     // we must use an ExternalMethodFixup to find the target address of
@@ -3384,7 +3384,7 @@ PCODE DynamicHelperFixup(TransitionBlock * pTransitionBlock, TADDR * pCell, DWOR
                 }
                 else
                 {
-                    target = ECall::GetFCallImpl(MscorlibBinder::GetMethod(METHOD__DELEGATE__CONSTRUCT_DELEGATE));
+                    target = ECall::GetFCallImpl(CoreLibBinder::GetMethod(METHOD__DELEGATE__CONSTRUCT_DELEGATE));
                     ctorData.pArg3 = NULL;
                 }
 
index e46ab22..497cdff 100644 (file)
@@ -70,7 +70,7 @@ void QCall::ObjectHandleOnStack::SetGuidArray(const GUID * p, COUNT_T length)
 
     GCX_COOP();
 
-    ::TypeHandle typeHandle = MscorlibBinder::GetClass(CLASS__GUID);
+    ::TypeHandle typeHandle = CoreLibBinder::GetClass(CLASS__GUID);
     BASEARRAYREF arr = (BASEARRAYREF) AllocateSzArray(typeHandle.MakeSZArray(), length);
     memcpyNoGCRefs(arr->GetDataPtr(), p, length * sizeof(GUID));
     Set(arr);
index 581aefe..2517f59 100644 (file)
@@ -13,8 +13,8 @@
 // QCALLS
 //
 
-// QCalls are internal calls from managed code in mscorlib.dll to unmanaged code in mscorwks.dll. QCalls are very much like
-// a normal P/Invoke from mscorlib.dll to mscorwks.dll.
+// QCalls are internal calls from managed code in CoreLib to unmanaged code in VM. QCalls are very much like
+// a normal P/Invoke from CoreLib to VM.
 //
 // Unlike FCalls, QCalls will marshal all arguments as unmanaged types like a normal P/Invoke. QCall also switch to preemptive
 // GC mode like a normal P/Invoke. These two features should make QCalls easier to write reliably compared to FCalls.
index 59a6431..4ea56e3 100644 (file)
@@ -200,7 +200,7 @@ FCIMPL2(FC_BOOL_RET, ReflectionInvocation::CanValueSpecialCast, ReflectClassBase
     // the field type is a pointer
     if (targetCorElement == ELEMENT_TYPE_PTR || targetCorElement == ELEMENT_TYPE_FNPTR) {
         // the object must be an IntPtr or a System.Reflection.Pointer
-        if (valueType == TypeHandle(MscorlibBinder::GetClass(CLASS__INTPTR))) {
+        if (valueType == TypeHandle(CoreLibBinder::GetClass(CLASS__INTPTR))) {
             //
             // it's an IntPtr, it's good.
         }
@@ -1679,7 +1679,7 @@ FCIMPL5(void, RuntimeFieldHandle::SetValueDirect, ReflectFieldObject *pFieldUNSA
     case ELEMENT_TYPE_PTR:      // pointers
         if (gc.oValue != 0) {
             value = 0;
-            if (MscorlibBinder::IsClass(gc.oValue->GetMethodTable(), CLASS__POINTER)) {
+            if (CoreLibBinder::IsClass(gc.oValue->GetMethodTable(), CLASS__POINTER)) {
                 value = (size_t) InvokeUtil::GetPointerValue(gc.oValue);
 #ifdef _MSC_VER
 #pragma warning(disable: 4267) //work-around for compiler
@@ -2368,7 +2368,7 @@ FCIMPL1(Object *, ReflectionEnum::InternalGetEnumUnderlyingType, ReflectClassBas
     OBJECTREF result = NULL;
 
     HELPER_METHOD_FRAME_BEGIN_RET_0();
-    MethodTable *pMT = MscorlibBinder::GetElementType(th.AsMethodTable()->GetInternalCorElementType());
+    MethodTable *pMT = CoreLibBinder::GetElementType(th.AsMethodTable()->GetInternalCorElementType());
     result = pMT->GetManagedClassObject();
     HELPER_METHOD_FRAME_END();
 
index 03cfa36..da7686a 100644 (file)
@@ -279,14 +279,4 @@ DEFINE_EXCEPTION(g_SystemNS,           OutOfMemoryException,           false,  E
 
 DEFINE_EXCEPTION(g_SystemNS,           ArgumentNullException,          false,  E_POINTER)
 
-#define kLastExceptionInMscorlib kArgumentNullException
-
-//
-// All exceptions defined in other .NET Framework assemblies have to be at the end
-//
-
-
-
-// Please see comments on at the top of this list
-
 #undef DEFINE_EXCEPTION
index 05bbc24..16d7e5e 100644 (file)
@@ -2248,9 +2248,9 @@ HRESULT RCW::SafeQueryInterfaceRemoteAware(REFIID iid, IUnknown** ppResUnk)
 #endif //#ifndef CROSSGEN_COMPILE
 
 // Helper method to allow us to compare a MethodTable against a known method table
-// from mscorlib.  If the mscorlib type isn't loaded, we don't load it because we
+// from CoreLib.  If the CoreLib type isn't loaded, we don't load it because we
 // know that it can't be the MethodTable we're curious about.
-static bool MethodTableHasSameTypeDefAsMscorlibClass(MethodTable* pMT, BinderClassID classId)
+static bool MethodTableHasSameTypeDefAsCoreLibClass(MethodTable* pMT, BinderClassID classId)
 {
     CONTRACTL
     {
@@ -2260,11 +2260,11 @@ static bool MethodTableHasSameTypeDefAsMscorlibClass(MethodTable* pMT, BinderCla
     }
     CONTRACTL_END;
 
-    MethodTable* pMT_MscorlibClass = MscorlibBinder::GetClassIfExist(classId);
-    if (pMT_MscorlibClass == NULL)
+    MethodTable* pMT_CoreLibClass = CoreLibBinder::GetClassIfExist(classId);
+    if (pMT_CoreLibClass == NULL)
         return false;
 
-    return (pMT->HasSameTypeDefAs(pMT_MscorlibClass) != FALSE);
+    return (pMT->HasSameTypeDefAs(pMT_CoreLibClass) != FALSE);
 }
 
 #ifndef CROSSGEN_COMPILE
@@ -2542,7 +2542,7 @@ bool RCW::SupportsMngStdInterface(MethodTable *pItfMT)
 
         // If the requested interface is IEnumerable then we need to check to see if the
         // COM object implements IDispatch and has a member with DISPID_NEWENUM.
-        if (pItfMT == MscorlibBinder::GetClass(CLASS__IENUMERABLE))
+        if (pItfMT == CoreLibBinder::GetClass(CLASS__IENUMERABLE))
         {
             SafeComHolder<IDispatch> pDisp = GetIDispatch();
             if (pDisp)
@@ -2824,7 +2824,7 @@ void ComObject::ThrowInvalidCastException(OBJECTREF *pObj, MethodTable *pCastToM
             COMPlusThrow(kInvalidCastException, IDS_EE_RCW_INVALIDCAST_EVENTITF, strHRDescription.GetUnicode(), strComObjClassName.GetUnicode(),
                 strCastToName.GetUnicode(), strIID, strSrcItfIID);
         }
-        else if (thCastTo == TypeHandle(MscorlibBinder::GetClass(CLASS__IENUMERABLE)))
+        else if (thCastTo == TypeHandle(CoreLibBinder::GetClass(CLASS__IENUMERABLE)))
         {
             COMPlusThrow(kInvalidCastException, IDS_EE_RCW_INVALIDCAST_IENUMERABLE,
                 strHRDescription.GetUnicode(), strComObjClassName.GetUnicode(), strCastToName.GetUnicode(), strIID);
index b34ee5c..14787a7 100644 (file)
@@ -736,7 +736,7 @@ PTRARRAYREF CopyRuntimeTypeHandles(TypeHandle * prgTH, FixupPointer<TypeHandle>
     }
 
     GCPROTECT_BEGIN(refArray);
-    TypeHandle thRuntimeType = TypeHandle(MscorlibBinder::GetClass(arrayElemType));
+    TypeHandle thRuntimeType = TypeHandle(CoreLibBinder::GetClass(arrayElemType));
     TypeHandle arrayHandle = ClassLoader::LoadArrayTypeThrowing(thRuntimeType, ELEMENT_TYPE_SZARRAY);
     refArray = (PTRARRAYREF)AllocateSzArray(arrayHandle, numTypeHandles);
 
@@ -1954,7 +1954,7 @@ FCIMPL3(Object *, SignatureNative::GetCustomModifiers, SignatureNative* pSignatu
         // modifiers now that we know how long they should be.
         sp = argument;
 
-        MethodTable *pMT = MscorlibBinder::GetClass(CLASS__TYPE);
+        MethodTable *pMT = CoreLibBinder::GetClass(CLASS__TYPE);
         TypeHandle arrayHandle = ClassLoader::LoadArrayTypeThrowing(TypeHandle(pMT), ELEMENT_TYPE_SZARRAY);
 
         gc.retVal = (PTRARRAYREF) AllocateSzArray(arrayHandle, cMods);
@@ -2466,10 +2466,10 @@ FCIMPL2(RuntimeMethodBody *, RuntimeMethodHandle::GetMethodBody, ReflectMethodOb
 
         if (pILHeader)
         {
-            MethodTable * pExceptionHandlingClauseMT = MscorlibBinder::GetClass(CLASS__RUNTIME_EH_CLAUSE);
+            MethodTable * pExceptionHandlingClauseMT = CoreLibBinder::GetClass(CLASS__RUNTIME_EH_CLAUSE);
             TypeHandle thEHClauseArray = ClassLoader::LoadArrayTypeThrowing(TypeHandle(pExceptionHandlingClauseMT), ELEMENT_TYPE_SZARRAY);
 
-            MethodTable * pLocalVariableMT = MscorlibBinder::GetClass(CLASS__RUNTIME_LOCAL_VARIABLE_INFO);
+            MethodTable * pLocalVariableMT = CoreLibBinder::GetClass(CLASS__RUNTIME_LOCAL_VARIABLE_INFO);
             TypeHandle thLocalVariableArray = ClassLoader::LoadArrayTypeThrowing(TypeHandle(pLocalVariableMT), ELEMENT_TYPE_SZARRAY);
 
             Module* pModule = pMethod->GetModule();
@@ -2489,7 +2489,7 @@ FCIMPL2(RuntimeMethodBody *, RuntimeMethodHandle::GetMethodBody, ReflectMethodOb
                 }
             }
 
-            gc.MethodBodyObj = (RUNTIMEMETHODBODYREF)AllocateObject(MscorlibBinder::GetClass(CLASS__RUNTIME_METHOD_BODY));
+            gc.MethodBodyObj = (RUNTIMEMETHODBODYREF)AllocateObject(CoreLibBinder::GetClass(CLASS__RUNTIME_METHOD_BODY));
 
             gc.MethodBodyObj->_maxStackSize = header.GetMaxStack();
             gc.MethodBodyObj->_initLocals = !!(header.GetFlags() & CorILMethod_InitLocals);
index 44c1f40..38ee027 100644 (file)
@@ -41,10 +41,10 @@ void SafeHandle::Init()
     // methods involves calling .GetMethod which can fail, we are doing this
     // eagerly here, Otherwise we will have to do it at the time of the call,
     // and this could be at risk if .GetMethod failed.
-    MethodDesc* pMD = MscorlibBinder::GetMethod(METHOD__SAFE_HANDLE__GET_IS_INVALID);
+    MethodDesc* pMD = CoreLibBinder::GetMethod(METHOD__SAFE_HANDLE__GET_IS_INVALID);
     s_IsInvalidHandleMethodSlot = pMD->GetSlot();
 
-    pMD = MscorlibBinder::GetMethod(METHOD__SAFE_HANDLE__RELEASE_HANDLE);
+    pMD = CoreLibBinder::GetMethod(METHOD__SAFE_HANDLE__RELEASE_HANDLE);
     s_ReleaseHandleMethodSlot = pMD->GetSlot();
 }
 
index ee42a4e..1d3fbbd 100644 (file)
@@ -728,12 +728,12 @@ MetaSig::MetaSig(BinderMethodID id)
     }
     CONTRACTL_END
 
-    Signature sig = MscorlibBinder::GetMethodSignature(id);
+    Signature sig = CoreLibBinder::GetMethodSignature(id);
 
-    _ASSERTE(MethodDescMatchesSig(MscorlibBinder::GetMethod(id),
-        sig.GetRawSig(), sig.GetRawSigLen(), MscorlibBinder::GetModule()));
+    _ASSERTE(MethodDescMatchesSig(CoreLibBinder::GetMethod(id),
+        sig.GetRawSig(), sig.GetRawSigLen(), CoreLibBinder::GetModule()));
 
-    Init(sig.GetRawSig(), sig.GetRawSigLen(), MscorlibBinder::GetModule(), NULL);
+    Init(sig.GetRawSig(), sig.GetRawSigLen(), CoreLibBinder::GetModule(), NULL);
 }
 
 MetaSig::MetaSig(LPHARDCODEDMETASIG pwzMetaSig)
@@ -748,9 +748,9 @@ MetaSig::MetaSig(LPHARDCODEDMETASIG pwzMetaSig)
     }
     CONTRACTL_END
 
-    Signature sig = MscorlibBinder::GetSignature(pwzMetaSig);
+    Signature sig = CoreLibBinder::GetSignature(pwzMetaSig);
 
-    Init(sig.GetRawSig(), sig.GetRawSigLen(), MscorlibBinder::GetModule(), NULL);
+    Init(sig.GetRawSig(), sig.GetRawSigLen(), CoreLibBinder::GetModule(), NULL);
 }
 
 // Helper constructor that constructs a field signature MetaSig from a FieldDesc
@@ -1086,7 +1086,7 @@ TypeHandle SigPointer::GetTypeHandleThrowing(
         // case ELEMENT_TYPE_STRING   = 0x0e,
         // case ELEMENT_TYPE_OBJECT   = 0x1c,
         //
-        thRet = TypeHandle(MscorlibBinder::GetElementType(typ));
+        thRet = TypeHandle(CoreLibBinder::GetElementType(typ));
     }
     else
     {
@@ -1479,7 +1479,7 @@ TypeHandle SigPointer::GetTypeHandleThrowing(
             {
                 if (TypeFromToken(typeToken) == mdtTypeRef)
                 {
-                        loadedType = TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_VOID));
+                        loadedType = TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_VOID));
                         thRet = loadedType;
                         break;
                 }
@@ -2372,7 +2372,7 @@ CorElementType SigPointer::PeekElemTypeNormalized(Module* pModule, const SigType
             TypeHandle th = GetTypeHandleThrowing(pModule, pTypeContext, ClassLoader::LoadTypes, CLASS_LOAD_APPROXPARENTS, TRUE);
             if(th.IsNull())
             {
-                th = TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_VOID));
+                th = TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_VOID));
             }
 
             type = th.GetInternalCorElementType();
@@ -4613,9 +4613,9 @@ MetaSig::CompareElementTypeToToken(
     }
 
     return CompareTypeTokens(
-        MscorlibBinder::GetElementType(Type1)->GetCl(),
+        CoreLibBinder::GetElementType(Type1)->GetCl(),
         tk2,
-        MscorlibBinder::GetModule(),
+        CoreLibBinder::GetModule(),
         pModule2,
         pVisited);
 } // MetaSig::CompareElementTypeToToken
@@ -4765,10 +4765,10 @@ BOOL MetaSig::CompareVariableConstraints(const Substitution *pSubst1,
         // a) are vacuous, and
         // b) may be implicit (ie. absent) in the overriden variable's declaration
         if (!(CompareTypeDefOrRefOrSpec(pModule1, tkConstraintType1, NULL,
-                                       MscorlibBinder::GetModule(), g_pObjectClass->GetCl(), NULL, NULL) ||
+                                       CoreLibBinder::GetModule(), g_pObjectClass->GetCl(), NULL, NULL) ||
           (((specialConstraints1 & gpNotNullableValueTypeConstraint) != 0) &&
            (CompareTypeDefOrRefOrSpec(pModule1, tkConstraintType1, NULL,
-                      MscorlibBinder::GetModule(), g_pValueTypeClass->GetCl(), NULL, NULL)))))
+                      CoreLibBinder::GetModule(), g_pValueTypeClass->GetCl(), NULL, NULL)))))
         {
             HENUMInternalHolder hEnum2(pInternalImport2);
             mdGenericParamConstraint tkConstraint2;
index 7f3fa8b..c2f68e1 100644 (file)
@@ -566,7 +566,7 @@ class MetaSig
 
         MetaSig(FieldDesc *pFD, TypeHandle declaringType = TypeHandle());
 
-        // Used to avoid touching metadata for mscorlib methods.  Nb. only use for non-generic methods.
+        // Used to avoid touching metadata for CoreLib methods.  Nb. only use for non-generic methods.
         MetaSig(BinderMethodID id);
 
         MetaSig(LPHARDCODEDMETASIG pwzMetaSig);
index eba82d7..a9047ba 100644 (file)
@@ -20,7 +20,7 @@ static CorElementType ParseMetadataForStaticsIsValueTypeEnum(Module * pModule, I
     if (TypeFromToken(tk) != mdtTypeDef)
     {
         // At this point, we would have to load other assemblies. The only one we have guaranteed
-        // to be there is mscorlib.
+        // to be there is CoreLib.
         return ELEMENT_TYPE_END;
     }
 
index 1be173a..d11d969 100644 (file)
@@ -133,7 +133,7 @@ void ILStubLinker::DumpIL_FormatToken(mdToken token, SString &strTokenFormatting
                 sig.GetSignature(&pSig, &cbSig);
             }
 
-            IMDInternalImport * pIMDI = MscorlibBinder::GetModule()->GetMDImport();
+            IMDInternalImport * pIMDI = CoreLibBinder::GetModule()->GetMDImport();
             CQuickBytes sigStr;
             PrettyPrintSig(pSig, cbSig, "", &sigStr, pIMDI, NULL);
 
@@ -1822,28 +1822,28 @@ void ILCodeStream::EmitUNALIGNED(BYTE alignment)
 void ILCodeStream::EmitNEWOBJ(BinderMethodID id, int numInArgs)
 {
     STANDARD_VM_CONTRACT;
-    EmitNEWOBJ(GetToken(MscorlibBinder::GetMethod(id)), numInArgs);
+    EmitNEWOBJ(GetToken(CoreLibBinder::GetMethod(id)), numInArgs);
 }
 
 void ILCodeStream::EmitCALL(BinderMethodID id, int numInArgs, int numRetArgs)
 {
     STANDARD_VM_CONTRACT;
-    EmitCALL(GetToken(MscorlibBinder::GetMethod(id)), numInArgs, numRetArgs);
+    EmitCALL(GetToken(CoreLibBinder::GetMethod(id)), numInArgs, numRetArgs);
 }
 void ILCodeStream::EmitLDFLD(BinderFieldID id)
 {
     STANDARD_VM_CONTRACT;
-    EmitLDFLD(GetToken(MscorlibBinder::GetField(id)));
+    EmitLDFLD(GetToken(CoreLibBinder::GetField(id)));
 }
 void ILCodeStream::EmitSTFLD(BinderFieldID id)
 {
     STANDARD_VM_CONTRACT;
-    EmitSTFLD(GetToken(MscorlibBinder::GetField(id)));
+    EmitSTFLD(GetToken(CoreLibBinder::GetField(id)));
 }
 void ILCodeStream::EmitLDFLDA(BinderFieldID id)
 {
     STANDARD_VM_CONTRACT;
-    EmitLDFLDA(GetToken(MscorlibBinder::GetField(id)));
+    EmitLDFLDA(GetToken(CoreLibBinder::GetField(id)));
 }
 
 void ILStubLinker::SetHasThis (bool fHasThis)
@@ -1881,7 +1881,7 @@ void ILCodeStream::EmitArgIteratorCreateAndLoad()
     //
     // we insert the ArgIterator in the same spot that the VASigCookie will go for sanity
     //
-    LocalDesc   aiLoc(MscorlibBinder::GetClass(CLASS__ARG_ITERATOR));
+    LocalDesc   aiLoc(CoreLibBinder::GetClass(CLASS__ARG_ITERATOR));
     int         aiLocNum;
 
     aiLocNum = NewLocal(aiLoc);
@@ -1895,7 +1895,7 @@ void ILCodeStream::EmitArgIteratorCreateAndLoad()
     aiLoc.ElementType[0]    = ELEMENT_TYPE_BYREF;
     aiLoc.ElementType[1]    = ELEMENT_TYPE_INTERNAL;
     aiLoc.cbType            = 2;
-    aiLoc.InternalToken     = MscorlibBinder::GetClass(CLASS__ARG_ITERATOR);
+    aiLoc.InternalToken     = CoreLibBinder::GetClass(CLASS__ARG_ITERATOR);
 
     SetStubTargetArgType(&aiLoc, false);
 }
index 70dee8e..0db1330 100644 (file)
@@ -119,7 +119,7 @@ MethodDesc* TailCallHelp::GetOrLoadTailCallDispatcherMD()
     CONTRACTL_END;
 
     if (s_tailCallDispatcherMD == NULL)
-        s_tailCallDispatcherMD = MscorlibBinder::GetMethod(METHOD__RUNTIME_HELPERS__DISPATCH_TAILCALLS);
+        s_tailCallDispatcherMD = CoreLibBinder::GetMethod(METHOD__RUNTIME_HELPERS__DISPATCH_TAILCALLS);
 
     return s_tailCallDispatcherMD;
 }
@@ -183,7 +183,7 @@ void TailCallHelp::LayOutArgBuffer(
         bool thisParamByRef = (calleeMD != NULL) ? calleeMD->GetMethodTable()->IsValueType() : thisArgByRef;
         if (thisParamByRef)
         {
-            thisHnd = TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_U1))
+            thisHnd = TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_U1))
                       .MakeByRef();
         }
         else
@@ -226,16 +226,16 @@ TypeHandle TailCallHelp::NormalizeSigType(TypeHandle tyHnd)
     }
     if (CorTypeInfo::IsObjRef(ety))
     {
-        return TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_OBJECT));
+        return TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_OBJECT));
     }
     if (tyHnd.IsPointer() || tyHnd.IsFnPtrType())
     {
-        return TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_I));
+        return TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_I));
     }
 
     if (tyHnd.IsByRef())
     {
-        return TypeHandle(MscorlibBinder::GetElementType(ELEMENT_TYPE_U1))
+        return TypeHandle(CoreLibBinder::GetElementType(ELEMENT_TYPE_U1))
                .MakeByRef();
     }
 
index 32cc52c..58ff01c 100644 (file)
@@ -1992,7 +1992,7 @@ void Thread::HandleThreadStartupFailure()
 
     GCPROTECT_BEGIN(args);
 
-    MethodTable *pMT = MscorlibBinder::GetException(kThreadStartException);
+    MethodTable *pMT = CoreLibBinder::GetException(kThreadStartException);
     args.pThrowable = AllocateObject(pMT);
 
     MethodDescCallSite exceptionCtor(METHOD__THREAD_START_EXCEPTION__EX_CTOR);
@@ -7844,7 +7844,7 @@ OBJECTREF Thread::GetCulture(BOOL bUICulture)
     }
     CONTRACTL_END;
 
-    // This is the case when we're building mscorlib and haven't yet created
+    // This is the case when we're building CoreLib and haven't yet created
     // the system assembly.
     if (SystemDomain::System()->SystemAssembly()==NULL || g_fForbidEnterEE) {
         return NULL;
@@ -8591,7 +8591,7 @@ OBJECTHANDLE Thread::GetOrCreateDeserializationTracker()
 
     _ASSERTE(this == GetThread());
 
-    MethodTable* pMT = MscorlibBinder::GetClass(CLASS__DESERIALIZATION_TRACKER);
+    MethodTable* pMT = CoreLibBinder::GetClass(CLASS__DESERIALIZATION_TRACKER);
     m_DeserializationTracker = CreateGlobalStrongHandle(AllocateObject(pMT));
 
     _ASSERTE(m_DeserializationTracker != NULL);
index b835b4a..a56bd5e 100644 (file)
@@ -977,7 +977,7 @@ struct PortableTailCallFrame
 
 class TailCallTls
 {
-    friend class MscorlibBinder;
+    friend class CoreLibBinder;
 
     PortableTailCallFrame* m_frame;
     char* m_argBuffer;
index c6fbf65..d2b9f2b 100644 (file)
@@ -22,7 +22,7 @@ inline PTR_MethodTable  TypeDesc::GetMethodTable() {
         return NULL;
 
     if (GetInternalCorElementType() == ELEMENT_TYPE_FNPTR)
-        return MscorlibBinder::GetElementType(ELEMENT_TYPE_U);
+        return CoreLibBinder::GetElementType(ELEMENT_TYPE_U);
 
     _ASSERTE(HasTypeParam());
     ParamTypeDesc* asParam = dac_cast<PTR_ParamTypeDesc>(this);
index 754f842..7883071 100644 (file)
@@ -1174,7 +1174,7 @@ OBJECTREF TypeHandle::GetManagedClassObject() const
 
             case ELEMENT_TYPE_FNPTR:
                 // A function pointer is mapped into typeof(IntPtr). It results in a loss of information.
-                return MscorlibBinder::GetElementType(ELEMENT_TYPE_I)->GetManagedClassObject();
+                return CoreLibBinder::GetElementType(ELEMENT_TYPE_I)->GetManagedClassObject();
 
             default:
                 _ASSERTE(!"Bad Element Type");
index ba66ee3..e566d7c 100644 (file)
@@ -277,7 +277,7 @@ FORCEINLINE OBJECTREF TypeHandle::GetManagedClassObjectFast() const
 
         case ELEMENT_TYPE_FNPTR:
             // A function pointer is mapped into typeof(IntPtr). It results in a loss of information.
-            o = MscorlibBinder::GetElementType(ELEMENT_TYPE_I)->GetManagedClassObjectIfExists();
+            o = CoreLibBinder::GetElementType(ELEMENT_TYPE_I)->GetManagedClassObjectIfExists();
             break;
 
         default:
index 1b69d0d..007ef08 100644 (file)
@@ -91,7 +91,7 @@ SAFEHANDLE TypeName::GetSafeHandle()
 
     GCPROTECT_BEGIN(objSafeHandle);
 
-    objSafeHandle = (SAFEHANDLE)AllocateObject(MscorlibBinder::GetClass(CLASS__SAFE_TYPENAMEPARSER_HANDLE));
+    objSafeHandle = (SAFEHANDLE)AllocateObject(CoreLibBinder::GetClass(CLASS__SAFE_TYPENAMEPARSER_HANDLE));
 
     MethodDescCallSite strCtor(METHOD__SAFE_TYPENAMEPARSER_HANDLE__CTOR);
 
@@ -226,7 +226,7 @@ void QCALLTYPE TypeName::QGetTypeArguments(TypeName * pTypeName, QCall::ObjectHa
 
         GCPROTECT_BEGIN(pReturnArguments);
 
-        pReturnArguments = (PTRARRAYREF)AllocateObjectArray(count, MscorlibBinder::GetClass(CLASS__SAFE_TYPENAMEPARSER_HANDLE));
+        pReturnArguments = (PTRARRAYREF)AllocateObjectArray(count, CoreLibBinder::GetClass(CLASS__SAFE_TYPENAMEPARSER_HANDLE));
 
         for (COUNT_T i = 0; i < count; i++)
         {
@@ -795,7 +795,7 @@ BOOL TypeName::TypeNameParser::NESTNAME()
 //    if szTypeName is not ASM-qualified, we will search for the types in the following order:
 //       - in pRequestingAssembly (if not NULL). pRequestingAssembly is the assembly that contained
 //         the custom attribute from which the typename was derived.
-//       - in mscorlib.dll
+//       - in CoreLib
 //       - raise an AssemblyResolveEvent() in the current appdomain
 //
 // pRequestingAssembly may be NULL. In that case, the "visibility" check will simply check that
index 39e4211..3cf1df6 100644 (file)
@@ -304,7 +304,7 @@ public:
     //    if szTypeName is not ASM-qualified, we will search for the types in the following order:
     //       - in pRequestingAssembly (if not NULL). pRequestingAssembly is the assembly that contained
     //         the custom attribute from which the typename was derived.
-    //       - in mscorlib.dll
+    //       - in CoreLib
     //       - raise an AssemblyResolveEvent() in the current appdomain
     //
     // pRequestingAssembly may be NULL. In that case, the "visibility" check will simply check that
index da6036a..4d56975 100644 (file)
@@ -439,7 +439,7 @@ FCIMPL3(void, WeakReferenceNative::Create, WeakReferenceObject * pThisUNSAFE, Ob
         COMPlusThrow(kNullReferenceException);
 
     if (pWeakReferenceMT == NULL)
-        pWeakReferenceMT = MscorlibBinder::GetClass(CLASS__WEAKREFERENCE);
+        pWeakReferenceMT = CoreLibBinder::GetClass(CLASS__WEAKREFERENCE);
 
     _ASSERTE(gc.pThis->GetMethodTable()->CanCastToClass(pWeakReferenceMT));
 
index bd67520..8141137 100644 (file)
@@ -12,8 +12,8 @@ add_library_clr(cee_wks_core OBJECT ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM}
 target_precompile_header(TARGET cee_wks_core HEADER common.h)
 
 if (MSVC)
-    # mscorlib.cpp does not compile with precompiled header file
-    set_source_files_properties(../mscorlib.cpp PROPERTIES COMPILE_FLAGS "/Y-")
+    # corelib.cpp does not compile with precompiled header file
+    set_source_files_properties(../corelib.cpp PROPERTIES COMPILE_FLAGS "/Y-")
 endif()
 
 add_dependencies(cee_wks_core eventing_headers)
index bcd02a3..e113942 100644 (file)
@@ -2210,10 +2210,7 @@ ZapImage::CompileStatus ZapImage::TryCompileMethodWorker(CORINFO_METHOD_HANDLE h
 BOOL ZapImage::ShouldCompileMethodDef(mdMethodDef md)
 {
     DWORD partialNGenStressVal = PartialNGenStressPercentage();
-    if (partialNGenStressVal &&
-        // Module::AddCerListToRootTable has problems if mscorlib.dll is
-        // a partial ngen image
-        m_hModule != m_zapper->m_pEECompileInfo->GetLoaderModuleForMscorlib())
+    if (partialNGenStressVal)
     {
         _ASSERTE(partialNGenStressVal <= 100);
         DWORD methodPercentageVal = (md % 100) + 1;
@@ -2315,10 +2312,7 @@ BOOL ZapImage::ShouldCompileMethodDef(mdMethodDef md)
 BOOL ZapImage::ShouldCompileInstantiatedMethod(CORINFO_METHOD_HANDLE handle)
 {
     DWORD partialNGenStressVal = PartialNGenStressPercentage();
-    if (partialNGenStressVal &&
-        // Module::AddCerListToRootTable has problems if mscorlib.dll is
-        // a partial ngen image
-        m_hModule != m_zapper->m_pEECompileInfo->GetLoaderModuleForMscorlib())
+    if (partialNGenStressVal)
     {
         _ASSERTE(partialNGenStressVal <= 100);
         DWORD methodPercentageVal = (m_zapper->m_pEEJitInfo->getMethodHash(handle) % 100) + 1;
index 5b999a8..f232719 100644 (file)
@@ -805,10 +805,10 @@ BOOL Zapper::IsAssembly(LPCWSTR path)
 
 void Zapper::SetContextInfo(LPCWSTR assemblyName)
 {
-    // A special case:  If we're compiling mscorlib, ignore m_exeName and don't set any context.
-    // There can only be one mscorlib in the runtime, independent of any context.  If we don't
-    // check for mscorlib, and isExe == true, then CompilationDomain::SetContextInfo will call
-    // into mscorlib and cause the resulting mscorlib.ni.dll to be slightly different (checked
+    // A special case:  If we're compiling CoreLib, ignore m_exeName and don't set any context.
+    // There can only be one CoreLib in the runtime, independent of any context.  If we don't
+    // check for CoreLib, and isExe == true, then CompilationDomain::SetContextInfo will call
+    // into CoreLib and cause the resulting System.Private.CoreLib.ni.dll to be slightly different (checked
     // build only).
     if (assemblyName != NULL && _wcsnicmp(assemblyName, CoreLibName_W, CoreLibNameLen) == 0 && (wcslen(assemblyName) == CoreLibNameLen || assemblyName[CoreLibNameLen] == W(',')))
     {
@@ -975,18 +975,18 @@ HRESULT Zapper::Compile(LPCWSTR string, CORCOMPILE_NGEN_SIGNATURE * pNativeImage
 {
     HRESULT hr = S_OK;
 
-    bool fMscorlib = false;
+    bool fCoreLib = false;
     LPCWSTR fileName = PathFindFileName(string);
     if (fileName != NULL && SString::_wcsicmp(fileName, g_pwBaseLibrary) == 0)
     {
-        fMscorlib = true;
+        fCoreLib = true;
     }
 
 
-    if (fMscorlib)
+    if (fCoreLib)
     {
         //
-        // Disallow use of native image to force a new native image generation for mscorlib
+        // Disallow use of native image to force a new native image generation for CoreLib
         //
         g_fAllowNativeImages = false;
     }
@@ -1180,7 +1180,7 @@ void Zapper::InitializeCompilerFlags(CORCOMPILE_VERSION_INFO * pVersionInfo)
     // That way the actual support checks will always be jitted.
     // We only do this for CoreLib because forgetting to wrap intrinsics under IsSupported
     // checks can lead to illegal instruction traps (instead of a nice managed exception).
-    if (m_pEECompileInfo->GetAssemblyModule(m_hAssembly) == m_pEECompileInfo->GetLoaderModuleForMscorlib())
+    if (m_pEECompileInfo->GetAssemblyModule(m_hAssembly) == m_pEECompileInfo->GetLoaderModuleForCoreLib())
     {
         m_pOpt->m_compilerFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_FEATURE_SIMD);
 
index 27d79b3..e36d4ae 100644 (file)
@@ -741,7 +741,7 @@ void ZapImage::OutputAttributePresenceFilter(IMDInternalImport * pMDImport)
     // present. Other assemblies *MAY* benefit from this feature, but it doesn't show
     // as useful at this time.
 
-    if (m_hModule != m_zapper->m_pEECompileInfo->GetLoaderModuleForMscorlib())
+    if (m_hModule != m_zapper->m_pEECompileInfo->GetLoaderModuleForCoreLib())
         return;
 
     SArray<UINT16> table;