Author: pmichaud
Date: Mon Dec 22 19:41:21 2008
New Revision: 34266
Modified:
trunk/compilers/pct/src/PAST/Compiler.pir
trunk/compilers/pct/src/PAST/Node.pir
Log:
[pct]: .HLL support part 2 -- .hll in PAST::Block nodes.
Modified: trunk/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Compiler.pir (original)
+++ trunk/compilers/pct/src/PAST/Compiler.pir Mon Dec 22 19:41:21 2008
@@ -743,11 +743,12 @@
unshift blockpast, node
.local string name, pirflags, blocktype
- .local pmc ns
+ .local pmc ns, hll
name = node.'name'()
pirflags = node.'pirflags'()
blocktype = node.'blocktype'()
ns = node.'namespace'()
+ hll = node.'hll'()
## handle anonymous blocks
if name goto have_name
@@ -759,7 +760,7 @@
## create a POST::Sub node for this block
.local pmc bpost
$P0 = get_hll_global ['POST'], 'Sub'
- bpost = $P0.'new'('node'=>node, 'name'=>name, 'blocktype'=>blocktype,
'namespace'=>ns)
+ bpost = $P0.'new'('node'=>node, 'name'=>name, 'blocktype'=>blocktype,
'namespace'=>ns, 'hll'=>hll)
unless pirflags goto pirflags_done
bpost.'pirflags'(pirflags)
pirflags_done:
Modified: trunk/compilers/pct/src/PAST/Node.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Node.pir (original)
+++ trunk/compilers/pct/src/PAST/Node.pir Mon Dec 22 19:41:21 2008
@@ -538,6 +538,19 @@
.end
+=item hll([hll])
+
+Get/set the C<hll> for this block.
+
+=cut
+
+.sub 'hll' :method
+ .param pmc value :optional
+ .param int has_value :opt_flag
+ .tailcall self.'attr'('hll', value, has_value)
+.end
+
+
=item symbol(name, [attr1 => val1, attr2 => val2, ...])
If called with named arguments, sets the symbol hash corresponding