Skip to content

Commit f97e725

Browse files
committed
Provide a non-decont'ing version of istype.
1 parent bd3d68a commit f97e725

File tree

1 file changed

+5
-3
lines changed
  • src/vm/jvm/runtime/org/perl6/nqp/runtime

1 file changed

+5
-3
lines changed

src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,12 +2103,14 @@ public static long isinvokable(SixModelObject obj, ThreadContext tc) {
21032103
return obj instanceof CodeRef || obj.st.InvocationSpec != null ? 1 : 0;
21042104
}
21052105
public static long istype(SixModelObject obj, SixModelObject type, ThreadContext tc) {
2106+
return istype_nodecont(decont(obj, tc), decont(type, tc), tc);
2107+
}
2108+
public static long istype_nodecont(SixModelObject obj, SixModelObject type, ThreadContext tc) {
21062109
/* Null always type checks false. */
21072110
if (obj == null)
21082111
return 0;
2109-
obj = decont(obj, tc);
2110-
type = decont(type, tc);
2111-
2112+
2113+
/* Start by considering cache. */
21122114
int typeCheckMode = type.st.ModeFlags & STable.TYPE_CHECK_CACHE_FLAG_MASK;
21132115
SixModelObject[] cache = obj.st.TypeCheckCache;
21142116
if (cache != null) {

0 commit comments

Comments
 (0)