[svn:parrot] r46737 - branches/pct_multi_support/compilers/pct/src/POST
bacek at svn.parrot.org
bacek at svn.parrot.org
Mon May 17 13:52:10 UTC 2010
Author: bacek
Date: Mon May 17 13:52:10 2010
New Revision: 46737
URL: https://trac.parrot.org/parrot/changeset/46737
Log:
Fix generating :multi
Modified:
branches/pct_multi_support/compilers/pct/src/POST/Compiler.pir
Modified: branches/pct_multi_support/compilers/pct/src/POST/Compiler.pir
==============================================================================
--- branches/pct_multi_support/compilers/pct/src/POST/Compiler.pir Mon May 17 13:51:56 2010 (r46736)
+++ branches/pct_multi_support/compilers/pct/src/POST/Compiler.pir Mon May 17 13:52:10 2010 (r46737)
@@ -322,10 +322,25 @@
nskey = self.'key_pir'(ns)
.local pmc multi
- $P0 = node.'multi'()
- unless $P0 goto no_multi
+ multi = node.'multi'()
+ unless multi goto no_multi
+
+ .local pmc parts, m_iter
+ parts = new ['ResizableStringArray']
+ m_iter = iter multi
+ multi_iter:
+ unless m_iter goto multi_iter_done
+ $P0 = shift m_iter
+ $S0 = $P0
+ if $S0 == "_" goto push_part
$S0 = self.'key_pir'($P0)
+ push_part:
+ push parts, $S0
+ goto multi_iter
+
+ multi_iter_done:
pirflags = concat pirflags, ' :multi('
+ $S0 = join ',', parts
pirflags = concat pirflags, $S0
pirflags = concat pirflags, ')'
no_multi:
More information about the parrot-commits
mailing list