[svn:parrot] r47388 - trunk/compilers/pct/src/PAST

pmichaud at svn.parrot.org pmichaud at svn.parrot.org
Sat Jun 5 21:38:43 UTC 2010


Author: pmichaud
Date: Sat Jun  5 21:38:42 2010
New Revision: 47388
URL: https://trac.parrot.org/parrot/changeset/47388

Log:
[pct]:  Convert $?SUB global into $*SUB dynamic lexical.

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

Modified: trunk/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Compiler.pir	Sat Jun  5 21:38:36 2010	(r47387)
+++ trunk/compilers/pct/src/PAST/Compiler.pir	Sat Jun  5 21:38:42 2010	(r47388)
@@ -207,8 +207,8 @@
     set_global '@?BLOCK', blockpast
   have_blockpast:
     .lex '@*BLOCKPAST', blockpast
-    null $P0
-    set_global '$?SUB', $P0
+    null $P99
+    .lex '$*SUB', $P99
     $P1 = self.'as_post'(past, 'rtype'=>'v')
     .return ($P1)
 .end
@@ -855,8 +855,8 @@
 
     ##  determine the outer POST::Sub for the new one
     .local pmc outerpost
-    outerpost = get_global '$?SUB'
-    set_global '$?SUB', bpost
+    outerpost = find_dynamic_lex '$*SUB'
+    .lex '$*SUB', bpost
 
     .local int islexical
     islexical = node.'lexical'()
@@ -987,7 +987,6 @@
   loadinit_done:
 
     ##  restore previous outer scope and symtable
-    set_global '$?SUB', outerpost
     setattribute self, '%!symtable', outersym
 
     ##  return block or block result
@@ -2110,7 +2109,7 @@
 
     ##  get the current sub
     .local pmc subpost
-    subpost = get_global '$?SUB'
+    subpost = find_dynamic_lex '$*SUB'
 
     ##  determine lexical, register, and parameter names
     .local string named, pname, has_pname


More information about the parrot-commits mailing list