Mercurial > hg > GearsTemplate
annotate src/parallel_execution/generate_stub.pl @ 382:f1d111e293c4
Enable Timer for bitonicSort
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 Jul 2017 20:05:08 +0900 |
parents | b4677965afa7 |
children | 300c18700ca5 |
rev | line source |
---|---|
194 | 1 #!/usr/bin/perl |
2 | |
250 | 3 use strict; |
254 | 4 use Getopt::Std; |
250 | 5 |
194 | 6 # interface.cbc |
7 # typedef struct Worker { | |
8 # int id; | |
9 # struct Context* contexts; | |
10 # enum Code execute; | |
11 # enum Code taskSend; | |
12 # enum Code taskRecive; | |
13 # enum Code shutdown; | |
14 # struct Queue* tasks; | |
15 # } Worker; | |
16 | |
255 | 17 our($opt_o,$opt_d,$opt_h); |
18 getopts('o:d:h'); | |
19 | |
20 my $dir = "."; | |
21 if ($opt_d) { | |
22 $dir = $opt_d; | |
23 if (! -d $dir) { | |
24 mkdir $dir; | |
25 } | |
26 } | |
254 | 27 |
28 for my $fn (@ARGV) { | |
255 | 29 next if ($fn !~ /\.cbc$/); |
249 | 30 &getDataGear($fn); |
31 &generateDataGear($fn); | |
194 | 32 } |
33 | |
250 | 34 my %var; |
35 my %code; | |
36 my %dataGearVar; | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
37 my %outputVar; # output var initializer |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
38 my %outputArgs; # continuation's output variables |
250 | 39 my %dataGear; |
40 my %dataGearName; | |
377 | 41 my %generic; |
42 my %dataGearVarType; | |
253 | 43 my $implementation; |
44 my $interface; | |
250 | 45 |
377 | 46 # interface definision |
47 # | |
48 # typedef struct Stack<Type, Impl>{ | |
49 # Type* stack; | |
50 # Type* data; | |
51 # Type* data1; | |
52 # __code whenEmpty(...); | |
53 # __code clear(Impl* stack,__code next(...)); | |
54 # __code push(Impl* stack,Type* data, __code next(...)); | |
55 # __code pop(Impl* stack, __code next(Type*, ...)); | |
56 # __code pop2(Impl* stack, Type** data, Type** data1, __code next(Type**, Type**, ...)); | |
57 # __code isEmpty(Impl* stack, __code next(...), __code whenEmpty(...)); | |
58 # __code get(Impl* stack, Type** data, __code next(...)); | |
59 # __code get2(Impl* stack,..., __code next(...)); | |
60 # __code next(...); | |
61 # } Stack; | |
62 # | |
63 # calling example | |
64 # | |
65 # goto nodeStack->push((union Data*)node, stackTest3); | |
66 # | |
67 # generated meta level code | |
68 # | |
69 # Gearef(context, Stack)->stack = nodeStack->stack; | |
70 # Gearef(context, Stack)->data = (union Data*)node; | |
71 # Gearef(context, Stack)->next = C_stackTest3; | |
72 # goto meta(context, nodeStack->push); | |
73 | |
194 | 74 sub getDataGear { |
75 my ($filename) = @_; | |
253 | 76 my ($codeGearName, $name, $inTypedef); |
194 | 77 open my $fd,"<",$filename or die("can't open $filename $!"); |
78 while (<$fd>) { | |
79 if (! $inTypedef) { | |
377 | 80 if (/^typedef struct (\w+)\s*<(.*)>/) { |
194 | 81 $inTypedef = 1; |
82 $name = $1; | |
83 $dataGear{$name} = $_; | |
259
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
84 $var{$name} = {}; |
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
85 $code{$name} = {}; |
377 | 86 $generic{$name} = \split(/,/,$2); |
87 } elsif (/^typedef struct (\w+)/) { | |
88 $inTypedef = 1; | |
89 $name = $1; | |
90 $dataGear{$name} = $_; | |
91 $var{$name} = {}; | |
92 $code{$name} = {}; | |
93 $generic{$name} = []; | |
269 | 94 } elsif (/^(\w+)(\*)+ create(\w+)\(/) { |
249 | 95 if (defined $interface) { |
96 die "duplicate interface $interface\n"; | |
97 } | |
98 $interface = $1; | |
269 | 99 $implementation = $3; |
250 | 100 if ( -f "$interface.cbc") { |
101 &getDataGear("$interface.cbc"); | |
102 } | |
226 | 103 } |
194 | 104 next; |
105 } | |
249 | 106 # gather type name and type |
194 | 107 $dataGear{$name} .= $_; |
259
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
108 if (/^\s*(.*)\s+(\w+);$/ ) { |
280 | 109 my $ttype = $1; |
110 my $tname = $2; | |
111 if ($ttype =~ /^(union|struct) (\w+)/) { | |
112 $ttype = $2; | |
113 } | |
114 $var{$name}->{$tname} = $ttype; | |
377 | 115 } elsif (/^\_\_code (\w+)\((.*)\)(.*)/) { |
116 my $args = $2; | |
117 my $method = $1; | |
118 $code{$name}->{$method} = []; | |
119 while($args) { | |
120 if ($args =~ s/(^\s*,\s*)//) { | |
121 } | |
122 # continuation case | |
123 if ($args =~ s/^(\s)*\_\_code\s+(\w+)\(([^)]*)\)//) { | |
124 my $next = $2; | |
125 my @args = split(/,/,$3); | |
126 push(@{$code{$name}->{$method}},$next); | |
127 } elsif ($args =~ s/^(struct|union) (\w+)(\*)+\s(\w+)//) { | |
128 my $structType = $1; | |
129 my $typeName = $2; | |
130 my $varName = $4; | |
131 my $typeField = lcfirst($typeName); | |
132 push(@{$code{$name}->{$method}},$varName); | |
133 } elsif ($args =~ s/(.*,)//) { | |
134 } else { | |
135 last; | |
136 } | |
137 } | |
250 | 138 } |
194 | 139 if (/^}/) { |
140 $inTypedef = 0; | |
141 } | |
142 } | |
143 } | |
144 | |
250 | 145 sub generateStub { |
251 | 146 my($fd,$prevCodeGearName,$dataGearName) = @_; |
274 | 147 print $fd "__code ", $prevCodeGearName ,"_stub(struct Context* context) {\n"; |
251 | 148 print $fd $dataGearName; |
250 | 149 print $fd "\n} \n\n"; |
251 | 150 return 1; |
250 | 151 } |
152 | |
253 | 153 sub generateStubArgs { |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
154 my($codeGearName, $varName, $typeName, $typeField, $interface,$output) = @_; |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
155 my $varname1 = $output?"O_$varName":$varName; |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
156 for my $n ( @{$dataGearVar{$codeGearName}} ) { |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
157 # we already have it |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
158 return 0 if ( $n eq $varname1); |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
159 } |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
160 push @{$dataGearVar{$codeGearName}}, $varname1; |
377 | 161 push @{$dataGearVarType{$codeGearName}}, $typeName; |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
162 if ($typeName eq $implementation) { |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
163 # get implementation |
258 | 164 $dataGearName{$codeGearName} .= "\t$typeName* $varName = ($typeName*)GearImpl(context, $interface, $varName);\n"; |
253 | 165 } else { |
259
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
166 for my $ivar (keys %{$var{$interface}}) { |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
167 # input data gear field |
253 | 168 if ($varName eq $ivar) { |
280 | 169 if ($typeName eq $var{$interface}->{$ivar}) { |
170 if ($output) { | |
171 $dataGearName{$codeGearName} .= "\t$typeName** O_$varName = &Gearef(context, $interface)->$varName;\n"; | |
172 $outputVar{$codeGearName} .= "\t$typeName* $varName;\n"; | |
173 return 1; | |
174 } | |
175 | |
176 $dataGearName{$codeGearName} .= "\t$typeName* $varName = Gearef(context, $interface)->$varName;\n"; | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
177 return 1; |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
178 } |
253 | 179 } |
180 } | |
259
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
181 for my $cName (keys %{$code{$interface}}) { |
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
182 if ($varName eq $cName) { |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
183 # continuation field |
259
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
184 $dataGearName{$codeGearName} .= "\tenum Code $varName = Gearef(context, $interface)->$varName;\n"; |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
185 return 1; |
253 | 186 } |
187 } | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
188 # global variable case |
268 | 189 $dataGearName{$codeGearName} .= "\t$typeName* $varName = Gearef(context, $typeName);\n"; |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
190 return 1; |
253 | 191 } |
192 } | |
193 | |
194 | 194 sub generateDataGear { |
249 | 195 my ($filename) = @_; |
196 open my $in,"<",$filename or die("can't open $filename $!"); | |
254 | 197 |
198 my $fn; | |
199 if ($opt_o) { | |
200 $fn = $opt_o; | |
201 } else { | |
202 my $fn1 = $filename; | |
203 $fn1 =~ s/\.cbc/.c/; | |
204 my $i = 1; | |
255 | 205 $fn = "$dir/$fn1"; |
254 | 206 while ( -f $fn) { |
255 | 207 $fn = "$dir/$fn1.$i"; |
254 | 208 $i++; |
209 } | |
250 | 210 } |
259
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
211 if ( $fn =~ m=(.*)/[^/]+$= ) { |
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
212 if (! -d $1) { |
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
213 mkdir $1; |
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
214 } |
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
215 } |
249 | 216 open my $fd,">",$fn or die("can't write $fn $!"); |
254 | 217 |
249 | 218 my $prevCodeGearName; |
250 | 219 my $inTypedef = 0; |
278 | 220 my $inStub = 0; |
250 | 221 my %stub; |
251 | 222 my $codeGearName; |
254 | 223 |
249 | 224 while (<$in>) { |
278 | 225 if (! $inTypedef && ! $inStub) { |
249 | 226 if (/^typedef struct (\w+) {/) { |
227 $inTypedef = 1; | |
253 | 228 } elsif (/^\_\_code (\w+)\((.*)\)(.*)/) { |
251 | 229 $codeGearName = $1; |
253 | 230 my $args = $2; |
231 my $tail = $3; | |
250 | 232 if ($codeGearName =~ /_stub$/) { |
262 | 233 # don't touch already existing stub |
278 | 234 $inStub = 1; |
250 | 235 $stub{$codeGearName} = 1; |
236 print $fd $_; | |
237 next; | |
238 } | |
249 | 239 if (defined $prevCodeGearName) { |
262 | 240 # stub is generated just before next CodeGear |
250 | 241 if (defined $stub{$prevCodeGearName."_stub"}) { |
242 undef $prevCodeGearName; | |
278 | 243 } else { |
244 &generateStub($fd,$prevCodeGearName,$dataGearName{$prevCodeGearName}); | |
245 $stub{$prevCodeGearName."_stub"} = 1; | |
250 | 246 } |
249 | 247 } |
262 | 248 # analyzing CodeGear argument |
249 # these arguments are extract from current context's arugment DataGear Interface | |
250 # and passed to the CodeGear | |
251 # struct Implementaion needs special handling | |
252 # __code next(...) ---> enum Code next | |
253 | 253 $prevCodeGearName = $codeGearName; |
254 $dataGearVar{$codeGearName} = []; | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
255 $outputVar{$codeGearName} = ""; |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
256 $outputArgs{$codeGearName} = {}; |
259
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
257 my $newArgs = "struct Context *context,"; |
305 | 258 if ($args=~/^struct Context\s*\*\s*context/) { |
259 $newArgs = ""; | |
260 } | |
253 | 261 while($args) { |
262 if ($args =~ s/(^\s*,\s*)//) { | |
263 $newArgs .= $1; | |
264 } | |
262 | 265 # continuation case |
280 | 266 if ($args =~ s/^(\s)*\_\_code\s+(\w+)\(([^)]*)\)//) { |
267 my $next = $2; | |
268 my @args = split(/,/,$3); | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
269 if ( &generateStubArgs($codeGearName, $next, "Code", $next, $interface,0) ) { |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
270 $newArgs .= "enum Code $next"; |
258 | 271 } |
262 | 272 # analyze continuation arguments |
273 # output arguments are defined in the Interface take the pointer of these | |
274 # output arguments are put into the Interface DataGear just before the goto | |
253 | 275 for my $arg (@args) { |
276 $arg =~ s/^\s*//; | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
277 last if ($arg =~ /\.\.\./); |
253 | 278 $arg =~ s/^(struct|union) (\w+)(\*)+\s(\w+)//; |
279 my $structType = $1; | |
280 my $typeName = $2; | |
281 my $varName = $4; | |
282 my $typeField = lcfirst($typeName); | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
283 push(@{$outputArgs{$codeGearName}->{$next}}, $varName); |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
284 if (&generateStubArgs($codeGearName, $varName, $typeName, $typeField, $interface,1)) { |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
285 $newArgs .= ",$structType $typeName **O_$varName"; |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
286 } |
253 | 287 } |
288 } elsif ($args =~ s/^(struct|union) (\w+)(\*)+\s(\w+)//) { | |
289 my $structType = $1; | |
290 my $typeName = $2; | |
291 my $varName = $4; | |
292 my $typeField = lcfirst($typeName); | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
293 $newArgs .= $&; # assuming no duplicate |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
294 &generateStubArgs($codeGearName, $varName, $typeName, $typeField, $interface,0); |
255 | 295 } elsif ($args =~ s/(.*,)//) { |
296 $newArgs .= $1; | |
297 } else { | |
298 $newArgs .= $args; | |
299 last; | |
253 | 300 } |
301 } | |
262 | 302 # generate goto statement from stub to the CodeGear in the buffer |
253 | 303 $dataGearName{$codeGearName} .= "\tgoto $codeGearName(context"; |
304 for my $arg ( @{$dataGearVar{$codeGearName}}) { | |
305 $dataGearName{$codeGearName} .= ", $arg"; | |
306 } | |
307 $dataGearName{$codeGearName} .= ");"; | |
262 | 308 # generate CodeGear header with new arguments |
253 | 309 print $fd "__code $codeGearName($newArgs)$tail\n"; |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
310 if ($outputVar{$codeGearName} ne "") { |
324 | 311 # output data var can be use before write |
312 # it should be initialze by gearef | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
313 print $fd $outputVar{$codeGearName}; |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
314 } |
250 | 315 next; |
377 | 316 } elsif (/^(.*)goto (\w+)\-\>(\w+)\((.*)\);/) { |
317 # handling goto statement | |
318 # convert it to the meta call form with two arugments, that is context and enum Code | |
319 my $prev = $1; | |
320 my $next = $2; | |
321 my $method = $3; | |
322 my @args = split(/,/,$4); | |
323 my @types = @{$dataGearVarType{$codeGearName}}; | |
324 my $ntype; | |
325 for my $v (@{$dataGearVar{$codeGearName}}) { | |
326 my $t = shift @types; | |
327 if ($v eq $next) { | |
328 $ntype = $t; | |
329 } | |
330 } | |
331 print $fd "\tGearef(context, $ntype)->$next = $next->$next;\n"; | |
332 # Put interface argument | |
333 my $prot = $code{$ntype}->{$method}; | |
334 for my $arg (@args) { | |
335 my $p = shift @$prot; | |
336 next if ($p eq $arg); | |
337 print $fd "\tGearef(context, $ntype)->$p = $arg;\n"; | |
338 } | |
339 print $fd "${prev}goto meta(context, $next->$next->$ntype.$method);\n"; | |
340 next; | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
341 } elsif (/^(.*)goto (\w+)\((.*)\);/) { |
278 | 342 # handling goto statement |
262 | 343 # convert it to the meta call form with two arugments, that is context and enum Code |
250 | 344 my $prev = $1; |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
345 my $next = $2; |
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
346 my @args = split(/,/,$3); |
278 | 347 if (defined $code{$interface}->{$next}) { |
348 # write continuation's arguments into the interface arguments | |
349 # we may need a commit for a shared DataGear | |
350 for my $arg ( @{$outputArgs{$codeGearName}->{$next}} ) { | |
351 my $v = shift(@args); | |
352 print $fd "\t*O_$arg = $v;\n"; | |
353 } | |
354 print $fd "${prev}goto meta(context, $next);\n"; | |
355 next; | |
260
6b5444bbea8a
generated stub no comiple errors
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
356 } |
259
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
357 } else { |
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
358 s/new\s+(\w+)\(\)/\&ALLOCATE(context, \1)->\1/g; # replacing new |
249 | 359 } |
360 # gather type name and type | |
259
195518ab62fc
fix type gathering pattern match in generate_stub.pl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
361 } elsif (/^}/) { |
278 | 362 $inStub = 0; |
249 | 363 $inTypedef = 0; |
364 } | |
250 | 365 print $fd $_; |
194 | 366 } |
250 | 367 if (defined $prevCodeGearName) { |
368 if (!defined $stub{$prevCodeGearName."_stub"}) { | |
251 | 369 $stub{$prevCodeGearName."_stub"} = &generateStub($fd,$prevCodeGearName,$dataGearName{$codeGearName}); |
250 | 370 } |
228 | 371 } |
194 | 372 } |
373 | |
374 # end |