On Sun Apr 13 08:35:08 2008, rgrjr wrote:

> 
>    The usages in ncidef2pasm.pl appear to have nothing per se to do with
>    these ops . . .
> 
> I couldn't even figure out what ncidef2pasm.pl was for, let alone how to
> test it.  Is this dead code?
> 

Not quite.  This is one of a number of scripts which are invoked --
usually once only -- in lib/Parrot/Docs/*/*.pm -- an area of Parrot into
which I have rarely peeked and whose function I don't claim to
understand (generating the HTML version of our docs, perhaps?  ptc:  can
you clarify?)

$ fnsa lib/Parrot/Docs '*.pm' | xargs grep -n ncidef2pasm
lib/Parrot/Docs/Section/Tools.pm:101:            $self->new_item( '',
'tools/util/ncidef2pasm.pl' ),


But here is a patch which partially implements the objective of this RT.
 What's missing is a revision of docs/pdds/draft/pdd19_pir.pod.  
'saveall' and 'restoreall' are used within a code example in this doc,
and I don't know what should go in their places.

Still to be addressed is this portion of the OP:  "When these are gone,
the instructions can be removed from src/ops/stack.ops, and the
reg_stack member of struct Parrot_Context can be removed."
Index: docs/pdds/draft/pdd06_pasm.pod
===================================================================
--- docs/pdds/draft/pdd06_pasm.pod      (revision 26965)
+++ docs/pdds/draft/pdd06_pasm.pod      (working copy)
@@ -507,24 +507,16 @@
 Restore register X from the generic stack by popping off the topmost entry.
 The type of this entry must match the register type.
 
-=item saveall
+=item savetop
 
-Save all of the current set of registers onto the appropriate frame  stacks.
+Save registers 16-31 onto the appropriate frame  stacks.
 Equivalent to performing a separate push for each register type.
 
-=item restoreall
+=item restoretop
 
-Restore all of the registers from the appropriate frame stacks. Equivalent to
+Restore registers 16-31 from the appropriate frame stacks. Equivalent to
 performing a separate pop for each register type.
 
-=item savetop
-
-As L<saveall> but only acts on registers 16-31.
-
-=item restoretop
-
-As L<restoreall> but only affects registers 16-31.
-
 =item set_warp string
 
 Sets a named marker for the stacks for later use.
Index: editor/kate_syntax.pl
===================================================================
--- editor/kate_syntax.pl       (revision 26965)
+++ editor/kate_syntax.pl       (working copy)
@@ -22,9 +22,10 @@
 
 $parrot =~ s/\/$//;
 
-my @imcc_oplike = qw(.sym .arg prototyped non_prototyped .class
-    .endclass .param inc dec new defined addr global clone saveall
-    restoreall);
+# saveall and restoreall deleted from @imcc_oplike April 2008.
+my @imcc_oplike = qw( .sym .arg prototyped non_prototyped .class
+    .endclass .param inc dec new defined addr global clone );
+
 my @imcc_spdirec = qw(.call .result .return .local .const .globalconst
     end goto if unless call branch jump jsr ret invoke invokecc throw
     rethrow die_hard .emit .eom .sub .end .begin_call
Index: languages/BASIC/compiler/compile.pl
===================================================================
--- languages/BASIC/compiler/compile.pl (revision 26965)
+++ languages/BASIC/compiler/compile.pl (working copy)
@@ -84,8 +84,6 @@
     #INIT
     my ( $edit, @saves );
 
-    #print CODE "\t.sub ${seg}_main\n\t\tsaveall\n";
-
     # If any "common" declared variables are in scope, set them up.
     @saves = ();
     foreach my $var ( keys %{ $code{$seg}->{declarations} } ) {
@@ -160,9 +158,10 @@
         print CODE ".end\t# outer segment\n";
         next;
     }
+    # saveall deleted from heredoc below April 2008
+    # see http://rt.perl.org/rt3/Ticket/Display.html?id=52838
     print CODE<<EOD;
         .sub ${seg}_debug
-                saveall
                 .param int debline
                 find_global \$P0, "DEBUGGER"
                 \$I0= \$P0["step"]

Reply via email to