Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement nqp::pow_n.
  • Loading branch information
pmurias committed Aug 19, 2014
1 parent 5746cd3 commit 03e4199
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vm/js/QAST/Compiler.nqp
Expand Up @@ -359,6 +359,8 @@ class QAST::OperationsJS {
add_simple_op($func ~ '_n', $T_NUM, [$T_NUM], sub ($arg) {"Math.$func($arg)"});
}

add_simple_op('pow_n', $T_NUM, [$T_NUM, $T_NUM], sub ($base, $exponent) {"Math.pow($base, $exponent)"});

for <if unless> -> $op_name {
add_op($op_name, sub ($comp, $node, :$want) {
unless nqp::defined($want) {
Expand Down

0 comments on commit 03e4199

Please sign in to comment.