| 150 | } |
| 151 | |
| 152 | static std::string FlattenedProgToString(Prog* prog, int start) { |
| 153 | std::string s; |
| 154 | for (int id = start; id < prog->size(); id++) { |
| 155 | Prog::Inst* ip = prog->inst(id); |
| 156 | if (ip->last()) |
| 157 | s += StringPrintf("%d. %s\n", id, ip->Dump().c_str()); |
| 158 | else |
| 159 | s += StringPrintf("%d+ %s\n", id, ip->Dump().c_str()); |
| 160 | } |
| 161 | return s; |
| 162 | } |
| 163 | |
| 164 | std::string Prog::Dump() { |
| 165 | if (did_flatten_) |