Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use add_simple_op for nqp::isinvokable.
  • Loading branch information
pmurias committed Aug 17, 2014
1 parent da342f4 commit 74fa9cf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/vm/js/QAST/Compiler.nqp
Expand Up @@ -290,10 +290,7 @@ class QAST::OperationsJS {
Chunk.new($T_VOID, "" , [$arg, "nqp.op.print({$arg.expr});\n"], :$node);
});

add_op('isinvokable', sub ($comp, $node, :$want) {
my $arg := $comp.as_js($node[0], :want($T_OBJ));
Chunk.new($T_INT, "nqp.op.isinvokable({$arg.expr})" , [$arg], :$node);
});
add_simple_op('isinvokable', $T_INT, [$T_OBJ], sub ($arg) {"nqp.op.isinvokable($arg)"});

# TODO - think if it's the correct thing to do
add_op('takeclosure', sub ($comp, $node, :$want) {
Expand Down

0 comments on commit 74fa9cf

Please sign in to comment.