@raviqqe/stak 0.11.11 → 0.11.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 -26
- package/stak_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/stak_wasm.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Compiles source codes in Scheme.
|
|
5
|
-
*/
|
|
6
|
-
export function compile(source: string): Uint8Array;
|
|
7
3
|
/**
|
|
8
4
|
* Interprets bytecode with standard input and returns its standard output.
|
|
9
5
|
*/
|
|
10
6
|
export function interpret(bytecode: Uint8Array, input: Uint8Array, heap_size: number): Uint8Array;
|
|
7
|
+
/**
|
|
8
|
+
* Compiles source codes in Scheme.
|
|
9
|
+
*/
|
|
10
|
+
export function compile(source: string): Uint8Array;
|
|
11
11
|
/**
|
|
12
12
|
* Runs a Scheme script with standard input and returns its standard output.
|
|
13
13
|
*/
|
package/stak_wasm.js
CHANGED
|
@@ -198,6 +198,13 @@ 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
|
+
|
|
201
208
|
function takeFromExternrefTable0(idx) {
|
|
202
209
|
const value = wasm.__wbindgen_export_2.get(idx);
|
|
203
210
|
wasm.__externref_table_dealloc(idx);
|
|
@@ -208,29 +215,6 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
208
215
|
ptr = ptr >>> 0;
|
|
209
216
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
210
217
|
}
|
|
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
|
-
}
|
|
234
218
|
/**
|
|
235
219
|
* Interprets bytecode with standard input and returns its standard output.
|
|
236
220
|
* @param {Uint8Array} bytecode
|
|
@@ -252,6 +236,23 @@ export function interpret(bytecode, input, heap_size) {
|
|
|
252
236
|
return v3;
|
|
253
237
|
}
|
|
254
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
|
+
|
|
255
256
|
/**
|
|
256
257
|
* Runs a Scheme script with standard input and returns its standard output.
|
|
257
258
|
* @param {string} source
|
|
@@ -362,7 +363,7 @@ function __wbg_get_imports() {
|
|
|
362
363
|
const ret = arg0.queueMicrotask;
|
|
363
364
|
return ret;
|
|
364
365
|
};
|
|
365
|
-
imports.wbg.
|
|
366
|
+
imports.wbg.__wbg_readstdin_d63c3ab49946abeb = function() {
|
|
366
367
|
const ret = read_stdin();
|
|
367
368
|
return ret;
|
|
368
369
|
};
|
|
@@ -394,11 +395,11 @@ function __wbg_get_imports() {
|
|
|
394
395
|
const ret = arg0.then(arg1, arg2);
|
|
395
396
|
return ret;
|
|
396
397
|
};
|
|
397
|
-
imports.wbg.
|
|
398
|
+
imports.wbg.__wbg_writestderr_02b85646566a3530 = function(arg0) {
|
|
398
399
|
const ret = write_stderr(arg0);
|
|
399
400
|
return ret;
|
|
400
401
|
};
|
|
401
|
-
imports.wbg.
|
|
402
|
+
imports.wbg.__wbg_writestdout_b7d9c7ba3a509adb = function(arg0) {
|
|
402
403
|
const ret = write_stdout(arg0);
|
|
403
404
|
return ret;
|
|
404
405
|
};
|
package/stak_wasm_bg.wasm
CHANGED
|
Binary file
|