klass = startklass = mono_class_from_mono_type (type->type);
refklass = mono_class_from_mono_type (reftype->type);
- mono_ptr_array_init (tmp_array, 2);
+ mono_ptr_array_init (tmp_array, 2, MONO_ROOT_SOURCE_REFLECTION, "temporary reflection fields list");
handle_parent:
if (klass->exception_type != MONO_EXCEPTION_NONE) {
gpointer iter = NULL;
MonoPtrArray tmp_array;
- mono_ptr_array_init (tmp_array, 4); /*FIXME, guestimating*/
+ mono_ptr_array_init (tmp_array, 4, MONO_ROOT_SOURCE_REFLECTION, "temporary reflection constructors list"); /*FIXME, guestimating*/
domain = ((MonoObject *)type)->vtable->domain;
if (type->type->byref)
GHashTable *properties = NULL;
MonoPtrArray tmp_array;
- mono_ptr_array_init (tmp_array, 8); /*This the average for ASP.NET types*/
+ mono_ptr_array_init (tmp_array, 8, MONO_ROOT_SOURCE_REFLECTION, "temporary reflection properties list"); /*This the average for ASP.NET types*/
if (!System_Reflection_PropertyInfo)
System_Reflection_PropertyInfo = mono_class_from_name (
GHashTable *events = NULL;
MonoPtrArray tmp_array;
- mono_ptr_array_init (tmp_array, 4);
+ mono_ptr_array_init (tmp_array, 4, MONO_ROOT_SOURCE_REFLECTION, "temporary reflection events list");
if (!System_Reflection_EventInfo)
System_Reflection_EventInfo = mono_class_from_name (
if (klass->generic_class)
klass = klass->generic_class->container_class;
- mono_ptr_array_init (tmp_array, 1);
+ mono_ptr_array_init (tmp_array, 1, MONO_ROOT_SOURCE_REFLECTION, "temporary reflection nested types list");
iter = NULL;
while ((nested = mono_class_get_nested_types (klass, &iter))) {
match = 0;
return ret;
}
+ICALL_EXPORT MonoReflectionMethod*
+ves_icall_System_Delegate_GetVirtualMethod_internal (MonoDelegate *delegate)
+{
+ return mono_method_get_object (mono_domain_get (), mono_object_get_virtual_method (delegate->target, delegate->method), mono_object_class (delegate->target));
+}
+
/* System.Buffer */
static inline gint32
{
guint8 *src_buf, *dest_buf;
+ if (count < 0) {
+ mono_set_pending_exception (mono_get_exception_argument ("count", "is negative"));
+ return FALSE;
+ }
+
+ g_assert (count >= 0);
+
/* This is called directly from the class libraries without going through the managed wrapper */
MONO_CHECK_ARG_NULL (src, FALSE);
MONO_CHECK_ARG_NULL (dest, FALSE);