Skip to content

Commit

Permalink
Sketch out QAST::BVal compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Apr 22, 2012
1 parent f3190cf commit 3dce35c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/QAST/Compiler.nqp
Expand Up @@ -87,6 +87,14 @@ class QAST::Compiler is HLL::Compiler {
self.escape($node.value)
}
multi method as_post(QAST::BVal $node) {
my $cuid := self.escape($node.block.cuid);
my $reg := $*REGALLOC.fresh_p();
my $ops := self.post_new('Ops', :result($reg));
$ops.push_pirop(".const 'Sub' $reg = '$cuid'");
$ops;
}

multi method as_post(QAST::WVal $node) {
my $val := $node.value;
my $sc := pir::nqp_get_sc_for_object__PP($val);
Expand Down

0 comments on commit 3dce35c

Please sign in to comment.