@noir-lang/noir_wasm 0.35.0 → 0.36.0-075c3d3.nightly

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.
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "The Noir Team <team@noir-lang.org>"
5
5
  ],
6
- "version": "0.35.0",
6
+ "version": "0.36.0",
7
7
  "license": "MIT OR Apache-2.0",
8
8
  "files": [
9
9
  "index_bg.wasm",
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "The Noir Team <team@noir-lang.org>"
5
5
  ],
6
- "version": "0.35.0",
6
+ "version": "0.36.0",
7
7
  "license": "MIT OR Apache-2.0",
8
8
  "files": [
9
9
  "index_bg.wasm",
Binary file
package/dist/node/main.js CHANGED
@@ -191,22 +191,6 @@ function debugString(val) {
191
191
  // TODO we could test for more things here, like `Set`s and `Map`s.
192
192
  return className;
193
193
  }
194
- /**
195
- * @param {string} level
196
- */
197
- module.exports.init_log_level = function(level) {
198
- const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
199
- const len0 = WASM_VECTOR_LEN;
200
- wasm.init_log_level(ptr0, len0);
201
- };
202
-
203
- /**
204
- * @returns {any}
205
- */
206
- module.exports.build_info = function() {
207
- const ret = wasm.build_info();
208
- return takeObject(ret);
209
- };
210
194
 
211
195
  function _assertClass(instance, klass) {
212
196
  if (!(instance instanceof klass)) {
@@ -223,7 +207,7 @@ function _assertClass(instance, klass) {
223
207
  module.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {
224
208
  try {
225
209
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
226
- const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
210
+ const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
227
211
  const len0 = WASM_VECTOR_LEN;
228
212
  _assertClass(file_source_map, PathToFileSourceMap);
229
213
  var ptr1 = file_source_map.__destroy_into_raw();
@@ -249,7 +233,7 @@ module.exports.compile_program = function(entry_point, dependency_graph, file_so
249
233
  module.exports.compile_contract = function(entry_point, dependency_graph, file_source_map) {
250
234
  try {
251
235
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
252
- const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
236
+ const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
253
237
  const len0 = WASM_VECTOR_LEN;
254
238
  _assertClass(file_source_map, PathToFileSourceMap);
255
239
  var ptr1 = file_source_map.__destroy_into_raw();
@@ -277,7 +261,7 @@ module.exports.compile_contract = function(entry_point, dependency_graph, file_s
277
261
  module.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {
278
262
  try {
279
263
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
280
- const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
264
+ const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
281
265
  const len0 = WASM_VECTOR_LEN;
282
266
  _assertClass(file_source_map, PathToFileSourceMap);
283
267
  var ptr1 = file_source_map.__destroy_into_raw();
@@ -305,7 +289,7 @@ module.exports.compile_program_ = function(entry_point, dependency_graph, file_s
305
289
  module.exports.compile_contract_ = function(entry_point, dependency_graph, file_source_map) {
306
290
  try {
307
291
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
308
- const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
292
+ const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
309
293
  const len0 = WASM_VECTOR_LEN;
310
294
  _assertClass(file_source_map, PathToFileSourceMap);
311
295
  var ptr1 = file_source_map.__destroy_into_raw();
@@ -322,11 +306,28 @@ module.exports.compile_contract_ = function(entry_point, dependency_graph, file_
322
306
  }
323
307
  };
324
308
 
309
+ /**
310
+ * @param {string} level
311
+ */
312
+ module.exports.init_log_level = function(level) {
313
+ const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
314
+ const len0 = WASM_VECTOR_LEN;
315
+ wasm.init_log_level(ptr0, len0);
316
+ };
317
+
318
+ /**
319
+ * @returns {any}
320
+ */
321
+ module.exports.build_info = function() {
322
+ const ret = wasm.build_info();
323
+ return takeObject(ret);
324
+ };
325
+
325
326
  function handleError(f, args) {
326
327
  try {
327
328
  return f.apply(this, args);
328
329
  } catch (e) {
329
- wasm.__wbindgen_export_3(addHeapObject(e));
330
+ wasm.__wbindgen_exn_store(addHeapObject(e));
330
331
  }
331
332
  }
332
333
  /**
@@ -369,7 +370,7 @@ class CompilerContext {
369
370
  * @returns {CrateId}
370
371
  */
371
372
  process_root_crate(path_to_crate) {
372
- const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
373
+ const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
373
374
  const len0 = WASM_VECTOR_LEN;
374
375
  const ret = wasm.compilercontext_process_root_crate(this.__wbg_ptr, ptr0, len0);
375
376
  return CrateId.__wrap(ret);
@@ -379,7 +380,7 @@ class CompilerContext {
379
380
  * @returns {CrateId}
380
381
  */
381
382
  process_dependency_crate(path_to_crate) {
382
- const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
383
+ const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
383
384
  const len0 = WASM_VECTOR_LEN;
384
385
  const ret = wasm.compilercontext_process_dependency_crate(this.__wbg_ptr, ptr0, len0);
385
386
  return CrateId.__wrap(ret);
@@ -392,7 +393,7 @@ class CompilerContext {
392
393
  add_dependency_edge(crate_name, from, to) {
393
394
  try {
394
395
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
395
- const ptr0 = passStringToWasm0(crate_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
396
+ const ptr0 = passStringToWasm0(crate_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
396
397
  const len0 = WASM_VECTOR_LEN;
397
398
  _assertClass(from, CrateId);
398
399
  _assertClass(to, CrateId);
@@ -508,9 +509,9 @@ class PathToFileSourceMap {
508
509
  * @returns {boolean}
509
510
  */
510
511
  add_source_code(path, source_code) {
511
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
512
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
512
513
  const len0 = WASM_VECTOR_LEN;
513
- const ptr1 = passStringToWasm0(source_code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
514
+ const ptr1 = passStringToWasm0(source_code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
514
515
  const len1 = WASM_VECTOR_LEN;
515
516
  const ret = wasm.pathtofilesourcemap_add_source_code(this.__wbg_ptr, ptr0, len0, ptr1, len1);
516
517
  return ret !== 0;
@@ -522,12 +523,7 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
522
523
  takeObject(arg0);
523
524
  };
524
525
 
525
- module.exports.__wbg_constructor_c846aa1e57e01f57 = function(arg0) {
526
- const ret = new Error(takeObject(arg0));
527
- return addHeapObject(ret);
528
- };
529
-
530
- module.exports.__wbg_constructor_5532b520acb38e73 = function() {
526
+ module.exports.__wbg_constructor_42abc892058cbf24 = function() {
531
527
  const ret = new Object();
532
528
  return addHeapObject(ret);
533
529
  };
@@ -537,6 +533,11 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
537
533
  return ret;
538
534
  };
539
535
 
536
+ module.exports.__wbg_constructor_00b064bf8f1c4a5d = function(arg0) {
537
+ const ret = new Error(takeObject(arg0));
538
+ return addHeapObject(ret);
539
+ };
540
+
540
541
  module.exports.__wbg_new_abda76e883ba8a5f = function() {
541
542
  const ret = new Error();
542
543
  return addHeapObject(ret);
@@ -544,7 +545,7 @@ module.exports.__wbg_new_abda76e883ba8a5f = function() {
544
545
 
545
546
  module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
546
547
  const ret = getObject(arg1).stack;
547
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
548
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
548
549
  const len1 = WASM_VECTOR_LEN;
549
550
  getInt32Memory0()[arg0 / 4 + 1] = len1;
550
551
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
@@ -558,7 +559,7 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
558
559
  deferred0_1 = arg1;
559
560
  console.error(getStringFromWasm0(arg0, arg1));
560
561
  } finally {
561
- wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
562
+ wasm.__wbindgen_free(deferred0_0, deferred0_1);
562
563
  }
563
564
  };
564
565
 
@@ -602,7 +603,7 @@ module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
602
603
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
603
604
  const obj = getObject(arg1);
604
605
  const ret = typeof(obj) === 'string' ? obj : undefined;
605
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
606
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
606
607
  var len1 = WASM_VECTOR_LEN;
607
608
  getInt32Memory0()[arg0 / 4 + 1] = len1;
608
609
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
@@ -635,7 +636,7 @@ module.exports.__wbg_set_07da13cc24b69217 = function() { return handleError(func
635
636
 
636
637
  module.exports.__wbindgen_debug_string = function(arg0, arg1) {
637
638
  const ret = debugString(getObject(arg1));
638
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
639
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
639
640
  const len1 = WASM_VECTOR_LEN;
640
641
  getInt32Memory0()[arg0 / 4 + 1] = len1;
641
642
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;