Skip to content

Commit 3dce35c

Browse files
committed
Sketch out QAST::BVal compilation.
1 parent f3190cf commit 3dce35c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/QAST/Compiler.nqp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ class QAST::Compiler is HLL::Compiler {
8787
self.escape($node.value)
8888
}
8989
90+
multi method as_post(QAST::BVal $node) {
91+
my $cuid := self.escape($node.block.cuid);
92+
my $reg := $*REGALLOC.fresh_p();
93+
my $ops := self.post_new('Ops', :result($reg));
94+
$ops.push_pirop(".const 'Sub' $reg = '$cuid'");
95+
$ops;
96+
}
97+
9098
multi method as_post(QAST::WVal $node) {
9199
my $val := $node.value;
92100
my $sc := pir::nqp_get_sc_for_object__PP($val);

0 commit comments

Comments
 (0)