X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fjit-icalls.c;h=d4dc21b1563773e964a00e3c64070951c91f6cd2;hb=364be2525413347ac1940d3db3473451689dedf6;hp=9912ad533a1c91ca9fce07a6aaa40a63922418ff;hpb=1c14f1ee6d701510c15499d71fc2b324151a8629;p=mono.git diff --git a/mono/mini/jit-icalls.c b/mono/mini/jit-icalls.c index 9912ad533a1..d4dc21b1563 100644 --- a/mono/mini/jit-icalls.c +++ b/mono/mini/jit-icalls.c @@ -605,51 +605,6 @@ mono_fload_r4_arg (double val) #endif -/** - * ves_array_element_address: - * @this: a pointer to the array object - * - * Returns: the address of an array element. - */ -gpointer -ves_array_element_address (MonoArray *this, ...) -{ - MonoClass *class; - va_list ap; - int i, ind, esize, realidx; - gpointer ea; - - MONO_ARCH_SAVE_REGS; - - g_assert (this != NULL); - - va_start(ap, this); - - class = this->obj.vtable->klass; - - g_assert (this->bounds != NULL); - - esize = mono_array_element_size (class); - ind = va_arg(ap, int); - ind -= (int)this->bounds [0].lower_bound; - if ((guint32)ind >= (guint32)this->bounds [0].length) - mono_raise_exception (mono_get_exception_index_out_of_range ()); - for (i = 1; i < class->rank; i++) { - realidx = va_arg(ap, int) - (int)this->bounds [i].lower_bound; - if ((guint32)realidx >= (guint32)this->bounds [i].length) - mono_raise_exception (mono_get_exception_index_out_of_range ()); - ind *= this->bounds [i].length; - ind += realidx; - } - esize *= ind; - - ea = (gpointer*)(gpointer)((char*)this->vector + esize); - - va_end(ap); - - return ea; -} - MonoArray * mono_array_new_va (MonoMethod *cm, ...) { @@ -831,6 +786,8 @@ mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, MonoGen MonoMethod *vmethod, *inflated; gpointer addr; + mono_jit_stats.generic_virtual_invocations++; + if (obj == NULL) mono_raise_exception (mono_get_exception_null_reference ()); vmethod = mono_object_get_virtual_method (obj, method); @@ -842,8 +799,8 @@ mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, MonoGen the same context. */ g_assert (!vmethod->klass->generic_container); - g_assert (!vmethod->klass->generic_class || !vmethod->klass->generic_class->inst->is_open); - g_assert (!context->gmethod || !context->gmethod->inst->is_open); + g_assert (!vmethod->klass->generic_class || !vmethod->klass->generic_class->context.class_inst->is_open); + g_assert (!context->method_inst || !context->method_inst->is_open); inflated = mono_class_inflate_generic_method (vmethod, context); inflated = mono_get_inflated_method (inflated); addr = mono_compile_method (inflated);