Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix code-gen bug with defaults.
  • Loading branch information
jnthn committed Feb 24, 2013
1 parent bd662c8 commit 730b64a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/QAST/JASTCompiler.nqp
Expand Up @@ -2584,12 +2584,6 @@ class QAST::CompilerJAST {
$*CODEREFS.set_max_args($node.cuid, $*MAX_ARGS_I, $*MAX_ARGS_N, $*MAX_ARGS_S, $*MAX_ARGS_O);
}

# Add all the locals.
for $block.locals {
$*JMETH.add_local($_.name, jtype($block.local_type($_.name)));
}
$*BLOCK_TA.add_temps_to_method($*JMETH);

# Stash lexical names.
$*CODEREFS.set_lexical_names($node.cuid, |$block.lexical_names_by_type());

Expand Down Expand Up @@ -2721,6 +2715,12 @@ class QAST::CompilerJAST {
$param_idx++;
}

# Add all the locals.
for $block.locals {
$*JMETH.add_local($_.name, jtype($block.local_type($_.name)));
}
$*BLOCK_TA.add_temps_to_method($*JMETH);

# Add method body JAST.
$*JMETH.append($body.jast);

Expand Down

0 comments on commit 730b64a

Please sign in to comment.