[svn:parrot] r44936 - branches/ops_pct/compilers/opsc/src/Ops
mikehh at svn.parrot.org
mikehh at svn.parrot.org
Mon Mar 15 14:15:37 UTC 2010
Author: mikehh
Date: Mon Mar 15 14:15:36 2010
New Revision: 44936
URL: https://trac.parrot.org/parrot/changeset/44936
Log:
fix Op.pm to pass pod_syntax.t
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 Mon Mar 15 13:25:15 2010 (r44935)
+++ branches/ops_pct/compilers/opsc/src/Ops/Op.pm Mon Mar 15 14:15:36 2010 (r44936)
@@ -2,8 +2,6 @@
# Copyright (C) 2010, Parrot Foundation.
# $Id$
-=begin
-
=head1 NAME
Ops::Op - Parrot Operation
@@ -62,7 +60,7 @@
=over 4
-=end
+=cut
class Ops::Op is PAST::Block;
@@ -70,8 +68,6 @@
pir::load_bytecode("dumper.pbc");
}
-=begin
-
=item C<new(:$code, :$type, :$name, :@args, :%flags)>
Allocates a new bodyless op. A body must be provided eventually for the
@@ -117,7 +113,7 @@
The same as C<full_name()>, but with 'C<Parrot_>' prefixed.
-=end
+=cut
method code($code?) { self.attr('code', $code, defined($code)) }
@@ -154,26 +150,22 @@
}
-=begin
-
=item C<flags()>
Sets the op's flags. This returns a hash reference, whose keys are any
flags (passed as ":flag") specified for the op.
-=end
+=cut
method flags(%flags?) { self.attr('flags', %flags, defined(%flags)) }
-=begin
-
=item C<body($body)>
=item C<body()>
Sets/gets the op's code body.
-=end
+=cut
method body() {
my $res := '';
@@ -183,8 +175,6 @@
$res;
}
-=begin
-
=item C<jump($jump)>
=item C<jump()>
@@ -193,19 +183,17 @@
C<|> (see F<include/parrot/op.h>). This indicates if and how an op
may jump.
-=end
+=cut
method jump($jump?) { self.attr('jump', $jump, defined($jump)) }
-=begin
-
=item C<add_jump($jump)>
=item C<add_jump($jump)>
Add a jump flag to this op if it's not there already.
-=end
+=cut
method add_jump($jump) {
my $found_jump := 0;
@@ -221,15 +209,13 @@
}
}
-=begin
-
=item C<get_jump()>
=item C<get_jump()>
Get the jump flags that apply to this op.
-=end
+=cut
method get_jump() {
@@ -241,14 +227,12 @@
}
}
-=begin
-
=item C<source($trans, $op)>
Returns the L<C<body()>> of the op with substitutions made by
C<$trans> (a subclass of C<Ops::Trans>).
-=end
+=cut
method source( $trans ) {
@@ -256,8 +240,6 @@
return $prelude ~ self.get_body( $trans );
}
-=begin
-
=item C<get_body($trans)>
Performs the various macro substitutions using the specified transform,
@@ -267,7 +249,7 @@
C<VTABLE_> macros are enforced by converting C<<< I<< x >>->vtable->I<<
method >> >>> to C<VTABLE_I<method>>.
-=end
+=cut
method get_body( $trans ) {
@@ -340,21 +322,17 @@
}
-=begin
-
=item C<size()>
Returns the op's number of arguments. Note that this also includes
the op itself as one argument.
-=end
+=cut
method size() {
return pir::does__IPs(self.arg_types, 'array') ?? +self.arg_types + 1 !! 2;
}
-=begin
-
=back
=head1 SEE ALSO
@@ -379,7 +357,7 @@
Migrate to NQP: Vasily Chekalkin E<lt>bacek at bacek.comE<gt>
-=end
+=cut
1;
More information about the parrot-commits
mailing list