Skip to content

Commit 0743f03

Browse files
committed
Do rest of positional API in MultiDimArray on JVM.
1 parent 0da71d8 commit 0743f03

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/MultiDimArrayInstanceBase.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,23 @@ public void shift_native(ThreadContext tc) {
9090
public void splice(ThreadContext tc, SixModelObject from, long offset, long count) {
9191
throw ExceptionHandling.dieInternal(tc, "Cannot splice a fixed dimension array");
9292
}
93+
94+
public SixModelObject at_pos_boxed(ThreadContext tc, long index) {
95+
return this.at_pos_multidim_boxed(tc, new long[] { index });
96+
}
97+
public void at_pos_native(ThreadContext tc, long index) {
98+
this.at_pos_multidim_native(tc, new long[] { index });
99+
}
100+
public void bind_pos_boxed(ThreadContext tc, long index, SixModelObject value) {
101+
this.bind_pos_multidim_boxed(tc, new long[] { index }, value);
102+
}
103+
public void bind_pos_native(ThreadContext tc, long index) {
104+
this.bind_pos_multidim_native(tc, new long[] { index });
105+
}
106+
public void set_elems(ThreadContext tc, long count) {
107+
this.set_dimensions(tc, new long[] { count });
108+
}
109+
public long elems(ThreadContext tc) {
110+
return this.dimensions(tc)[0];
111+
}
93112
}

0 commit comments

Comments
 (0)