/ * codegen_enter_loop: Fix up loop stack when a loop is entered. The top of the * loop is set to the current position in the file. */
| 370 | * loop is set to the current position in the file. |
| 371 | */ |
| 372 | void codegen_enter_loop(void) |
| 373 | { |
| 374 | list_type temp; |
| 375 | /* Loop info holds info needed to handle break and continue statements */ |
| 376 | loop_type loop_info = (loop_type) SafeMalloc(sizeof(loop_struct)); |
| 377 | |
| 378 | /* Make new loop_info structure and add it to the loop "stack" */ |
| 379 | loop_info->toppos = FileCurPos(outfile); |
| 380 | loop_info->break_list = NULL; |
| 381 | loop_info->for_continue_list = NULL; |
| 382 | current_loop = loop_info; |
| 383 | |
| 384 | /* Add new loop to front of list */ |
| 385 | temp = list_create( (void *) loop_info); |
| 386 | loop_stack = list_append(temp, loop_stack); |
| 387 | } |
| 388 | /************************************************************************/ |
| 389 | /* |
| 390 | * codegen_exit_loop: Fix up loop stack when a loop is exited. Break statements |
no test coverage detected