@raviqqe/stak 0.11.12 → 0.11.14
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 +1 -1
- package/stak_wasm.d.ts +6 -6
- package/stak_wasm.js +17 -17
- package/stak_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/stak_wasm.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Runs a Scheme script with standard input and returns its standard output.
|
|
5
5
|
*/
|
|
6
|
-
export function
|
|
6
|
+
export function run(source: string, input: Uint8Array, heap_size: number): Uint8Array;
|
|
7
7
|
/**
|
|
8
8
|
* Compiles source codes in Scheme.
|
|
9
9
|
*/
|
|
10
10
|
export function compile(source: string): Uint8Array;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Interprets bytecode with standard input and returns its standard output.
|
|
13
13
|
*/
|
|
14
|
-
export function
|
|
14
|
+
export function interpret(bytecode: Uint8Array, input: Uint8Array, heap_size: number): Uint8Array;
|
|
15
15
|
/**
|
|
16
16
|
* Runs a REPL interpreter.
|
|
17
17
|
*/
|
|
@@ -33,8 +33,8 @@ export interface InitOutput {
|
|
|
33
33
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
34
34
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
35
35
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
36
|
-
readonly
|
|
37
|
-
readonly
|
|
36
|
+
readonly closure20_externref_shim: (a: number, b: number, c: any) => void;
|
|
37
|
+
readonly closure44_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
38
38
|
readonly __wbindgen_start: () => void;
|
|
39
39
|
}
|
|
40
40
|
|
package/stak_wasm.js
CHANGED
|
@@ -216,18 +216,18 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
216
216
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
|
-
*
|
|
220
|
-
* @param {
|
|
219
|
+
* Runs a Scheme script with standard input and returns its standard output.
|
|
220
|
+
* @param {string} source
|
|
221
221
|
* @param {Uint8Array} input
|
|
222
222
|
* @param {number} heap_size
|
|
223
223
|
* @returns {Uint8Array}
|
|
224
224
|
*/
|
|
225
|
-
export function
|
|
226
|
-
const ptr0 =
|
|
225
|
+
export function run(source, input, heap_size) {
|
|
226
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
227
227
|
const len0 = WASM_VECTOR_LEN;
|
|
228
228
|
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
229
229
|
const len1 = WASM_VECTOR_LEN;
|
|
230
|
-
const ret = wasm.
|
|
230
|
+
const ret = wasm.run(ptr0, len0, ptr1, len1, heap_size);
|
|
231
231
|
if (ret[3]) {
|
|
232
232
|
throw takeFromExternrefTable0(ret[2]);
|
|
233
233
|
}
|
|
@@ -254,18 +254,18 @@ export function compile(source) {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
|
-
*
|
|
258
|
-
* @param {
|
|
257
|
+
* Interprets bytecode with standard input and returns its standard output.
|
|
258
|
+
* @param {Uint8Array} bytecode
|
|
259
259
|
* @param {Uint8Array} input
|
|
260
260
|
* @param {number} heap_size
|
|
261
261
|
* @returns {Uint8Array}
|
|
262
262
|
*/
|
|
263
|
-
export function
|
|
264
|
-
const ptr0 =
|
|
263
|
+
export function interpret(bytecode, input, heap_size) {
|
|
264
|
+
const ptr0 = passArray8ToWasm0(bytecode, wasm.__wbindgen_malloc);
|
|
265
265
|
const len0 = WASM_VECTOR_LEN;
|
|
266
266
|
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
267
267
|
const len1 = WASM_VECTOR_LEN;
|
|
268
|
-
const ret = wasm.
|
|
268
|
+
const ret = wasm.interpret(ptr0, len0, ptr1, len1, heap_size);
|
|
269
269
|
if (ret[3]) {
|
|
270
270
|
throw takeFromExternrefTable0(ret[2]);
|
|
271
271
|
}
|
|
@@ -285,11 +285,11 @@ export function repl(heap_size) {
|
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
function __wbg_adapter_24(arg0, arg1, arg2) {
|
|
288
|
-
wasm.
|
|
288
|
+
wasm.closure20_externref_shim(arg0, arg1, arg2);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
function __wbg_adapter_39(arg0, arg1, arg2, arg3) {
|
|
292
|
-
wasm.
|
|
292
|
+
wasm.closure44_externref_shim(arg0, arg1, arg2, arg3);
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
async function __wbg_load(module, imports) {
|
|
@@ -363,7 +363,7 @@ function __wbg_get_imports() {
|
|
|
363
363
|
const ret = arg0.queueMicrotask;
|
|
364
364
|
return ret;
|
|
365
365
|
};
|
|
366
|
-
imports.wbg.
|
|
366
|
+
imports.wbg.__wbg_readstdin_bc0ecdec6d21fb4a = function() {
|
|
367
367
|
const ret = read_stdin();
|
|
368
368
|
return ret;
|
|
369
369
|
};
|
|
@@ -395,11 +395,11 @@ function __wbg_get_imports() {
|
|
|
395
395
|
const ret = arg0.then(arg1, arg2);
|
|
396
396
|
return ret;
|
|
397
397
|
};
|
|
398
|
-
imports.wbg.
|
|
398
|
+
imports.wbg.__wbg_writestderr_92a0c69cf6c63c35 = function(arg0) {
|
|
399
399
|
const ret = write_stderr(arg0);
|
|
400
400
|
return ret;
|
|
401
401
|
};
|
|
402
|
-
imports.wbg.
|
|
402
|
+
imports.wbg.__wbg_writestdout_436f769e5f639c2f = function(arg0) {
|
|
403
403
|
const ret = write_stdout(arg0);
|
|
404
404
|
return ret;
|
|
405
405
|
};
|
|
@@ -412,8 +412,8 @@ function __wbg_get_imports() {
|
|
|
412
412
|
const ret = false;
|
|
413
413
|
return ret;
|
|
414
414
|
};
|
|
415
|
-
imports.wbg.
|
|
416
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
415
|
+
imports.wbg.__wbindgen_closure_wrapper87 = function(arg0, arg1, arg2) {
|
|
416
|
+
const ret = makeMutClosure(arg0, arg1, 21, __wbg_adapter_24);
|
|
417
417
|
return ret;
|
|
418
418
|
};
|
|
419
419
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/stak_wasm_bg.wasm
CHANGED
|
Binary file
|