@raviqqe/stak 0.12.11 → 0.12.12
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 +4 -4
- package/stak_wasm.js +27 -27
- 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
|
-
* Runs a Scheme script with standard input and returns its standard output.
|
|
5
|
-
*/
|
|
6
|
-
export function run(source: string, input: Uint8Array, heap_size: number): Uint8Array;
|
|
7
3
|
/**
|
|
8
4
|
* Interprets bytecode with standard input and returns its standard output.
|
|
9
5
|
*/
|
|
@@ -12,6 +8,10 @@ export function interpret(bytecode: Uint8Array, input: Uint8Array, heap_size: nu
|
|
|
12
8
|
* Compiles source codes in Scheme.
|
|
13
9
|
*/
|
|
14
10
|
export function compile(source: string): Uint8Array;
|
|
11
|
+
/**
|
|
12
|
+
* Runs a Scheme script with standard input and returns its standard output.
|
|
13
|
+
*/
|
|
14
|
+
export function run(source: string, input: Uint8Array, heap_size: number): Uint8Array;
|
|
15
15
|
/**
|
|
16
16
|
* Runs a REPL interpreter.
|
|
17
17
|
*/
|
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
|
-
* Runs a Scheme script with standard input and returns its standard output.
|
|
220
|
-
* @param {string} source
|
|
221
|
-
* @param {Uint8Array} input
|
|
222
|
-
* @param {number} heap_size
|
|
223
|
-
* @returns {Uint8Array}
|
|
224
|
-
*/
|
|
225
|
-
export function run(source, input, heap_size) {
|
|
226
|
-
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
227
|
-
const len0 = WASM_VECTOR_LEN;
|
|
228
|
-
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
229
|
-
const len1 = WASM_VECTOR_LEN;
|
|
230
|
-
const ret = wasm.run(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
|
* Interprets bytecode with standard input and returns its standard output.
|
|
241
220
|
* @param {Uint8Array} bytecode
|
|
@@ -274,6 +253,27 @@ export function compile(source) {
|
|
|
274
253
|
return v2;
|
|
275
254
|
}
|
|
276
255
|
|
|
256
|
+
/**
|
|
257
|
+
* Runs a Scheme script with standard input and returns its standard output.
|
|
258
|
+
* @param {string} source
|
|
259
|
+
* @param {Uint8Array} input
|
|
260
|
+
* @param {number} heap_size
|
|
261
|
+
* @returns {Uint8Array}
|
|
262
|
+
*/
|
|
263
|
+
export function run(source, input, heap_size) {
|
|
264
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
265
|
+
const len0 = WASM_VECTOR_LEN;
|
|
266
|
+
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
267
|
+
const len1 = WASM_VECTOR_LEN;
|
|
268
|
+
const ret = wasm.run(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
|
|
@@ -288,7 +288,7 @@ function __wbg_adapter_24(arg0, arg1, arg2) {
|
|
|
288
288
|
wasm.closure26_externref_shim(arg0, arg1, arg2);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
function
|
|
291
|
+
function __wbg_adapter_45(arg0, arg1, arg2, arg3) {
|
|
292
292
|
wasm.closure50_externref_shim(arg0, arg1, arg2, arg3);
|
|
293
293
|
}
|
|
294
294
|
|
|
@@ -341,7 +341,7 @@ function __wbg_get_imports() {
|
|
|
341
341
|
const a = state0.a;
|
|
342
342
|
state0.a = 0;
|
|
343
343
|
try {
|
|
344
|
-
return
|
|
344
|
+
return __wbg_adapter_45(a, state0.b, arg0, arg1);
|
|
345
345
|
} finally {
|
|
346
346
|
state0.a = a;
|
|
347
347
|
}
|
|
@@ -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_4a3ccfe639546971 = 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_ebecde2673fbabfa = function(arg0) {
|
|
399
399
|
const ret = write_stderr(arg0);
|
|
400
400
|
return ret;
|
|
401
401
|
};
|
|
402
|
-
imports.wbg.
|
|
402
|
+
imports.wbg.__wbg_writestdout_34782e5ec71f9d08 = function(arg0) {
|
|
403
403
|
const ret = write_stdout(arg0);
|
|
404
404
|
return ret;
|
|
405
405
|
};
|
|
@@ -412,7 +412,7 @@ function __wbg_get_imports() {
|
|
|
412
412
|
const ret = false;
|
|
413
413
|
return ret;
|
|
414
414
|
};
|
|
415
|
-
imports.wbg.
|
|
415
|
+
imports.wbg.__wbindgen_closure_wrapper98 = function(arg0, arg1, arg2) {
|
|
416
416
|
const ret = makeMutClosure(arg0, arg1, 27, __wbg_adapter_24);
|
|
417
417
|
return ret;
|
|
418
418
|
};
|
package/stak_wasm_bg.wasm
CHANGED
|
Binary file
|