Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make BVal consistent with the various other Val nodes. Also fix compi…
…lation of it.
  • Loading branch information
jnthn committed May 12, 2012
1 parent 2a41c7d commit efa345e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/QAST/BVal.nqp
@@ -1 +1,4 @@
class QAST::BVal is QAST::Node { has $!block; method block(*@value) { $!block := @value[0] if @value; $!block }}
class QAST::BVal is QAST::Node {
has $!value;
method value(*@value) { $!value := @value[0] if @value; $!value }
}
4 changes: 2 additions & 2 deletions src/QAST/Compiler.nqp
Expand Up @@ -377,10 +377,10 @@ class QAST::Compiler is HLL::Compiler {
}

multi method as_post(QAST::BVal $node) {
my $cuid := self.escape($node.block.cuid);
my $cuid := self.escape($node.value.cuid);
my $reg := $*REGALLOC.fresh_p();
my $ops := self.post_new('Ops', :result($reg));
$ops.push_pirop(".const 'Sub' $reg = '$cuid'");
$ops.push_pirop(".const 'Sub' $reg = $cuid");
$ops;
}

Expand Down

0 comments on commit efa345e

Please sign in to comment.