2010-03-07 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mcs / class / corlib / Mono / Runtime.cs
index d9b1c13ad3e5c73879f2730e3c40953a755bd8b8..920c545e6f701ce98255cc942a2491799c47a705 100644 (file)
@@ -41,6 +41,25 @@ namespace Mono {
                {
                        mono_runtime_install_handlers ();
                }
+
+               // Should not be removed intended for external use
+               // Safe to be called using reflection
+               // Format is undefined only for use as a string for reporting
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               internal static extern string GetDisplayName ();
+
+               /*
+               Create a object without calling any of it's constructors.
+               @h is a pointer to the runtime type handle of that object.              
+               Recomended usage is to emit the following code sequence:
+               ldtoken [mscorlib]System.Object
+               call object [mscorlib]Mono.Runtime::NewObject(intptr)
+
+               This is the only well understood sequence known by the JIT
+               which produces faster code.
+               */
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               internal static extern object NewObject (IntPtr h);
        }
        
 }