Skip to content

Commit

Permalink
[js] Implement QAST::Stmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Nov 7, 2015
1 parent ac51c16 commit fb0aad7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/vm/js/QAST/Compiler.nqp
Expand Up @@ -2762,6 +2762,12 @@ class QAST::CompilerJS does DWIMYNameMangling does SerializeOnce {
self.as_js($node.value, :$want);
}

# Helps with register allocation on other backends
# We don't do allocate registers so just ignore that
multi method as_js(QAST::Stmt $node, :$want) {
self.as_js($node[0], :$want);
}

multi method as_js(QAST::Stmts $node, :$want) {
# for performance purposes we use the native js lexicals as much as possible, that means we need hacks for things that other backends can do easily with all the various ctx ops
if self.is_ctxsave($node) {
Expand Down

0 comments on commit fb0aad7

Please sign in to comment.