@raviqqe/stak 0.12.21 → 0.12.22
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 +10 -10
- package/stak_wasm.js +169 -167
- package/stak_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/stak_wasm.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Runs a Scheme script with standard input and returns its standard output.
|
|
5
|
-
*/
|
|
6
|
-
export function run(source: string, input: Uint8Array, heap_size: number): Uint8Array;
|
|
7
3
|
/**
|
|
8
4
|
* Interprets bytecode with standard input and returns its standard output.
|
|
9
5
|
*/
|
|
@@ -12,6 +8,10 @@ export function interpret(bytecode: Uint8Array, input: Uint8Array, heap_size: nu
|
|
|
12
8
|
* Compiles source codes in Scheme.
|
|
13
9
|
*/
|
|
14
10
|
export function compile(source: string): Uint8Array;
|
|
11
|
+
/**
|
|
12
|
+
* Runs a Scheme script with standard input and returns its standard output.
|
|
13
|
+
*/
|
|
14
|
+
export function run(source: string, input: Uint8Array, heap_size: number): Uint8Array;
|
|
15
15
|
/**
|
|
16
16
|
* Runs a REPL interpreter.
|
|
17
17
|
*/
|
|
@@ -25,16 +25,16 @@ export interface InitOutput {
|
|
|
25
25
|
readonly interpret: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
26
26
|
readonly repl: (a: number) => any;
|
|
27
27
|
readonly run: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly __wbindgen_export_3: WebAssembly.Table;
|
|
28
|
+
readonly wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b: (a: number, b: number, c: any) => void;
|
|
29
|
+
readonly wasm_bindgen__closure__destroy__h88d41d2f204608f4: (a: number, b: number) => void;
|
|
30
|
+
readonly wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065: (a: number, b: number, c: any, d: any) => void;
|
|
32
31
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
33
32
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
33
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
34
|
+
readonly __externref_table_alloc: () => number;
|
|
35
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
34
36
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
35
37
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
36
|
-
readonly closure18_externref_shim: (a: number, b: number, c: any) => void;
|
|
37
|
-
readonly closure42_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
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
let wasm;
|
|
2
2
|
|
|
3
|
-
function addToExternrefTable0(obj) {
|
|
4
|
-
const idx = wasm.__externref_table_alloc();
|
|
5
|
-
wasm.__wbindgen_export_2.set(idx, obj);
|
|
6
|
-
return idx;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function handleError(f, args) {
|
|
10
|
-
try {
|
|
11
|
-
return f.apply(this, args);
|
|
12
|
-
} catch (e) {
|
|
13
|
-
const idx = addToExternrefTable0(e);
|
|
14
|
-
wasm.__wbindgen_exn_store(idx);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
19
|
-
|
|
20
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
21
|
-
|
|
22
3
|
let cachedUint8ArrayMemory0 = null;
|
|
23
4
|
|
|
24
5
|
function getUint8ArrayMemory0() {
|
|
@@ -28,44 +9,25 @@ function getUint8ArrayMemory0() {
|
|
|
28
9
|
return cachedUint8ArrayMemory0;
|
|
29
10
|
}
|
|
30
11
|
|
|
31
|
-
|
|
32
|
-
ptr = ptr >>> 0;
|
|
33
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
34
|
-
}
|
|
12
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
35
13
|
|
|
36
|
-
|
|
37
|
-
return x === undefined || x === null;
|
|
38
|
-
}
|
|
14
|
+
cachedTextDecoder.decode();
|
|
39
15
|
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
16
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
17
|
+
let numBytesDecoded = 0;
|
|
18
|
+
function decodeText(ptr, len) {
|
|
19
|
+
numBytesDecoded += len;
|
|
20
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
21
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
22
|
+
cachedTextDecoder.decode();
|
|
23
|
+
numBytesDecoded = len;
|
|
24
|
+
}
|
|
25
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
26
|
+
}
|
|
45
27
|
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// First up with a closure we increment the internal reference
|
|
50
|
-
// count. This ensures that the Rust closure environment won't
|
|
51
|
-
// be deallocated while we're invoking it.
|
|
52
|
-
state.cnt++;
|
|
53
|
-
const a = state.a;
|
|
54
|
-
state.a = 0;
|
|
55
|
-
try {
|
|
56
|
-
return f(a, state.b, ...args);
|
|
57
|
-
} finally {
|
|
58
|
-
if (--state.cnt === 0) {
|
|
59
|
-
wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
|
|
60
|
-
CLOSURE_DTORS.unregister(state);
|
|
61
|
-
} else {
|
|
62
|
-
state.a = a;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
real.original = state;
|
|
67
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
68
|
-
return real;
|
|
28
|
+
function getStringFromWasm0(ptr, len) {
|
|
29
|
+
ptr = ptr >>> 0;
|
|
30
|
+
return decodeText(ptr, len);
|
|
69
31
|
}
|
|
70
32
|
|
|
71
33
|
function debugString(val) {
|
|
@@ -135,20 +97,18 @@ function debugString(val) {
|
|
|
135
97
|
|
|
136
98
|
let WASM_VECTOR_LEN = 0;
|
|
137
99
|
|
|
138
|
-
const cachedTextEncoder =
|
|
100
|
+
const cachedTextEncoder = new TextEncoder();
|
|
139
101
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
102
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
103
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
104
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
105
|
+
view.set(buf);
|
|
106
|
+
return {
|
|
107
|
+
read: arg.length,
|
|
108
|
+
written: buf.length
|
|
109
|
+
};
|
|
110
|
+
}
|
|
143
111
|
}
|
|
144
|
-
: function (arg, view) {
|
|
145
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
146
|
-
view.set(buf);
|
|
147
|
-
return {
|
|
148
|
-
read: arg.length,
|
|
149
|
-
written: buf.length
|
|
150
|
-
};
|
|
151
|
-
});
|
|
152
112
|
|
|
153
113
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
154
114
|
|
|
@@ -179,7 +139,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
179
139
|
}
|
|
180
140
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
181
141
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
182
|
-
const ret =
|
|
142
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
183
143
|
|
|
184
144
|
offset += ret.written;
|
|
185
145
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -198,6 +158,57 @@ function getDataViewMemory0() {
|
|
|
198
158
|
return cachedDataViewMemory0;
|
|
199
159
|
}
|
|
200
160
|
|
|
161
|
+
function isLikeNone(x) {
|
|
162
|
+
return x === undefined || x === null;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function addToExternrefTable0(obj) {
|
|
166
|
+
const idx = wasm.__externref_table_alloc();
|
|
167
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
168
|
+
return idx;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function handleError(f, args) {
|
|
172
|
+
try {
|
|
173
|
+
return f.apply(this, args);
|
|
174
|
+
} catch (e) {
|
|
175
|
+
const idx = addToExternrefTable0(e);
|
|
176
|
+
wasm.__wbindgen_exn_store(idx);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
181
|
+
? { register: () => {}, unregister: () => {} }
|
|
182
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
183
|
+
|
|
184
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
185
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
186
|
+
const real = (...args) => {
|
|
187
|
+
|
|
188
|
+
// First up with a closure we increment the internal reference
|
|
189
|
+
// count. This ensures that the Rust closure environment won't
|
|
190
|
+
// be deallocated while we're invoking it.
|
|
191
|
+
state.cnt++;
|
|
192
|
+
const a = state.a;
|
|
193
|
+
state.a = 0;
|
|
194
|
+
try {
|
|
195
|
+
return f(a, state.b, ...args);
|
|
196
|
+
} finally {
|
|
197
|
+
state.a = a;
|
|
198
|
+
real._wbg_cb_unref();
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
real._wbg_cb_unref = () => {
|
|
202
|
+
if (--state.cnt === 0) {
|
|
203
|
+
state.dtor(state.a, state.b);
|
|
204
|
+
state.a = 0;
|
|
205
|
+
CLOSURE_DTORS.unregister(state);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
209
|
+
return real;
|
|
210
|
+
}
|
|
211
|
+
|
|
201
212
|
function passArray8ToWasm0(arg, malloc) {
|
|
202
213
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
203
214
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -206,7 +217,7 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
206
217
|
}
|
|
207
218
|
|
|
208
219
|
function takeFromExternrefTable0(idx) {
|
|
209
|
-
const value = wasm.
|
|
220
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
210
221
|
wasm.__externref_table_dealloc(idx);
|
|
211
222
|
return value;
|
|
212
223
|
}
|
|
@@ -215,27 +226,6 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
215
226
|
ptr = ptr >>> 0;
|
|
216
227
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
217
228
|
}
|
|
218
|
-
/**
|
|
219
|
-
* Runs a Scheme script with standard input and returns its standard output.
|
|
220
|
-
* @param {string} source
|
|
221
|
-
* @param {Uint8Array} input
|
|
222
|
-
* @param {number} heap_size
|
|
223
|
-
* @returns {Uint8Array}
|
|
224
|
-
*/
|
|
225
|
-
export function run(source, input, heap_size) {
|
|
226
|
-
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
227
|
-
const len0 = WASM_VECTOR_LEN;
|
|
228
|
-
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
229
|
-
const len1 = WASM_VECTOR_LEN;
|
|
230
|
-
const ret = wasm.run(ptr0, len0, ptr1, len1, heap_size);
|
|
231
|
-
if (ret[3]) {
|
|
232
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
233
|
-
}
|
|
234
|
-
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
235
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
236
|
-
return v3;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
229
|
/**
|
|
240
230
|
* Interprets bytecode with standard input and returns its standard output.
|
|
241
231
|
* @param {Uint8Array} bytecode
|
|
@@ -274,6 +264,27 @@ export function compile(source) {
|
|
|
274
264
|
return v2;
|
|
275
265
|
}
|
|
276
266
|
|
|
267
|
+
/**
|
|
268
|
+
* Runs a Scheme script with standard input and returns its standard output.
|
|
269
|
+
* @param {string} source
|
|
270
|
+
* @param {Uint8Array} input
|
|
271
|
+
* @param {number} heap_size
|
|
272
|
+
* @returns {Uint8Array}
|
|
273
|
+
*/
|
|
274
|
+
export function run(source, input, heap_size) {
|
|
275
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
276
|
+
const len0 = WASM_VECTOR_LEN;
|
|
277
|
+
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
|
|
278
|
+
const len1 = WASM_VECTOR_LEN;
|
|
279
|
+
const ret = wasm.run(ptr0, len0, ptr1, len1, heap_size);
|
|
280
|
+
if (ret[3]) {
|
|
281
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
282
|
+
}
|
|
283
|
+
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
284
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
285
|
+
return v3;
|
|
286
|
+
}
|
|
287
|
+
|
|
277
288
|
/**
|
|
278
289
|
* Runs a REPL interpreter.
|
|
279
290
|
* @param {number} heap_size
|
|
@@ -284,14 +295,16 @@ export function repl(heap_size) {
|
|
|
284
295
|
return ret;
|
|
285
296
|
}
|
|
286
297
|
|
|
287
|
-
function
|
|
288
|
-
wasm.
|
|
298
|
+
function wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b(arg0, arg1, arg2) {
|
|
299
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b(arg0, arg1, arg2);
|
|
289
300
|
}
|
|
290
301
|
|
|
291
|
-
function
|
|
292
|
-
wasm.
|
|
302
|
+
function wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065(arg0, arg1, arg2, arg3) {
|
|
303
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065(arg0, arg1, arg2, arg3);
|
|
293
304
|
}
|
|
294
305
|
|
|
306
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
307
|
+
|
|
295
308
|
async function __wbg_load(module, imports) {
|
|
296
309
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
297
310
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
@@ -299,7 +312,9 @@ async function __wbg_load(module, imports) {
|
|
|
299
312
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
300
313
|
|
|
301
314
|
} catch (e) {
|
|
302
|
-
|
|
315
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
316
|
+
|
|
317
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
303
318
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
304
319
|
|
|
305
320
|
} else {
|
|
@@ -326,22 +341,57 @@ async function __wbg_load(module, imports) {
|
|
|
326
341
|
function __wbg_get_imports() {
|
|
327
342
|
const imports = {};
|
|
328
343
|
imports.wbg = {};
|
|
329
|
-
imports.wbg.
|
|
330
|
-
const ret = arg0
|
|
344
|
+
imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
|
|
345
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
331
346
|
return ret;
|
|
332
|
-
}
|
|
333
|
-
imports.wbg.
|
|
347
|
+
};
|
|
348
|
+
imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
|
|
349
|
+
const ret = debugString(arg1);
|
|
350
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
351
|
+
const len1 = WASM_VECTOR_LEN;
|
|
352
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
353
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
354
|
+
};
|
|
355
|
+
imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
|
|
356
|
+
const ret = typeof(arg0) === 'function';
|
|
357
|
+
return ret;
|
|
358
|
+
};
|
|
359
|
+
imports.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
|
|
360
|
+
const ret = arg0 === null;
|
|
361
|
+
return ret;
|
|
362
|
+
};
|
|
363
|
+
imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
|
|
364
|
+
const ret = arg0 === undefined;
|
|
365
|
+
return ret;
|
|
366
|
+
};
|
|
367
|
+
imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
|
|
368
|
+
const obj = arg1;
|
|
369
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
370
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
371
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
372
|
+
};
|
|
373
|
+
imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
374
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
375
|
+
};
|
|
376
|
+
imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
|
|
377
|
+
arg0._wbg_cb_unref();
|
|
378
|
+
};
|
|
379
|
+
imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
|
|
334
380
|
const ret = arg0.call(arg1, arg2);
|
|
335
381
|
return ret;
|
|
336
382
|
}, arguments) };
|
|
337
|
-
imports.wbg.
|
|
383
|
+
imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
|
|
384
|
+
const ret = arg0.call(arg1);
|
|
385
|
+
return ret;
|
|
386
|
+
}, arguments) };
|
|
387
|
+
imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
|
|
338
388
|
try {
|
|
339
389
|
var state0 = {a: arg0, b: arg1};
|
|
340
390
|
var cb0 = (arg0, arg1) => {
|
|
341
391
|
const a = state0.a;
|
|
342
392
|
state0.a = 0;
|
|
343
393
|
try {
|
|
344
|
-
return
|
|
394
|
+
return wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065(a, state0.b, arg0, arg1);
|
|
345
395
|
} finally {
|
|
346
396
|
state0.a = a;
|
|
347
397
|
}
|
|
@@ -352,83 +402,64 @@ function __wbg_get_imports() {
|
|
|
352
402
|
state0.a = state0.b = 0;
|
|
353
403
|
}
|
|
354
404
|
};
|
|
355
|
-
imports.wbg.
|
|
405
|
+
imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
|
|
356
406
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
357
407
|
return ret;
|
|
358
408
|
};
|
|
359
|
-
imports.wbg.
|
|
360
|
-
queueMicrotask(arg0);
|
|
361
|
-
};
|
|
362
|
-
imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
409
|
+
imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
|
|
363
410
|
const ret = arg0.queueMicrotask;
|
|
364
411
|
return ret;
|
|
365
412
|
};
|
|
366
|
-
imports.wbg.
|
|
413
|
+
imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
|
|
414
|
+
queueMicrotask(arg0);
|
|
415
|
+
};
|
|
416
|
+
imports.wbg.__wbg_read_stdin_a5dd287112d4a636 = function() {
|
|
367
417
|
const ret = read_stdin();
|
|
368
418
|
return ret;
|
|
369
419
|
};
|
|
370
|
-
imports.wbg.
|
|
420
|
+
imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
|
|
371
421
|
const ret = Promise.resolve(arg0);
|
|
372
422
|
return ret;
|
|
373
423
|
};
|
|
374
|
-
imports.wbg.
|
|
424
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
|
|
375
425
|
const ret = typeof global === 'undefined' ? null : global;
|
|
376
426
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
377
427
|
};
|
|
378
|
-
imports.wbg.
|
|
428
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
|
|
379
429
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
380
430
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
381
431
|
};
|
|
382
|
-
imports.wbg.
|
|
432
|
+
imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
|
|
383
433
|
const ret = typeof self === 'undefined' ? null : self;
|
|
384
434
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
385
435
|
};
|
|
386
|
-
imports.wbg.
|
|
436
|
+
imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
|
|
387
437
|
const ret = typeof window === 'undefined' ? null : window;
|
|
388
438
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
389
439
|
};
|
|
390
|
-
imports.wbg.
|
|
440
|
+
imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
|
|
391
441
|
const ret = arg0.then(arg1);
|
|
392
442
|
return ret;
|
|
393
443
|
};
|
|
394
|
-
imports.wbg.
|
|
444
|
+
imports.wbg.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
|
|
395
445
|
const ret = arg0.then(arg1, arg2);
|
|
396
446
|
return ret;
|
|
397
447
|
};
|
|
398
|
-
imports.wbg.
|
|
448
|
+
imports.wbg.__wbg_write_stderr_5a1e4e92452f0aa6 = function(arg0) {
|
|
399
449
|
const ret = write_stderr(arg0);
|
|
400
450
|
return ret;
|
|
401
451
|
};
|
|
402
|
-
imports.wbg.
|
|
452
|
+
imports.wbg.__wbg_write_stdout_01bed16a860f2cfb = function(arg0) {
|
|
403
453
|
const ret = write_stdout(arg0);
|
|
404
454
|
return ret;
|
|
405
455
|
};
|
|
406
|
-
imports.wbg.
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
obj.a = 0;
|
|
410
|
-
return true;
|
|
411
|
-
}
|
|
412
|
-
const ret = false;
|
|
413
|
-
return ret;
|
|
414
|
-
};
|
|
415
|
-
imports.wbg.__wbindgen_closure_wrapper90 = function(arg0, arg1, arg2) {
|
|
416
|
-
const ret = makeMutClosure(arg0, arg1, 19, __wbg_adapter_24);
|
|
417
|
-
return ret;
|
|
418
|
-
};
|
|
419
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
420
|
-
const ret = debugString(arg1);
|
|
421
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
422
|
-
const len1 = WASM_VECTOR_LEN;
|
|
423
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
424
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
425
|
-
};
|
|
426
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
427
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
456
|
+
imports.wbg.__wbindgen_cast_80e5451c6d1fd870 = function(arg0, arg1) {
|
|
457
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 17, function: Function { arguments: [Externref], shim_idx: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
458
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h88d41d2f204608f4, wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b);
|
|
428
459
|
return ret;
|
|
429
460
|
};
|
|
430
461
|
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
431
|
-
const table = wasm.
|
|
462
|
+
const table = wasm.__wbindgen_externrefs;
|
|
432
463
|
const offset = table.grow(4);
|
|
433
464
|
table.set(0, undefined);
|
|
434
465
|
table.set(offset + 0, undefined);
|
|
@@ -437,35 +468,10 @@ function __wbg_get_imports() {
|
|
|
437
468
|
table.set(offset + 3, false);
|
|
438
469
|
;
|
|
439
470
|
};
|
|
440
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
441
|
-
const ret = typeof(arg0) === 'function';
|
|
442
|
-
return ret;
|
|
443
|
-
};
|
|
444
|
-
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
445
|
-
const ret = arg0 === null;
|
|
446
|
-
return ret;
|
|
447
|
-
};
|
|
448
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
449
|
-
const ret = arg0 === undefined;
|
|
450
|
-
return ret;
|
|
451
|
-
};
|
|
452
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
453
|
-
const obj = arg1;
|
|
454
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
455
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
456
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
457
|
-
};
|
|
458
|
-
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
459
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
460
|
-
};
|
|
461
471
|
|
|
462
472
|
return imports;
|
|
463
473
|
}
|
|
464
474
|
|
|
465
|
-
function __wbg_init_memory(imports, memory) {
|
|
466
|
-
|
|
467
|
-
}
|
|
468
|
-
|
|
469
475
|
function __wbg_finalize_init(instance, module) {
|
|
470
476
|
wasm = instance.exports;
|
|
471
477
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
@@ -491,8 +497,6 @@ function initSync(module) {
|
|
|
491
497
|
|
|
492
498
|
const imports = __wbg_get_imports();
|
|
493
499
|
|
|
494
|
-
__wbg_init_memory(imports);
|
|
495
|
-
|
|
496
500
|
if (!(module instanceof WebAssembly.Module)) {
|
|
497
501
|
module = new WebAssembly.Module(module);
|
|
498
502
|
}
|
|
@@ -523,8 +527,6 @@ async function __wbg_init(module_or_path) {
|
|
|
523
527
|
module_or_path = fetch(module_or_path);
|
|
524
528
|
}
|
|
525
529
|
|
|
526
|
-
__wbg_init_memory(imports);
|
|
527
|
-
|
|
528
530
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
529
531
|
|
|
530
532
|
return __wbg_finalize_init(instance, module);
|
package/stak_wasm_bg.wasm
CHANGED
|
Binary file
|