@noir-lang/noirc_abi 0.19.3 → 0.19.4

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.
@@ -34,7 +34,7 @@ export type AbiType =
34
34
  { kind: "integer", sign: Sign, width: number } |
35
35
  { kind: "array", length: number, type: AbiType } |
36
36
  { kind: "tuple", fields: AbiType[] } |
37
- { kind: "struct", path: string, fields: [string, AbiType][] };
37
+ { kind: "struct", path: string, fields: { name: string, type: AbiType }[] };
38
38
 
39
39
  export type AbiParameter = {
40
40
  name: string,
@@ -11,6 +11,18 @@ function getObject(idx) { return heap[idx]; }
11
11
 
12
12
  let heap_next = heap.length;
13
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
+
14
26
  function addHeapObject(obj) {
15
27
  if (heap_next === heap.length) heap.push(heap.length + 1);
16
28
  const idx = heap_next;
@@ -20,16 +32,26 @@ function addHeapObject(obj) {
20
32
  return idx;
21
33
  }
22
34
 
23
- function dropObject(idx) {
24
- if (idx < 132) return;
25
- heap[idx] = heap_next;
26
- heap_next = idx;
35
+ function isLikeNone(x) {
36
+ return x === undefined || x === null;
27
37
  }
28
38
 
29
- function takeObject(idx) {
30
- const ret = getObject(idx);
31
- dropObject(idx);
32
- return ret;
39
+ let cachedFloat64Memory0 = null;
40
+
41
+ function getFloat64Memory0() {
42
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
43
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
44
+ }
45
+ return cachedFloat64Memory0;
46
+ }
47
+
48
+ let cachedInt32Memory0 = null;
49
+
50
+ function getInt32Memory0() {
51
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
52
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
53
+ }
54
+ return cachedInt32Memory0;
33
55
  }
34
56
 
35
57
  let WASM_VECTOR_LEN = 0;
@@ -96,28 +118,6 @@ function passStringToWasm0(arg, malloc, realloc) {
96
118
  return ptr;
97
119
  }
98
120
 
99
- function isLikeNone(x) {
100
- return x === undefined || x === null;
101
- }
102
-
103
- let cachedInt32Memory0 = null;
104
-
105
- function getInt32Memory0() {
106
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
107
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
108
- }
109
- return cachedInt32Memory0;
110
- }
111
-
112
- let cachedFloat64Memory0 = null;
113
-
114
- function getFloat64Memory0() {
115
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
116
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
117
- }
118
- return cachedFloat64Memory0;
119
- }
120
-
121
121
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
122
122
 
123
123
  cachedTextDecoder.decode();
@@ -186,7 +186,11 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
186
186
  return ret;
187
187
  };
188
188
 
189
- module.exports.__wbg_new_b5ed67197ffbd837 = function() {
189
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
190
+ takeObject(arg0);
191
+ };
192
+
193
+ module.exports.__wbg_new_ea5ce65bd15411ec = function() {
190
194
  const ret = new Map();
191
195
  return addHeapObject(ret);
192
196
  };
@@ -196,8 +200,11 @@ module.exports.__wbindgen_number_new = function(arg0) {
196
200
  return addHeapObject(ret);
197
201
  };
198
202
 
199
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
200
- takeObject(arg0);
203
+ module.exports.__wbindgen_number_get = function(arg0, arg1) {
204
+ const obj = getObject(arg1);
205
+ const ret = typeof(obj) === 'number' ? obj : undefined;
206
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
207
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
201
208
  };
202
209
 
203
210
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
@@ -209,14 +216,7 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
209
216
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
210
217
  };
211
218
 
212
- module.exports.__wbindgen_number_get = function(arg0, arg1) {
213
- const obj = getObject(arg1);
214
- const ret = typeof(obj) === 'number' ? obj : undefined;
215
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
216
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
217
- };
218
-
219
- module.exports.__wbg_constructor_6b9bfb1271febd50 = function(arg0) {
219
+ module.exports.__wbg_constructor_fc0c89256754526e = function(arg0) {
220
220
  const ret = new Error(takeObject(arg0));
221
221
  return addHeapObject(ret);
222
222
  };
Binary file
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "The Noir Team <team@noir-lang.org>"
5
5
  ],
6
- "version": "0.19.3",
6
+ "version": "0.19.4",
7
7
  "license": "(MIT OR Apache-2.0)",
8
8
  "files": [
9
9
  "nodejs",
@@ -34,7 +34,7 @@ export type AbiType =
34
34
  { kind: "integer", sign: Sign, width: number } |
35
35
  { kind: "array", length: number, type: AbiType } |
36
36
  { kind: "tuple", fields: AbiType[] } |
37
- { kind: "struct", path: string, fields: [string, AbiType][] };
37
+ { kind: "struct", path: string, fields: { name: string, type: AbiType }[] };
38
38
 
39
39
  export type AbiParameter = {
40
40
  name: string,
@@ -8,6 +8,18 @@ function getObject(idx) { return heap[idx]; }
8
8
 
9
9
  let heap_next = heap.length;
10
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
+
11
23
  function addHeapObject(obj) {
12
24
  if (heap_next === heap.length) heap.push(heap.length + 1);
13
25
  const idx = heap_next;
@@ -17,16 +29,26 @@ function addHeapObject(obj) {
17
29
  return idx;
18
30
  }
19
31
 
20
- function dropObject(idx) {
21
- if (idx < 132) return;
22
- heap[idx] = heap_next;
23
- heap_next = idx;
32
+ function isLikeNone(x) {
33
+ return x === undefined || x === null;
24
34
  }
25
35
 
26
- function takeObject(idx) {
27
- const ret = getObject(idx);
28
- dropObject(idx);
29
- return ret;
36
+ let cachedFloat64Memory0 = null;
37
+
38
+ function getFloat64Memory0() {
39
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
40
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
41
+ }
42
+ return cachedFloat64Memory0;
43
+ }
44
+
45
+ let cachedInt32Memory0 = null;
46
+
47
+ function getInt32Memory0() {
48
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
49
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
50
+ }
51
+ return cachedInt32Memory0;
30
52
  }
31
53
 
32
54
  let WASM_VECTOR_LEN = 0;
@@ -93,28 +115,6 @@ function passStringToWasm0(arg, malloc, realloc) {
93
115
  return ptr;
94
116
  }
95
117
 
96
- function isLikeNone(x) {
97
- return x === undefined || x === null;
98
- }
99
-
100
- let cachedInt32Memory0 = null;
101
-
102
- function getInt32Memory0() {
103
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
104
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
105
- }
106
- return cachedInt32Memory0;
107
- }
108
-
109
- let cachedFloat64Memory0 = null;
110
-
111
- function getFloat64Memory0() {
112
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
113
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
114
- }
115
- return cachedFloat64Memory0;
116
- }
117
-
118
118
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
119
119
 
120
120
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
@@ -216,7 +216,10 @@ function __wbg_get_imports() {
216
216
  const ret = getObject(arg0) === undefined;
217
217
  return ret;
218
218
  };
219
- imports.wbg.__wbg_new_b5ed67197ffbd837 = function() {
219
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
220
+ takeObject(arg0);
221
+ };
222
+ imports.wbg.__wbg_new_ea5ce65bd15411ec = function() {
220
223
  const ret = new Map();
221
224
  return addHeapObject(ret);
222
225
  };
@@ -224,8 +227,11 @@ function __wbg_get_imports() {
224
227
  const ret = arg0;
225
228
  return addHeapObject(ret);
226
229
  };
227
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
228
- takeObject(arg0);
230
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
231
+ const obj = getObject(arg1);
232
+ const ret = typeof(obj) === 'number' ? obj : undefined;
233
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
234
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
229
235
  };
230
236
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
231
237
  const obj = getObject(arg1);
@@ -235,13 +241,7 @@ function __wbg_get_imports() {
235
241
  getInt32Memory0()[arg0 / 4 + 1] = len1;
236
242
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
237
243
  };
238
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
239
- const obj = getObject(arg1);
240
- const ret = typeof(obj) === 'number' ? obj : undefined;
241
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
242
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
243
- };
244
- imports.wbg.__wbg_constructor_6b9bfb1271febd50 = function(arg0) {
244
+ imports.wbg.__wbg_constructor_fc0c89256754526e = function(arg0) {
245
245
  const ret = new Error(takeObject(arg0));
246
246
  return addHeapObject(ret);
247
247
  };
Binary file