(list) = g_slist_prepend ((list), vinfo); \
} while (0)
-static const char* const
-valid_cultures[] = {
+static const char
+valid_cultures[][9] = {
"ar-SA", "ar-IQ", "ar-EG", "ar-LY",
"ar-DZ", "ar-MA", "ar-TN", "ar-OM",
"ar-YE", "ar-SY", "ar-JO", "ar-LB",
"Lt-uz-UZ", "Cy-uz-UZ", "tt-TA", "pa-IN",
"gu-IN", "ta-IN", "te-IN", "kn-IN",
"mr-IN", "sa-IN", "mn-MN", "gl-ES",
- "kok-IN", "syr-SY", "div-MV",
- NULL
+ "kok-IN", "syr-SY", "div-MV"
};
static int
int found;
found = *cname == 0;
- for (i = 0; !found && valid_cultures [i]; ++i) {
- if (g_strcasecmp (valid_cultures [i], cname))
+ for (i = 0; i < G_N_ELEMENTS (valid_cultures); ++i) {
+ if (g_strcasecmp (valid_cultures [i], cname)) {
found = 1;
+ break;
+ }
}
return found;
}
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:
{"pinfo", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, pinfo)},
{"pi_dll", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, dll)},
{"pi_entry", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, dllentry)},
- {"ncharset", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, charset)},
+ {"charset", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, charset)},
+ {"extra_flags", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, extra_flags)},
{"native_cc", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, native_cc)},
{"call_conv", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, call_conv)},
{NULL, 0}
static FieldDesc
thread_fields[] = {
{"system_thread_handle", G_STRUCT_OFFSET (MonoThread, handle)},
- {"current_culture", G_STRUCT_OFFSET (MonoThread, culture_info)},
{"threadpool_thread", G_STRUCT_OFFSET (MonoThread, threadpool_thread)},
{"state", G_STRUCT_OFFSET (MonoThread, state)},
{"abort_exc", G_STRUCT_OFFSET (MonoThread, abort_exc)},
static const FieldDesc
dtfinfo_fields[] = {
- {"_AMDesignator", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, AMDesignator)},
- {"_PMDesignator", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, PMDesignator)},
- {"_DayNames", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, DayNames)},
- {"_MonthNames", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, MonthNames)},
+ {"amDesignator", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, AMDesignator)},
+ {"pmDesignator", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, PMDesignator)},
+ {"dayNames", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, DayNames)},
+ {"monthNames", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, MonthNames)},
{NULL, 0}
};