--- a/stage3/flow_control_analysis.cc Mon Apr 03 22:06:40 2017 +0100
+++ b/stage3/flow_control_analysis.cc Mon Apr 03 22:18:22 2017 +0100
@@ -218,8 +218,8 @@
prev_il_instruction_is_JMP_or_RET = false;
for(int i = 0; i < symbol->n; i++) {
prev_il_instruction = NULL;
- if (i > 0) prev_il_instruction = symbol->elements[i-1];
- curr_il_instruction = symbol->elements[i];
+ if (i > 0) prev_il_instruction = symbol->get_element(i-1);
+ curr_il_instruction = symbol->get_element(i);
curr_il_instruction->accept(*this);
curr_il_instruction = NULL;
}
@@ -310,8 +310,8 @@
void *flow_control_analysis_c::visit(simple_instr_list_c *symbol) {
for(int i = 0; i < symbol->n; i++) {
/* The prev_il_instruction for element[0] was set in visit(il_expression_c *) */
- if (i>0) prev_il_instruction = symbol->elements[i-1];
- symbol->elements[i]->accept(*this);
+ if (i>0) prev_il_instruction = symbol->get_element(i-1);
+ symbol->get_element(i)->accept(*this);
}
return NULL;
}