@noir-lang/acvm_js 0.26.1 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/nodejs/acvm_js.js CHANGED
@@ -3,6 +3,26 @@ imports['__wbindgen_placeholder__'] = module.exports;
3
3
  let wasm;
4
4
  const { TextDecoder, TextEncoder } = require(`util`);
5
5
 
6
+ const heap = new Array(128).fill(undefined);
7
+
8
+ heap.push(undefined, null, true, false);
9
+
10
+ function getObject(idx) { return heap[idx]; }
11
+
12
+ let heap_next = heap.length;
13
+
14
+ function dropObject(idx) {
15
+ if (idx < 132) return;
16
+ heap[idx] = heap_next;
17
+ heap_next = idx;
18
+ }
19
+
20
+ function takeObject(idx) {
21
+ const ret = getObject(idx);
22
+ dropObject(idx);
23
+ return ret;
24
+ }
25
+
6
26
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
7
27
 
8
28
  cachedTextDecoder.decode();
@@ -21,12 +41,6 @@ function getStringFromWasm0(ptr, len) {
21
41
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
22
42
  }
23
43
 
24
- const heap = new Array(128).fill(undefined);
25
-
26
- heap.push(undefined, null, true, false);
27
-
28
- let heap_next = heap.length;
29
-
30
44
  function addHeapObject(obj) {
31
45
  if (heap_next === heap.length) heap.push(heap.length + 1);
32
46
  const idx = heap_next;
@@ -36,20 +50,6 @@ function addHeapObject(obj) {
36
50
  return idx;
37
51
  }
38
52
 
39
- function getObject(idx) { return heap[idx]; }
40
-
41
- function dropObject(idx) {
42
- if (idx < 132) return;
43
- heap[idx] = heap_next;
44
- heap_next = idx;
45
- }
46
-
47
- function takeObject(idx) {
48
- const ret = getObject(idx);
49
- dropObject(idx);
50
- return ret;
51
- }
52
-
53
53
  function isLikeNone(x) {
54
54
  return x === undefined || x === null;
55
55
  }
@@ -226,7 +226,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
226
226
  return real;
227
227
  }
228
228
  function __wbg_adapter_54(arg0, arg1, arg2) {
229
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8fdacd768a9ff6b4(arg0, arg1, addHeapObject(arg2));
229
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7be0e81f38bcb593(arg0, arg1, addHeapObject(arg2));
230
230
  }
231
231
 
232
232
  /**
@@ -445,7 +445,7 @@ function handleError(f, args) {
445
445
  }
446
446
  }
447
447
  function __wbg_adapter_148(arg0, arg1, arg2, arg3) {
448
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h2def3b115f9d10e4(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
448
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h2cc2a3675130eda0(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
449
449
  }
450
450
 
451
451
  /**
@@ -499,11 +499,6 @@ class WasmBlackBoxFunctionSolver {
499
499
  }
500
500
  module.exports.WasmBlackBoxFunctionSolver = WasmBlackBoxFunctionSolver;
501
501
 
502
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
503
- const ret = getStringFromWasm0(arg0, arg1);
504
- return addHeapObject(ret);
505
- };
506
-
507
502
  module.exports.__wbindgen_object_drop_ref = function(arg0) {
508
503
  takeObject(arg0);
509
504
  };
@@ -518,6 +513,11 @@ module.exports.__wbindgen_object_clone_ref = function(arg0) {
518
513
  return addHeapObject(ret);
519
514
  };
520
515
 
516
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
517
+ const ret = getStringFromWasm0(arg0, arg1);
518
+ return addHeapObject(ret);
519
+ };
520
+
521
521
  module.exports.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
522
522
  const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
523
523
  return addHeapObject(ret);
@@ -550,7 +550,7 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
550
550
  return ret;
551
551
  };
552
552
 
553
- module.exports.__wbg_constructor_0f1be29bba11a757 = function(arg0) {
553
+ module.exports.__wbg_constructor_6b4742a211e48095 = function(arg0) {
554
554
  const ret = new Error(takeObject(arg0));
555
555
  return addHeapObject(ret);
556
556
  };
@@ -564,7 +564,7 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
564
564
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
565
565
  };
566
566
 
567
- module.exports.__wbg_new_b1b225905e158eb4 = function() {
567
+ module.exports.__wbg_new_212eeacc588e41ad = function() {
568
568
  const ret = new Map();
569
569
  return addHeapObject(ret);
570
570
  };
@@ -604,13 +604,8 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
604
604
  }
605
605
  };
606
606
 
607
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
608
- const ret = BigInt.asUintN(64, arg0);
609
- return addHeapObject(ret);
610
- };
611
-
612
- module.exports.__wbindgen_shr = function(arg0, arg1) {
613
- const ret = getObject(arg0) >> getObject(arg1);
607
+ module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
608
+ const ret = arg0;
614
609
  return addHeapObject(ret);
615
610
  };
616
611
 
@@ -619,16 +614,6 @@ module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
619
614
  return ret;
620
615
  };
621
616
 
622
- module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
623
- const ret = arg0;
624
- return addHeapObject(ret);
625
- };
626
-
627
- module.exports.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
628
- const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
629
- return addHeapObject(ret);
630
- };
631
-
632
617
  module.exports.__wbindgen_ge = function(arg0, arg1) {
633
618
  const ret = getObject(arg0) >= getObject(arg1);
634
619
  return ret;
@@ -639,6 +624,21 @@ module.exports.__wbindgen_is_bigint = function(arg0) {
639
624
  return ret;
640
625
  };
641
626
 
627
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
628
+ const ret = BigInt.asUintN(64, arg0);
629
+ return addHeapObject(ret);
630
+ };
631
+
632
+ module.exports.__wbindgen_shr = function(arg0, arg1) {
633
+ const ret = getObject(arg0) >> getObject(arg1);
634
+ return addHeapObject(ret);
635
+ };
636
+
637
+ module.exports.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
638
+ const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
639
+ return addHeapObject(ret);
640
+ };
641
+
642
642
  module.exports.__wbindgen_is_object = function(arg0) {
643
643
  const val = getObject(arg0);
644
644
  const ret = typeof(val) === 'object' && val !== null;
@@ -1062,8 +1062,8 @@ module.exports.__wbindgen_function_table = function() {
1062
1062
  return addHeapObject(ret);
1063
1063
  };
1064
1064
 
1065
- module.exports.__wbindgen_closure_wrapper773 = function(arg0, arg1, arg2) {
1066
- const ret = makeMutClosure(arg0, arg1, 230, __wbg_adapter_54);
1065
+ module.exports.__wbindgen_closure_wrapper595 = function(arg0, arg1, arg2) {
1066
+ const ret = makeMutClosure(arg0, arg1, 189, __wbg_adapter_54);
1067
1067
  return addHeapObject(ret);
1068
1068
  };
1069
1069
 
Binary file
@@ -17,8 +17,8 @@ export function trap___wbgd_downcast_token(): number;
17
17
  export function __wbindgen_malloc(a: number, b: number): number;
18
18
  export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
19
19
  export const __wbindgen_export_2: WebAssembly.Table;
20
- export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8fdacd768a9ff6b4(a: number, b: number, c: number): void;
20
+ export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7be0e81f38bcb593(a: number, b: number, c: number): void;
21
21
  export function __wbindgen_add_to_stack_pointer(a: number): number;
22
22
  export function __wbindgen_free(a: number, b: number, c: number): void;
23
23
  export function __wbindgen_exn_store(a: number): void;
24
- export function wasm_bindgen__convert__closures__invoke2_mut__h2def3b115f9d10e4(a: number, b: number, c: number, d: number): void;
24
+ export function wasm_bindgen__convert__closures__invoke2_mut__h2cc2a3675130eda0(a: number, b: number, c: number, d: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noir-lang/acvm_js",
3
- "version": "0.26.1",
3
+ "version": "0.27.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/noir-lang/acvm.git"
package/web/acvm_js.d.ts CHANGED
@@ -160,11 +160,11 @@ export interface InitOutput {
160
160
  readonly __wbindgen_malloc: (a: number, b: number) => number;
161
161
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
162
162
  readonly __wbindgen_export_2: WebAssembly.Table;
163
- readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8fdacd768a9ff6b4: (a: number, b: number, c: number) => void;
163
+ readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7be0e81f38bcb593: (a: number, b: number, c: number) => void;
164
164
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
165
165
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
166
166
  readonly __wbindgen_exn_store: (a: number) => void;
167
- readonly wasm_bindgen__convert__closures__invoke2_mut__h2def3b115f9d10e4: (a: number, b: number, c: number, d: number) => void;
167
+ readonly wasm_bindgen__convert__closures__invoke2_mut__h2cc2a3675130eda0: (a: number, b: number, c: number, d: number) => void;
168
168
  }
169
169
 
170
170
  export type SyncInitInput = BufferSource | WebAssembly.Module;
package/web/acvm_js.js CHANGED
@@ -1,5 +1,25 @@
1
1
  let wasm;
2
2
 
3
+ const heap = new Array(128).fill(undefined);
4
+
5
+ heap.push(undefined, null, true, false);
6
+
7
+ function getObject(idx) { return heap[idx]; }
8
+
9
+ let heap_next = heap.length;
10
+
11
+ function dropObject(idx) {
12
+ if (idx < 132) return;
13
+ heap[idx] = heap_next;
14
+ heap_next = idx;
15
+ }
16
+
17
+ function takeObject(idx) {
18
+ const ret = getObject(idx);
19
+ dropObject(idx);
20
+ return ret;
21
+ }
22
+
3
23
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
4
24
 
5
25
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
@@ -18,12 +38,6 @@ function getStringFromWasm0(ptr, len) {
18
38
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
19
39
  }
20
40
 
21
- const heap = new Array(128).fill(undefined);
22
-
23
- heap.push(undefined, null, true, false);
24
-
25
- let heap_next = heap.length;
26
-
27
41
  function addHeapObject(obj) {
28
42
  if (heap_next === heap.length) heap.push(heap.length + 1);
29
43
  const idx = heap_next;
@@ -33,20 +47,6 @@ function addHeapObject(obj) {
33
47
  return idx;
34
48
  }
35
49
 
36
- function getObject(idx) { return heap[idx]; }
37
-
38
- function dropObject(idx) {
39
- if (idx < 132) return;
40
- heap[idx] = heap_next;
41
- heap_next = idx;
42
- }
43
-
44
- function takeObject(idx) {
45
- const ret = getObject(idx);
46
- dropObject(idx);
47
- return ret;
48
- }
49
-
50
50
  function isLikeNone(x) {
51
51
  return x === undefined || x === null;
52
52
  }
@@ -223,7 +223,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
223
223
  return real;
224
224
  }
225
225
  function __wbg_adapter_54(arg0, arg1, arg2) {
226
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8fdacd768a9ff6b4(arg0, arg1, addHeapObject(arg2));
226
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7be0e81f38bcb593(arg0, arg1, addHeapObject(arg2));
227
227
  }
228
228
 
229
229
  /**
@@ -442,7 +442,7 @@ function handleError(f, args) {
442
442
  }
443
443
  }
444
444
  function __wbg_adapter_148(arg0, arg1, arg2, arg3) {
445
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h2def3b115f9d10e4(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
445
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h2cc2a3675130eda0(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
446
446
  }
447
447
 
448
448
  /**
@@ -528,10 +528,6 @@ async function __wbg_load(module, imports) {
528
528
  function __wbg_get_imports() {
529
529
  const imports = {};
530
530
  imports.wbg = {};
531
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
532
- const ret = getStringFromWasm0(arg0, arg1);
533
- return addHeapObject(ret);
534
- };
535
531
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
536
532
  takeObject(arg0);
537
533
  };
@@ -543,6 +539,10 @@ function __wbg_get_imports() {
543
539
  const ret = getObject(arg0);
544
540
  return addHeapObject(ret);
545
541
  };
542
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
543
+ const ret = getStringFromWasm0(arg0, arg1);
544
+ return addHeapObject(ret);
545
+ };
546
546
  imports.wbg.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
547
547
  const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
548
548
  return addHeapObject(ret);
@@ -570,7 +570,7 @@ function __wbg_get_imports() {
570
570
  const ret = false;
571
571
  return ret;
572
572
  };
573
- imports.wbg.__wbg_constructor_0f1be29bba11a757 = function(arg0) {
573
+ imports.wbg.__wbg_constructor_6b4742a211e48095 = function(arg0) {
574
574
  const ret = new Error(takeObject(arg0));
575
575
  return addHeapObject(ret);
576
576
  };
@@ -582,7 +582,7 @@ function __wbg_get_imports() {
582
582
  getInt32Memory0()[arg0 / 4 + 1] = len1;
583
583
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
584
584
  };
585
- imports.wbg.__wbg_new_b1b225905e158eb4 = function() {
585
+ imports.wbg.__wbg_new_212eeacc588e41ad = function() {
586
586
  const ret = new Map();
587
587
  return addHeapObject(ret);
588
588
  };
@@ -616,26 +616,14 @@ function __wbg_get_imports() {
616
616
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
617
617
  }
618
618
  };
619
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
620
- const ret = BigInt.asUintN(64, arg0);
621
- return addHeapObject(ret);
622
- };
623
- imports.wbg.__wbindgen_shr = function(arg0, arg1) {
624
- const ret = getObject(arg0) >> getObject(arg1);
619
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
620
+ const ret = arg0;
625
621
  return addHeapObject(ret);
626
622
  };
627
623
  imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
628
624
  const ret = getObject(arg0) === getObject(arg1);
629
625
  return ret;
630
626
  };
631
- imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
632
- const ret = arg0;
633
- return addHeapObject(ret);
634
- };
635
- imports.wbg.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
636
- const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
637
- return addHeapObject(ret);
638
- };
639
627
  imports.wbg.__wbindgen_ge = function(arg0, arg1) {
640
628
  const ret = getObject(arg0) >= getObject(arg1);
641
629
  return ret;
@@ -644,6 +632,18 @@ function __wbg_get_imports() {
644
632
  const ret = typeof(getObject(arg0)) === 'bigint';
645
633
  return ret;
646
634
  };
635
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
636
+ const ret = BigInt.asUintN(64, arg0);
637
+ return addHeapObject(ret);
638
+ };
639
+ imports.wbg.__wbindgen_shr = function(arg0, arg1) {
640
+ const ret = getObject(arg0) >> getObject(arg1);
641
+ return addHeapObject(ret);
642
+ };
643
+ imports.wbg.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
644
+ const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
645
+ return addHeapObject(ret);
646
+ };
647
647
  imports.wbg.__wbindgen_is_object = function(arg0) {
648
648
  const val = getObject(arg0);
649
649
  const ret = typeof(val) === 'object' && val !== null;
@@ -992,8 +992,8 @@ function __wbg_get_imports() {
992
992
  const ret = wasm.__wbindgen_export_2;
993
993
  return addHeapObject(ret);
994
994
  };
995
- imports.wbg.__wbindgen_closure_wrapper773 = function(arg0, arg1, arg2) {
996
- const ret = makeMutClosure(arg0, arg1, 230, __wbg_adapter_54);
995
+ imports.wbg.__wbindgen_closure_wrapper595 = function(arg0, arg1, arg2) {
996
+ const ret = makeMutClosure(arg0, arg1, 189, __wbg_adapter_54);
997
997
  return addHeapObject(ret);
998
998
  };
999
999
 
Binary file
@@ -17,8 +17,8 @@ export function trap___wbgd_downcast_token(): number;
17
17
  export function __wbindgen_malloc(a: number, b: number): number;
18
18
  export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
19
19
  export const __wbindgen_export_2: WebAssembly.Table;
20
- export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8fdacd768a9ff6b4(a: number, b: number, c: number): void;
20
+ export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7be0e81f38bcb593(a: number, b: number, c: number): void;
21
21
  export function __wbindgen_add_to_stack_pointer(a: number): number;
22
22
  export function __wbindgen_free(a: number, b: number, c: number): void;
23
23
  export function __wbindgen_exn_store(a: number): void;
24
- export function wasm_bindgen__convert__closures__invoke2_mut__h2def3b115f9d10e4(a: number, b: number, c: number, d: number): void;
24
+ export function wasm_bindgen__convert__closures__invoke2_mut__h2cc2a3675130eda0(a: number, b: number, c: number, d: number): void;