Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Native fetch/store for native_ref cont spec.
  • Loading branch information
jnthn committed Feb 28, 2015
1 parent b22a0e7 commit 47a347c
Showing 1 changed file with 7 additions and 6 deletions.
Expand Up @@ -3,34 +3,35 @@
import org.perl6.nqp.runtime.ExceptionHandling;
import org.perl6.nqp.runtime.Ops;
import org.perl6.nqp.runtime.ThreadContext;
import org.perl6.nqp.sixmodel.reprs.NativeRefInstance;

public class NativeRefContainerSpec extends ContainerSpec {
/* Fetches a value out of a container. Used for decontainerization. */
public SixModelObject fetch(ThreadContext tc, SixModelObject cont) {
throw ExceptionHandling.dieInternal(tc, "NYI");
}
public long fetch_i(ThreadContext tc, SixModelObject cont) {
throw ExceptionHandling.dieInternal(tc, "NYI");
return ((NativeRefInstance)cont).fetch_i(tc);
}
public double fetch_n(ThreadContext tc, SixModelObject cont) {
throw ExceptionHandling.dieInternal(tc, "NYI");
return ((NativeRefInstance)cont).fetch_n(tc);
}
public String fetch_s(ThreadContext tc, SixModelObject cont) {
throw ExceptionHandling.dieInternal(tc, "NYI");
return ((NativeRefInstance)cont).fetch_s(tc);
}

/* Stores a value in a container. Used for assignment. */
public void store(ThreadContext tc, SixModelObject cont, SixModelObject obj) {
throw ExceptionHandling.dieInternal(tc, "NYI");
}
public void store_i(ThreadContext tc, SixModelObject cont, long value) {
throw ExceptionHandling.dieInternal(tc, "NYI");
((NativeRefInstance)cont).store_i(tc, value);
}
public void store_n(ThreadContext tc, SixModelObject cont, double value) {
throw ExceptionHandling.dieInternal(tc, "NYI");
((NativeRefInstance)cont).store_n(tc, value);
}
public void store_s(ThreadContext tc, SixModelObject cont, String value) {
throw ExceptionHandling.dieInternal(tc, "NYI");
((NativeRefInstance)cont).store_s(tc, value);
}

/* Stores a value in a container, without any checking of it (this
Expand Down

0 comments on commit 47a347c

Please sign in to comment.