New tests.
[mono.git] / mono / mini / abcremoval.c
index 6ccaf81eb405561c5bb48055fc31fb7a299e2824..239e92d0add7595f3995f13aaf3f63eaa5a0af61 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "config.h"
 
+#ifndef DISABLE_JIT
+
 #ifndef DISABLE_SSA
 
 #include "inssel.h"
@@ -568,9 +570,8 @@ get_relations_from_previous_bb (MonoVariableRelationsEvaluationArea *area, MonoB
        
        if (bb->in_count == 1) { /* Should write the code to "sum" conditions... */
                in_bb = bb->in_bb [0];
-               branch = mono_inst_list_last (&in_bb->ins_list);
-               if (branch == NULL)
-                       return;
+               branch = in_bb->last_ins;
+               if (branch == NULL) return;
                branch_relation = get_relation_from_branch_instruction (branch->opcode);
                if ((branch_relation != MONO_ANY_RELATION) && (branch->inst_left->opcode == OP_COMPARE)) {
                        MonoSummarizedValue left_value;
@@ -1268,7 +1269,7 @@ process_block (MonoBasicBlock *bb, MonoVariableRelationsEvaluationArea *area) {
        apply_change_to_evaluation_area (area, &(additional_relations.relation2));
        
        inst_index = 0;
-       MONO_INST_LIST_FOR_EACH_ENTRY (current_inst, &bb->ins_list, node) {
+       MONO_BB_FOR_EACH_INS (bb, current_inst) {
                if (TRACE_ABC_REMOVAL) {
                        printf ("Processing instruction %d\n", inst_index);
                        inst_index++;
@@ -1277,6 +1278,7 @@ process_block (MonoBasicBlock *bb, MonoVariableRelationsEvaluationArea *area) {
                process_inst (current_inst, area);
        }
        
+       
        if (TRACE_ABC_REMOVAL) {
                printf ("Processing block %d [dfn %d] done.\n", bb->block_num, bb->dfn);
        }
@@ -1331,8 +1333,8 @@ mono_perform_abc_removal (MonoCompile *cfg)
                area.relations [i].relation = MONO_EQ_RELATION;
                area.relations [i].relation_is_static_definition = TRUE;
                area.relations [i].next = NULL;
-               if (cfg->vars [i]->def != NULL) {
-                       MonoInst *value = get_variable_value_from_store_instruction (cfg->vars [i]->def, i);
+               if (MONO_VARINFO (cfg, i)->def != NULL) {
+                       MonoInst *value = get_variable_value_from_store_instruction (MONO_VARINFO (cfg, i)->def, i);
                        if (value != NULL) {
                                gboolean is_array_type;
                                MonoIntegerValueKind effective_value_kind;
@@ -1465,3 +1467,4 @@ handle_integer_value:
 
 #endif /* DISABLE_SSA */
 
+#endif /* DISABLE_JIT */