[svn:parrot] r44598 - trunk/lib/Parrot

bacek at svn.parrot.org bacek at svn.parrot.org
Tue Mar 2 20:45:35 UTC 2010


Author: bacek
Date: Tue Mar  2 20:45:34 2010
New Revision: 44598
URL: https://trac.parrot.org/parrot/changeset/44598

Log:
Remove Parrot::Op.full_body. 'auto' vs 'non-auto' ops separated by op pragma and handled in OpsFile

Modified:
   trunk/lib/Parrot/Op.pm

Modified: trunk/lib/Parrot/Op.pm
==============================================================================
--- trunk/lib/Parrot/Op.pm	Tue Mar  2 20:45:14 2010	(r44597)
+++ trunk/lib/Parrot/Op.pm	Tue Mar  2 20:45:34 2010	(r44598)
@@ -300,23 +300,6 @@
     return $self->{JUMP};
 }
 
-=item C<full_body()>
-
-For manual ops, C<full_body()> is the same as C<body()>. For auto ops
-this method adds a final C<goto NEXT()> line to the code to represent
-the auto-computed return value. See the note on op types above.
-
-=cut
-
-sub full_body {
-    my $self = shift;
-    my $body = $self->body;
-
-    $body .= sprintf( "  {{+=%d}};\n", $self->size ) if $self->type eq 'auto';
-
-    return $body;
-}
-
 # Called from rewrite_body() to perform the actual substitutions.
 sub _substitute {
     my $self           = shift;
@@ -382,7 +365,7 @@
 
 =item C<source($trans)>
 
-Returns the L<C<full_body()>> of the op with substitutions made by
+Returns the L<C<body()>> of the op with substitutions made by
 C<$trans> (a subclass of C<Parrot::OpTrans>).
 
 =cut
@@ -402,7 +385,7 @@
                 ? $trans->add_body_prelude()
                 : '';
 
-    return $self->rewrite_body( $prelude . $self->full_body, $trans );
+    return $self->rewrite_body( $prelude . $self->body, $trans );
 }
 
 =item C<size()>


More information about the parrot-commits mailing list