From c820894ecd591c9ac9e7fbe85916d256d7ba5b2f Mon Sep 17 00:00:00 2001 From: Pawel Murias Date: Tue, 24 Jan 2017 16:35:14 +0100 Subject: [PATCH] [js] Implement nqp::p6captosig. --- src/vm/js/Perl6/Ops.nqp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vm/js/Perl6/Ops.nqp b/src/vm/js/Perl6/Ops.nqp index 82dfdf32044..94210275a45 100644 --- a/src/vm/js/Perl6/Ops.nqp +++ b/src/vm/js/Perl6/Ops.nqp @@ -67,6 +67,10 @@ $ops.add_simple_op('p6isbindable', $ops.INT, [$ops.OBJ, $ops.OBJ], :!inlinable, "nqp.p6binder.is_bindable($*CTX, null, nqp.p6binder, $sig, $cap)" }); +$ops.add_simple_op('p6captosig', $ops.OBJ, [$ops.OBJ, $ops.OBJ], sub ($sig, $cap) { + "nqp.p6binder.bind_cap_to_sig($*CTX, null, nqp.p6binder, $sig, $cap)" +}, :side_effects); + $ops.add_op('p6bindattrinvres', $ops.bindattr($ops.OBJ, :inverted_result)); $ops.add_simple_op('p6invokeunder', $ops.OBJ, [$ops.OBJ, $ops.OBJ], :side_effects, sub ($fake, $code) {