TYPE_MAX = 8
};
-static const char*
+static const char* const
arg_name [TYPE_MAX] = {
"Invalid",
"Int32",
ILStackDesc *stack;
register const unsigned char *ip;
register const unsigned char *end;
- const unsigned char *target; /* branch target */
+ const unsigned char *target = NULL; /* branch target */
int max_args, max_stack, cur_stack, i, n, need_merge, start;
- guint32 token, ip_offset;
+ guint32 token, ip_offset = 0;
char *local_state = NULL;
GSList *list = NULL;
guint prefix = 0;
(method->flags & (METHOD_ATTRIBUTE_PINVOKE_IMPL | METHOD_ATTRIBUTE_ABSTRACT))) {
return NULL;
}
- signature = method->signature;
- header = ((MonoMethodNormal *)method)->header;
+ signature = mono_method_signature (method);
+ header = mono_method_get_header (method);
ip = header->code;
end = ip + header->code_size;
max_args = signature->param_count + signature->hasthis;
params = signature->params;
}
- if (method->signature->is_inflated)
+ if (signature->is_inflated)
generic_context = ((MonoMethodInflated *) method)->context;
if (header->num_locals) {
cmethod = mono_get_method_full (image, token, NULL, generic_context);
if (!cmethod)
ADD_INVALID (list, g_strdup_printf ("Method 0x%08x not found at 0x%04x", token, ip_offset));
- if (cmethod->signature->pinvoke) {
- csig = cmethod->signature;
+ if (mono_method_signature (cmethod)) {
+ csig = mono_method_signature (cmethod);
} else {
csig = mono_method_get_signature (cmethod, image, token);
}
cmethod = mono_get_method_full (image, token, NULL, generic_context);
if (!cmethod)
ADD_INVALID (list, g_strdup_printf ("Constructor 0x%08x not found at 0x%04x", token, ip_offset));
- csig = cmethod->signature;
+ csig = mono_method_signature (cmethod);
CHECK_STACK_UNDERFLOW (csig->param_count);
cur_stack -= csig->param_count;
CHECK_STACK_OVERFLOW ();
cur_stack -= 3;
++ip;
break;
- case CEE_LDELEM:
- case CEE_STELEM:
+ case CEE_LDELEM_ANY:
+ case CEE_STELEM_ANY:
case CEE_UNBOX_ANY:
case CEE_UNUSED5:
case CEE_UNUSED6: