changeset 12:618c343f4a17

modifed_code_seg_name
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 09 Oct 2018 19:44:37 +0900
parents e08e6dca633f
children b0d43f1e6a04
files cbctools/change_OP_to_cbc.pl
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/cbctools/change_OP_to_cbc.pl	Tue Oct 09 16:17:01 2018 +0900
+++ b/cbctools/change_OP_to_cbc.pl	Tue Oct 09 19:44:37 2018 +0900
@@ -43,10 +43,10 @@
 
     if ($cbc_lines[$i] =~ /^\s+OP\((.*)\):/ ){
         my $opcode = $1;
-        push @dispatch,"${indent}OP($opcode):\n";
+        #push @dispatch,"${indent}OP($opcode):\n";
         $none_left_blanket = $cbc_lines[$i] =~ /{/ ? 0 : 1;
         # transrate OP(HOGE) to __code hoge(INTERP *i){
-        $cbc_lines[$i]  =  "__code ".$opcode."(INTERP i){\n";
+        $cbc_lines[$i]  =  "__code "."cbc_$opcode"."(INTERP i){\n";
         #$cbc_lines[$i]  = $indent. "__code ".$opcode."(INTERP i){\n";
         push @rewritec,$cbc_lines[$i];
 
@@ -87,7 +87,8 @@
 
 my @after = ();
 map { push @after,$cbc_lines[$_]} ($i+1.. scalar(@cbc_lines)-1);
-map { print; } (@upside,@rewritec,@middle,@dispatch,@after);
+#map { print; } (@upside,@rewritec,@middle,@dispatch,@after);
+map { print; } (@upside,@rewritec,@middle,@after);
 
 
 sub change_i {
@@ -96,7 +97,7 @@
     $str =~ s/tc/i->tc/g;
     $str =~ s/cur_callsite/i->cur_callsite/g;
     $str =~ s/NEXT;/NEXT(i);/;
-    $str =~ s/^\s{16}/    /g;
+    $str =~ s/                /    /g;
     return $str;
 }