equal
deleted
inserted
replaced
97 * |
97 * |
98 * simple_instr_list: |
98 * simple_instr_list: |
99 * list of il_simple_instruction |
99 * list of il_simple_instruction |
100 * |
100 * |
101 * il_simple_instruction: |
101 * il_simple_instruction: |
102 * il_simple_operation (il_simple_operation_c) |
102 * il_simple_operation (il_simple_operation_c, il_function_call_c) |
103 * | il_expression (il_expression_c) |
103 * | il_expression (il_expression_c) |
104 * | il_formal_funct_call (il_formal_funct_call_c) |
104 * | il_formal_funct_call (il_formal_funct_call_c) |
105 * |
105 * |
106 */ |
106 */ |
107 |
107 |
255 #endif |
255 #endif |
256 |
256 |
257 |
257 |
258 // void *visit(il_operand_list_c *symbol); |
258 // void *visit(il_operand_list_c *symbol); |
259 void *flow_control_analysis_c::visit(simple_instr_list_c *symbol) { |
259 void *flow_control_analysis_c::visit(simple_instr_list_c *symbol) { |
260 /* The prev_il_instruction for element[0] was set in visit(il_expression_c *) */ |
260 for(int i = 0; i < symbol->n; i++) { |
261 for(int i = 1; i < symbol->n; i++) { |
|
262 /* The prev_il_instruction for element[0] was set in visit(il_expression_c *) */ |
261 /* The prev_il_instruction for element[0] was set in visit(il_expression_c *) */ |
263 if (i>0) prev_il_instruction = symbol->elements[i-1]; |
262 if (i>0) prev_il_instruction = symbol->elements[i-1]; |
264 symbol->elements[i]->accept(*this); |
263 symbol->elements[i]->accept(*this); |
265 } |
264 } |
266 return NULL; |
265 return NULL; |