Author: lupus
Date: 2007-09-06 13:23:30 -0400 (Thu, 06 Sep 2007)
New Revision: 85432

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/icall-def.h
   trunk/mono/mono/metadata/icall.c
   trunk/mono/mono/metadata/reflection.c
Log:


Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>

        * reflection.c, icall.c, icall-def.h: the methodinfos name field is
        used only as a cache: added an icall to fill it.



Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2007-09-06 17:23:22 UTC (rev 85431)
+++ trunk/mono/mono/metadata/ChangeLog  2007-09-06 17:23:30 UTC (rev 85432)
@@ -1,3 +1,9 @@
+
+Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>
+
+       * reflection.c, icall.c, icall-def.h: the methodinfos name field is
+       used only as a cache: added an icall to fill it.
+
 2007-09-16  Rodrigo Kumpera  <[EMAIL PROTECTED]>
 
        * reflection.h: exposed mono_reflection_free_type_info

Modified: trunk/mono/mono/metadata/icall-def.h
===================================================================
--- trunk/mono/mono/metadata/icall-def.h        2007-09-06 17:23:22 UTC (rev 
85431)
+++ trunk/mono/mono/metadata/icall-def.h        2007-09-06 17:23:30 UTC (rev 
85432)
@@ -542,6 +542,7 @@
 ICALL(MMETH_6, "get_IsGenericMethod", ves_icall_MonoMethod_get_IsGenericMethod)
 ICALL(MMETH_7, "get_IsGenericMethodDefinition", 
ves_icall_MonoMethod_get_IsGenericMethodDefinition)
 ICALL(MMETH_8, "get_base_definition", ves_icall_MonoMethod_get_base_definition)
+ICALL(MMETH_9, "get_name", ves_icall_MonoMethod_get_name)
 
 ICALL_TYPE(MMETHI, "System.Reflection.MonoMethodInfo", MMETHI_1)
 ICALL(MMETHI_1, "get_method_info", ves_icall_get_method_info)

Modified: trunk/mono/mono/metadata/icall.c
===================================================================
--- trunk/mono/mono/metadata/icall.c    2007-09-06 17:23:22 UTC (rev 85431)
+++ trunk/mono/mono/metadata/icall.c    2007-09-06 17:23:30 UTC (rev 85432)
@@ -6338,6 +6338,15 @@
        return mono_method_get_object (mono_domain_get (), result, NULL);
 }
 
+static MonoString*
+ves_icall_MonoMethod_get_name (MonoReflectionMethod *m)
+{
+       MonoMethod *method = m->method;
+
+       MONO_OBJECT_SETREF (m, name, mono_string_new (mono_object_domain (m), 
method->name));
+       return m->name;
+}
+
 static void
 mono_ArgIterator_Setup (MonoArgIterator *iter, char* argsp, char* start)
 {

Modified: trunk/mono/mono/metadata/reflection.c
===================================================================
--- trunk/mono/mono/metadata/reflection.c       2007-09-06 17:23:22 UTC (rev 
85431)
+++ trunk/mono/mono/metadata/reflection.c       2007-09-06 17:23:30 UTC (rev 
85432)
@@ -5571,7 +5571,6 @@
        }
        ret = (MonoReflectionMethod*)mono_object_new (domain, klass);
        ret->method = method;
-       MONO_OBJECT_SETREF (ret, name, mono_string_new (domain, method->name));
        MONO_OBJECT_SETREF (ret, reftype, mono_type_get_object (domain, 
&refclass->byval_arg));
        CACHE_OBJECT (MonoReflectionMethod *, method, ret, refclass);
 }

_______________________________________________
Mono-patches maillist  -  Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to