const writeRef = (kind) => { memory.writeUint32(payload1_ptr, memory.retain(value)); return exceptionBit | kind; };