[svn:parrot] r44977 - in branches/ops_pct/compilers/opsc: src/Ops src/Ops/Compiler src/Ops/Trans t

cotto at svn.parrot.org cotto at svn.parrot.org
Wed Mar 17 02:50:28 UTC 2010


Author: cotto
Date: Wed Mar 17 02:50:25 2010
New Revision: 44977
URL: https://trac.parrot.org/parrot/changeset/44977

Log:
[opsc] revert a batch of pod fixes that don't apply to nqp, fix the opsfile test

Modified:
   branches/ops_pct/compilers/opsc/src/Ops/Compiler/Actions.pm
   branches/ops_pct/compilers/opsc/src/Ops/File.pm
   branches/ops_pct/compilers/opsc/src/Ops/Op.pm
   branches/ops_pct/compilers/opsc/src/Ops/Trans/C.pm
   branches/ops_pct/compilers/opsc/t/01-parse.t
   branches/ops_pct/compilers/opsc/t/06-opsfile.t

Modified: branches/ops_pct/compilers/opsc/src/Ops/Compiler/Actions.pm
==============================================================================
--- branches/ops_pct/compilers/opsc/src/Ops/Compiler/Actions.pm	Tue Mar 16 23:40:55 2010	(r44976)
+++ branches/ops_pct/compilers/opsc/src/Ops/Compiler/Actions.pm	Wed Mar 17 02:50:25 2010	(r44977)
@@ -196,17 +196,14 @@
     @result;
 }
 
-=over 4
+=begin
 
 =item C<expand_args(@args)>
 
 Given an argument list, returns a list of all the possible argument
 combinations.
 
-=back
-
-=cut
-
+=end
 sub expand_args(@args) {
 
     return list() unless @args;

Modified: branches/ops_pct/compilers/opsc/src/Ops/File.pm
==============================================================================
--- branches/ops_pct/compilers/opsc/src/Ops/File.pm	Tue Mar 16 23:40:55 2010	(r44976)
+++ branches/ops_pct/compilers/opsc/src/Ops/File.pm	Wed Mar 17 02:50:25 2010	(r44977)
@@ -4,6 +4,8 @@
 
 # XXX Better to put this into docs/ somewhere.
 
+=begin
+
 =head1 NAME
 
 Ops::File - Ops To C Code Generation
@@ -161,12 +163,14 @@
 
 =over 4
 
-=cut
+=end
 
 class Ops::File is Hash;
 
 pir::load_bytecode('config.pbc');
 
+=begin
+
 =item C<new(@files)>
 
 Returns a new instance initialized by calling C<read_ops()> on each of
@@ -177,7 +181,7 @@
 Returns a new instance initialized by compiling C<$str> as the contents of an
 ops file.
 
-=cut
+=end
 
 method new(*@files, :$oplib!, :$nolines) {
     self<files>   := @files;
@@ -207,6 +211,8 @@
 }
 
 
+=begin
+
 =back
 
 =head2 Instance Methods
@@ -217,7 +223,7 @@
 
 Reads in the specified .ops file, gathering information about the ops.
 
-=cut
+=end
 
 method read_ops($file, $nolines) {
     $Ops::Compiler::Actions::OPLIB := self<oplib>;
@@ -270,6 +276,8 @@
     self<version>       := @bits;
 }
 
+=begin
+
 =back
 
 =head1 SEE ALSO
@@ -288,7 +296,7 @@
 
 =back
 
-=cut
+=end
 
 # Local Variables:
 #   mode: cperl

Modified: branches/ops_pct/compilers/opsc/src/Ops/Op.pm
==============================================================================
--- branches/ops_pct/compilers/opsc/src/Ops/Op.pm	Tue Mar 16 23:40:55 2010	(r44976)
+++ branches/ops_pct/compilers/opsc/src/Ops/Op.pm	Wed Mar 17 02:50:25 2010	(r44977)
@@ -2,6 +2,8 @@
 # Copyright (C) 2010, Parrot Foundation.
 # $Id$
 
+=begin
+
 =head1 NAME
 
 Ops::Op - Parrot Operation
@@ -60,7 +62,7 @@
 
 =over 4
 
-=cut
+=end
 
 class Ops::Op is PAST::Block;
 
@@ -68,6 +70,8 @@
     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
@@ -113,7 +117,7 @@
 
 The same as C<full_name()>, but with 'C<Parrot_>' prefixed.
 
-=cut
+=end
 
 method code($code?) { self.attr('code', $code, defined($code)) }
 
@@ -150,22 +154,26 @@
 }
 
 
+=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.
 
-=cut
+=end
 
 method flags(%flags?) { self.attr('flags', %flags, defined(%flags)) }
 
+=begin
+
 =item C<body($body)>
 
 =item C<body()>
 
 Sets/gets the op's code body.
 
-=cut
+=end
 
 method body() {
     my $res := '';
@@ -175,6 +183,8 @@
     $res;
 }
 
+=begin
+
 =item C<jump($jump)>
 
 =item C<jump()>
@@ -183,17 +193,19 @@
 C<|> (see F<include/parrot/op.h>). This indicates if and how an op
 may jump.
 
-=cut
+=end
 
 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.
 
-=cut
+=end
 
 method add_jump($jump) {
     my $found_jump := 0;
@@ -209,13 +221,15 @@
     }
 }
 
+=begin
+
 =item C<get_jump()>
 
 =item C<get_jump()>
 
 Get the jump flags that apply to this op.
 
-=cut
+=end
 
 method get_jump() {
 
@@ -227,12 +241,14 @@
     }
 }
 
+=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>).
 
-=cut
+=end
 
 method source( $trans ) {
 
@@ -240,6 +256,8 @@
     return $prelude ~ self.get_body( $trans );
 }
 
+=begin
+
 =item C<get_body($trans)>
 
 Performs the various macro substitutions using the specified transform,
@@ -249,7 +267,7 @@
 C<VTABLE_> macros are enforced by converting C<<< I<< x >>->vtable->I<<
 method >> >>> to C<VTABLE_I<method>>.
 
-=cut
+=end
 
 method get_body( $trans ) {
 
@@ -322,17 +340,21 @@
 }
 
 
+=begin
+
 =item C<size()>
 
 Returns the op's number of arguments. Note that this also includes
 the op itself as one argument.
 
-=cut
+=end
 
 method size() {
     return pir::does__IPs(self.arg_types, 'array') ?? +self.arg_types + 1 !! 2;
 }
 
+=begin
+
 =back
 
 =head1 SEE ALSO
@@ -357,7 +379,7 @@
 
 Migrate to NQP: Vasily Chekalkin E<lt>bacek at bacek.comE<gt>
 
-=cut
+=end
 
 1;
 

Modified: branches/ops_pct/compilers/opsc/src/Ops/Trans/C.pm
==============================================================================
--- branches/ops_pct/compilers/opsc/src/Ops/Trans/C.pm	Tue Mar 16 23:40:55 2010	(r44976)
+++ branches/ops_pct/compilers/opsc/src/Ops/Trans/C.pm	Wed Mar 17 02:50:25 2010	(r44977)
@@ -101,15 +101,13 @@
 
 method expr_offset($offset) { "cur_opcode + $offset"; }
 
-=over 4
+=begin
 
 =item C<defines()>
 
 Returns the C C<#define> macros for register access etc.
 
-=back
-
-=cut
+=end
 
 method defines($emitter) {
     return qq|

Modified: branches/ops_pct/compilers/opsc/t/01-parse.t
==============================================================================
--- branches/ops_pct/compilers/opsc/t/01-parse.t	Tue Mar 16 23:40:55 2010	(r44976)
+++ branches/ops_pct/compilers/opsc/t/01-parse.t	Wed Mar 17 02:50:25 2010	(r44977)
@@ -2,21 +2,6 @@
 # Copyright (C) 2010, Parrot Foundation.
 # $Id$
 
-=head1 NAME
-
-core.ops - Core Opcodes
-
-=cut
-
-=head1 DESCRIPTION
-
-Parrot's core library of ops.
-
-Core operations are primarily flow control and interpreter
-introspection.
-
-=cut
-
 .include 'compilers/opsc/t/common.pir'
 
 .sub 'main' :main
@@ -74,7 +59,6 @@
 
     buf = <<"END"
 
-=over 4
 
 =item noop
 
@@ -89,14 +73,12 @@
 
 asdsad
 
-=back
-
 =cut
 
 inline op halt() {
 }
 
-=head2 rule_the_world
+=head2
 
 ads
 
@@ -122,6 +104,10 @@
     .local pmc res
 
     buf = <<"END"
+/*
+ * $Id$
+** core.ops
+*/
 
 BEGIN_OPS_PREAMBLE
 
@@ -133,6 +119,21 @@
 
 END_OPS_PREAMBLE
 
+=head1 NAME
+
+core.ops - Core Opcodes
+
+=cut
+
+=head1 DESCRIPTION
+
+Parrot's core library of ops.
+
+Core operations are primarily flow control and interpreter
+introspection.
+
+=cut
+
 inline op noop() {
 }
 

Modified: branches/ops_pct/compilers/opsc/t/06-opsfile.t
==============================================================================
--- branches/ops_pct/compilers/opsc/t/06-opsfile.t	Tue Mar 16 23:40:55 2010	(r44976)
+++ branches/ops_pct/compilers/opsc/t/06-opsfile.t	Wed Mar 17 02:50:25 2010	(r44977)
@@ -20,7 +20,7 @@
 # 116 math
 # We can generate more than 1 Ops::Op per op due args expansion.
 say( "# Parsed " ~ + at ops);
-ok(+ at ops == 314, "Ops parsed correctly");
+ok(+ at ops == 313, "Ops parsed correctly");
 
 my $op := @ops[0];
 #_dumper($op);


More information about the parrot-commits mailing list