From e516211b2d3a3ae2dbd80f2c94b129910a9e280d Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Wed, 30 Nov 2016 12:08:47 -0800 Subject: [PATCH] Hide types implemented in corefx --- src/mscorlib/model.xml | 111 ++-------------- src/mscorlib/ref/mscorlib.cs | 193 ---------------------------- src/vm/mscorlib.h | 2 + src/vm/rexcep.h | 6 + tests/src/JIT/Methodical/refany/format.cs | 10 ++ tests/src/JIT/Methodical/refany/format.il | 50 ++++--- tests/src/JIT/Methodical/refany/longsig.il | 50 ++++--- tests/src/JIT/Methodical/refany/shortsig.il | 50 ++++--- 8 files changed, 119 insertions(+), 353 deletions(-) diff --git a/src/mscorlib/model.xml b/src/mscorlib/model.xml index 7bb3dde..437d5d6 100644 --- a/src/mscorlib/model.xml +++ b/src/mscorlib/model.xml @@ -67,8 +67,6 @@ - - @@ -79,8 +77,6 @@ - - @@ -89,8 +85,8 @@ - - + + @@ -102,9 +98,9 @@ - - - + + + @@ -127,20 +123,9 @@ - - - - - - - - - - - - - - + + + @@ -167,23 +152,6 @@ - - - - - - - - - - - - - - - - - @@ -550,12 +518,6 @@ - - - - - - @@ -1989,7 +1951,6 @@ - @@ -1997,7 +1958,6 @@ - @@ -3556,21 +3516,6 @@ - - - - - - - - - - - - - - - @@ -3885,20 +3830,6 @@ - - - - - - - - - - - - - - @@ -8182,7 +8113,6 @@ - @@ -9945,16 +9875,6 @@ - - - - - - - - - - @@ -11082,22 +11002,7 @@ - - - - - - - - - - - - - - - diff --git a/src/mscorlib/ref/mscorlib.cs b/src/mscorlib/ref/mscorlib.cs index da37877..d5a5e96 100644 --- a/src/mscorlib/ref/mscorlib.cs +++ b/src/mscorlib/ref/mscorlib.cs @@ -115,9 +115,6 @@ namespace System public static System.Runtime.Remoting.ObjectHandle CreateComInstanceFrom(string assemblyName, string typeName) { throw null; } public static System.Runtime.Remoting.ObjectHandle CreateComInstanceFrom(string assemblyName, string typeName, byte[] hashValue, System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgorithm) { throw null; } [System.Security.SecurityCriticalAttribute] - public static System.Runtime.Remoting.ObjectHandle CreateInstance(System.AppDomain domain, string assemblyName, string typeName) { throw null; } - [System.Security.SecurityCriticalAttribute] - public static System.Runtime.Remoting.ObjectHandle CreateInstance(System.AppDomain domain, string assemblyName, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) { throw null; } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Security.SecuritySafeCriticalAttribute] public static System.Runtime.Remoting.ObjectHandle CreateInstance(string assemblyName, string typeName) { throw null; } @@ -139,9 +136,6 @@ namespace System [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public static T CreateInstance() { throw null; } [System.Security.SecurityCriticalAttribute] - public static System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(System.AppDomain domain, string assemblyFile, string typeName) { throw null; } - [System.Security.SecurityCriticalAttribute] - public static System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(System.AppDomain domain, string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) { throw null; } public static System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName) { throw null; } public static System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) { throw null; } public static System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName, object[] activationAttributes) { throw null; } @@ -180,56 +174,6 @@ namespace System public static event System.EventHandler FirstChanceException { add { } remove { } } public static event System.EventHandler ProcessExit { add { } remove { } } } - [System.Runtime.InteropServices.ClassInterfaceAttribute((System.Runtime.InteropServices.ClassInterfaceType)(0))] - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public sealed partial class AppDomain - { - internal AppDomain() { } - public string BaseDirectory { [System.Security.SecurityCriticalAttribute]get { throw null; } } - public static System.AppDomain CurrentDomain { get { throw null; } } - public bool IsFullyTrusted { [System.Security.SecuritySafeCriticalAttribute]get { throw null; } } - [System.Security.SecurityCriticalAttribute] - public object GetData(string name) { throw null; } - [System.Security.SecuritySafeCriticalAttribute] - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - [System.Security.SecurityCriticalAttribute] - public partial class AppDomainManager - { - public AppDomainManager() { } - public virtual bool CheckSecuritySettings(System.Security.SecurityState state) { throw null; } - [System.Security.SecurityCriticalAttribute] - public virtual void InitializeNewDomain(System.AppDomainSetup appDomainInfo) { } - } - [System.Runtime.InteropServices.ClassInterfaceAttribute((System.Runtime.InteropServices.ClassInterfaceType)(0))] - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public sealed partial class AppDomainSetup - { - internal AppDomainSetup() { } - } - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public partial class AppDomainUnloadedException : System.SystemException - { - public AppDomainUnloadedException() { } - public AppDomainUnloadedException(string message) { } - public AppDomainUnloadedException(string message, System.Exception innerException) { } - protected AppDomainUnloadedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } - } - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public sealed partial class ApplicationId - { - public ApplicationId(byte[] publicKeyToken, string name, System.Version version, string processorArchitecture, string culture) { } - public string Culture { get { throw null; } } - public string Name { get { throw null; } } - public string ProcessorArchitecture { get { throw null; } } - public byte[] PublicKeyToken { get { throw null; } } - public System.Version Version { get { throw null; } } - public System.ApplicationId Copy() { throw null; } - public override bool Equals(object o) { throw null; } - public override int GetHashCode() { throw null; } - public override string ToString() { throw null; } - } [System.Runtime.InteropServices.ComVisibleAttribute(true)] public partial class ApplicationException : System.Exception { @@ -731,14 +675,6 @@ namespace System public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Byte result) { result = default(byte); throw null; } } [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public partial class CannotUnloadAppDomainException : System.SystemException - { - public CannotUnloadAppDomainException() { } - public CannotUnloadAppDomainException(string message) { } - public CannotUnloadAppDomainException(string message, System.Exception innerException) { } - protected CannotUnloadAppDomainException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } - } - [System.Runtime.InteropServices.ComVisibleAttribute(true)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public partial struct Char : System.IComparable, System.IComparable, System.IConvertible, System.IEquatable { @@ -1947,13 +1883,11 @@ namespace System public static bool HasShutdownStarted { [System.Security.SecuritySafeCriticalAttribute][System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]get { throw null; } } public static string MachineName { [System.Security.SecuritySafeCriticalAttribute]get { throw null; } } public static string NewLine { get { throw null; } } - public static System.OperatingSystem OSVersion { [System.Security.SecuritySafeCriticalAttribute]get { throw null; } } public static int ProcessorCount { [System.Security.SecuritySafeCriticalAttribute]get { throw null; } } public static string StackTrace { [System.Security.SecuritySafeCriticalAttribute]get { throw null; } } public static int TickCount { [System.Security.SecuritySafeCriticalAttribute][System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]get { throw null; } } public static System.Version Version { get { throw null; } } [System.Security.SecuritySafeCriticalAttribute] - [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, Flags=(System.Security.Permissions.SecurityPermissionFlag)(2))] public static void Exit(int exitCode) { } [System.Security.SecuritySafeCriticalAttribute] public static string ExpandEnvironmentVariables(string name) { throw null; } @@ -2480,26 +2414,6 @@ namespace System public override string ToString() { throw null; } } [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public enum LoaderOptimization - { - [System.ObsoleteAttribute("This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202")] - DisallowBindings = 4, - [System.ObsoleteAttribute("This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202")] - DomainMask = 3, - MultiDomain = 2, - MultiDomainHost = 3, - NotSpecified = 0, - SingleDomain = 1, - } - [System.AttributeUsageAttribute((System.AttributeTargets)(64))] - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public sealed partial class LoaderOptimizationAttribute : System.Attribute - { - public LoaderOptimizationAttribute(byte value) { } - public LoaderOptimizationAttribute(System.LoaderOptimization value) { } - public System.LoaderOptimization Value { get { throw null; } } - } - [System.Runtime.InteropServices.ComVisibleAttribute(true)] public sealed partial class LocalDataStoreSlot { internal LocalDataStoreSlot() { } @@ -2904,19 +2818,6 @@ namespace System public string Message { get { throw null; } } } [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public sealed partial class OperatingSystem : System.ICloneable, System.Runtime.Serialization.ISerializable - { - public OperatingSystem(System.PlatformID platform, System.Version version) { } - public System.PlatformID Platform { get { throw null; } } - public string ServicePack { get { throw null; } } - public System.Version Version { get { throw null; } } - public string VersionString { get { throw null; } } - public object Clone() { throw null; } - [System.Security.SecurityCriticalAttribute] - public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.ComVisibleAttribute(true)] public partial class OperationCanceledException : System.SystemException { public OperationCanceledException() { } @@ -2951,17 +2852,6 @@ namespace System public ParamArrayAttribute() { } } [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public enum PlatformID - { - MacOSX = 6, - Unix = 4, - Win32NT = 2, - Win32S = 0, - Win32Windows = 1, - WinCE = 3, - Xbox = 5, - } - [System.Runtime.InteropServices.ComVisibleAttribute(true)] public partial class PlatformNotSupportedException : System.NotSupportedException { public PlatformNotSupportedException() { } @@ -7177,7 +7067,6 @@ namespace System.IO public void Dispose() { } protected virtual void Dispose(bool disposing) { } [System.Security.SecuritySafeCriticalAttribute] - [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, Flags=(System.Security.Permissions.SecurityPermissionFlag)(2))] protected void Initialize(System.Runtime.InteropServices.SafeBuffer buffer, long offset, long capacity, System.IO.FileAccess access) { } [System.Security.SecurityCriticalAttribute] public void Read(long position, out T structure) where T : struct { structure = default(T); throw null; } @@ -10487,10 +10376,8 @@ namespace System.Runtime.InteropServices public sealed partial class BStrWrapper { [System.Security.SecuritySafeCriticalAttribute] - [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, Flags=(System.Security.Permissions.SecurityPermissionFlag)(2))] public BStrWrapper(object value) { } [System.Security.SecuritySafeCriticalAttribute] - [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, Flags=(System.Security.Permissions.SecurityPermissionFlag)(2))] public BStrWrapper(string value) { } public string WrappedObject { get { throw null; } } } @@ -10695,7 +10582,6 @@ namespace System.Runtime.InteropServices public sealed partial class DispatchWrapper { [System.Security.SecuritySafeCriticalAttribute] - [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, Flags=(System.Security.Permissions.SecurityPermissionFlag)(2))] public DispatchWrapper(object obj) { } public object WrappedObject { get { throw null; } } } @@ -10736,7 +10622,6 @@ namespace System.Runtime.InteropServices public sealed partial class ErrorWrapper { [System.Security.SecuritySafeCriticalAttribute] - [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, Flags=(System.Security.Permissions.SecurityPermissionFlag)(2))] public ErrorWrapper(System.Exception e) { } public ErrorWrapper(int errorCode) { } public ErrorWrapper(object errorCode) { } @@ -12405,80 +12290,6 @@ namespace System.Security protected VerificationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } } } -namespace System.Security.Permissions -{ - [System.AttributeUsageAttribute((System.AttributeTargets)(109), AllowMultiple=true, Inherited=false)] - [System.ObsoleteAttribute("CodeAccessSecurityAttribute is no longer accessible to application code.")] - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public abstract partial class CodeAccessSecurityAttribute : System.Security.Permissions.SecurityAttribute - { - protected CodeAccessSecurityAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { } - } - [System.ObsoleteAttribute("SecurityAction is no longer accessible to application code.")] - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public enum SecurityAction - { - Assert = 3, - Demand = 2, - [System.ObsoleteAttribute("Deny is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] - Deny = 4, - InheritanceDemand = 7, - LinkDemand = 6, - PermitOnly = 5, - [System.ObsoleteAttribute("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] - RequestMinimum = 8, - [System.ObsoleteAttribute("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] - RequestOptional = 9, - [System.ObsoleteAttribute("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] - RequestRefuse = 10, - } - [System.AttributeUsageAttribute((System.AttributeTargets)(109), AllowMultiple=true, Inherited=false)] - [System.ObsoleteAttribute("SecurityAttribute is no longer accessible to application code.")] - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public abstract partial class SecurityAttribute : System.Attribute - { - protected SecurityAttribute(System.Security.Permissions.SecurityAction action) { } - public System.Security.Permissions.SecurityAction Action { get { throw null; } set { } } - public bool Unrestricted { get { throw null; } set { } } - } - [System.AttributeUsageAttribute((System.AttributeTargets)(109), AllowMultiple=true, Inherited=false)] - [System.ObsoleteAttribute("SecurityPermissionAttribute is no longer accessible to application code.")] - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public sealed partial class SecurityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute - { - public SecurityPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { } - public bool ControlAppDomain { get { throw null; } set { } } - public bool ControlDomainPolicy { get { throw null; } set { } } - public bool ControlEvidence { get { throw null; } set { } } - public bool ControlPolicy { get { throw null; } set { } } - public bool ControlThread { get { throw null; } set { } } - public System.Security.Permissions.SecurityPermissionFlag Flags { get { throw null; } set { } } - public bool SkipVerification { get { throw null; } set { } } - public bool UnmanagedCode { get { throw null; } set { } } - } - [System.FlagsAttribute] - [System.ObsoleteAttribute("SecurityPermissionFlag is no longer accessible to application code.")] - [System.Runtime.InteropServices.ComVisibleAttribute(true)] - public enum SecurityPermissionFlag - { - AllFlags = 16383, - Assertion = 1, - BindingRedirects = 8192, - ControlAppDomain = 1024, - ControlDomainPolicy = 256, - ControlEvidence = 32, - ControlPolicy = 64, - ControlPrincipal = 512, - ControlThread = 16, - Execution = 8, - Infrastructure = 4096, - NoFlags = 0, - RemotingConfiguration = 2048, - SerializationFormatter = 128, - SkipVerification = 4, - UnmanagedCode = 2, - } -} namespace System.Security.Principal { [System.Runtime.InteropServices.ComVisibleAttribute(true)] @@ -13535,7 +13346,6 @@ namespace System.Threading public new string Name { get { throw null; } [System.Security.SecuritySafeCriticalAttribute]set { } } ~Thread() { } [System.Security.SecuritySafeCriticalAttribute] - public static System.AppDomain GetDomain() { throw null; } [System.Runtime.InteropServices.ComVisibleAttribute(false)] public override int GetHashCode() { throw null; } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute] @@ -13582,7 +13392,6 @@ namespace System.Threading public static partial class ThreadPool { [System.Security.SecurityCriticalAttribute] - [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, Flags=(System.Security.Permissions.SecurityPermissionFlag)(2))] public static bool BindHandle(System.Runtime.InteropServices.SafeHandle osHandle) { throw null; } [System.Security.SecuritySafeCriticalAttribute] public static void GetMaxThreads(out int workerThreads, out int completionPortThreads) { workerThreads = default(int); completionPortThreads = default(int); } @@ -13602,10 +13411,8 @@ namespace System.Threading [System.Security.SecuritySafeCriticalAttribute] public static System.Threading.RegisteredWaitHandle RegisterWaitForSingleObject(System.Threading.WaitHandle waitObject, System.Threading.WaitOrTimerCallback callBack, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce) { throw null; } [System.Security.SecurityCriticalAttribute] - [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, ControlThread=true)] public static bool SetMaxThreads(int workerThreads, int completionPortThreads) { throw null; } [System.Security.SecurityCriticalAttribute] - [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, ControlThread=true)] public static bool SetMinThreads(int workerThreads, int completionPortThreads) { throw null; } } public enum ThreadPriority diff --git a/src/vm/mscorlib.h b/src/vm/mscorlib.h index cb95868..bd40a7d 100644 --- a/src/vm/mscorlib.h +++ b/src/vm/mscorlib.h @@ -1400,8 +1400,10 @@ DEFINE_CLASS(SAFE_CSHANDLE, Threading, SafeCompressedStackHandle) DEFINE_CLASS(SECURITY_ACTION, Permissions, SecurityAction) DEFINE_CLASS(HOST_PROTECTION_RESOURCE, Permissions, HostProtectionResource) +#ifdef FEATURE_CAS_POLICY DEFINE_CLASS(SECURITY_ATTRIBUTE, Permissions, SecurityAttribute) DEFINE_METHOD(SECURITY_ATTRIBUTE, FIND_SECURITY_ATTRIBUTE_TYPE_HANDLE, FindSecurityAttributeTypeHandle, SM_Str_RetIntPtr) +#endif #ifdef FEATURE_CAS_POLICY DEFINE_CLASS(SECURITY_ELEMENT, Security, SecurityElement) diff --git a/src/vm/rexcep.h b/src/vm/rexcep.h index 1d1d938..3ff4963 100644 --- a/src/vm/rexcep.h +++ b/src/vm/rexcep.h @@ -142,7 +142,13 @@ DEFINE_EXCEPTION(g_SystemNS, BadImageFormatException, true, META_E_BAD_SIGNATURE, COR_E_LOADING_WINMD_REFERENCE_ASSEMBLY) +#ifdef FEATURE_CORECLR +// CannotUnloadAppDomainException is removed in CoreCLR +#define kCannotUnloadAppDomainException kException +#else DEFINE_EXCEPTION(g_SystemNS, CannotUnloadAppDomainException, false, COR_E_CANNOTUNLOADAPPDOMAIN) +#endif // FEATURE_CORECLR + DEFINE_EXCEPTION(g_CodeContractsNS, ContractException, false, COR_E_CODECONTRACTFAILED) #ifdef FEATURE_REMOTING diff --git a/tests/src/JIT/Methodical/refany/format.cs b/tests/src/JIT/Methodical/refany/format.cs index 7b4c90c..33f9273 100644 --- a/tests/src/JIT/Methodical/refany/format.cs +++ b/tests/src/JIT/Methodical/refany/format.cs @@ -6,6 +6,16 @@ using System; namespace JitTest { + public enum PlatformID + { + MacOSX = 6, + Unix = 4, + Win32NT = 2, + Win32S = 0, + Win32Windows = 1, + WinCE = 3, + Xbox = 5, + } internal enum Mood { good, diff --git a/tests/src/JIT/Methodical/refany/format.il b/tests/src/JIT/Methodical/refany/format.il index 41bd149..86cae21 100644 --- a/tests/src/JIT/Methodical/refany/format.il +++ b/tests/src/JIT/Methodical/refany/format.il @@ -17,6 +17,18 @@ .module format.exe .namespace JitTest { + .class public auto ansi sealed PlatformID + extends [mscorlib]System.Enum + { + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype JitTest.PlatformID MacOSX = int32(0x00000006) + .field public static literal valuetype JitTest.PlatformID Unix = int32(0x00000004) + .field public static literal valuetype JitTest.PlatformID Win32NT = int32(0x00000002) + .field public static literal valuetype JitTest.PlatformID Win32S = int32(0x00000000) + .field public static literal valuetype JitTest.PlatformID Win32Windows = int32(0x00000001) + .field public static literal valuetype JitTest.PlatformID WinCE = int32(0x00000003) + .field public static literal valuetype JitTest.PlatformID Xbox = int32(0x00000005) + } // end of class JitTest.PlatformID .class value private auto ansi serializable sealed Mood extends [mscorlib]System.Enum { @@ -37,7 +49,7 @@ .field private float64 m_dbl .field private bool m_b .field private static value class [mscorlib]System.DateTime m_t - .field private value class [mscorlib]System.PlatformID m_pid + .field private value class JitTest.PlatformID m_pid .field private value class JitTest.Mood m_mood .method private hidebysig static string Format(typedref format, @@ -401,7 +413,7 @@ IL_031d: ldarg.1 IL_031e: refanytype IL_0320: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(value class [mscorlib]System.RuntimeTypeHandle) - IL_0325: ldtoken [mscorlib]System.PlatformID + IL_0325: ldtoken JitTest.PlatformID IL_032a: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(value class [mscorlib]System.RuntimeTypeHandle) IL_032f: beq.s IL_0337 @@ -410,9 +422,9 @@ IL_0337: ldloc.2 IL_0338: ldarg.1 - IL_0339: refanyval [mscorlib]System.PlatformID - ldobj [mscorlib]System.PlatformID - IL_033e: box [mscorlib]System.PlatformID + IL_0339: refanyval JitTest.PlatformID + ldobj JitTest.PlatformID + IL_033e: box JitTest.PlatformID IL_0343: call instance string [mscorlib]System.Enum::ToString() IL_0348: call string [mscorlib]System.String::Concat(string, string) @@ -551,7 +563,7 @@ float64 V_5, bool V_6, value class [mscorlib]System.DateTime V_7, - value class [mscorlib]System.PlatformID V_8, + value class JitTest.PlatformID V_8, value class JitTest.Mood V_9) IL_0000: ldc.i4.s 10 IL_0002: stloc.0 @@ -644,7 +656,7 @@ string) IL_00f6: ldstr "{%p}" IL_00fb: ldloca.s V_8 - IL_00fd: mkrefany [mscorlib]System.PlatformID + IL_00fd: mkrefany JitTest.PlatformID IL_0102: ldstr "{Win32NT}" IL_0107: call void JitTest.TestClass::Test(string, typedref, @@ -732,8 +744,8 @@ string) IL_00e1: ldstr "{%p}" IL_00e6: ldarg.0 - IL_00e7: ldflda value class [mscorlib]System.PlatformID JitTest.TestClass::m_pid - IL_00ec: mkrefany [mscorlib]System.PlatformID + IL_00e7: ldflda value class JitTest.PlatformID JitTest.TestClass::m_pid + IL_00ec: mkrefany JitTest.PlatformID IL_00f1: ldstr "{Win32NT}" IL_00f6: call void JitTest.TestClass::Test(string, typedref, @@ -758,7 +770,7 @@ float64& dbl, bool& b, value class [mscorlib]System.DateTime& t, - value class [mscorlib]System.PlatformID& pid) il managed + value class JitTest.PlatformID& pid) il managed { .maxstack 5 IL_0000: ldstr "{%d}" @@ -825,7 +837,7 @@ string) IL_00bd: ldstr "{%p}" IL_00c2: ldarg.s pid - IL_00c4: mkrefany [mscorlib]System.PlatformID + IL_00c4: mkrefany JitTest.PlatformID IL_00c9: ldstr "{Win32NT}" IL_00ce: call void JitTest.TestClass::Test(string, typedref, @@ -845,7 +857,7 @@ float64 V_5, bool V_6, value class [mscorlib]System.DateTime V_7, - value class [mscorlib]System.PlatformID V_8) + value class JitTest.PlatformID V_8) IL_0000: ldc.i4.s 20 IL_0002: stloc.0 IL_0003: ldc.i4.s 21 @@ -888,7 +900,7 @@ float64&, bool&, value class [mscorlib]System.DateTime&, - value class [mscorlib]System.PlatformID&) + value class JitTest.PlatformID&) IL_0049: ret } // end of method TestClass::TestArgSlots @@ -904,7 +916,7 @@ float64[] V_5, bool[] V_6, value class [mscorlib]System.DateTime[] V_7, - value class [mscorlib]System.PlatformID[] V_8, + value class JitTest.PlatformID[] V_8, value class JitTest.Mood[] V_9, int32[] V_10, unsigned int32[] V_11, @@ -913,7 +925,7 @@ float32[] V_14, float64[] V_15, bool[] V_16, - value class [mscorlib]System.PlatformID[] V_17, + value class JitTest.PlatformID[] V_17, value class JitTest.Mood[] V_18) IL_0000: ldc.i4.1 IL_0001: newarr [mscorlib]System.Int32 @@ -993,7 +1005,7 @@ int32, int32) IL_00a3: ldc.i4.1 - IL_00a4: newarr [mscorlib]System.PlatformID + IL_00a4: newarr JitTest.PlatformID IL_00a9: stloc.s V_17 IL_00ab: ldloc.s V_17 IL_00ad: ldc.i4.0 @@ -1089,8 +1101,8 @@ IL_01b3: ldstr "{%p}" IL_01b8: ldloc.s V_8 IL_01ba: ldc.i4.0 - IL_01bb: ldelema [mscorlib]System.PlatformID - IL_01c0: mkrefany [mscorlib]System.PlatformID + IL_01bb: ldelema JitTest.PlatformID + IL_01c0: mkrefany JitTest.PlatformID IL_01c5: ldstr "{Win32NT}" IL_01ca: call void JitTest.TestClass::Test(string, typedref, @@ -1163,7 +1175,7 @@ IL_002d: stfld bool JitTest.TestClass::m_b IL_0032: ldarg.0 IL_0033: ldc.i4.2 - IL_0034: stfld value class [mscorlib]System.PlatformID JitTest.TestClass::m_pid + IL_0034: stfld value class JitTest.PlatformID JitTest.TestClass::m_pid IL_0039: ldarg.0 IL_003a: ldc.i4.0 IL_003b: stfld value class JitTest.Mood JitTest.TestClass::m_mood diff --git a/tests/src/JIT/Methodical/refany/longsig.il b/tests/src/JIT/Methodical/refany/longsig.il index 0aafa47..395d042 100644 --- a/tests/src/JIT/Methodical/refany/longsig.il +++ b/tests/src/JIT/Methodical/refany/longsig.il @@ -17,6 +17,18 @@ .module format.exe .namespace JitTest { + .class public auto ansi sealed PlatformID + extends [mscorlib]System.Enum + { + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype JitTest.PlatformID MacOSX = int32(0x00000006) + .field public static literal valuetype JitTest.PlatformID Unix = int32(0x00000004) + .field public static literal valuetype JitTest.PlatformID Win32NT = int32(0x00000002) + .field public static literal valuetype JitTest.PlatformID Win32S = int32(0x00000000) + .field public static literal valuetype JitTest.PlatformID Win32Windows = int32(0x00000001) + .field public static literal valuetype JitTest.PlatformID WinCE = int32(0x00000003) + .field public static literal valuetype JitTest.PlatformID Xbox = int32(0x00000005) + } // end of class JitTest.PlatformID .class value private auto ansi serializable sealed Mood extends [mscorlib]System.Enum { @@ -37,7 +49,7 @@ .field private float64 m_dbl .field private bool m_b .field private static value class [mscorlib]System.DateTime m_t - .field private value class [mscorlib]System.PlatformID m_pid + .field private value class JitTest.PlatformID m_pid .field private value class JitTest.Mood m_mood .method private hidebysig static string Format(typedref format, @@ -401,7 +413,7 @@ IL_031d: ldarg.1 IL_031e: refanytype IL_0320: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(value class [mscorlib]System.RuntimeTypeHandle) - IL_0325: ldtoken [mscorlib]System.PlatformID + IL_0325: ldtoken JitTest.PlatformID IL_032a: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(value class [mscorlib]System.RuntimeTypeHandle) IL_032f: beq.s IL_0337 @@ -410,9 +422,9 @@ IL_0337: ldloc.2 IL_0338: ldarg.1 - IL_0339: refanyval [mscorlib]System.PlatformID - ldobj [mscorlib]System.PlatformID - IL_033e: box [mscorlib]System.PlatformID + IL_0339: refanyval JitTest.PlatformID + ldobj JitTest.PlatformID + IL_033e: box JitTest.PlatformID IL_0343: call instance string [mscorlib]System.Enum::ToString() IL_0348: call string [mscorlib]System.String::Concat(string, string) @@ -551,7 +563,7 @@ [5] float64 V_5, [6] bool V_6, [7] value class [mscorlib]System.DateTime V_7, - [8] value class [mscorlib]System.PlatformID V_8, + [8] value class JitTest.PlatformID V_8, [9] value class JitTest.Mood V_9) IL_0000: ldc.i4.s 10 IL_0002: stloc.0 @@ -644,7 +656,7 @@ string) IL_00f6: ldstr "{%p}" IL_00fb: ldloca.s V_8 - IL_00fd: mkrefany [mscorlib]System.PlatformID + IL_00fd: mkrefany JitTest.PlatformID IL_0102: ldstr "{Win32NT}" IL_0107: call void JitTest.TestClass::Test(string, typedref, @@ -732,8 +744,8 @@ string) IL_00e1: ldstr "{%p}" IL_00e6: ldarg.0 - IL_00e7: ldflda value class [mscorlib]System.PlatformID JitTest.TestClass::m_pid - IL_00ec: mkrefany [mscorlib]System.PlatformID + IL_00e7: ldflda value class JitTest.PlatformID JitTest.TestClass::m_pid + IL_00ec: mkrefany JitTest.PlatformID IL_00f1: ldstr "{Win32NT}" IL_00f6: call void JitTest.TestClass::Test(string, typedref, @@ -758,7 +770,7 @@ float64& dbl, bool& b, value class [mscorlib]System.DateTime& t, - value class [mscorlib]System.PlatformID& pid) il managed + value class JitTest.PlatformID& pid) il managed { .maxstack 5 IL_0000: ldstr "{%d}" @@ -825,7 +837,7 @@ string) IL_00bd: ldstr "{%p}" IL_00c2: ldarg.s pid - IL_00c4: mkrefany [mscorlib]System.PlatformID + IL_00c4: mkrefany JitTest.PlatformID IL_00c9: ldstr "{Win32NT}" IL_00ce: call void JitTest.TestClass::Test(string, typedref, @@ -845,7 +857,7 @@ [5] float64 V_5, [6] bool V_6, [7] value class [mscorlib]System.DateTime V_7, - [8] value class [mscorlib]System.PlatformID V_8) + [8] value class JitTest.PlatformID V_8) IL_0000: ldc.i4.s 20 IL_0002: stloc.0 IL_0003: ldc.i4.s 21 @@ -888,7 +900,7 @@ float64&, bool&, value class [mscorlib]System.DateTime&, - value class [mscorlib]System.PlatformID&) + value class JitTest.PlatformID&) IL_0049: ret } // end of method TestClass::TestArgSlots @@ -904,7 +916,7 @@ [5] float64[] V_5, [6] bool[] V_6, [7] value class [mscorlib]System.DateTime[] V_7, - [8] value class [mscorlib]System.PlatformID[] V_8, + [8] value class JitTest.PlatformID[] V_8, [9] value class JitTest.Mood[] V_9, [10] int32[] V_10, [11] unsigned int32[] V_11, @@ -913,7 +925,7 @@ [14] float32[] V_14, [15] float64[] V_15, [16] bool[] V_16, - [17] value class [mscorlib]System.PlatformID[] V_17, + [17] value class JitTest.PlatformID[] V_17, [18] value class JitTest.Mood[] V_18) IL_0000: ldc.i4.1 IL_0001: newarr [mscorlib]System.Int32 @@ -993,7 +1005,7 @@ int32, int32) IL_00a3: ldc.i4.1 - IL_00a4: newarr [mscorlib]System.PlatformID + IL_00a4: newarr JitTest.PlatformID IL_00a9: stloc.s V_17 IL_00ab: ldloc.s V_17 IL_00ad: ldc.i4.0 @@ -1089,8 +1101,8 @@ IL_01b3: ldstr "{%p}" IL_01b8: ldloc.s V_8 IL_01ba: ldc.i4.0 - IL_01bb: ldelema [mscorlib]System.PlatformID - IL_01c0: mkrefany [mscorlib]System.PlatformID + IL_01bb: ldelema JitTest.PlatformID + IL_01c0: mkrefany JitTest.PlatformID IL_01c5: ldstr "{Win32NT}" IL_01ca: call void JitTest.TestClass::Test(string, typedref, @@ -1163,7 +1175,7 @@ IL_002d: stfld bool JitTest.TestClass::m_b IL_0032: ldarg.0 IL_0033: ldc.i4.2 - IL_0034: stfld value class [mscorlib]System.PlatformID JitTest.TestClass::m_pid + IL_0034: stfld value class JitTest.PlatformID JitTest.TestClass::m_pid IL_0039: ldarg.0 IL_003a: ldc.i4.0 IL_003b: stfld value class JitTest.Mood JitTest.TestClass::m_mood diff --git a/tests/src/JIT/Methodical/refany/shortsig.il b/tests/src/JIT/Methodical/refany/shortsig.il index f336dfd..e013bae 100644 --- a/tests/src/JIT/Methodical/refany/shortsig.il +++ b/tests/src/JIT/Methodical/refany/shortsig.il @@ -16,6 +16,18 @@ } .namespace JitTest { + .class public auto ansi sealed PlatformID + extends [mscorlib]System.Enum + { + .field public specialname rtspecialname int32 value__ + .field public static literal valuetype JitTest.PlatformID MacOSX = int32(0x00000006) + .field public static literal valuetype JitTest.PlatformID Unix = int32(0x00000004) + .field public static literal valuetype JitTest.PlatformID Win32NT = int32(0x00000002) + .field public static literal valuetype JitTest.PlatformID Win32S = int32(0x00000000) + .field public static literal valuetype JitTest.PlatformID Win32Windows = int32(0x00000001) + .field public static literal valuetype JitTest.PlatformID WinCE = int32(0x00000003) + .field public static literal valuetype JitTest.PlatformID Xbox = int32(0x00000005) + } // end of class JitTest.PlatformID .class value private auto ansi serializable sealed Mood extends [mscorlib]System.Enum { @@ -36,7 +48,7 @@ .field private float64 m_dbl .field private bool m_b .field private static value class [mscorlib]System.DateTime m_t - .field private value class [mscorlib]System.PlatformID m_pid + .field private value class JitTest.PlatformID m_pid .field private value class JitTest.Mood m_mood .method private hidebysig static string Format(typedref format, @@ -400,7 +412,7 @@ IL_031d: ldarg.1 IL_031e: refanytype IL_0320: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(value class [mscorlib]System.RuntimeTypeHandle) - IL_0325: ldtoken [mscorlib]System.PlatformID + IL_0325: ldtoken JitTest.PlatformID IL_032a: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(value class [mscorlib]System.RuntimeTypeHandle) IL_032f: beq.s IL_0337 @@ -409,9 +421,9 @@ IL_0337: ldloc.2 IL_0338: ldarg.1 - IL_0339: refanyval [mscorlib]System.PlatformID - ldobj [mscorlib]System.PlatformID - IL_033e: box [mscorlib]System.PlatformID + IL_0339: refanyval JitTest.PlatformID + ldobj JitTest.PlatformID + IL_033e: box JitTest.PlatformID IL_0343: call instance string [mscorlib]System.Enum::ToString() IL_0348: call string [mscorlib]System.String::Concat(string, string) @@ -550,7 +562,7 @@ [5] float64 V_5, [6] bool V_6, [7] value class [mscorlib]System.DateTime V_7, - [8] value class [mscorlib]System.PlatformID V_8, + [8] value class JitTest.PlatformID V_8, [9] value class JitTest.Mood V_9) IL_0000: ldc.i4.s 10 IL_0002: stloc.0 @@ -643,7 +655,7 @@ string) IL_00f6: ldstr "{%p}" IL_00fb: ldloca.s V_8 - IL_00fd: mkrefany [mscorlib]System.PlatformID + IL_00fd: mkrefany JitTest.PlatformID IL_0102: ldstr "{Win32NT}" IL_0107: call void JitTest.TestClass::Test(string, typedref, @@ -731,8 +743,8 @@ string) IL_00e1: ldstr "{%p}" IL_00e6: ldarg.0 - IL_00e7: ldflda value class [mscorlib]System.PlatformID JitTest.TestClass::m_pid - IL_00ec: mkrefany [mscorlib]System.PlatformID + IL_00e7: ldflda value class JitTest.PlatformID JitTest.TestClass::m_pid + IL_00ec: mkrefany JitTest.PlatformID IL_00f1: ldstr "{Win32NT}" IL_00f6: call void JitTest.TestClass::Test(string, typedref, @@ -757,7 +769,7 @@ float64& dbl, bool& b, value class [mscorlib]System.DateTime& t, - value class [mscorlib]System.PlatformID& pid) il managed + value class JitTest.PlatformID& pid) il managed { .maxstack 5 IL_0000: ldstr "{%d}" @@ -824,7 +836,7 @@ string) IL_00bd: ldstr "{%p}" IL_00c2: ldarg.s pid - IL_00c4: mkrefany [mscorlib]System.PlatformID + IL_00c4: mkrefany JitTest.PlatformID IL_00c9: ldstr "{Win32NT}" IL_00ce: call void JitTest.TestClass::Test(string, typedref, @@ -844,7 +856,7 @@ [5] float64 V_5, [6] bool V_6, [7] value class [mscorlib]System.DateTime V_7, - [8] value class [mscorlib]System.PlatformID V_8) + [8] value class JitTest.PlatformID V_8) IL_0000: ldc.i4.s 20 IL_0002: stloc.0 IL_0003: ldc.i4.s 21 @@ -887,7 +899,7 @@ float64&, bool&, value class [mscorlib]System.DateTime&, - value class [mscorlib]System.PlatformID&) + value class JitTest.PlatformID&) IL_0049: ret } // end of method TestClass::TestArgSlots @@ -903,7 +915,7 @@ [5] float64[] V_5, [6] bool[] V_6, [7] value class [mscorlib]System.DateTime[] V_7, - [8] value class [mscorlib]System.PlatformID[] V_8, + [8] value class JitTest.PlatformID[] V_8, [9] value class JitTest.Mood[] V_9, [10] int32[] V_10, [11] unsigned int32[] V_11, @@ -912,7 +924,7 @@ [14] float32[] V_14, [15] float64[] V_15, [16] bool[] V_16, - [17] value class [mscorlib]System.PlatformID[] V_17, + [17] value class JitTest.PlatformID[] V_17, [18] value class JitTest.Mood[] V_18) IL_0000: ldc.i4.1 IL_0001: newarr [mscorlib]System.Int32 @@ -992,7 +1004,7 @@ int32, int32) IL_00a3: ldc.i4.1 - IL_00a4: newarr [mscorlib]System.PlatformID + IL_00a4: newarr JitTest.PlatformID IL_00a9: stloc.s V_17 IL_00ab: ldloc.s V_17 IL_00ad: ldc.i4.0 @@ -1088,8 +1100,8 @@ IL_01b3: ldstr "{%p}" IL_01b8: ldloc.s V_8 IL_01ba: ldc.i4.0 - IL_01bb: ldelema [mscorlib]System.PlatformID - IL_01c0: mkrefany [mscorlib]System.PlatformID + IL_01bb: ldelema JitTest.PlatformID + IL_01c0: mkrefany JitTest.PlatformID IL_01c5: ldstr "{Win32NT}" IL_01ca: call void JitTest.TestClass::Test(string, typedref, @@ -1162,7 +1174,7 @@ IL_002d: stfld bool JitTest.TestClass::m_b IL_0032: ldarg.0 IL_0033: ldc.i4.2 - IL_0034: stfld value class [mscorlib]System.PlatformID JitTest.TestClass::m_pid + IL_0034: stfld value class JitTest.PlatformID JitTest.TestClass::m_pid IL_0039: ldarg.0 IL_003a: ldc.i4.0 IL_003b: stfld value class JitTest.Mood JitTest.TestClass::m_mood -- 2.7.4