comparison src/parallel_execution/generate_stub.pl @ 388:8940d1451a0d

handle local continuation
author masataka
date Sat, 29 Jul 2017 19:08:25 +0900
parents 590f03af1a2c
children d9a7620a1106
comparison
equal deleted inserted replaced
387:590f03af1a2c 388:8940d1451a0d
373 # handling goto statement 373 # handling goto statement
374 # convert it to the meta call form with two arugments, that is context and enum Code 374 # convert it to the meta call form with two arugments, that is context and enum Code
375 my $prev = $1; 375 my $prev = $1;
376 my $next = $2; 376 my $next = $2;
377 my @args = split(/,/,$3); 377 my @args = split(/,/,$3);
378 if (defined $code{$interface}->{$next}) { 378 my $v = 0;
379 for my $n ( @{$dataGearVar{$codeGearName}} ) {
380 # continuation arguments
381 $v = 1 if ( $n eq $next);
382 }
383 if ($v || defined $code{$interface}->{$next}) {
379 # write continuation's arguments into the interface arguments 384 # write continuation's arguments into the interface arguments
380 # we may need a commit for a shared DataGear 385 # we may need a commit for a shared DataGear
381 for my $arg ( @{$outputArgs{$codeGearName}->{$next}} ) { 386 for my $arg ( @{$outputArgs{$codeGearName}->{$next}} ) {
382 my $v = shift(@args); 387 my $v = shift(@args);
383 print $fd "\t*O_$arg = $v;\n"; 388 print $fd "\t*O_$arg = $v;\n";