@raviqqe/stak 0.12.0 → 0.12.2
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
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* Compiles source codes in Scheme.
|
|
5
5
|
*/
|
|
6
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
7
|
/**
|
|
12
8
|
* Runs a Scheme script with standard input and returns its standard output.
|
|
13
9
|
*/
|
|
14
10
|
export function run(source: string, input: Uint8Array, heap_size: number): Uint8Array;
|
|
11
|
+
/**
|
|
12
|
+
* Interprets bytecode with standard input and returns its standard output.
|
|
13
|
+
*/
|
|
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 closure26_externref_shim: (a: number, b: number, c: any) => void;
|
|
37
|
+
readonly closure50_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
|
@@ -232,18 +232,18 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
232
232
|
return ptr;
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
|
-
*
|
|
236
|
-
* @param {
|
|
235
|
+
* Runs a Scheme script with standard input and returns its standard output.
|
|
236
|
+
* @param {string} source
|
|
237
237
|
* @param {Uint8Array} input
|
|
238
238
|
* @param {number} heap_size
|
|
239
239
|
* @returns {Uint8Array}
|
|
240
240
|
*/
|
|
241
|
-
export function
|
|
242
|
-
const ptr0 =
|
|
241
|
+
export function run(source, input, heap_size) {
|
|
242
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
243
243
|
const len0 = WASM_VECTOR_LEN;
|
|
244
244
|
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
245
245
|
const len1 = WASM_VECTOR_LEN;
|
|
246
|
-
const ret = wasm.
|
|
246
|
+
const ret = wasm.run(ptr0, len0, ptr1, len1, heap_size);
|
|
247
247
|
if (ret[3]) {
|
|
248
248
|
throw takeFromExternrefTable0(ret[2]);
|
|
249
249
|
}
|
|
@@ -253,18 +253,18 @@ export function interpret(bytecode, input, heap_size) {
|
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
/**
|
|
256
|
-
*
|
|
257
|
-
* @param {
|
|
256
|
+
* Interprets bytecode with standard input and returns its standard output.
|
|
257
|
+
* @param {Uint8Array} bytecode
|
|
258
258
|
* @param {Uint8Array} input
|
|
259
259
|
* @param {number} heap_size
|
|
260
260
|
* @returns {Uint8Array}
|
|
261
261
|
*/
|
|
262
|
-
export function
|
|
263
|
-
const ptr0 =
|
|
262
|
+
export function interpret(bytecode, input, heap_size) {
|
|
263
|
+
const ptr0 = passArray8ToWasm0(bytecode, wasm.__wbindgen_malloc);
|
|
264
264
|
const len0 = WASM_VECTOR_LEN;
|
|
265
265
|
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
266
266
|
const len1 = WASM_VECTOR_LEN;
|
|
267
|
-
const ret = wasm.
|
|
267
|
+
const ret = wasm.interpret(ptr0, len0, ptr1, len1, heap_size);
|
|
268
268
|
if (ret[3]) {
|
|
269
269
|
throw takeFromExternrefTable0(ret[2]);
|
|
270
270
|
}
|
|
@@ -284,11 +284,11 @@ export function repl(heap_size) {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
function __wbg_adapter_24(arg0, arg1, arg2) {
|
|
287
|
-
wasm.
|
|
287
|
+
wasm.closure26_externref_shim(arg0, arg1, arg2);
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
function __wbg_adapter_39(arg0, arg1, arg2, arg3) {
|
|
291
|
-
wasm.
|
|
291
|
+
wasm.closure50_externref_shim(arg0, arg1, arg2, arg3);
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
async function __wbg_load(module, imports) {
|
|
@@ -362,7 +362,7 @@ function __wbg_get_imports() {
|
|
|
362
362
|
const ret = arg0.queueMicrotask;
|
|
363
363
|
return ret;
|
|
364
364
|
};
|
|
365
|
-
imports.wbg.
|
|
365
|
+
imports.wbg.__wbg_readstdin_9d4a8989e1a9e0b1 = function() {
|
|
366
366
|
const ret = read_stdin();
|
|
367
367
|
return ret;
|
|
368
368
|
};
|
|
@@ -394,11 +394,11 @@ function __wbg_get_imports() {
|
|
|
394
394
|
const ret = arg0.then(arg1, arg2);
|
|
395
395
|
return ret;
|
|
396
396
|
};
|
|
397
|
-
imports.wbg.
|
|
397
|
+
imports.wbg.__wbg_writestderr_74642c810f1eb4ad = function(arg0) {
|
|
398
398
|
const ret = write_stderr(arg0);
|
|
399
399
|
return ret;
|
|
400
400
|
};
|
|
401
|
-
imports.wbg.
|
|
401
|
+
imports.wbg.__wbg_writestdout_0596e95422044d34 = function(arg0) {
|
|
402
402
|
const ret = write_stdout(arg0);
|
|
403
403
|
return ret;
|
|
404
404
|
};
|
|
@@ -411,8 +411,8 @@ function __wbg_get_imports() {
|
|
|
411
411
|
const ret = false;
|
|
412
412
|
return ret;
|
|
413
413
|
};
|
|
414
|
-
imports.wbg.
|
|
415
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
414
|
+
imports.wbg.__wbindgen_closure_wrapper97 = function(arg0, arg1, arg2) {
|
|
415
|
+
const ret = makeMutClosure(arg0, arg1, 27, __wbg_adapter_24);
|
|
416
416
|
return ret;
|
|
417
417
|
};
|
|
418
418
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/stak_wasm_bg.wasm
CHANGED
|
Binary file
|