Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement decont_[ins].
  • Loading branch information
jnthn committed Feb 28, 2015
1 parent 9b7f462 commit b7388c6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -3037,6 +3037,30 @@ public static SixModelObject decont(SixModelObject obj, ThreadContext tc) {
ContainerSpec cs = obj.st.ContainerSpec;
return cs == null || obj instanceof TypeObject ? obj : cs.fetch(tc, obj);
}
public static long decont_i(SixModelObject obj, ThreadContext tc) {
if (!(obj instanceof TypeObject)) {
ContainerSpec cs = obj.st.ContainerSpec;
if (cs != null)
return cs.fetch_i(tc, obj);
}
return obj.get_int(tc);
}
public static double decont_n(SixModelObject obj, ThreadContext tc) {
if (!(obj instanceof TypeObject)) {
ContainerSpec cs = obj.st.ContainerSpec;
if (cs != null)
return cs.fetch_n(tc, obj);
}
return obj.get_num(tc);
}
public static String decont_s(SixModelObject obj, ThreadContext tc) {
if (!(obj instanceof TypeObject)) {
ContainerSpec cs = obj.st.ContainerSpec;
if (cs != null)
return cs.fetch_s(tc, obj);
}
return obj.get_str(tc);
}
public static SixModelObject assign(SixModelObject cont, SixModelObject value, ThreadContext tc) {
ContainerSpec cs = cont.st.ContainerSpec;
if (cs != null)
Expand Down

0 comments on commit b7388c6

Please sign in to comment.