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

[svn:parrot] r34464 - branches/rvar/compilers/pct/src/PAST

From:
pmichaud
Date:
December 27, 2008 21:50
Subject:
[svn:parrot] r34464 - branches/rvar/compilers/pct/src/PAST
Message ID:
20081228055019.0157FCB9B0@x12.develooper.com
Author: pmichaud
Date: Sat Dec 27 21:50:17 2008
New Revision: 34464

Modified:
   branches/rvar/compilers/pct/src/PAST/Compiler.pir

Log:
[pct]:  Allow piropsig to specify an argument as a return value.


Modified: branches/rvar/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- branches/rvar/compilers/pct/src/PAST/Compiler.pir	(original)
+++ branches/rvar/compilers/pct/src/PAST/Compiler.pir	Sat Dec 27 21:50:17 2008
@@ -80,7 +80,7 @@
     piropsig['pow']        = 'NN+'
     piropsig['print']      = 'v*'
     piropsig['set']        = 'PP'
-    piropsig['setprop']    = 'vP~P'
+    piropsig['setprop']    = '0P~P'
     set_global '%piropsig', piropsig
 
     ##  %valflags specifies when PAST::Val nodes are allowed to
@@ -1045,6 +1045,11 @@
 
     $S0 = substr signature, 0, 1
     if $S0 == 'v' goto pirop_void
+    $I0 = index '0123456789', $S0
+    if $I0 < 0 goto pirop_reg
+    $S0 = arglist[$I0]
+    ops.'result'($S0)
+    goto pirop_void
   pirop_reg:
     .local string result
     result = self.'uniquereg'($S0)



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