@raviqqe/stak 0.11.13 → 0.12.0
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 +30 -31
- package/stak_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/stak_wasm.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Compiles source codes in Scheme.
|
|
5
|
+
*/
|
|
6
|
+
export function compile(source: string): Uint8Array;
|
|
3
7
|
/**
|
|
4
8
|
* Interprets bytecode with standard input and returns its standard output.
|
|
5
9
|
*/
|
|
@@ -8,10 +12,6 @@ export function interpret(bytecode: Uint8Array, input: Uint8Array, heap_size: nu
|
|
|
8
12
|
* Runs a Scheme script with standard input and returns its standard output.
|
|
9
13
|
*/
|
|
10
14
|
export function run(source: string, 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
|
*/
|
|
@@ -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 closure25_externref_shim: (a: number, b: number, c: any) => void;
|
|
37
|
+
readonly closure49_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
|
@@ -198,13 +198,6 @@ function getDataViewMemory0() {
|
|
|
198
198
|
return cachedDataViewMemory0;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
202
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
203
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
204
|
-
WASM_VECTOR_LEN = arg.length;
|
|
205
|
-
return ptr;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
201
|
function takeFromExternrefTable0(idx) {
|
|
209
202
|
const value = wasm.__wbindgen_export_2.get(idx);
|
|
210
203
|
wasm.__externref_table_dealloc(idx);
|
|
@@ -215,6 +208,29 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
215
208
|
ptr = ptr >>> 0;
|
|
216
209
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
217
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* Compiles source codes in Scheme.
|
|
213
|
+
* @param {string} source
|
|
214
|
+
* @returns {Uint8Array}
|
|
215
|
+
*/
|
|
216
|
+
export function compile(source) {
|
|
217
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
218
|
+
const len0 = WASM_VECTOR_LEN;
|
|
219
|
+
const ret = wasm.compile(ptr0, len0);
|
|
220
|
+
if (ret[3]) {
|
|
221
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
222
|
+
}
|
|
223
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
224
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
225
|
+
return v2;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
229
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
230
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
231
|
+
WASM_VECTOR_LEN = arg.length;
|
|
232
|
+
return ptr;
|
|
233
|
+
}
|
|
218
234
|
/**
|
|
219
235
|
* Interprets bytecode with standard input and returns its standard output.
|
|
220
236
|
* @param {Uint8Array} bytecode
|
|
@@ -257,23 +273,6 @@ export function run(source, input, heap_size) {
|
|
|
257
273
|
return v3;
|
|
258
274
|
}
|
|
259
275
|
|
|
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
276
|
/**
|
|
278
277
|
* Runs a REPL interpreter.
|
|
279
278
|
* @param {number} heap_size
|
|
@@ -285,11 +284,11 @@ export function repl(heap_size) {
|
|
|
285
284
|
}
|
|
286
285
|
|
|
287
286
|
function __wbg_adapter_24(arg0, arg1, arg2) {
|
|
288
|
-
wasm.
|
|
287
|
+
wasm.closure25_externref_shim(arg0, arg1, arg2);
|
|
289
288
|
}
|
|
290
289
|
|
|
291
290
|
function __wbg_adapter_39(arg0, arg1, arg2, arg3) {
|
|
292
|
-
wasm.
|
|
291
|
+
wasm.closure49_externref_shim(arg0, arg1, arg2, arg3);
|
|
293
292
|
}
|
|
294
293
|
|
|
295
294
|
async function __wbg_load(module, imports) {
|
|
@@ -363,7 +362,7 @@ function __wbg_get_imports() {
|
|
|
363
362
|
const ret = arg0.queueMicrotask;
|
|
364
363
|
return ret;
|
|
365
364
|
};
|
|
366
|
-
imports.wbg.
|
|
365
|
+
imports.wbg.__wbg_readstdin_2d4ededd0b11be0d = function() {
|
|
367
366
|
const ret = read_stdin();
|
|
368
367
|
return ret;
|
|
369
368
|
};
|
|
@@ -395,11 +394,11 @@ function __wbg_get_imports() {
|
|
|
395
394
|
const ret = arg0.then(arg1, arg2);
|
|
396
395
|
return ret;
|
|
397
396
|
};
|
|
398
|
-
imports.wbg.
|
|
397
|
+
imports.wbg.__wbg_writestderr_53cb485e8dfee086 = function(arg0) {
|
|
399
398
|
const ret = write_stderr(arg0);
|
|
400
399
|
return ret;
|
|
401
400
|
};
|
|
402
|
-
imports.wbg.
|
|
401
|
+
imports.wbg.__wbg_writestdout_017601bf5d742a3e = function(arg0) {
|
|
403
402
|
const ret = write_stdout(arg0);
|
|
404
403
|
return ret;
|
|
405
404
|
};
|
|
@@ -412,8 +411,8 @@ function __wbg_get_imports() {
|
|
|
412
411
|
const ret = false;
|
|
413
412
|
return ret;
|
|
414
413
|
};
|
|
415
|
-
imports.wbg.
|
|
416
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
414
|
+
imports.wbg.__wbindgen_closure_wrapper95 = function(arg0, arg1, arg2) {
|
|
415
|
+
const ret = makeMutClosure(arg0, arg1, 26, __wbg_adapter_24);
|
|
417
416
|
return ret;
|
|
418
417
|
};
|
|
419
418
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/stak_wasm_bg.wasm
CHANGED
|
Binary file
|