| 725 | } |
| 726 | } |
| 727 | void |
| 728 | ReducerOutputMgr::output_stm(const Statement* stm, std::ostream &out, FactMgr* fm, int indent) |
| 729 | { |
| 730 | string str_out; |
| 731 | // print pre-statement assignments |
| 732 | output_pre_stm_assigns(stm, out, indent); |
| 733 | output_pre_stm_values(stm, out, fm, indent); |
| 734 | |
| 735 | if (reducer->replaced_stms.find(stm) != reducer->replaced_stms.end()) { |
| 736 | const Statement* alt_stm = reducer->replaced_stms[stm]; |
| 737 | vector<string> labels; |
| 738 | // special case for goto target: if the jump source is still around, we have to keep the label somehow |
| 739 | if (reducer->find_missing_labels(stm, alt_stm, labels)) { |
| 740 | for (size_t i=0; i<labels.size(); i++) { |
| 741 | out << labels[i] << ": ;" << endl; |
| 742 | } |
| 743 | } |
| 744 | if (alt_stm && alt_stm->eType == eBlock) { |
| 745 | output_block((const Block*)alt_stm, out, indent, true); |
| 746 | } else if (alt_stm) { |
| 747 | output_stm(reducer->replaced_stms[stm], out, fm, indent); |
| 748 | } |
| 749 | return; |
| 750 | } |
| 751 | |
| 752 | if (stm->func == reducer->rewrite_calls_inside) { |
| 753 | rewrite_func_calls(stm, out, indent); |
| 754 | } |
| 755 | // print lable for jump detination |
| 756 | string label = reducer->find_jump_label(stm); |
| 757 | label.empty() ? (out << "") : (out << label << ":" << endl); |
| 758 | |
| 759 | output_alt_exprs(stm, out, indent); |
| 760 | |
| 761 | output_reduced_stm(stm, out, indent); |
| 762 | |
| 763 | output_post_stm_values(stm, out, fm, indent); |
| 764 | } |
| 765 | |
| 766 | void |
| 767 | ReducerOutputMgr::rewrite_func_call(const Statement* stm, const FunctionInvocation* invoke, string tmp_id, std::ostream& out, int indent) |
nothing calls this directly
no test coverage detected