Mercurial > hg > GearsTemplate
comparison src/parallel_execution/trans_impl.pl @ 585:b2157a88e0ef
tweak trans_impl
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 03 Dec 2019 08:21:48 +0900 |
parents | 823503ada47f |
children |
comparison
equal
deleted
inserted
replaced
584:823503ada47f | 585:b2157a88e0ef |
---|---|
115 $instance_impl =~ s/([A-Z])/_\l$1/g; | 115 $instance_impl =~ s/([A-Z])/_\l$1/g; |
116 my $data_gear_types = {}; | 116 my $data_gear_types = {}; |
117 | 117 |
118 if (defined $impl_ir->{codes}) { | 118 if (defined $impl_ir->{codes}) { |
119 for my $cg (@{$impl_ir->{codes}}) { | 119 for my $cg (@{$impl_ir->{codes}}) { |
120 my $data_gears = $cg->{args}; | |
120 while ($data_gears =~ /Type\*\s*(\w+),/g) { | 121 while ($data_gears =~ /Type\*\s*(\w+),/g) { |
121 $data_gears =~ s/Type\*/struct $impl*/; | 122 $data_gears =~ s/Type\*/struct $impl*/; |
122 } | 123 } |
123 | 124 |
124 while ($data_gears =~ /Isa\*\s*(\w+),/g) { | 125 while ($data_gears =~ /Isa\*\s*(\w+),/g) { |
125 $data_gears =~ s/Isa\*/struct $inter_name*/; | 126 $data_gears =~ s/Isa\*/struct $interface_name*/; |
126 } | 127 } |
127 print $out "__code $code_ir->{name}$impl("; | 128 print $out "__code $cg->{name}$impl("; |
128 print $out "$data_gears) {\n\n"; | 129 print $out "$data_gears) {\n\n"; |
129 | 130 |
130 #__code next(...), __code whenEmpty(...) | 131 #__code next(...), __code whenEmpty(...) |
131 my @cg = (); | 132 my @cg = (); |
132 while ($data_gears =~ /__code ([\w(\.)\*\s,]+?\)),?/g) { | 133 while ($data_gears =~ /__code ([\w(\.)\*\s,]+?\)),?/g) { |