Skip to content

Commit

Permalink
Bump rsdd version
Browse files Browse the repository at this point in the history
To-do: change the docs, since they're now outdated
  • Loading branch information
mattxwang committed Jul 6, 2023
1 parent 478f3fe commit 67092b4
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 31 deletions.
2 changes: 1 addition & 1 deletion static/rsdd/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rsdd",
"collaborators": [
"Steven Holtzen <[email protected]>"
"Steven Holtzen <[email protected]>"
],
"description": "Rust decision diagrams.",
"version": "0.1.0",
Expand Down
63 changes: 36 additions & 27 deletions static/rsdd/rsdd_bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ function passStringToWasm0(arg, malloc, realloc) {

if (realloc === undefined) {
const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length);
const ptr = malloc(buf.length, 1) >>> 0;
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
WASM_VECTOR_LEN = buf.length;
return ptr;
}

let len = arg.length;
let ptr = malloc(len);
let ptr = malloc(len, 1) >>> 0;

const mem = getUint8Memory0();

Expand All @@ -79,7 +79,7 @@ function passStringToWasm0(arg, malloc, realloc) {
if (offset !== 0) {
arg = arg.slice(offset);
}
ptr = realloc(ptr, len, len = offset + arg.length * 3);
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
const ret = encodeString(arg, view);

Expand Down Expand Up @@ -119,6 +119,7 @@ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true
cachedTextDecoder.decode();

function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}

Expand Down Expand Up @@ -232,17 +233,21 @@ export function vtree(cnf_input, vtree_type_input) {
* @returns {string}
*/
export function bdd(cnf_input) {
let deferred2_0;
let deferred2_1;
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(cnf_input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.bdd(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
deferred2_0 = r0;
deferred2_1 = r1;
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
}
}

Expand All @@ -256,7 +261,7 @@ function getBigUint64Memory0() {
}

function passArray64ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 8);
const ptr = malloc(arg.length * 8, 8) >>> 0;
getBigUint64Memory0().set(arg, ptr / 8);
WASM_VECTOR_LEN = arg.length;
return ptr;
Expand All @@ -267,6 +272,8 @@ function passArray64ToWasm0(arg, malloc) {
* @returns {string}
*/
export function bdd_with_var_order(cnf_input, order) {
let deferred3_0;
let deferred3_1;
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(cnf_input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
Expand All @@ -276,10 +283,12 @@ export function bdd_with_var_order(cnf_input, order) {
wasm.bdd_with_var_order(retptr, ptr0, len0, ptr1, len1);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
deferred3_0 = r0;
deferred3_1 = r1;
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
}
}

Expand Down Expand Up @@ -335,10 +344,10 @@ export function __wbindgen_object_drop_ref(arg0) {
export function __wbindgen_string_get(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'string' ? obj : undefined;
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
};

export function __wbindgen_is_string(arg0) {
Expand Down Expand Up @@ -409,31 +418,31 @@ export function __wbg_set_20cbc34131e76824(arg0, arg1, arg2) {
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
};

export function __wbg_get_27fe3dac1c4d0224(arg0, arg1) {
export function __wbg_get_44be0491f933a435(arg0, arg1) {
const ret = getObject(arg0)[arg1 >>> 0];
return addHeapObject(ret);
};

export function __wbg_length_e498fbc24f9c1d4f(arg0) {
export function __wbg_length_fff51ee6522a1a18(arg0) {
const ret = getObject(arg0).length;
return ret;
};

export function __wbg_new_b525de17f44a8943() {
export function __wbg_new_898a68150f225f2e() {
const ret = new Array();
return addHeapObject(ret);
};

export function __wbg_new_f9876326328f45ed() {
export function __wbg_new_b51585de1b234aff() {
const ret = new Object();
return addHeapObject(ret);
};

export function __wbg_set_17224bc548dd1d7b(arg0, arg1, arg2) {
export function __wbg_set_502d29070ea18557(arg0, arg1, arg2) {
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
};

export function __wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065(arg0) {
export function __wbg_instanceof_ArrayBuffer_39ac22089b74fddb(arg0) {
let result;
try {
result = getObject(arg0) instanceof ArrayBuffer;
Expand All @@ -444,36 +453,36 @@ export function __wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065(arg0) {
return ret;
};

export function __wbg_isSafeInteger_8c4789029e885159(arg0) {
export function __wbg_isSafeInteger_bb8e18dd21c97288(arg0) {
const ret = Number.isSafeInteger(getObject(arg0));
return ret;
};

export function __wbg_entries_4e1315b774245952(arg0) {
export function __wbg_entries_e51f29c7bba0c054(arg0) {
const ret = Object.entries(getObject(arg0));
return addHeapObject(ret);
};

export function __wbg_buffer_cf65c07de34b9a08(arg0) {
export function __wbg_buffer_085ec1f694018c4f(arg0) {
const ret = getObject(arg0).buffer;
return addHeapObject(ret);
};

export function __wbg_new_537b7341ce90bb31(arg0) {
export function __wbg_new_8125e318e6245eed(arg0) {
const ret = new Uint8Array(getObject(arg0));
return addHeapObject(ret);
};

export function __wbg_set_17499e8aa4003ebd(arg0, arg1, arg2) {
export function __wbg_set_5cf90238115182c3(arg0, arg1, arg2) {
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
};

export function __wbg_length_27a2afe8ab42b09f(arg0) {
export function __wbg_length_72e2208bbc0efc61(arg0) {
const ret = getObject(arg0).length;
return ret;
};

export function __wbg_instanceof_Uint8Array_01cebe79ca606cca(arg0) {
export function __wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4(arg0) {
let result;
try {
result = getObject(arg0) instanceof Uint8Array;
Expand All @@ -493,10 +502,10 @@ export function __wbindgen_bigint_get_as_i64(arg0, arg1) {

export function __wbindgen_debug_string(arg0, arg1) {
const ret = debugString(getObject(arg1));
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
};

export function __wbindgen_throw(arg0, arg1) {
Expand Down
Binary file modified static/rsdd/rsdd_bg.wasm
Binary file not shown.
6 changes: 3 additions & 3 deletions static/rsdd/rsdd_bg.wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function bdd(a: number, b: number, c: number): void;
export function bdd_with_var_order(a: number, b: number, c: number, d: number, e: number): void;
export function sdd(a: number, b: number, c: number, d: number): void;
export function demo_model_count_sdd(a: number, b: number, c: number): void;
export function __wbindgen_malloc(a: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number): number;
export function __wbindgen_malloc(a: number, b: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_free(a: number, b: number): void;
export function __wbindgen_free(a: number, b: number, c: number): void;

0 comments on commit 67092b4

Please sign in to comment.