guint8 *fde, *cie, *code_start, *code_end;
int version, fde_count;
gint32 *table;
- int i, j, pos, left, right, code_len;
+ int i, pos, left, right, code_len;
MonoJitExceptionInfo *ei;
guint32 fde_len, ei_len, nested_len, nindex;
gpointer *type_info;
gint32 cindex1 = read32 (type_info [i]);
GSList *l;
- for (l = nesting [cindex1]; l; l = l->next) {
- gint32 nesting_cindex = GPOINTER_TO_INT (l->data);
-
- for (j = 0; j < ei_len; ++j) {
- gint32 cindex2 = read32 (type_info [j]);
-
- if (cindex2 == nesting_cindex)
- nested_len ++;
- }
- }
+ for (l = nesting [cindex1]; l; l = l->next)
+ nested_len ++;
}
/*
for (l = nesting [cindex1]; l; l = l->next) {
gint32 nesting_cindex = GPOINTER_TO_INT (l->data);
+ MonoJitExceptionInfo *nesting_ei;
+ MonoJitExceptionInfo *nesting_clause = &clauses [nesting_cindex];
- for (j = 0; j < ei_len; ++j) {
- gint32 cindex2 = read32 (type_info [j]);
+ nesting_ei = &jinfo->clauses [nindex];
+ nindex ++;
- if (cindex2 == nesting_cindex) {
- memcpy (&jinfo->clauses [nindex], &jinfo->clauses [j], sizeof (MonoJitExceptionInfo));
- jinfo->clauses [nindex].try_start = jinfo->clauses [i].try_start;
- jinfo->clauses [nindex].try_end = jinfo->clauses [i].try_end;
- jinfo->clauses [nindex].handler_start = jinfo->clauses [i].handler_start;
- jinfo->clauses [nindex].exvar_offset = jinfo->clauses [i].exvar_offset;
- nindex ++;
- }
- }
+ memcpy (nesting_ei, &jinfo->clauses [i], sizeof (MonoJitExceptionInfo));
+ nesting_ei->flags = nesting_clause->flags;
+ nesting_ei->data.catch_class = nesting_clause->data.catch_class;
+ nesting_ei->clause_index = nesting_cindex;
}
}
g_assert (nindex == ei_len + nested_len);
case MONO_PATCH_INFO_CLASS:
case MONO_PATCH_INFO_IID:
case MONO_PATCH_INFO_ADJUSTED_IID:
- case MONO_PATCH_INFO_CLASS_INIT:
/* Shared */
ji->data.klass = decode_klass_ref (aot_module, p, &p);
if (!ji->data.klass)
}
static guint32
-find_aot_method_in_amodule (MonoAotModule *amodule, MonoMethod *method)
+find_aot_method_in_amodule (MonoAotModule *amodule, MonoMethod *method, guint32 hash_full)
{
guint32 table_size, entry_size, hash;
guint32 *table, *entry;
return 0xffffff;
table_size = amodule->extra_method_table [0];
+ hash = hash_full % table_size;
table = amodule->extra_method_table + 1;
entry_size = 3;
- hash = mono_aot_method_hash (method) % table_size;
-
entry = &table [hash * entry_size];
if (entry [0] == 0)
guint32 index;
GPtrArray *modules;
int i;
+ guint32 hash = mono_aot_method_hash (method);
/* Try the method's module first */
*out_amodule = method->klass->image->aot_module;
- index = find_aot_method_in_amodule (method->klass->image->aot_module, method);
+ index = find_aot_method_in_amodule (method->klass->image->aot_module, method, hash);
if (index != 0xffffff)
return index;
MonoAotModule *amodule = g_ptr_array_index (modules, i);
if (amodule != method->klass->image->aot_module)
- index = find_aot_method_in_amodule (amodule, method);
+ index = find_aot_method_in_amodule (amodule, method, hash);
if (index != 0xffffff) {
*out_amodule = amodule;
break;
* patches, so have to translate between the two.
* FIXME: Clean this up, but how ?
*/
- if (ji.type == MONO_PATCH_INFO_ABS || ji.type == MONO_PATCH_INFO_INTERNAL_METHOD || ji.type == MONO_PATCH_INFO_CLASS_INIT || ji.type == MONO_PATCH_INFO_ICALL_ADDR || ji.type == MONO_PATCH_INFO_JIT_ICALL_ADDR || ji.type == MONO_PATCH_INFO_RGCTX_FETCH) {
+ if (ji.type == MONO_PATCH_INFO_ABS || ji.type == MONO_PATCH_INFO_INTERNAL_METHOD || ji.type == MONO_PATCH_INFO_ICALL_ADDR || ji.type == MONO_PATCH_INFO_JIT_ICALL_ADDR || ji.type == MONO_PATCH_INFO_RGCTX_FETCH) {
/* These should already have a function descriptor */
#ifdef PPC_USES_FUNCTION_DESCRIPTOR
/* Our function descriptors have a 0 environment, gcc created ones don't */
} else if (!strcmp (ji->data.name, "specific_trampoline_monitor_exit")) {
target = mono_create_specific_trampoline (NULL, MONO_TRAMPOLINE_MONITOR_EXIT, mono_get_root_domain (), NULL);
target = mono_create_ftnptr_malloc (target);
- } else if (!strcmp (ji->data.name, "specific_trampoline_generic_class_init")) {
- target = mono_create_specific_trampoline (NULL, MONO_TRAMPOLINE_GENERIC_CLASS_INIT, mono_get_root_domain (), NULL);
- target = mono_create_ftnptr_malloc (target);
} else if (!strcmp (ji->data.name, "mono_thread_get_and_clear_pending_exception")) {
target = mono_thread_get_and_clear_pending_exception;
} else if (!strcmp (ji->data.name, "debugger_agent_single_step_from_context")) {