develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35202 - branches/rvar2/compilers/pct/src/POST

From:
pmichaud
Date:
January 8, 2009 07:42
Subject:
[svn:parrot] r35202 - branches/rvar2/compilers/pct/src/POST
Message ID:
20090108154154.AF1BACB9F9@x12.develooper.com
Author: pmichaud
Date: Thu Jan  8 07:41:54 2009
New Revision: 35202

Modified:
   branches/rvar2/compilers/pct/src/POST/Compiler.pir

Log:
[pct]:  Improve handling of namespaces, especially for hll_pir.


Modified: branches/rvar2/compilers/pct/src/POST/Compiler.pir
==============================================================================
--- branches/rvar2/compilers/pct/src/POST/Compiler.pir	(original)
+++ branches/rvar2/compilers/pct/src/POST/Compiler.pir	Thu Jan  8 07:41:54 2009
@@ -28,7 +28,7 @@
 
     $P0 = new 'String'
     set_global '$?HLL', $P0
-    $P0 = box '[]'
+    null $P0
     set_global '$?NAMESPACE', $P0
     .return ()
 .end
@@ -249,12 +249,13 @@
 
     .local pmc outerns, ns, nskey
     outerns = get_global '$?NAMESPACE'
-    nskey = outerns
-    ns = node.'namespace'()
-    unless ns goto have_ns
-    nskey = code.'key'(ns)
-    set_global '$?NAMESPACE', nskey
+    ns = outerns
+    $P0 = node.'namespace'()
+    unless $P0 goto have_ns
+    ns = $P0
   have_ns:
+    set_global '$?NAMESPACE', ns
+    nskey = code.'key'(ns)
 
   subpir_start:
     $P0 = node.'compiler'()
@@ -312,7 +313,6 @@
     .param pmc options         :slurpy :named
 
     options['target'] = 'pir'
-    options['grammar'] = ''
     $P0 = node.'subid'()
     options['subid'] = $P0
     .local pmc source, compiler, pir



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