@raviqqe/stak 0.12.22 → 0.12.24

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@raviqqe/stak",
3
3
  "type": "module",
4
4
  "description": "Stak Scheme in WebAssembly",
5
- "version": "0.12.22",
5
+ "version": "0.12.24",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
package/stak_wasm.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Interprets bytecode with standard input and returns its standard output.
5
- */
6
- export function interpret(bytecode: Uint8Array, input: Uint8Array, heap_size: number): Uint8Array;
7
3
  /**
8
4
  * Compiles source codes in Scheme.
9
5
  */
10
6
  export function compile(source: string): Uint8Array;
7
+ /**
8
+ * Interprets bytecode with standard input and returns its standard output.
9
+ */
10
+ export function interpret(bytecode: Uint8Array, input: Uint8Array, heap_size: number): Uint8Array;
11
11
  /**
12
12
  * Runs a Scheme script with standard input and returns its standard output.
13
13
  */
@@ -25,9 +25,9 @@ export interface InitOutput {
25
25
  readonly interpret: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
26
26
  readonly repl: (a: number) => any;
27
27
  readonly run: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
28
- readonly wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b: (a: number, b: number, c: any) => void;
29
- readonly wasm_bindgen__closure__destroy__h88d41d2f204608f4: (a: number, b: number) => void;
30
- readonly wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065: (a: number, b: number, c: any, d: any) => void;
28
+ readonly wasm_bindgen_4c9dc23d57156128___convert__closures_____invoke___wasm_bindgen_4c9dc23d57156128___JsValue_____: (a: number, b: number, c: any) => void;
29
+ readonly wasm_bindgen_4c9dc23d57156128___closure__destroy___dyn_core_f0fd674eaa06beef___ops__function__FnMut__wasm_bindgen_4c9dc23d57156128___JsValue____Output_______: (a: number, b: number) => void;
30
+ readonly wasm_bindgen_4c9dc23d57156128___convert__closures_____invoke___wasm_bindgen_4c9dc23d57156128___JsValue__wasm_bindgen_4c9dc23d57156128___JsValue_____: (a: number, b: number, c: any, d: any) => void;
31
31
  readonly __wbindgen_malloc: (a: number, b: number) => number;
32
32
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
33
33
  readonly __wbindgen_exn_store: (a: number) => void;
package/stak_wasm.js CHANGED
@@ -209,13 +209,6 @@ function makeMutClosure(arg0, arg1, dtor, f) {
209
209
  return real;
210
210
  }
211
211
 
212
- function passArray8ToWasm0(arg, malloc) {
213
- const ptr = malloc(arg.length * 1, 1) >>> 0;
214
- getUint8ArrayMemory0().set(arg, ptr / 1);
215
- WASM_VECTOR_LEN = arg.length;
216
- return ptr;
217
- }
218
-
219
212
  function takeFromExternrefTable0(idx) {
220
213
  const value = wasm.__wbindgen_externrefs.get(idx);
221
214
  wasm.__externref_table_dealloc(idx);
@@ -226,6 +219,29 @@ function getArrayU8FromWasm0(ptr, len) {
226
219
  ptr = ptr >>> 0;
227
220
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
228
221
  }
222
+ /**
223
+ * Compiles source codes in Scheme.
224
+ * @param {string} source
225
+ * @returns {Uint8Array}
226
+ */
227
+ export function compile(source) {
228
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
229
+ const len0 = WASM_VECTOR_LEN;
230
+ const ret = wasm.compile(ptr0, len0);
231
+ if (ret[3]) {
232
+ throw takeFromExternrefTable0(ret[2]);
233
+ }
234
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
235
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
236
+ return v2;
237
+ }
238
+
239
+ function passArray8ToWasm0(arg, malloc) {
240
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
241
+ getUint8ArrayMemory0().set(arg, ptr / 1);
242
+ WASM_VECTOR_LEN = arg.length;
243
+ return ptr;
244
+ }
229
245
  /**
230
246
  * Interprets bytecode with standard input and returns its standard output.
231
247
  * @param {Uint8Array} bytecode
@@ -247,23 +263,6 @@ export function interpret(bytecode, input, heap_size) {
247
263
  return v3;
248
264
  }
249
265
 
250
- /**
251
- * Compiles source codes in Scheme.
252
- * @param {string} source
253
- * @returns {Uint8Array}
254
- */
255
- export function compile(source) {
256
- const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
257
- const len0 = WASM_VECTOR_LEN;
258
- const ret = wasm.compile(ptr0, len0);
259
- if (ret[3]) {
260
- throw takeFromExternrefTable0(ret[2]);
261
- }
262
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
263
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
264
- return v2;
265
- }
266
-
267
266
  /**
268
267
  * Runs a Scheme script with standard input and returns its standard output.
269
268
  * @param {string} source
@@ -295,12 +294,12 @@ export function repl(heap_size) {
295
294
  return ret;
296
295
  }
297
296
 
298
- function wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b(arg0, arg1, arg2) {
299
- wasm.wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b(arg0, arg1, arg2);
297
+ function wasm_bindgen_4c9dc23d57156128___convert__closures_____invoke___wasm_bindgen_4c9dc23d57156128___JsValue_____(arg0, arg1, arg2) {
298
+ wasm.wasm_bindgen_4c9dc23d57156128___convert__closures_____invoke___wasm_bindgen_4c9dc23d57156128___JsValue_____(arg0, arg1, arg2);
300
299
  }
301
300
 
302
- function wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065(arg0, arg1, arg2, arg3) {
303
- wasm.wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065(arg0, arg1, arg2, arg3);
301
+ function wasm_bindgen_4c9dc23d57156128___convert__closures_____invoke___wasm_bindgen_4c9dc23d57156128___JsValue__wasm_bindgen_4c9dc23d57156128___JsValue_____(arg0, arg1, arg2, arg3) {
302
+ wasm.wasm_bindgen_4c9dc23d57156128___convert__closures_____invoke___wasm_bindgen_4c9dc23d57156128___JsValue__wasm_bindgen_4c9dc23d57156128___JsValue_____(arg0, arg1, arg2, arg3);
304
303
  }
305
304
 
306
305
  const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
@@ -391,7 +390,7 @@ function __wbg_get_imports() {
391
390
  const a = state0.a;
392
391
  state0.a = 0;
393
392
  try {
394
- return wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065(a, state0.b, arg0, arg1);
393
+ return wasm_bindgen_4c9dc23d57156128___convert__closures_____invoke___wasm_bindgen_4c9dc23d57156128___JsValue__wasm_bindgen_4c9dc23d57156128___JsValue_____(a, state0.b, arg0, arg1);
395
394
  } finally {
396
395
  state0.a = a;
397
396
  }
@@ -413,7 +412,7 @@ function __wbg_get_imports() {
413
412
  imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
414
413
  queueMicrotask(arg0);
415
414
  };
416
- imports.wbg.__wbg_read_stdin_a5dd287112d4a636 = function() {
415
+ imports.wbg.__wbg_read_stdin_41a19c0252acd26c = function() {
417
416
  const ret = read_stdin();
418
417
  return ret;
419
418
  };
@@ -445,17 +444,17 @@ function __wbg_get_imports() {
445
444
  const ret = arg0.then(arg1, arg2);
446
445
  return ret;
447
446
  };
448
- imports.wbg.__wbg_write_stderr_5a1e4e92452f0aa6 = function(arg0) {
447
+ imports.wbg.__wbg_write_stderr_f54be4aa1d8654dc = function(arg0) {
449
448
  const ret = write_stderr(arg0);
450
449
  return ret;
451
450
  };
452
- imports.wbg.__wbg_write_stdout_01bed16a860f2cfb = function(arg0) {
451
+ imports.wbg.__wbg_write_stdout_7e0903610bdd0201 = function(arg0) {
453
452
  const ret = write_stdout(arg0);
454
453
  return ret;
455
454
  };
456
455
  imports.wbg.__wbindgen_cast_80e5451c6d1fd870 = function(arg0, arg1) {
457
456
  // Cast intrinsic for `Closure(Closure { dtor_idx: 17, function: Function { arguments: [Externref], shim_idx: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
458
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h88d41d2f204608f4, wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b);
457
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_4c9dc23d57156128___closure__destroy___dyn_core_f0fd674eaa06beef___ops__function__FnMut__wasm_bindgen_4c9dc23d57156128___JsValue____Output_______, wasm_bindgen_4c9dc23d57156128___convert__closures_____invoke___wasm_bindgen_4c9dc23d57156128___JsValue_____);
459
458
  return ret;
460
459
  };
461
460
  imports.wbg.__wbindgen_init_externref_table = function() {
package/stak_wasm_bg.wasm CHANGED
Binary file