[svn:parrot] r44899 - branches/ops_pct/compilers/opsc/src/Ops

cotto at svn.parrot.org cotto at svn.parrot.org
Fri Mar 12 07:48:55 UTC 2010


Author: cotto
Date: Fri Mar 12 07:48:54 2010
New Revision: 44899
URL: https://trac.parrot.org/parrot/changeset/44899

Log:
[opsc] remove unused and inefficient method

Modified:
   branches/ops_pct/compilers/opsc/src/Ops/Op.pm

Modified: branches/ops_pct/compilers/opsc/src/Ops/Op.pm
==============================================================================
--- branches/ops_pct/compilers/opsc/src/Ops/Op.pm	Fri Mar 12 07:34:43 2010	(r44898)
+++ branches/ops_pct/compilers/opsc/src/Ops/Op.pm	Fri Mar 12 07:48:54 2010	(r44899)
@@ -256,74 +256,6 @@
     return $prelude ~ self.get_body( $trans );
 }
 
-
-# Called from rewrite_body() to perform the actual substitutions.
-method substitute($str, $trans) {
-
-
-    #also needed:
-    #s/OP_SIZE/ self.size /g;
-    $str := subst($str, /'OP_SIZE'/, self.size);
-
-    #my $rewrote_access = s/{{\@([^{]*?)}}/   $trans->access_arg($self->arg_type($1 - 1), $1, $self); /me;
-
-    $str := subst($str,
-        /'{{@' $<op_num>=[<digit>+] '}}'/,
-        -> $m { $trans.access_arg( self.arg_type(+$m<op_num> - 1), +$m<op_num>) }
-    );
-
-    #s/{{=0,=([^{]*?)}}/   $trans->restart_address($1) . "; {{=0}}"; /me;
-    $str := subst($str,
-        /'{{=0,=' $<addr>=[<-[{]>*?] '}}'/,
-        -> $m { $trans.restart_address($m<addr>) ~ '; {{=0}}' }
-    );
-
-    #s/{{=0,\+=([^{]*?)}}/ $trans->restart_offset($1)  . "; {{=0}}"; /me;
-    $str := subst($str,
-        /'{{=0,+=' $<offset>=[<-[{]>*?] '}}'/,
-        -> $m { $trans.restart_offset($m<offset>) ~ '; {{=0}}' }
-    );
-
-    #s/{{=([^*][^{]*?)}}/  $trans->goto_address($1); /me;
-    $str := subst($str,
-        /'{{=' $<addr>=[<-[{]>*?] '}}'/,
-        -> $m { $trans.goto_address($m<addr>) }
-    );
-
-    #s/{{\+=([^{]*?)}}/    $trans->goto_offset($1);  /me;
-    $str := subst($str,
-        /'{{+=' $<offset>=[<-[{]>*?] '}}'/,
-        -> $m { $trans.goto_offset($m<offset>) }
-    );
-
-    #s/{{\^(-?\d+)}}/      $1                        /me;
-    $str := subst($str,
-        /'{{^' $<addr>=[ <digit>+] '}}'/,
-        -> $m { $m<addr> }
-    );
-
-    #s/{{\^\+([^{]*?)}}/   $trans->expr_offset($1);  /me;
-    $str := subst($str,
-        /'{{^+' $<offset>=[<-[{]>*?] '}}'/,
-        -> $m { $trans.expr_offset($m<offset>) }
-    );
-
-    #s/{{\^([^{]*?)}}/     $trans->expr_address($1); /me;
-    $str := subst($str,
-        /'{{^' $<addr>=[<-[{]>*?] '}}'/,
-        -> $m { $trans.expr_address($m<addr>) }
-    );
-
-=begin COMMENT
-
-    #XXX: die "Argument access not allowed in preamble\n"
-    #XXX: if $preamble_only && $rewrote_access;
-
-=end COMMENT
-
-    $str;
-}
-
 =begin
 
 =item C<get_body($trans)>


More information about the parrot-commits mailing list