| 137 | } |
| 138 | |
| 139 | static std::string ProgToString(Prog* prog, Workq* q) { |
| 140 | std::string s; |
| 141 | for (Workq::iterator i = q->begin(); i != q->end(); ++i) { |
| 142 | int id = *i; |
| 143 | Prog::Inst* ip = prog->inst(id); |
| 144 | s += StringPrintf("%d. %s\n", id, ip->Dump().c_str()); |
| 145 | AddToQueue(q, ip->out()); |
| 146 | if (ip->opcode() == kInstAlt || ip->opcode() == kInstAltMatch) |
| 147 | AddToQueue(q, ip->out1()); |
| 148 | } |
| 149 | return s; |
| 150 | } |
| 151 | |
| 152 | static std::string FlattenedProgToString(Prog* prog, int start) { |
| 153 | std::string s; |
no test coverage detected