wasm gc: fix wrong argument order in System.arraycopy implementation (#975)

This commit is contained in:
lax1dude 2024-11-30 09:53:59 -08:00 committed by GitHub
parent f11a5474d0
commit e4c32681b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -876,8 +876,8 @@ public class WasmGCClassGenerator implements WasmGCClassInfoProvider, WasmGCInit
var targetArrayData = new WasmStructGet(arrayStruct, targetArray, ARRAY_DATA_FIELD_OFFSET);
function.getBody().add(new WasmArrayCopy(
arrayDataType, targetArrayData, new WasmGetLocal(sourceIndexLocal),
arrayDataType, sourceArrayData, new WasmGetLocal(targetIndexLocal),
arrayDataType, targetArrayData, new WasmGetLocal(targetIndexLocal),
arrayDataType, sourceArrayData, new WasmGetLocal(sourceIndexLocal),
new WasmGetLocal(countLocal)));
return function;
}