@noir-lang/noir_wasm 0.35.0-2a0d211.nightly → 0.35.0-51ae1b3.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.
package/dist/node/index_bg.wasm
CHANGED
|
Binary file
|
package/dist/node/main.js
CHANGED
|
@@ -195,7 +195,7 @@ function debugString(val) {
|
|
|
195
195
|
* @param {string} level
|
|
196
196
|
*/
|
|
197
197
|
module.exports.init_log_level = function(level) {
|
|
198
|
-
const ptr0 = passStringToWasm0(level, wasm.
|
|
198
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
199
199
|
const len0 = WASM_VECTOR_LEN;
|
|
200
200
|
wasm.init_log_level(ptr0, len0);
|
|
201
201
|
};
|
|
@@ -215,19 +215,21 @@ function _assertClass(instance, klass) {
|
|
|
215
215
|
return instance.ptr;
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
|
+
* This is a method that exposes the same API as `compile`
|
|
219
|
+
* But uses the Context based APi internally
|
|
218
220
|
* @param {string} entry_point
|
|
219
221
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
220
222
|
* @param {PathToFileSourceMap} file_source_map
|
|
221
223
|
* @returns {ProgramCompileResult}
|
|
222
224
|
*/
|
|
223
|
-
module.exports.
|
|
225
|
+
module.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {
|
|
224
226
|
try {
|
|
225
227
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
226
|
-
const ptr0 = passStringToWasm0(entry_point, wasm.
|
|
228
|
+
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
227
229
|
const len0 = WASM_VECTOR_LEN;
|
|
228
230
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
229
231
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
230
|
-
wasm.
|
|
232
|
+
wasm.compile_program_(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
231
233
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
232
234
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
233
235
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -241,19 +243,21 @@ module.exports.compile_program = function(entry_point, dependency_graph, file_so
|
|
|
241
243
|
};
|
|
242
244
|
|
|
243
245
|
/**
|
|
246
|
+
* This is a method that exposes the same API as `compile`
|
|
247
|
+
* But uses the Context based APi internally
|
|
244
248
|
* @param {string} entry_point
|
|
245
249
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
246
250
|
* @param {PathToFileSourceMap} file_source_map
|
|
247
251
|
* @returns {ContractCompileResult}
|
|
248
252
|
*/
|
|
249
|
-
module.exports.
|
|
253
|
+
module.exports.compile_contract_ = function(entry_point, dependency_graph, file_source_map) {
|
|
250
254
|
try {
|
|
251
255
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
252
|
-
const ptr0 = passStringToWasm0(entry_point, wasm.
|
|
256
|
+
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
253
257
|
const len0 = WASM_VECTOR_LEN;
|
|
254
258
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
255
259
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
256
|
-
wasm.
|
|
260
|
+
wasm.compile_contract_(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
257
261
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
258
262
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
259
263
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -267,21 +271,19 @@ module.exports.compile_contract = function(entry_point, dependency_graph, file_s
|
|
|
267
271
|
};
|
|
268
272
|
|
|
269
273
|
/**
|
|
270
|
-
* This is a method that exposes the same API as `compile`
|
|
271
|
-
* But uses the Context based APi internally
|
|
272
274
|
* @param {string} entry_point
|
|
273
275
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
274
276
|
* @param {PathToFileSourceMap} file_source_map
|
|
275
277
|
* @returns {ProgramCompileResult}
|
|
276
278
|
*/
|
|
277
|
-
module.exports.
|
|
279
|
+
module.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {
|
|
278
280
|
try {
|
|
279
281
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
280
|
-
const ptr0 = passStringToWasm0(entry_point, wasm.
|
|
282
|
+
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
281
283
|
const len0 = WASM_VECTOR_LEN;
|
|
282
284
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
283
285
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
284
|
-
wasm.
|
|
286
|
+
wasm.compile_program(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
285
287
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
286
288
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
287
289
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -295,21 +297,19 @@ module.exports.compile_program_ = function(entry_point, dependency_graph, file_s
|
|
|
295
297
|
};
|
|
296
298
|
|
|
297
299
|
/**
|
|
298
|
-
* This is a method that exposes the same API as `compile`
|
|
299
|
-
* But uses the Context based APi internally
|
|
300
300
|
* @param {string} entry_point
|
|
301
301
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
302
302
|
* @param {PathToFileSourceMap} file_source_map
|
|
303
303
|
* @returns {ContractCompileResult}
|
|
304
304
|
*/
|
|
305
|
-
module.exports.
|
|
305
|
+
module.exports.compile_contract = function(entry_point, dependency_graph, file_source_map) {
|
|
306
306
|
try {
|
|
307
307
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
308
|
-
const ptr0 = passStringToWasm0(entry_point, wasm.
|
|
308
|
+
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
309
309
|
const len0 = WASM_VECTOR_LEN;
|
|
310
310
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
311
311
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
312
|
-
wasm.
|
|
312
|
+
wasm.compile_contract(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
313
313
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
314
314
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
315
315
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -326,7 +326,7 @@ function handleError(f, args) {
|
|
|
326
326
|
try {
|
|
327
327
|
return f.apply(this, args);
|
|
328
328
|
} catch (e) {
|
|
329
|
-
wasm.
|
|
329
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
@@ -369,7 +369,7 @@ class CompilerContext {
|
|
|
369
369
|
* @returns {CrateId}
|
|
370
370
|
*/
|
|
371
371
|
process_root_crate(path_to_crate) {
|
|
372
|
-
const ptr0 = passStringToWasm0(path_to_crate, wasm.
|
|
372
|
+
const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
373
373
|
const len0 = WASM_VECTOR_LEN;
|
|
374
374
|
const ret = wasm.compilercontext_process_root_crate(this.__wbg_ptr, ptr0, len0);
|
|
375
375
|
return CrateId.__wrap(ret);
|
|
@@ -379,7 +379,7 @@ class CompilerContext {
|
|
|
379
379
|
* @returns {CrateId}
|
|
380
380
|
*/
|
|
381
381
|
process_dependency_crate(path_to_crate) {
|
|
382
|
-
const ptr0 = passStringToWasm0(path_to_crate, wasm.
|
|
382
|
+
const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
383
383
|
const len0 = WASM_VECTOR_LEN;
|
|
384
384
|
const ret = wasm.compilercontext_process_dependency_crate(this.__wbg_ptr, ptr0, len0);
|
|
385
385
|
return CrateId.__wrap(ret);
|
|
@@ -392,7 +392,7 @@ class CompilerContext {
|
|
|
392
392
|
add_dependency_edge(crate_name, from, to) {
|
|
393
393
|
try {
|
|
394
394
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
395
|
-
const ptr0 = passStringToWasm0(crate_name, wasm.
|
|
395
|
+
const ptr0 = passStringToWasm0(crate_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
396
396
|
const len0 = WASM_VECTOR_LEN;
|
|
397
397
|
_assertClass(from, CrateId);
|
|
398
398
|
_assertClass(to, CrateId);
|
|
@@ -508,9 +508,9 @@ class PathToFileSourceMap {
|
|
|
508
508
|
* @returns {boolean}
|
|
509
509
|
*/
|
|
510
510
|
add_source_code(path, source_code) {
|
|
511
|
-
const ptr0 = passStringToWasm0(path, wasm.
|
|
511
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
512
512
|
const len0 = WASM_VECTOR_LEN;
|
|
513
|
-
const ptr1 = passStringToWasm0(source_code, wasm.
|
|
513
|
+
const ptr1 = passStringToWasm0(source_code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
514
514
|
const len1 = WASM_VECTOR_LEN;
|
|
515
515
|
const ret = wasm.pathtofilesourcemap_add_source_code(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
516
516
|
return ret !== 0;
|
|
@@ -527,16 +527,16 @@ module.exports.__wbg_constructor_c846aa1e57e01f57 = function(arg0) {
|
|
|
527
527
|
return addHeapObject(ret);
|
|
528
528
|
};
|
|
529
529
|
|
|
530
|
-
module.exports.__wbg_constructor_5532b520acb38e73 = function() {
|
|
531
|
-
const ret = new Object();
|
|
532
|
-
return addHeapObject(ret);
|
|
533
|
-
};
|
|
534
|
-
|
|
535
530
|
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
536
531
|
const ret = getObject(arg0) === undefined;
|
|
537
532
|
return ret;
|
|
538
533
|
};
|
|
539
534
|
|
|
535
|
+
module.exports.__wbg_constructor_5532b520acb38e73 = function() {
|
|
536
|
+
const ret = new Object();
|
|
537
|
+
return addHeapObject(ret);
|
|
538
|
+
};
|
|
539
|
+
|
|
540
540
|
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
541
541
|
const ret = new Error();
|
|
542
542
|
return addHeapObject(ret);
|
|
@@ -544,7 +544,7 @@ module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
|
544
544
|
|
|
545
545
|
module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
546
546
|
const ret = getObject(arg1).stack;
|
|
547
|
-
const ptr1 = passStringToWasm0(ret, wasm.
|
|
547
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
548
548
|
const len1 = WASM_VECTOR_LEN;
|
|
549
549
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
550
550
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
@@ -558,7 +558,7 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
|
558
558
|
deferred0_1 = arg1;
|
|
559
559
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
560
560
|
} finally {
|
|
561
|
-
wasm.
|
|
561
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1);
|
|
562
562
|
}
|
|
563
563
|
};
|
|
564
564
|
|
|
@@ -602,7 +602,7 @@ module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
|
602
602
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
603
603
|
const obj = getObject(arg1);
|
|
604
604
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
605
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.
|
|
605
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
606
606
|
var len1 = WASM_VECTOR_LEN;
|
|
607
607
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
608
608
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
@@ -635,7 +635,7 @@ module.exports.__wbg_set_07da13cc24b69217 = function() { return handleError(func
|
|
|
635
635
|
|
|
636
636
|
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
637
637
|
const ret = debugString(getObject(arg1));
|
|
638
|
-
const ptr1 = passStringToWasm0(ret, wasm.
|
|
638
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
639
639
|
const len1 = WASM_VECTOR_LEN;
|
|
640
640
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
641
641
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|