Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Emit code for .post_deserialize in QAST::CompUnit's.
  • Loading branch information
pmurias committed Jan 24, 2015
1 parent 38ec73c commit 30951ea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/vm/js/QAST/Compiler.nqp
Expand Up @@ -1629,6 +1629,13 @@ class QAST::CompilerJS does DWIMYNameMangling does SerializeOnce {
}
}

my @post;
for $node.post_deserialize -> $node {
self.log($node.dump);
@post.push(self.as_js($node, :want($T_VOID)));
}
my $post := Chunk.new($T_VOID, "", @post);

# Compile the block.
my $block_js := self.as_js($node[0], :want($T_VOID));

Expand All @@ -1645,7 +1652,7 @@ class QAST::CompilerJS does DWIMYNameMangling does SerializeOnce {
$body := $block_js;
}

Chunk.new($T_VOID, "", [self.setup_cuids(), $pre , self.create_sc($node), $body]);
Chunk.new($T_VOID, "", [self.setup_cuids(), $pre , self.create_sc($node), $post, $body]);
}

method declare_var(QAST::Var $node) {
Expand Down

0 comments on commit 30951ea

Please sign in to comment.