stage3/flow_control_analysis.cc
changeset 452 79ac274d1cc4
parent 448 1bd18fc06911
child 453 4733f662362a
equal deleted inserted replaced
451:a1b87eb155e4 452:79ac274d1cc4
   131 	 * 	  label2:
   131 	 * 	  label2:
   132 	 *        label3:
   132 	 *        label3:
   133 	 *        label4:
   133 	 *        label4:
   134 	 *                LD I
   134 	 *                LD I
   135 	 */
   135 	 */
   136 
   136 	if (NULL != symbol->il_instruction)
       
   137 		symbol->il_instruction->accept(*this);
   137 return NULL;
   138 return NULL;
   138 }
   139 }
   139 
   140 
   140 
   141 
   141 #if 0
   142 #if 0
   169 /* NOTE: The parameter 'called_function_declaration' is used to pass data between the stage 3 and stage 4. */
   170 /* NOTE: The parameter 'called_function_declaration' is used to pass data between the stage 3 and stage 4. */
   170 // SYM_REF2(il_formal_funct_call_c, function_name, il_param_list, symbol_c *called_function_declaration; int extensible_param_count;)
   171 // SYM_REF2(il_formal_funct_call_c, function_name, il_param_list, symbol_c *called_function_declaration; int extensible_param_count;)
   171 void *flow_control_analysis_c::visit(il_formal_funct_call_c *symbol) {
   172 void *flow_control_analysis_c::visit(il_formal_funct_call_c *symbol) {
   172 	return NULL;
   173 	return NULL;
   173 }
   174 }
       
   175 #endif
   174 
   176 
   175 
   177 
       
   178 //  void *visit(il_operand_list_c *symbol);
       
   179 
       
   180 void *flow_control_analysis_c::visit(simple_instr_list_c *symbol) {
       
   181 	for(int i = 0; i < symbol->n; i++) {
       
   182 		prev_il_instruction = NULL;
       
   183 		if (i > 0) prev_il_instruction = symbol->elements[i-1];
       
   184 		symbol->elements[i]->accept(*this);
       
   185 	}
       
   186 	return NULL;
       
   187 }
       
   188 
   176 /*
   189 /*
   177     void *visit(il_operand_list_c *symbol);
       
   178     void *visit(simple_instr_list_c *symbol);
       
   179     void *visit(il_param_list_c *symbol);
   190     void *visit(il_param_list_c *symbol);
   180     void *visit(il_param_assignment_c *symbol);
   191     void *visit(il_param_assignment_c *symbol);
   181     void *visit(il_param_out_assignment_c *symbol);
   192     void *visit(il_param_out_assignment_c *symbol);
   182  */
   193  */
   183 
   194 
   184 
   195 
   185 #endif
       
   186 
   196