@@ -1457,6 +1457,7 @@ generate_item
1457
1457
func_unit* funit = db_get_tfn_by_position( @1.first_line, @1.first_column );
1458
1458
assert( funit != NULL );
1459
1459
generator_push_funit( funit );
1460
+ generator_create_tmp_regs();
1460
1461
}
1461
1462
generate_item_list_opt K_end
1462
1463
{
@@ -1481,6 +1482,7 @@ generate_item
1481
1482
func_unit* funit = db_get_tfn_by_position( @1.first_line, @1.first_column );
1482
1483
assert( funit != NULL );
1483
1484
generator_push_funit( funit );
1485
+ generator_create_tmp_regs();
1484
1486
}
1485
1487
generate_item_list_opt K_end
1486
1488
{
@@ -1494,11 +1496,13 @@ generate_item
1494
1496
func_unit* funit = db_get_tfn_by_position( @11.first_line, @11.first_column );
1495
1497
assert( funit != NULL );
1496
1498
generator_push_funit( funit );
1499
+ generator_create_tmp_regs();
1497
1500
}
1498
1501
generate_item_list_opt K_end
1499
1502
{
1500
1503
func_unit* funit = db_get_tfn_by_position( @11.first_line, @11.first_column );
1501
1504
assert( funit != NULL );
1505
+ generator_pop_funit();
1502
1506
$$ = generator_build( 17, strdup_safe( "for(" ), $3, strdup_safe( ";" ), $5, strdup_safe( ";" ), $7, strdup_safe( ")" ), "\n", strdup_safe( "begin : " ), $11, "\n",
1503
1507
generator_inst_id_reg( funit ), "\n", generator_tmp_regs(), $13, strdup_safe( "end" ), "\n" );
1504
1508
}
@@ -3858,7 +3862,6 @@ inc_for_depth
3858
3862
{
3859
3863
func_unit* funit = db_get_tfn_by_position( @$.first_line, (@$.first_column - 3) );
3860
3864
assert( funit != NULL );
3861
- printf( "In inc_for_depth, first_line: %d, first_column: %d, funit->name: %s\n", @$.first_line, (@$.first_column - 3), funit->name );
3862
3865
generator_push_funit( funit );
3863
3866
}
3864
3867
;
0 commit comments