Mercurial > hg > Gears > Gears
changeset 686:3c37a86646ce
remove new line in intermediate structure
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 21 Aug 2020 14:29:43 +0900 |
parents | aa49b27140df |
children | 90a35ebecac5 |
files | src/parallel_execution/lib/Gears/Context.pm src/parallel_execution/lib/Gears/Util.pm |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/lib/Gears/Context.pm Fri Aug 21 11:37:21 2020 +0900 +++ b/src/parallel_execution/lib/Gears/Context.pm Fri Aug 21 14:29:43 2020 +0900 @@ -228,11 +228,13 @@ for my $c (@var) { $c =~ s/$content_space//; $context .= "${space}${space}$c"; + $context .= "\n"; } for my $c (@enumCodes) { $c =~ s/$content_space//; $context .= "${space}${space}$c"; + $context .= "\n"; } $context .= "${space}} $h2context->{name};\n";
--- a/src/parallel_execution/lib/Gears/Util.pm Fri Aug 21 11:37:21 2020 +0900 +++ b/src/parallel_execution/lib/Gears/Util.pm Fri Aug 21 14:29:43 2020 +0900 @@ -102,6 +102,7 @@ my @tmp_args; while ($line = <$fh>) { + chomp $line; if ($line =~ m|\s*/\*|) { while ( $line !~ m|\*/|) { $line = <$fh>; @@ -114,7 +115,7 @@ next if ($line =~ m[^\}\s*$ir->{name};]); if ($line =~ m|__code (\w+)|) { - push(@tmp_args,"enum Code $1;\n"); + push(@tmp_args,"enum Code $1;"); next if $static_data_gear_write_mode; my $args = $'; #$args eq (Impl* vm, pde_t* pgdir, char* init, uint sz, __code next(...)); @@ -125,7 +126,7 @@ next if ($type eq '__code'); next unless $vname; # __code hoge(int ret, __code next(ret, ...); this is second "ret" case $type =~ s/^(?:Impl|Type|Isa)\s*(\*)?/union Data$1/; - my $val = "$type $vname;\n"; + my $val = "$type $vname;"; push(@tmp_args, $const_type ? "$const_type $val" : $val); } next;