@raviqqe/stak 0.1.1 → 0.2.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 +2 -2
- package/stak_wasm.js +2 -2
- package/stak_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/stak_wasm.d.ts
CHANGED
|
@@ -11,14 +11,14 @@ export function compile(source: string): Uint8Array;
|
|
|
11
11
|
* @param {number} heap_size
|
|
12
12
|
* @returns {Uint8Array}
|
|
13
13
|
*/
|
|
14
|
-
export function
|
|
14
|
+
export function interpret(bytecodes: Uint8Array, input: Uint8Array, heap_size: number): Uint8Array;
|
|
15
15
|
|
|
16
16
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
17
17
|
|
|
18
18
|
export interface InitOutput {
|
|
19
19
|
readonly memory: WebAssembly.Memory;
|
|
20
20
|
readonly compile: (a: number, b: number, c: number) => void;
|
|
21
|
-
readonly
|
|
21
|
+
readonly interpret: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
22
22
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
23
23
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
24
24
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
package/stak_wasm.js
CHANGED
|
@@ -153,14 +153,14 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
153
153
|
* @param {number} heap_size
|
|
154
154
|
* @returns {Uint8Array}
|
|
155
155
|
*/
|
|
156
|
-
export function
|
|
156
|
+
export function interpret(bytecodes, input, heap_size) {
|
|
157
157
|
try {
|
|
158
158
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
159
159
|
const ptr0 = passArray8ToWasm0(bytecodes, wasm.__wbindgen_malloc);
|
|
160
160
|
const len0 = WASM_VECTOR_LEN;
|
|
161
161
|
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
162
162
|
const len1 = WASM_VECTOR_LEN;
|
|
163
|
-
wasm.
|
|
163
|
+
wasm.interpret(retptr, ptr0, len0, ptr1, len1, heap_size);
|
|
164
164
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
165
165
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
166
166
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
package/stak_wasm_bg.wasm
CHANGED
|
Binary file
|