Skip to content

Commit

Permalink
[jvm] Implement nqp::istype_nd
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Aug 16, 2018
1 parent 6ee956f commit 47271b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/vm/jvm/QAST/Compiler.nqp
Expand Up @@ -2666,6 +2666,7 @@ QAST::OperationsJAST.map_classlib_core_op('what_nd', $TYPE_OPS, 'what_nd', [$RT_
QAST::OperationsJAST.map_classlib_core_op('how_nd', $TYPE_OPS, 'how_nd', [$RT_OBJ], $RT_OBJ, :tc);
QAST::OperationsJAST.map_classlib_core_op('clone_nd', $TYPE_OPS, 'clone_nd', [$RT_OBJ], $RT_OBJ, :tc);
QAST::OperationsJAST.map_classlib_core_op('isconcrete_nd', $TYPE_OPS, 'isconcrete_nd', [$RT_OBJ], $RT_INT, :tc);
QAST::OperationsJAST.map_classlib_core_op('istype_nd', $TYPE_OPS, 'istype_nd', [$RT_OBJ, $RT_OBJ], $RT_INT, :tc);

# container related
QAST::OperationsJAST.map_classlib_core_op('setcontspec', $TYPE_OPS, 'setcontspec', [$RT_OBJ, $RT_STR, $RT_OBJ], $RT_OBJ, :tc);
Expand Down
4 changes: 2 additions & 2 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -2667,9 +2667,9 @@ public static long isinvokable(SixModelObject obj, ThreadContext tc) {
return obj instanceof CodeRef || obj.st.InvocationSpec != null ? 1 : 0;
}
public static long istype(SixModelObject obj, SixModelObject type, ThreadContext tc) {
return istype_nodecont(decont(obj, tc), decont(type, tc), tc);
return istype_nd(decont(obj, tc), decont(type, tc), tc);
}
public static long istype_nodecont(SixModelObject obj, SixModelObject type, ThreadContext tc) {
public static long istype_nd(SixModelObject obj, SixModelObject type, ThreadContext tc) {
/* Null always type checks false. */
if (obj == null)
return 0;
Expand Down

0 comments on commit 47271b2

Please sign in to comment.