[svn:parrot] r44617 - in trunk: include/parrot lib/Parrot
cotto at svn.parrot.org
cotto at svn.parrot.org
Thu Mar 4 04:08:49 UTC 2010
Author: cotto
Date: Thu Mar 4 04:08:30 2010
New Revision: 44617
URL: https://trac.parrot.org/parrot/changeset/44617
Log:
[ops] remove PARROT_JUMP_ABSOLUTE, which also appears to be unused
Modified:
trunk/include/parrot/op.h
trunk/lib/Parrot/OpsFile.pm
Modified: trunk/include/parrot/op.h
==============================================================================
--- trunk/include/parrot/op.h Thu Mar 4 03:50:21 2010 (r44616)
+++ trunk/include/parrot/op.h Thu Mar 4 04:08:30 2010 (r44617)
@@ -51,8 +51,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_RELATIVE = 1
} 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:50:21 2010 (r44616)
+++ trunk/lib/Parrot/OpsFile.pm Thu Mar 4 04:08:30 2010 (r44617)
@@ -457,10 +457,8 @@
$argdirs, $line, $file, $labels, $flags, $nolines
) = @_;
my $counter = 0;
- my $absolute = 0;
my $branch = 0;
my $pop = 0;
- my $restart = 0;
if (exists($$flags{deprecated})) {
$body = <<"END_CODE" . $body;
@@ -512,10 +510,10 @@
# with labels, etc.).
#
- $absolute ||= $body =~ s/\bgoto\s+ADDRESS\(\( (.*?) \)\)/{{=$1}}/mg;
- $body =~ s/\bexpr\s+ADDRESS\(\( (.*?) \)\)/{{^$1}}/mg;
- $absolute ||= $body =~ s/\bgoto\s+ADDRESS\((.*?)\)/{{=$1}}/mg;
- $body =~ s/\bexpr\s+ADDRESS\((.*?)\)/{{^$1}}/mg;
+ $body =~ s/\bgoto\s+ADDRESS\(\( (.*?) \)\)/{{=$1}}/mg;
+ $body =~ s/\bexpr\s+ADDRESS\(\( (.*?) \)\)/{{^$1}}/mg;
+ $body =~ s/\bgoto\s+ADDRESS\((.*?)\)/{{=$1}}/mg;
+ $body =~ s/\bexpr\s+ADDRESS\((.*?)\)/{{^$1}}/mg;
$branch ||= $short_name =~ /runinterp/;
$branch ||= $body =~ s/\bgoto\s+OFFSET\(\( (.*?) \)\)/{{+=$1}}/mg;
@@ -525,21 +523,16 @@
$short_name =~ /runinterp/;
$body =~ s/\bexpr\s+NEXT\(\)/{{^+$op_size}}/mg;
- $body =~ s/\bgoto\s+NEXT\(\)/{{+=$op_size}}/mg;
+ $body =~ s/\bgoto\s+NEXT\(\)/{{+=$op_size}}/mg;
$body =~ s/\bOP_SIZE\b/{{^$op_size}}/mg;
if ( $body =~ s/\brestart\s+OFFSET\((.*?)\)/{{=0,+=$1}}/mg ) {
$branch = 1;
- $restart = 1;
- }
- elsif ( $body =~ s/\brestart\s+NEXT\(\)/{{=0,+=$op_size}}/mg ) {
- $restart = 1;
- }
- elsif ( $body =~ s/\brestart\s+ADDRESS\((.*?)\)/{{=$1}}/mg ) {
- $restart = 1;
}
+ $body =~ s/\brestart\s+NEXT\(\)/{{=0,+=$op_size}}/mg;
+ $body =~ s/\brestart\s+ADDRESS\((.*?)\)/{{=$1}}/mg;
$body =~ s/\$(\d+)/{{\@$1}}/mg;
# We can only reference as many parameters as we declare
@@ -555,7 +548,6 @@
$op->body( $nolines ? $body : qq{#line $line "$file_escaped"\n$body} );
# 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;
$op->jump($jumps);
More information about the parrot-commits
mailing list