changeset 356:62b7dbe7f88e

fix error
author mir3636
date Fri, 23 Jun 2017 17:53:14 +0900
parents 45afe5d70956
children 4ae1eebccbd1
files src/parallel_execution/SingleLinkedStack.cbc src/parallel_execution/generate_stub.pl
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/SingleLinkedStack.cbc	Thu Jun 22 16:20:56 2017 +0900
+++ b/src/parallel_execution/SingleLinkedStack.cbc	Fri Jun 23 17:53:14 2017 +0900
@@ -6,9 +6,9 @@
 // } SingleLinkedStack;
 
 Stack* createSingleLinkedStack(struct Context* context) {
-    struct Stack* stack = new Stack();
+    struct Stack* ctack = new Stack();
     struct SingleLinkedStack* singleLinkedStack = new SingleLinkedStack();
-    stack->stack = (union Data*)singleLinkedStack;
+    ctack->stack = (union Data*)singleLinkedStack;
     singleLinkedStack->top = NULL;
     stack->push = C_pushSingleLinkedStack;
     stack->pop  = C_popSingleLinkedStack;
--- a/src/parallel_execution/generate_stub.pl	Thu Jun 22 16:20:56 2017 +0900
+++ b/src/parallel_execution/generate_stub.pl	Fri Jun 23 17:53:14 2017 +0900
@@ -38,6 +38,8 @@
 my %outputArgs;      # continuation's output variables
 my %dataGear;
 my %dataGearName;
+my %generic;
+my %dataGearVarType;
 my $implementation;
 my $interface;
 
@@ -318,9 +320,9 @@
                 my $next = $2;
                 my $method = $3;
                 my @args = split(/,/,$4);
-                my @types = @$dataGearVarType;
+                my @types = @{$dataGearVarType{$codeGearName}};
                 my $ntype;
-                for my $v (@$dataGearVar) {
+                for my $v (@{$dataGearVar{$codeGearName}}) {
                     my $t = shift @types;
                     if ($v eq $next) {
                         $ntype = $t;
@@ -328,7 +330,7 @@
                 }
                 print $fd "\tGearef(context, $ntype)->$next = $next->$next;\n";
                 # Put interface argument 
-                my $prot = $code->{$method};
+                my $prot = $code{$ntype}->{$method};
                 for my $arg (@args) {
                     my $p = shift @$prot;
                     next if ($p eq $arg);