// Zero it out
buffer.setStructReturn(new byte[type.getNativeSize()], 0);
}
} else if (memory instanceof ArrayMemoryIO) {
ArrayMemoryIO arrayMemory = (ArrayMemoryIO) memory;
if (arrayMemory.arrayLength() < type.getNativeSize()) {
throw runtime.newRuntimeError("size of struct returned from callback too small");
}
buffer.setStructReturn(arrayMemory.array(), arrayMemory.arrayOffset());
} else {
throw runtime.newRuntimeError("struct return value has illegal backing memory");
}
} else if (value.isNil()) {