@raviqqe/stak 0.12.10 → 0.12.11
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 +20 -20
- package/stak_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/stak_wasm.d.ts
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* Runs a Scheme script with standard input and returns its standard output.
|
|
5
5
|
*/
|
|
6
6
|
export function run(source: string, input: Uint8Array, heap_size: number): Uint8Array;
|
|
7
|
-
/**
|
|
8
|
-
* Compiles source codes in Scheme.
|
|
9
|
-
*/
|
|
10
|
-
export function compile(source: string): Uint8Array;
|
|
11
7
|
/**
|
|
12
8
|
* Interprets bytecode with standard input and returns its standard output.
|
|
13
9
|
*/
|
|
14
10
|
export function interpret(bytecode: Uint8Array, input: Uint8Array, heap_size: number): Uint8Array;
|
|
11
|
+
/**
|
|
12
|
+
* Compiles source codes in Scheme.
|
|
13
|
+
*/
|
|
14
|
+
export function compile(source: string): Uint8Array;
|
|
15
15
|
/**
|
|
16
16
|
* Runs a REPL interpreter.
|
|
17
17
|
*/
|
package/stak_wasm.js
CHANGED
|
@@ -236,23 +236,6 @@ export function run(source, input, heap_size) {
|
|
|
236
236
|
return v3;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
/**
|
|
240
|
-
* Compiles source codes in Scheme.
|
|
241
|
-
* @param {string} source
|
|
242
|
-
* @returns {Uint8Array}
|
|
243
|
-
*/
|
|
244
|
-
export function compile(source) {
|
|
245
|
-
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
246
|
-
const len0 = WASM_VECTOR_LEN;
|
|
247
|
-
const ret = wasm.compile(ptr0, len0);
|
|
248
|
-
if (ret[3]) {
|
|
249
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
250
|
-
}
|
|
251
|
-
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
252
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
253
|
-
return v2;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
239
|
/**
|
|
257
240
|
* Interprets bytecode with standard input and returns its standard output.
|
|
258
241
|
* @param {Uint8Array} bytecode
|
|
@@ -274,6 +257,23 @@ export function interpret(bytecode, input, heap_size) {
|
|
|
274
257
|
return v3;
|
|
275
258
|
}
|
|
276
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Compiles source codes in Scheme.
|
|
262
|
+
* @param {string} source
|
|
263
|
+
* @returns {Uint8Array}
|
|
264
|
+
*/
|
|
265
|
+
export function compile(source) {
|
|
266
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
267
|
+
const len0 = WASM_VECTOR_LEN;
|
|
268
|
+
const ret = wasm.compile(ptr0, len0);
|
|
269
|
+
if (ret[3]) {
|
|
270
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
271
|
+
}
|
|
272
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
273
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
274
|
+
return v2;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
277
|
/**
|
|
278
278
|
* Runs a REPL interpreter.
|
|
279
279
|
* @param {number} heap_size
|
|
@@ -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_f00a8d574e591ae1 = 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_3c8d80c169ad4d5a = function(arg0) {
|
|
399
399
|
const ret = write_stderr(arg0);
|
|
400
400
|
return ret;
|
|
401
401
|
};
|
|
402
|
-
imports.wbg.
|
|
402
|
+
imports.wbg.__wbg_writestdout_887ff973c22c6296 = function(arg0) {
|
|
403
403
|
const ret = write_stdout(arg0);
|
|
404
404
|
return ret;
|
|
405
405
|
};
|
package/stak_wasm_bg.wasm
CHANGED
|
Binary file
|