@raviqqe/stak 0.11.13 → 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 +28 -28
- package/stak_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/stak_wasm.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
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
|
* Runs a Scheme script with standard input and returns its standard output.
|
|
9
5
|
*/
|
|
@@ -12,6 +8,10 @@ export function run(source: string, input: Uint8Array, heap_size: number): Uint8
|
|
|
12
8
|
* Compiles source codes in Scheme.
|
|
13
9
|
*/
|
|
14
10
|
export function compile(source: string): 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 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
|
@@ -215,27 +215,6 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
215
215
|
ptr = ptr >>> 0;
|
|
216
216
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
217
217
|
}
|
|
218
|
-
/**
|
|
219
|
-
* Interprets bytecode with standard input and returns its standard output.
|
|
220
|
-
* @param {Uint8Array} bytecode
|
|
221
|
-
* @param {Uint8Array} input
|
|
222
|
-
* @param {number} heap_size
|
|
223
|
-
* @returns {Uint8Array}
|
|
224
|
-
*/
|
|
225
|
-
export function interpret(bytecode, input, heap_size) {
|
|
226
|
-
const ptr0 = passArray8ToWasm0(bytecode, wasm.__wbindgen_malloc);
|
|
227
|
-
const len0 = WASM_VECTOR_LEN;
|
|
228
|
-
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
229
|
-
const len1 = WASM_VECTOR_LEN;
|
|
230
|
-
const ret = wasm.interpret(ptr0, len0, ptr1, len1, heap_size);
|
|
231
|
-
if (ret[3]) {
|
|
232
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
233
|
-
}
|
|
234
|
-
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
235
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
236
|
-
return v3;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
218
|
/**
|
|
240
219
|
* Runs a Scheme script with standard input and returns its standard output.
|
|
241
220
|
* @param {string} source
|
|
@@ -274,6 +253,27 @@ export function compile(source) {
|
|
|
274
253
|
return v2;
|
|
275
254
|
}
|
|
276
255
|
|
|
256
|
+
/**
|
|
257
|
+
* Interprets bytecode with standard input and returns its standard output.
|
|
258
|
+
* @param {Uint8Array} bytecode
|
|
259
|
+
* @param {Uint8Array} input
|
|
260
|
+
* @param {number} heap_size
|
|
261
|
+
* @returns {Uint8Array}
|
|
262
|
+
*/
|
|
263
|
+
export function interpret(bytecode, input, heap_size) {
|
|
264
|
+
const ptr0 = passArray8ToWasm0(bytecode, wasm.__wbindgen_malloc);
|
|
265
|
+
const len0 = WASM_VECTOR_LEN;
|
|
266
|
+
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
267
|
+
const len1 = WASM_VECTOR_LEN;
|
|
268
|
+
const ret = wasm.interpret(ptr0, len0, ptr1, len1, heap_size);
|
|
269
|
+
if (ret[3]) {
|
|
270
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
271
|
+
}
|
|
272
|
+
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
273
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
274
|
+
return v3;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
277
|
/**
|
|
278
278
|
* Runs a REPL interpreter.
|
|
279
279
|
* @param {number} heap_size
|
|
@@ -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
|