Mercurial > hg > Members > Moririn
comparison src/parallel_execution/generate_stub.pl @ 424:3c6af75b13d4
fix RedBlackTree.cbc
author | mir3636 |
---|---|
date | Fri, 06 Oct 2017 18:00:28 +0900 |
parents | d839c9cb7c83 |
children | 481fce540daf |
comparison
equal
deleted
inserted
replaced
423:71dbdb27cb51 | 424:3c6af75b13d4 |
---|---|
479 } elsif (/^(.*)goto (\w+)\((.*)\);/) { | 479 } elsif (/^(.*)goto (\w+)\((.*)\);/) { |
480 # handling goto statement | 480 # handling goto statement |
481 # convert it to the meta call form with two arugments, that is context and enum Code | 481 # convert it to the meta call form with two arugments, that is context and enum Code |
482 my $prev = $1; | 482 my $prev = $1; |
483 my $next = $2; | 483 my $next = $2; |
484 my @args = split(/,/,$3); | 484 my @args = split(/, /,$3); |
485 my $v = 0; | 485 my $v = 0; |
486 for my $n ( @{$dataGearVar{$codeGearName}} ) { | 486 for my $n ( @{$dataGearVar{$codeGearName}} ) { |
487 # continuation arguments | 487 # continuation arguments |
488 $v = 1 if ( $n eq $next); | 488 $v = 1 if ( $n eq $next); |
489 } | 489 } |
504 next; | 504 next; |
505 } | 505 } |
506 if ($inParGoto) { | 506 if ($inParGoto) { |
507 print $fd "${prev}taskManager->tasks = context->tasks;\n"; | 507 print $fd "${prev}taskManager->tasks = context->tasks;\n"; |
508 print $fd "${prev}taskManager->next1 = C_$next;\n"; | 508 print $fd "${prev}taskManager->next1 = C_$next;\n"; |
509 print $fd "${prev}goto meta(context, C_$next);\n"; | |
510 next; | |
511 } elsif ($next eq "meta") { | |
512 print $fd $_; | |
513 next; | |
514 } else { | |
509 print $fd "${prev}goto meta(context, C_$next);\n"; | 515 print $fd "${prev}goto meta(context, C_$next);\n"; |
510 next; | 516 next; |
511 } | 517 } |
512 } elsif(/^}/) { | 518 } elsif(/^}/) { |
513 $inParGoto = 0; | 519 $inParGoto = 0; |