Skip to content

Commit

Permalink
[truffle] Stub nqp::decont
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Sep 20, 2018
1 parent 7bbcb7b commit fc0e8de
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vm/jvm/Truffle.nqp
Expand Up @@ -495,6 +495,8 @@ class QAST::OperationsTruffle {
TAST.new($OBJ, $ret);
});

add_simple_op('decont', $OBJ, [$OBJ]);

%ops<callstatic> := %ops<call>;

add_op('bind', sub ($comp, $node, :$want) {
Expand Down
@@ -0,0 +1,22 @@
package org.perl6.nqp.truffle.nodes.expression;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.NodeInfo;
import org.perl6.nqp.truffle.nodes.NQPNode;
import org.perl6.nqp.truffle.nodes.NQPObjNode;
import org.perl6.nqp.dsl.Deserializer;

@NodeInfo(shortName = "decont")
public final class NQPDecontNode extends NQPObjNode {
@Child private NQPNode argNode;

@Deserializer
public NQPDecontNode(NQPNode argNode) {
this.argNode = argNode;
}

@Override
public Object execute(VirtualFrame frame) {
/* TODO - actually decont stuff */
return argNode.execute(frame);
}
}

0 comments on commit fc0e8de

Please sign in to comment.