@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@raviqqe/stak",
3
3
  "description": "Stak Scheme VM in WebAssembly",
4
- "version": "0.1.1",
4
+ "version": "0.2.0",
5
5
  "license": "SEE LICENSE IN ../LICENSE",
6
6
  "repository": {
7
7
  "type": "git",
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 run(bytecodes: Uint8Array, input: Uint8Array, heap_size: number): Uint8Array;
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 run: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
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 run(bytecodes, input, heap_size) {
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.run(retptr, ptr0, len0, ptr1, len1, heap_size);
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