Schedules the instruction at nextPC to be executed in the next step. This method advances the current thread to the next program counter, to be executed after reading the next character. @param currentPC the current program counter @param nextPC the program counte
(int currentPC, int nextPC, ThreadQueue next)
| 181 | * same {@code nextPC} already) |
| 182 | */ |
| 183 | private boolean queueNext(int currentPC, int nextPC, ThreadQueue next) { |
| 184 | if (next.tail < 0) { |
| 185 | next.head = nextPC; |
| 186 | } else if (next.isScheduled(nextPC)) { |
| 187 | return false; |
| 188 | } else { |
| 189 | next.next[next.tail] = nextPC + 1; |
| 190 | } |
| 191 | next.offsets[nextPC] = offsets[currentPC]; |
| 192 | next.tail = nextPC; |
| 193 | return true; |
| 194 | } |
| 195 | |
| 196 | public void saveOffset(int pc, int index, int offset) { |
| 197 | offsets[pc][index] = offset + 1; |
no test coverage detected