changeset 572:3c35bcb82f08

mv Gears.pm to Gears/Context.pm
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 24 Nov 2019 22:59:13 +0900
parents d9c3bccaa13c
children 5f4b7ff18a34
files src/parallel_execution/auto_generate_context.pl src/parallel_execution/lib/Gears.pm src/parallel_execution/lib/Gears/Context.pm
diffstat 3 files changed, 64 insertions(+), 64 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/auto_generate_context.pl	Sun Nov 24 22:55:33 2019 +0900
+++ b/src/parallel_execution/auto_generate_context.pl	Sun Nov 24 22:59:13 2019 +0900
@@ -1,12 +1,12 @@
 #!/usr/bin/env perl
 use strict;
 use warnings;
-use Gears;
+use Gears::Context;
 use DDP {deparse => 1};
 
 my @cbc_files = <DATA>;
 chomp @cbc_files;
-my $gears = Gears->new(compile_sources => \@cbc_files);
+my $gears = Gears::Context->new(compile_sources => \@cbc_files);
 $gears->extraction_dg_compile_sources();
 $gears->search_data_gears();
 
--- a/src/parallel_execution/lib/Gears.pm	Sun Nov 24 22:55:33 2019 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-package Gears;
-
-use strict;
-use warnings;
-
-use Gears::Util;
-use DDP {deparse => 1};
-
-sub new {
-  my ($class, %args) = @_;
-  p %args;
-
-  my $self = {
-    interfaces => [],
-    data_gears_with_count => {},
-  };
-
-  if ($args{compile_sources}) {
-    $self->{compile_sources} = $args{compile_sources};
-    map { Gears::Util->file_checking($_); } @{$self->{compile_sources}};
-  }
-  return bless $self, $class;
-}
-
-sub extraction_dg_compile_sources {
-  my $self = shift;
-  map { $self->extraction_data_gears($_) } @{$self->{compile_sources}};
-}
-
-sub extraction_data_gears {
-  my ($self, $cbc_file)  = @_;
-  open my $fh , '<', $cbc_file;
-  while (my $line = <$fh>) {
-     if ($line =~ /#interface\s*"(.*)\.h"/) {
-        $self->{data_gears_with_count}->{$1}->{caller}->{$cbc_file}++;
-        push(@{$self->{interfaces}}, "$1.h");
-        next;
-     }
-
-     if ($line =~ /__code/) {
-       while ($line =~ /struct (\w+)*/g) {
-         $self->{data_gears_with_count}->{$1}->{caller}->{$cbc_file}++;
-       }
-     }
-  }
-  close $fh;
-}
-
-sub search_data_gears {
-  my $self = shift;
-  my @data_gears_name;
-  if (@_) {
-    @data_gears_name = @_;
-  } else {
-    @data_gears_name = keys %{$self->{data_gears_with_count}};
-  }
-  #my @data_gears_name =  keys %{$self->{data_gears_with_count}};
-  p @data_gears_name;
-}
-
-
-1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/parallel_execution/lib/Gears/Context.pm	Sun Nov 24 22:59:13 2019 +0900
@@ -0,0 +1,62 @@
+package Gears::Context;
+
+use strict;
+use warnings;
+
+use Gears::Util;
+use DDP {deparse => 1};
+
+sub new {
+  my ($class, %args) = @_;
+  p %args;
+
+  my $self = {
+    interfaces => [],
+    data_gears_with_count => {},
+  };
+
+  if ($args{compile_sources}) {
+    $self->{compile_sources} = $args{compile_sources};
+    map { Gears::Util->file_checking($_); } @{$self->{compile_sources}};
+  }
+  return bless $self, $class;
+}
+
+sub extraction_dg_compile_sources {
+  my $self = shift;
+  map { $self->extraction_data_gears($_) } @{$self->{compile_sources}};
+}
+
+sub extraction_data_gears {
+  my ($self, $cbc_file)  = @_;
+  open my $fh , '<', $cbc_file;
+  while (my $line = <$fh>) {
+     if ($line =~ /#interface\s*"(.*)\.h"/) {
+        $self->{data_gears_with_count}->{$1}->{caller}->{$cbc_file}++;
+        push(@{$self->{interfaces}}, "$1.h");
+        next;
+     }
+
+     if ($line =~ /__code/) {
+       while ($line =~ /struct (\w+)*/g) {
+         $self->{data_gears_with_count}->{$1}->{caller}->{$cbc_file}++;
+       }
+     }
+  }
+  close $fh;
+}
+
+sub search_data_gears {
+  my $self = shift;
+  my @data_gears_name;
+  if (@_) {
+    @data_gears_name = @_;
+  } else {
+    @data_gears_name = keys %{$self->{data_gears_with_count}};
+  }
+  #my @data_gears_name =  keys %{$self->{data_gears_with_count}};
+  p @data_gears_name;
+}
+
+
+1;