develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34062 - branches/main/languages/perl6/src/parser

From:
pmichaud
Date:
December 17, 2008 22:46
Subject:
[svn:parrot] r34062 - branches/main/languages/perl6/src/parser
Message ID:
20081218064633.04B23CBA12@x12.develooper.com
Author: pmichaud
Date: Wed Dec 17 22:46:32 2008
New Revision: 34062

Modified:
   branches/main/languages/perl6/src/parser/actions.pm

Log:
[rakudo]:  Remove remaining pieces of $?INIT.  All spectests pass.


Modified: branches/main/languages/perl6/src/parser/actions.pm
==============================================================================
--- branches/main/languages/perl6/src/parser/actions.pm	(original)
+++ branches/main/languages/perl6/src/parser/actions.pm	Wed Dec 17 22:46:32 2008
@@ -8,15 +8,6 @@
     $past.blocktype('declaration');
     declare_implicit_routine_vars($past);
 
-    # Attach any initialization code.
-    our $?INIT;
-    if defined( $?INIT ) {
-        $?INIT.blocktype('declaration');
-        $?INIT.pirflags(':init :load');
-        $past.unshift( $?INIT );
-        $?INIT := PAST::Block.new(); # For the next eval.
-    }
-
     #  Make sure we have the interpinfo constants.
     $past.unshift( PAST::Op.new( :inline('.include "interpinfo.pasm"') ) );
 
@@ -400,11 +391,8 @@
         # a call straight into the output code, because then we load the
         # module too late to inherit from any classes in it. So for now we
         # stick the use call into $?INIT.
-        our $?INIT;
-        unless defined($?INIT) {
-            $?INIT := PAST::Block.new();
-        }
-        $?INIT.push($past);
+        our $?BLOCK;
+        $?BLOCK.loadinit().push($past);
         $past := PAST::Stmts.new( :node($/) );
     }
     make $past;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About