[svn:parrot] r44615 - in trunk: compilers/imcc include/parrot lib/Parrot

cotto at svn.parrot.org cotto at svn.parrot.org
Thu Mar 4 03:47:24 UTC 2010


Author: cotto
Date: Thu Mar  4 03:47:20 2010
New Revision: 44615
URL: https://trac.parrot.org/parrot/changeset/44615

Log:
[ops] remove used but unnecessary PARROT_JUMP_ENEXT

Modified:
   trunk/compilers/imcc/parser_util.c
   trunk/include/parrot/op.h
   trunk/lib/Parrot/OpsFile.pm

Modified: trunk/compilers/imcc/parser_util.c
==============================================================================
--- trunk/compilers/imcc/parser_util.c	Thu Mar  4 03:28:13 2010	(r44614)
+++ trunk/compilers/imcc/parser_util.c	Thu Mar  4 03:47:20 2010	(r44615)
@@ -548,7 +548,7 @@
         }
     }
 
-    if (op_info->jump && op_info->jump != PARROT_JUMP_ENEXT) {
+    if (op_info->jump) {
         ins->type |= ITBRANCH;
         /* TODO use opnum constants */
         if (STREQ(name, "branch")

Modified: trunk/include/parrot/op.h
==============================================================================
--- trunk/include/parrot/op.h	Thu Mar  4 03:28:13 2010	(r44614)
+++ trunk/include/parrot/op.h	Thu Mar  4 03:47:20 2010	(r44615)
@@ -52,8 +52,7 @@
 /* See lib/Parrot/OpsFile.pm if the names of these values change */
 typedef enum {
     PARROT_JUMP_RELATIVE = 1,
-    PARROT_JUMP_ADDRESS  = 2,
-    PARROT_JUMP_ENEXT    = 4
+    PARROT_JUMP_ADDRESS  = 2
 } op_jump_t;
 
 /* NOTE: Sure wish we could put the types here... */

Modified: trunk/lib/Parrot/OpsFile.pm
==============================================================================
--- trunk/lib/Parrot/OpsFile.pm	Thu Mar  4 03:28:13 2010	(r44614)
+++ trunk/lib/Parrot/OpsFile.pm	Thu Mar  4 03:47:20 2010	(r44615)
@@ -460,7 +460,6 @@
     my $absolute = 0;
     my $branch   = 0;
     my $pop      = 0;
-    my $next     = 0;
     my $restart  = 0;
 
     if (exists($$flags{deprecated})) {
@@ -524,8 +523,8 @@
         $branch   ||= $body =~ s/\bgoto\s+OFFSET\((.*?)\)/{{+=$1}}/mg;
                       $body =~ s/\bexpr\s+OFFSET\((.*?)\)/{{^+$1}}/mg;
 
-        $next     ||= $short_name =~ /runinterp/;
-        $next     ||= $body =~ s/\bexpr\s+NEXT\(\)/{{^+$op_size}}/mg;
+        $short_name =~ /runinterp/;
+        $body =~ s/\bexpr\s+NEXT\(\)/{{^+$op_size}}/mg;
                       $body =~ s/\bgoto\s+NEXT\(\)/{{+=$op_size}}/mg;
 
         $body =~ s/\bOP_SIZE\b/{{^$op_size}}/mg;
@@ -536,10 +535,8 @@
         }
         elsif ( $body =~ s/\brestart\s+NEXT\(\)/{{=0,+=$op_size}}/mg ) {
             $restart = 1;
-            $next    = 1;
         }
         elsif ( $body =~ s/\brestart\s+ADDRESS\((.*?)\)/{{=$1}}/mg ) {
-            $next    = 0;
             $restart = 1;
         }
 
@@ -560,7 +557,6 @@
         # Constants here are defined in include/parrot/op.h
         or_flag( \$jumps, "PARROT_JUMP_ADDRESS"  ) if $absolute;
         or_flag( \$jumps, "PARROT_JUMP_RELATIVE" ) if $branch;
-        or_flag( \$jumps, "PARROT_JUMP_ENEXT"    ) if $next;
 
         $op->jump($jumps);
         $self->push_op($op);


More information about the parrot-commits mailing list