projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3749 from BrzVlad/fix-mips-fix
[mono.git]
/
mono
/
metadata
/
mono-basic-block.c
diff --git
a/mono/metadata/mono-basic-block.c
b/mono/metadata/mono-basic-block.c
index d7115994b84f49a9063db8720ace9c9423c44f15..5ccb938df9b03a0f8dfb9a77c6a8accb80e9c2f0 100644
(file)
--- a/
mono/metadata/mono-basic-block.c
+++ b/
mono/metadata/mono-basic-block.c
@@
-5,6
+5,7
@@
* Rodrigo Kumpera (rkumpera@novell.com)
*
* Copyright 2010 Novell, Inc (http://www.novell.com)
* Rodrigo Kumpera (rkumpera@novell.com)
*
* Copyright 2010 Novell, Inc (http://www.novell.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#include <config.h>
*/
#include <config.h>
@@
-239,6
+240,8
@@
bb_split (MonoSimpleBasicBlock *first, MonoSimpleBasicBlock *hint, MonoSimpleBas
{
MonoSimpleBasicBlock *res, *bb = first;
{
MonoSimpleBasicBlock *res, *bb = first;
+ mono_error_init (error);
+
if (bb_idx_is_contained (hint, target)) {
first = hint;
} else if (hint->next && bb_idx_is_contained (hint->next, target)) {
if (bb_idx_is_contained (hint, target)) {
first = hint;
} else if (hint->next && bb_idx_is_contained (hint->next, target)) {
@@
-335,6
+338,8
@@
bb_formation_il_pass (const unsigned char *start, const unsigned char *end, Mono
MonoSimpleBasicBlock *branch, *next, *current;
const MonoOpcode *opcode;
MonoSimpleBasicBlock *branch, *next, *current;
const MonoOpcode *opcode;
+ mono_error_init (error);
+
current = bb;
while (ip < end) {
current = bb;
while (ip < end) {
@@
-463,6
+468,9
@@
bb_formation_eh_pass (MonoMethodHeader *header, MonoSimpleBasicBlock *bb, MonoSi
{
int i;
int end = header->code_size;
{
int i;
int end = header->code_size;
+
+ mono_error_init (error);
+
/*We must split at all points to verify for targets in the middle of an instruction*/
for (i = 0; i < header->num_clauses; ++i) {
MonoExceptionClause *clause = header->clauses + i;
/*We must split at all points to verify for targets in the middle of an instruction*/
for (i = 0; i < header->num_clauses; ++i) {
MonoExceptionClause *clause = header->clauses + i;
@@
-514,21
+522,13
@@
mono_basic_block_free (MonoSimpleBasicBlock *bb)
* Return the list of basic blocks of method. Return NULL on failure and set @error.
*/
MonoSimpleBasicBlock*
* Return the list of basic blocks of method. Return NULL on failure and set @error.
*/
MonoSimpleBasicBlock*
-mono_basic_block_split (MonoMethod *method, MonoError *error)
+mono_basic_block_split (MonoMethod *method, MonoError *error
, MonoMethodHeader *header
)
{
{
- MonoError inner_error;
MonoSimpleBasicBlock *bb, *root;
const unsigned char *start, *end;
MonoSimpleBasicBlock *bb, *root;
const unsigned char *start, *end;
- MonoMethodHeader *header = mono_method_get_header_checked (method, &inner_error);
mono_error_init (error);
mono_error_init (error);
- if (!header) {
- mono_error_set_not_verifiable (error, method, "Could not decode header due to %s", mono_error_get_message (&inner_error));
- mono_error_cleanup (&inner_error);
- return NULL;
- }
-
start = header->code;
end = start + header->code_size;
start = header->code;
end = start + header->code_size;
@@
-553,11
+553,9
@@
mono_basic_block_split (MonoMethod *method, MonoError *error)
dump_bb_list (bb, &root, g_strdup_printf("AFTER LIVENESS %s", mono_method_full_name (method, TRUE)));
#endif
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:
return bb;
fail:
- mono_metadata_free_mh (header);
mono_basic_block_free (bb);
return NULL;
}
mono_basic_block_free (bb);
return NULL;
}