Author: pmichaud
Date: Sun Nov 9 23:26:20 2008
New Revision: 32483
Modified:
trunk/compilers/nqp/src/Grammar/Actions.pir
Log:
[nqp]: Update for_statement to use correct block body.
Modified: trunk/compilers/nqp/src/Grammar/Actions.pir
==============================================================================
--- trunk/compilers/nqp/src/Grammar/Actions.pir (original)
+++ trunk/compilers/nqp/src/Grammar/Actions.pir Sun Nov 9 23:26:20 2008
@@ -274,13 +274,14 @@
$P0 = $P0.'item'()
$P1 = match['block']
block = $P1.'item'()
- block.'blocktype'('sub')
+ block.'blocktype'('immediate')
.local pmc params, topic_var
params = block[0]
$P3 = get_hll_global ['PAST'], 'Var'
topic_var = $P3.'new'('name'=>'$_', 'scope'=>'parameter')
params.'push'(topic_var)
block.'symbol'('$_', 'scope'=>'lexical')
+ block.'arity'(1)
$P2 = get_hll_global ['PAST'], 'Op'
$S1 = match['sym']
past = $P2.'new'($P0, block, 'pasttype'=>$S1, 'node'=>match)