equal
deleted
inserted
replaced
1659 } |
1659 } |
1660 |
1660 |
1661 |
1661 |
1662 /* | il_expr_operator '(' [il_operand] eol_list [simple_instr_list] ')' */ |
1662 /* | il_expr_operator '(' [il_operand] eol_list [simple_instr_list] ')' */ |
1663 void *visit(il_expression_c *symbol) { |
1663 void *visit(il_expression_c *symbol) { |
|
1664 /* Since stage2 will insert an artificial (and equivalent) LD <il_operand> to the simple_instr_list when an 'il_operand' exists, we know |
|
1665 * that if (symbol->il_operand != NULL), then the first IL instruction in the simple_instr_list will be the equivalent and artificial |
|
1666 * 'LD <il_operand>' IL instruction. |
|
1667 * Since we do not want the extra LD instruction, we simply remove it! |
|
1668 */ |
|
1669 if (symbol->il_operand != NULL) |
|
1670 ((list_c *)symbol->simple_instr_list)->remove_element(0); |
|
1671 |
1664 symbol->il_expr_operator->accept(*this); |
1672 symbol->il_expr_operator->accept(*this); |
1665 s4o.print("("); |
1673 s4o.print("("); |
1666 if (symbol->il_operand != NULL) |
1674 if (symbol->il_operand != NULL) |
1667 symbol->il_operand->accept(*this); |
1675 symbol->il_operand->accept(*this); |
1668 if (symbol->simple_instr_list != NULL) { |
1676 if (symbol->simple_instr_list != NULL) { |