Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
take care of NativeRefs in nativecall op
If we would just decont as we did before, we'd strip the NativeRef container
we need to be able to do assignments. This also needs a stage0 update, so
we can use nqp::isont_[ins] here.
  • Loading branch information
FROGGS committed Apr 4, 2015
1 parent 7aa9537 commit 7533c6b
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/vm/moar/QAST/QASTOperationsMAST.nqp
Expand Up @@ -2647,10 +2647,12 @@ QAST::MASTOperations.add_core_op('nativecall', -> $qastcomp, $op {
my int $n := nqp::elems(@args);
my $obj;
while $i < $n {
$obj := nqp::decont(nqp::atpos(@args, $i));
nqp::bindpos(@args, $i, nqp::can($obj, 'cstr')
?? nqp::decont($obj.cstr())
!! $obj);
$obj := nqp::atpos(@args, $i);
unless nqp::iscont_i($obj) || nqp::iscont_n($obj) || nqp::iscont_s($obj) {
nqp::bindpos(@args, $i, nqp::can($obj, 'cstr')
?? nqp::decont($obj.cstr())
!! nqp::decont($obj));
}
$i++;
}
@args
Expand Down
Binary file modified src/vm/moar/stage0/MASTNodes.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/MASTOps.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/ModuleLoader.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/NQPCORE.setting.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/NQPHLL.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/NQPP6QRegex.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/QAST.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/QASTNode.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/QRegex.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/nqp.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/nqpmo.moarvm
Binary file not shown.
2 changes: 1 addition & 1 deletion tools/build/MOAR_REVISION
@@ -1 +1 @@
2015.03-45-ge0f1cb0
2015.03-48-g3eac8ba

0 comments on commit 7533c6b

Please sign in to comment.