From 06ec290888ca091eccca781d2bb9d5f8e04f115e Mon Sep 17 00:00:00 2001 From: gnorton Date: Thu, 4 Mar 2010 21:17:19 +0000 Subject: [PATCH] 2010-03-04 Geoff Norton * icall-def.h: * icall.c: Add a new private internal icall to construct an object from its type without running the ctor. git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mono@153044 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- mono/metadata/ChangeLog | 5 +++++ mono/metadata/icall-def.h | 1 + mono/metadata/icall.c | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog index 5a0bf645d..e9135eed7 100644 --- a/mono/metadata/ChangeLog +++ b/mono/metadata/ChangeLog @@ -1,3 +1,8 @@ +2010-03-04 Geoff Norton + + * icall-def.h: + * icall.c: Add a new private internal icall to construct + an object from its type without running the ctor. Thu Mar 4 15:37:09 CET 2010 Paolo Molaro diff --git a/mono/metadata/icall-def.h b/mono/metadata/icall-def.h index 2972f1081..55d304a1f 100644 --- a/mono/metadata/icall-def.h +++ b/mono/metadata/icall-def.h @@ -47,6 +47,7 @@ ICALL(COMPROX_2, "FindProxy", ves_icall_Mono_Interop_ComInteropProxy_FindProxy) ICALL_TYPE(RUNTIME, "Mono.Runtime", RUNTIME_1) ICALL(RUNTIME_1, "GetDisplayName", ves_icall_Mono_Runtime_GetDisplayName) +ICALL(RUNTIME_2, "NewObject", ves_icall_Mono_Runtime_NewObject) #ifndef PLATFORM_RO_FS ICALL_TYPE(KPAIR, "Mono.Security.Cryptography.KeyPairPersistence", KPAIR_1) diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c index 889c21110..8235293f0 100644 --- a/mono/metadata/icall.c +++ b/mono/metadata/icall.c @@ -7385,6 +7385,12 @@ ves_icall_Mono_Runtime_GetDisplayName (void) return display_name; } +static MonoObject * +ves_icall_Mono_Runtime_NewObject (MonoType *t) +{ + return mono_object_new (mono_domain_get (), mono_class_from_mono_type (t)); +} + static MonoString* ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage (guint32 code) { -- 2.11.4.GIT