stage3/flow_control_analysis.cc
changeset 448 1bd18fc06911
parent 443 ff4d26b7e51d
child 452 79ac274d1cc4
equal deleted inserted replaced
447:aad0f3e5df33 448:1bd18fc06911
   110 /***********************************/
   110 /***********************************/
   111 
   111 
   112 /*| instruction_list il_instruction */
   112 /*| instruction_list il_instruction */
   113 // SYM_LIST(instruction_list_c)
   113 // SYM_LIST(instruction_list_c)
   114 void *flow_control_analysis_c::visit(instruction_list_c *symbol) {
   114 void *flow_control_analysis_c::visit(instruction_list_c *symbol) {
   115 	for(int i = 1; i < symbol->n; i++) {
   115 	for(int i = 0; i < symbol->n; i++) {
   116 		prev_il_instruction = symbol->elements[i-1];
   116 		prev_il_instruction = NULL;
       
   117 		if (i > 0) prev_il_instruction = symbol->elements[i-1];
   117 		symbol->elements[i]->accept(*this);
   118 		symbol->elements[i]->accept(*this);
   118 	}
   119 	}
   119 	return NULL;
   120 	return NULL;
   120 }
   121 }
   121 
   122