/ * codegen_exit_loop: Fix up loop stack when a loop is exited. Break statements * jump to the current file position. */
| 391 | * jump to the current file position. |
| 392 | */ |
| 393 | void codegen_exit_loop(void) |
| 394 | { |
| 395 | list_type p; |
| 396 | |
| 397 | /* Backpatch break statements to jump to end of loop */ |
| 398 | for (p = current_loop->break_list; p != NULL; p = p->next) |
| 399 | BackpatchGoto(outfile, *((int *)(&p->data)), FileCurPos(outfile)); |
| 400 | |
| 401 | /* Remove current list from loop "stack" */ |
| 402 | loop_stack = list_delete_first(loop_stack); |
| 403 | |
| 404 | /* Restore current_loop to correct state */ |
| 405 | current_loop = (loop_type) list_first_item(loop_stack); |
| 406 | } |
| 407 | /************************************************************************/ |
| 408 | /* |
| 409 | * codegen_while: Generate code for a while loop statement. |
no test coverage detected