[svn:parrot] r38270 - in trunk/compilers/pct/src: PAST POST

pmichaud at svn.parrot.org pmichaud at svn.parrot.org
Wed Apr 22 13:12:13 UTC 2009


Author: pmichaud
Date: Wed Apr 22 13:12:12 2009
New Revision: 38270
URL: https://trac.parrot.org/parrot/changeset/38270

Log:
[pct]:  loadinit handling in PAST/POST compilation now works for 'compiler' nodes

Modified:
   trunk/compilers/pct/src/PAST/Compiler.pir
   trunk/compilers/pct/src/POST/Compiler.pir

Modified: trunk/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Compiler.pir	Wed Apr 22 12:06:11 2009	(r38269)
+++ trunk/compilers/pct/src/PAST/Compiler.pir	Wed Apr 22 13:12:12 2009	(r38270)
@@ -924,7 +924,7 @@
     lipast = node.'loadinit'()
     lipost = self.'as_post'(lipast, 'rtype'=>'v')
     lisub.'push'(lipost)
-    bpost.'unshift'(lisub)
+    bpost['loadinit'] = lisub
   loadinit_done:
 
     ##  restore previous outer scope and symtable

Modified: trunk/compilers/pct/src/POST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/POST/Compiler.pir	Wed Apr 22 12:06:11 2009	(r38269)
+++ trunk/compilers/pct/src/POST/Compiler.pir	Wed Apr 22 13:12:12 2009	(r38270)
@@ -266,6 +266,11 @@
     nskey = subpir.'key'(ns)
 
   subpir_start:
+    $P0 = node['loadinit']
+    if null $P0 goto loadinit_done
+    self.'pir'($P0)
+  loadinit_done:
+
     $P0 = node.'compiler'()
     unless $P0 goto subpir_post
   subpir_compiler:


More information about the parrot-commits mailing list