add acopy native (must be included manually for backwards compatibility, for now)
This commit is contained in:
parent
0818de0421
commit
1fe56dbf17
1 changed files with 13 additions and 0 deletions
13
ISBPL.java
13
ISBPL.java
|
@ -323,6 +323,19 @@ public class ISBPL {
|
||||||
stack.push(new ISBPLObject(getType("array"), arr));
|
stack.push(new ISBPLObject(getType("array"), arr));
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
case "acopy":
|
||||||
|
func = (stack) -> {
|
||||||
|
ISBPLObject len = stack.pop();
|
||||||
|
ISBPLObject idx2 = stack.pop();
|
||||||
|
ISBPLObject idx1 = stack.pop();
|
||||||
|
ISBPLObject arr2 = stack.pop();
|
||||||
|
ISBPLObject arr1 = stack.pop();
|
||||||
|
arr1.checkType(getType("array"));
|
||||||
|
arr2.checkType(getType("array"));
|
||||||
|
System.arraycopy((ISBPLObject[]) arr1.object, (int) idx1.toLong(), (ISBPLObject[]) arr2.object, (int) idx2.toLong(), (int) len.toLong());
|
||||||
|
stack.push(arr2);
|
||||||
|
};
|
||||||
|
break;
|
||||||
case "_array":
|
case "_array":
|
||||||
func = (Stack<ISBPLObject> stack) -> {
|
func = (Stack<ISBPLObject> stack) -> {
|
||||||
ISBPLObject a = stack.pop();
|
ISBPLObject a = stack.pop();
|
||||||
|
|
Loading…
Add table
Reference in a new issue