MonoSimpleBasicBlock *bb, *root;
const unsigned char *start, *end;
MonoMethodHeader *header = mono_method_get_header (method);
- start = header->code;
- end = start + header->code_size;
mono_error_init (error);
return NULL;
}
+ start = header->code;
+ end = start + header->code_size;
+
bb = g_new0 (MonoSimpleBasicBlock, 1);
bb->start = 0;
bb->end = end - start;
dump_bb_list (bb, &root, g_strdup_printf("AFTER LIVENESS %s", mono_method_full_name (method, TRUE)));
#endif
+ mono_metadata_free_mh (header);
return bb;
fail:
+ mono_metadata_free_mh (header);
mono_basic_block_free (bb);
return NULL;
}
g_error ("Invalid opcode %d argument %d max opcode %d\n", i, mono_opcodes [i].argument, MONO_CEE_LAST);
}
- if (ADD_IS_GREATER_OR_OVF (p, size, end))
+ if (ADDP_IS_GREATER_OR_OVF (p, size, end))
return -1;
return (p - start) + size;