In .:
[mono.git] / mono / mini / aliasing.c
index 9e6ea1105aba0aa7cc22fe5e8cb60f6a3bde7ea7..f1979527082a442c4cd8052aeeb22f71306ddc58 100644 (file)
@@ -15,8 +15,6 @@
 
 #include "aliasing.h"
 
-extern guint8 mono_burg_arity [];
-
 #define MONO_APPLY_DEADCE_TO_SINGLE_METHOD 0
 #define DEBUG_DEADCE 0
 
@@ -117,7 +115,7 @@ print_tree_node (MonoInst *tree) {
        printf (mono_inst_name (tree->opcode));
        
        if (OP_IS_OUTARG (tree->opcode)) {
-               printf ("[OUT:%d]", tree->inst_c1);
+               printf ("[OUT:%ld]", (long)tree->inst_c1);
        }
        
        switch (tree->opcode) {
@@ -243,7 +241,7 @@ print_used_aliases(MonoInst *inst, MonoLocalVariableList* affected_variables) {
                        switch (inst->inst_i0->opcode) {
                        case OP_LOCAL:
                        case OP_ARG:
-                               printf ("{%d}", inst->inst_i0->inst_c0);
+                               printf ("{%ld}", (long)inst->inst_i0->inst_c0);
                                break;
                        case OP_RETARG:
                                printf ("{RETARG}");
@@ -598,7 +596,7 @@ update_aliasing_information_on_inst (MonoAliasingInformation *info, MonoAliasing
                }
                
                info->number_of_arguments = 0;
-       } else if (inst->opcode == CEE_ADD) {
+       } else if ((inst->opcode == CEE_ADD) || (inst->opcode == OP_LADD)){
                if ((context.subtree_aliases [0].type == MONO_ALIASING_TYPE_LOCAL) || (context.subtree_aliases [0].type == MONO_ALIASING_TYPE_LOCAL_FIELD)) {
                        int variable_index = context.subtree_aliases [0].variable_index;
                        //ADD_BAD_ALIAS (info, variable_index);
@@ -630,7 +628,7 @@ update_aliasing_information_on_inst (MonoAliasingInformation *info, MonoAliasing
                        use->affected_variables = info->temporary_uncontrollably_aliased_variables;
                        APPEND_USE (info,bb_info,use);
                }
-       } else if ((inst->opcode == OP_UNBOXCAST) || (inst->opcode == CEE_CONV_I)) {
+       } else if ((inst->opcode == OP_UNBOXCAST) || (inst->opcode == CEE_CONV_I) || (inst->opcode == OP_LCONV_TO_I)) {
                father_alias->type = context.subtree_aliases [0].type;
                father_alias->variable_index = context.subtree_aliases [0].variable_index;
        } else if ((inst->opcode == CEE_LDELEMA) || (inst->opcode == OP_COMPARE) || (inst->opcode == CEE_SWITCH)) {
@@ -736,7 +734,7 @@ mono_build_aliasing_information (MonoCompile *cfg) {
                                } else {
                                        MonoLocalVariableList *last = use->affected_variables;
                                        while (last->next != NULL) {
-                                               while (info->variable_is_uncontrollably_aliased [last->next->variable_index]) {
+                                               while (last->next && info->variable_is_uncontrollably_aliased [last->next->variable_index]) {
                                                        last->next = last->next->next;
                                                }
                                                if (last->next != NULL) {
@@ -927,7 +925,7 @@ mono_aliasing_deadce_on_inst (MonoAliasingInformation *info, MonoInst **possibly
        
        if ((! has_side_effects) && (inst->ssa_op == MONO_SSA_STORE)) {
                if (LOG_DEADCE) {
-                       printf ("FILLING slot %d with inst ", inst->inst_i0->inst_c0);
+                       printf ("FILLING slot %d with inst ", (int)inst->inst_i0->inst_c0);
                        mono_print_tree_nl (inst);
                }
                possibly_dead_assignments [inst->inst_i0->inst_c0] = inst;