Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement multi-dim access funcs in VMArray.
  • Loading branch information
jnthn committed Jul 10, 2015
1 parent ef20fbf commit 404e842
Showing 1 changed file with 24 additions and 0 deletions.
Expand Up @@ -16,4 +16,28 @@ public void set_dimensions(ThreadContext tc, long[] dims) {
throw ExceptionHandling.dieInternal(tc, "A dynamic array can only have a single dimension");
this.set_elems(tc, dims[0]);
}

public SixModelObject at_pos_multidim_boxed(ThreadContext tc, long[] indices) {
if (indices.length != 1)
throw ExceptionHandling.dieInternal(tc, "A dynamic array can only be indexed with a single dimension");
return this.at_pos_boxed(tc, indices[0]);
}

public void at_pos_multidim_native(ThreadContext tc, long[] indices) {
if (indices.length != 1)
throw ExceptionHandling.dieInternal(tc, "A dynamic array can only be indexed with a single dimension");
this.at_pos_native(tc, indices[0]);
}

public void bind_pos_multidim_boxed(ThreadContext tc, long[] indices, SixModelObject value) {
if (indices.length != 1)
throw ExceptionHandling.dieInternal(tc, "A dynamic array can only be indexed with a single dimension");
this.bind_pos_boxed(tc, indices[0], value);
}

public void bind_pos_multidim_native(ThreadContext tc, long[] indices) {
if (indices.length != 1)
throw ExceptionHandling.dieInternal(tc, "A dynamic array can only be indexed with a single dimension");
this.bind_pos_native(tc, indices[0]);
}
}

0 comments on commit 404e842

Please sign in to comment.