@hew-lang/wasm 0.6.0-rc7 → 0.6.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 +3 -3
- package/wasm.d.ts +23 -18
- package/wasm.js +157 -35
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@hew-lang/wasm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "WebAssembly bindings for Hew analysis and verified sandbox compilation",
|
|
5
|
-
"version": "0.6.0
|
|
5
|
+
"version": "0.6.0",
|
|
6
6
|
"license": "MIT OR Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"webassembly"
|
|
27
27
|
],
|
|
28
28
|
"hewSource": {
|
|
29
|
-
"commit": "
|
|
30
|
-
"tag": "v0.6.0
|
|
29
|
+
"commit": "c4b08fc6215201308794f6093aa67eb173eda1fd",
|
|
30
|
+
"tag": "v0.6.0",
|
|
31
31
|
"dirty": false
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
package/wasm.d.ts
CHANGED
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Analyze
|
|
6
|
-
*
|
|
7
|
-
* This is analysis-only and does not execute the program.
|
|
5
|
+
* Analyze source using the supplied browser input files.
|
|
8
6
|
*
|
|
9
7
|
* # Errors
|
|
10
8
|
*
|
|
11
|
-
* Returns a JavaScript error if the
|
|
9
|
+
* Returns a JavaScript error if an input is invalid or the result cannot be serialized.
|
|
12
10
|
*/
|
|
13
|
-
export function analyze(source: string): string;
|
|
11
|
+
export function analyze(source: string, files?: Map<any, any> | null): string;
|
|
14
12
|
|
|
15
13
|
/**
|
|
16
14
|
* Get code actions for given diagnostics JSON. Returns JSON array of `CodeAction`.
|
|
@@ -43,8 +41,12 @@ export function compileTestsToSandboxBytecode(source: string, file: string): str
|
|
|
43
41
|
*
|
|
44
42
|
* `profile` should be `"sandbox-vm-export"` for the educational sandbox VM.
|
|
45
43
|
* An unrecognised profile is reported as a diagnostic with `bytecode: null`.
|
|
44
|
+
*
|
|
45
|
+
* # Panics
|
|
46
|
+
*
|
|
47
|
+
* Panics if the compiled output cannot be serialized as JSON.
|
|
46
48
|
*/
|
|
47
|
-
export function compileToSandboxBytecode(source: string, profile: string): string;
|
|
49
|
+
export function compileToSandboxBytecode(source: string, profile: string, files?: Map<any, any> | null): string;
|
|
48
50
|
|
|
49
51
|
/**
|
|
50
52
|
* Get completions at byte offset. Returns JSON array of `CompletionItem`.
|
|
@@ -64,6 +66,11 @@ export function complete(source: string, offset: number): string;
|
|
|
64
66
|
*/
|
|
65
67
|
export function document_symbols(source: string): string;
|
|
66
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Execute the compiler's typed codec plan using the shared native engine.
|
|
71
|
+
*/
|
|
72
|
+
export function executeCodec(request: string): string;
|
|
73
|
+
|
|
67
74
|
/**
|
|
68
75
|
* Find all references at offset. Returns JSON `{ name, spans }` or `"null"` if no symbol found.
|
|
69
76
|
*
|
|
@@ -182,28 +189,25 @@ export function semantic_tokens(source: string): string;
|
|
|
182
189
|
export function signature_help(source: string, offset: number): string;
|
|
183
190
|
|
|
184
191
|
/**
|
|
185
|
-
* Type-check
|
|
186
|
-
*
|
|
187
|
-
* `diagnostics` includes parser and checker diagnostics. `type_info` contains
|
|
188
|
-
* byte-span keyed, user-facing resolved types for hover/editor consumers; it is
|
|
189
|
-
* empty when parsing fails and the checker is skipped.
|
|
192
|
+
* Type-check source using the supplied browser input files.
|
|
190
193
|
*
|
|
191
194
|
* # Errors
|
|
192
195
|
*
|
|
193
|
-
* Returns a JavaScript error if the
|
|
196
|
+
* Returns a JavaScript error if an input is invalid or the result cannot be serialized.
|
|
194
197
|
*/
|
|
195
|
-
export function type_check(source: string): string;
|
|
198
|
+
export function type_check(source: string, files?: Map<any, any> | null): string;
|
|
196
199
|
|
|
197
200
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
198
201
|
|
|
199
202
|
export interface InitOutput {
|
|
200
203
|
readonly memory: WebAssembly.Memory;
|
|
201
|
-
readonly analyze: (a: number, b: number, c: number) => void;
|
|
204
|
+
readonly analyze: (a: number, b: number, c: number, d: number) => void;
|
|
202
205
|
readonly code_actions: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
203
206
|
readonly compileTestsToSandboxBytecode: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
204
|
-
readonly compileToSandboxBytecode: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
207
|
+
readonly compileToSandboxBytecode: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
205
208
|
readonly complete: (a: number, b: number, c: number, d: number) => void;
|
|
206
209
|
readonly document_symbols: (a: number, b: number, c: number) => void;
|
|
210
|
+
readonly executeCodec: (a: number, b: number, c: number) => void;
|
|
207
211
|
readonly find_references: (a: number, b: number, c: number, d: number) => void;
|
|
208
212
|
readonly folding_ranges: (a: number, b: number, c: number) => void;
|
|
209
213
|
readonly format_source: (a: number, b: number, c: number) => void;
|
|
@@ -216,11 +220,12 @@ export interface InitOutput {
|
|
|
216
220
|
readonly rename: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
217
221
|
readonly semantic_tokens: (a: number, b: number, c: number) => void;
|
|
218
222
|
readonly signature_help: (a: number, b: number, c: number, d: number) => void;
|
|
219
|
-
readonly type_check: (a: number, b: number, c: number) => void;
|
|
220
|
-
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
223
|
+
readonly type_check: (a: number, b: number, c: number, d: number) => void;
|
|
221
224
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
222
225
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
223
|
-
readonly __wbindgen_export3: (a: number
|
|
226
|
+
readonly __wbindgen_export3: (a: number) => void;
|
|
227
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
228
|
+
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
224
229
|
}
|
|
225
230
|
|
|
226
231
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
package/wasm.js
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
/* @ts-self-types="./wasm.d.ts" */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Analyze
|
|
5
|
-
*
|
|
6
|
-
* This is analysis-only and does not execute the program.
|
|
4
|
+
* Analyze source using the supplied browser input files.
|
|
7
5
|
*
|
|
8
6
|
* # Errors
|
|
9
7
|
*
|
|
10
|
-
* Returns a JavaScript error if the
|
|
8
|
+
* Returns a JavaScript error if an input is invalid or the result cannot be serialized.
|
|
11
9
|
* @param {string} source
|
|
10
|
+
* @param {Map<any, any> | null} [files]
|
|
12
11
|
* @returns {string}
|
|
13
12
|
*/
|
|
14
|
-
export function analyze(source) {
|
|
13
|
+
export function analyze(source, files) {
|
|
15
14
|
let deferred3_0;
|
|
16
15
|
let deferred3_1;
|
|
17
16
|
try {
|
|
18
17
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
19
18
|
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
20
19
|
const len0 = WASM_VECTOR_LEN;
|
|
21
|
-
wasm.analyze(retptr, ptr0, len0);
|
|
20
|
+
wasm.analyze(retptr, ptr0, len0, isLikeNone(files) ? 0 : addHeapObject(files));
|
|
22
21
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
23
22
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
24
23
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -34,7 +33,7 @@ export function analyze(source) {
|
|
|
34
33
|
return getStringFromWasm0(ptr2, len2);
|
|
35
34
|
} finally {
|
|
36
35
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
37
|
-
wasm.
|
|
36
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
|
|
@@ -77,7 +76,7 @@ export function code_actions(source, diagnostics_json) {
|
|
|
77
76
|
return getStringFromWasm0(ptr3, len3);
|
|
78
77
|
} finally {
|
|
79
78
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
80
|
-
wasm.
|
|
79
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
|
|
@@ -106,7 +105,7 @@ export function compileTestsToSandboxBytecode(source, file) {
|
|
|
106
105
|
return getStringFromWasm0(r0, r1);
|
|
107
106
|
} finally {
|
|
108
107
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
109
|
-
wasm.
|
|
108
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
110
109
|
}
|
|
111
110
|
}
|
|
112
111
|
|
|
@@ -121,11 +120,16 @@ export function compileTestsToSandboxBytecode(source, file) {
|
|
|
121
120
|
*
|
|
122
121
|
* `profile` should be `"sandbox-vm-export"` for the educational sandbox VM.
|
|
123
122
|
* An unrecognised profile is reported as a diagnostic with `bytecode: null`.
|
|
123
|
+
*
|
|
124
|
+
* # Panics
|
|
125
|
+
*
|
|
126
|
+
* Panics if the compiled output cannot be serialized as JSON.
|
|
124
127
|
* @param {string} source
|
|
125
128
|
* @param {string} profile
|
|
129
|
+
* @param {Map<any, any> | null} [files]
|
|
126
130
|
* @returns {string}
|
|
127
131
|
*/
|
|
128
|
-
export function compileToSandboxBytecode(source, profile) {
|
|
132
|
+
export function compileToSandboxBytecode(source, profile, files) {
|
|
129
133
|
let deferred3_0;
|
|
130
134
|
let deferred3_1;
|
|
131
135
|
try {
|
|
@@ -134,7 +138,7 @@ export function compileToSandboxBytecode(source, profile) {
|
|
|
134
138
|
const len0 = WASM_VECTOR_LEN;
|
|
135
139
|
const ptr1 = passStringToWasm0(profile, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
136
140
|
const len1 = WASM_VECTOR_LEN;
|
|
137
|
-
wasm.compileToSandboxBytecode(retptr, ptr0, len0, ptr1, len1);
|
|
141
|
+
wasm.compileToSandboxBytecode(retptr, ptr0, len0, ptr1, len1, isLikeNone(files) ? 0 : addHeapObject(files));
|
|
138
142
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
139
143
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
140
144
|
deferred3_0 = r0;
|
|
@@ -142,7 +146,7 @@ export function compileToSandboxBytecode(source, profile) {
|
|
|
142
146
|
return getStringFromWasm0(r0, r1);
|
|
143
147
|
} finally {
|
|
144
148
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
145
|
-
wasm.
|
|
149
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
146
150
|
}
|
|
147
151
|
}
|
|
148
152
|
|
|
@@ -179,7 +183,7 @@ export function complete(source, offset) {
|
|
|
179
183
|
return getStringFromWasm0(ptr2, len2);
|
|
180
184
|
} finally {
|
|
181
185
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
182
|
-
wasm.
|
|
186
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
183
187
|
}
|
|
184
188
|
}
|
|
185
189
|
|
|
@@ -215,7 +219,31 @@ export function document_symbols(source) {
|
|
|
215
219
|
return getStringFromWasm0(ptr2, len2);
|
|
216
220
|
} finally {
|
|
217
221
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
218
|
-
wasm.
|
|
222
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Execute the compiler's typed codec plan using the shared native engine.
|
|
228
|
+
* @param {string} request
|
|
229
|
+
* @returns {string}
|
|
230
|
+
*/
|
|
231
|
+
export function executeCodec(request) {
|
|
232
|
+
let deferred2_0;
|
|
233
|
+
let deferred2_1;
|
|
234
|
+
try {
|
|
235
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
236
|
+
const ptr0 = passStringToWasm0(request, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
237
|
+
const len0 = WASM_VECTOR_LEN;
|
|
238
|
+
wasm.executeCodec(retptr, ptr0, len0);
|
|
239
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
240
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
241
|
+
deferred2_0 = r0;
|
|
242
|
+
deferred2_1 = r1;
|
|
243
|
+
return getStringFromWasm0(r0, r1);
|
|
244
|
+
} finally {
|
|
245
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
246
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
219
247
|
}
|
|
220
248
|
}
|
|
221
249
|
|
|
@@ -252,7 +280,7 @@ export function find_references(source, offset) {
|
|
|
252
280
|
return getStringFromWasm0(ptr2, len2);
|
|
253
281
|
} finally {
|
|
254
282
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
255
|
-
wasm.
|
|
283
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
256
284
|
}
|
|
257
285
|
}
|
|
258
286
|
|
|
@@ -288,7 +316,7 @@ export function folding_ranges(source) {
|
|
|
288
316
|
return getStringFromWasm0(ptr2, len2);
|
|
289
317
|
} finally {
|
|
290
318
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
291
|
-
wasm.
|
|
319
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
292
320
|
}
|
|
293
321
|
}
|
|
294
322
|
|
|
@@ -327,7 +355,7 @@ export function format_source(source) {
|
|
|
327
355
|
return getStringFromWasm0(ptr2, len2);
|
|
328
356
|
} finally {
|
|
329
357
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
330
|
-
wasm.
|
|
358
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
331
359
|
}
|
|
332
360
|
}
|
|
333
361
|
|
|
@@ -360,7 +388,7 @@ export function get_keywords() {
|
|
|
360
388
|
return getStringFromWasm0(ptr1, len1);
|
|
361
389
|
} finally {
|
|
362
390
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
363
|
-
wasm.
|
|
391
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
364
392
|
}
|
|
365
393
|
}
|
|
366
394
|
|
|
@@ -397,7 +425,7 @@ export function goto_definition(source, offset) {
|
|
|
397
425
|
return getStringFromWasm0(ptr2, len2);
|
|
398
426
|
} finally {
|
|
399
427
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
400
|
-
wasm.
|
|
428
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
401
429
|
}
|
|
402
430
|
}
|
|
403
431
|
|
|
@@ -436,7 +464,7 @@ export function hover(source, offset) {
|
|
|
436
464
|
return getStringFromWasm0(ptr2, len2);
|
|
437
465
|
} finally {
|
|
438
466
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
439
|
-
wasm.
|
|
467
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
440
468
|
}
|
|
441
469
|
}
|
|
442
470
|
|
|
@@ -472,7 +500,7 @@ export function inlay_hints(source) {
|
|
|
472
500
|
return getStringFromWasm0(ptr2, len2);
|
|
473
501
|
} finally {
|
|
474
502
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
475
|
-
wasm.
|
|
503
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
476
504
|
}
|
|
477
505
|
}
|
|
478
506
|
|
|
@@ -512,7 +540,7 @@ export function parse_source(source) {
|
|
|
512
540
|
return getStringFromWasm0(ptr2, len2);
|
|
513
541
|
} finally {
|
|
514
542
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
515
|
-
wasm.
|
|
543
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
516
544
|
}
|
|
517
545
|
}
|
|
518
546
|
|
|
@@ -549,7 +577,7 @@ export function prepare_rename(source, offset) {
|
|
|
549
577
|
return getStringFromWasm0(ptr2, len2);
|
|
550
578
|
} finally {
|
|
551
579
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
552
|
-
wasm.
|
|
580
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
553
581
|
}
|
|
554
582
|
}
|
|
555
583
|
|
|
@@ -589,7 +617,7 @@ export function rename(source, offset, new_name) {
|
|
|
589
617
|
return getStringFromWasm0(ptr3, len3);
|
|
590
618
|
} finally {
|
|
591
619
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
592
|
-
wasm.
|
|
620
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
593
621
|
}
|
|
594
622
|
}
|
|
595
623
|
|
|
@@ -625,7 +653,7 @@ export function semantic_tokens(source) {
|
|
|
625
653
|
return getStringFromWasm0(ptr2, len2);
|
|
626
654
|
} finally {
|
|
627
655
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
628
|
-
wasm.
|
|
656
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
629
657
|
}
|
|
630
658
|
}
|
|
631
659
|
|
|
@@ -662,31 +690,28 @@ export function signature_help(source, offset) {
|
|
|
662
690
|
return getStringFromWasm0(ptr2, len2);
|
|
663
691
|
} finally {
|
|
664
692
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
665
|
-
wasm.
|
|
693
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
666
694
|
}
|
|
667
695
|
}
|
|
668
696
|
|
|
669
697
|
/**
|
|
670
|
-
* Type-check
|
|
671
|
-
*
|
|
672
|
-
* `diagnostics` includes parser and checker diagnostics. `type_info` contains
|
|
673
|
-
* byte-span keyed, user-facing resolved types for hover/editor consumers; it is
|
|
674
|
-
* empty when parsing fails and the checker is skipped.
|
|
698
|
+
* Type-check source using the supplied browser input files.
|
|
675
699
|
*
|
|
676
700
|
* # Errors
|
|
677
701
|
*
|
|
678
|
-
* Returns a JavaScript error if the
|
|
702
|
+
* Returns a JavaScript error if an input is invalid or the result cannot be serialized.
|
|
679
703
|
* @param {string} source
|
|
704
|
+
* @param {Map<any, any> | null} [files]
|
|
680
705
|
* @returns {string}
|
|
681
706
|
*/
|
|
682
|
-
export function type_check(source) {
|
|
707
|
+
export function type_check(source, files) {
|
|
683
708
|
let deferred3_0;
|
|
684
709
|
let deferred3_1;
|
|
685
710
|
try {
|
|
686
711
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
687
712
|
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
688
713
|
const len0 = WASM_VECTOR_LEN;
|
|
689
|
-
wasm.type_check(retptr, ptr0, len0);
|
|
714
|
+
wasm.type_check(retptr, ptr0, len0, isLikeNone(files) ? 0 : addHeapObject(files));
|
|
690
715
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
691
716
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
692
717
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -702,17 +727,97 @@ export function type_check(source) {
|
|
|
702
727
|
return getStringFromWasm0(ptr2, len2);
|
|
703
728
|
} finally {
|
|
704
729
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
705
|
-
wasm.
|
|
730
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
706
731
|
}
|
|
707
732
|
}
|
|
708
733
|
function __wbg_get_imports() {
|
|
709
734
|
const import0 = {
|
|
710
735
|
__proto__: null,
|
|
736
|
+
__wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
|
|
737
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
738
|
+
return ret;
|
|
739
|
+
},
|
|
740
|
+
__wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
|
|
741
|
+
const val = getObject(arg0);
|
|
742
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
743
|
+
return ret;
|
|
744
|
+
},
|
|
745
|
+
__wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
|
|
746
|
+
const obj = getObject(arg1);
|
|
747
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
748
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
749
|
+
var len1 = WASM_VECTOR_LEN;
|
|
750
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
751
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
752
|
+
},
|
|
753
|
+
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
|
|
754
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
755
|
+
},
|
|
756
|
+
__wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
|
|
757
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
758
|
+
return addHeapObject(ret);
|
|
759
|
+
}, arguments); },
|
|
760
|
+
__wbg_done_b41a1d26cdb37fb6: function(arg0) {
|
|
761
|
+
const ret = getObject(arg0).done;
|
|
762
|
+
return ret;
|
|
763
|
+
},
|
|
764
|
+
__wbg_from_296ca31f8d0f1c52: function(arg0) {
|
|
765
|
+
const ret = Array.from(getObject(arg0));
|
|
766
|
+
return addHeapObject(ret);
|
|
767
|
+
},
|
|
768
|
+
__wbg_get_658f6698067d9515: function() { return handleError(function (arg0, arg1) {
|
|
769
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
770
|
+
return addHeapObject(ret);
|
|
771
|
+
}, arguments); },
|
|
772
|
+
__wbg_get_6c896e0571ddae51: function(arg0, arg1) {
|
|
773
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
774
|
+
return addHeapObject(ret);
|
|
775
|
+
},
|
|
776
|
+
__wbg_instanceof_Uint8Array_828cef2aaacafc31: function(arg0) {
|
|
777
|
+
let result;
|
|
778
|
+
try {
|
|
779
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
780
|
+
} catch (_) {
|
|
781
|
+
result = false;
|
|
782
|
+
}
|
|
783
|
+
const ret = result;
|
|
784
|
+
return ret;
|
|
785
|
+
},
|
|
786
|
+
__wbg_iterator_e3c31c892080e444: function() {
|
|
787
|
+
const ret = Symbol.iterator;
|
|
788
|
+
return addHeapObject(ret);
|
|
789
|
+
},
|
|
790
|
+
__wbg_length_7f3c00c40364105e: function(arg0) {
|
|
791
|
+
const ret = getObject(arg0).length;
|
|
792
|
+
return ret;
|
|
793
|
+
},
|
|
794
|
+
__wbg_new_1dbf7428bba60a42: function(arg0) {
|
|
795
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
796
|
+
return addHeapObject(ret);
|
|
797
|
+
},
|
|
798
|
+
__wbg_next_33784799010f1bbe: function(arg0) {
|
|
799
|
+
const ret = getObject(arg0).next;
|
|
800
|
+
return addHeapObject(ret);
|
|
801
|
+
},
|
|
802
|
+
__wbg_next_f4aac29c42af995c: function() { return handleError(function (arg0) {
|
|
803
|
+
const ret = getObject(arg0).next();
|
|
804
|
+
return addHeapObject(ret);
|
|
805
|
+
}, arguments); },
|
|
806
|
+
__wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
|
|
807
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
808
|
+
},
|
|
809
|
+
__wbg_value_f3c585ee8f5ba40c: function(arg0) {
|
|
810
|
+
const ret = getObject(arg0).value;
|
|
811
|
+
return addHeapObject(ret);
|
|
812
|
+
},
|
|
711
813
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
712
814
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
713
815
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
714
816
|
return addHeapObject(ret);
|
|
715
817
|
},
|
|
818
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
819
|
+
takeObject(arg0);
|
|
820
|
+
},
|
|
716
821
|
};
|
|
717
822
|
return {
|
|
718
823
|
__proto__: null,
|
|
@@ -735,6 +840,11 @@ function dropObject(idx) {
|
|
|
735
840
|
heap_next = idx;
|
|
736
841
|
}
|
|
737
842
|
|
|
843
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
844
|
+
ptr = ptr >>> 0;
|
|
845
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
846
|
+
}
|
|
847
|
+
|
|
738
848
|
let cachedDataViewMemory0 = null;
|
|
739
849
|
function getDataViewMemory0() {
|
|
740
850
|
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
@@ -757,11 +867,23 @@ function getUint8ArrayMemory0() {
|
|
|
757
867
|
|
|
758
868
|
function getObject(idx) { return heap[idx]; }
|
|
759
869
|
|
|
870
|
+
function handleError(f, args) {
|
|
871
|
+
try {
|
|
872
|
+
return f.apply(this, args);
|
|
873
|
+
} catch (e) {
|
|
874
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
760
878
|
let heap = new Array(1024).fill(undefined);
|
|
761
879
|
heap.push(undefined, null, true, false);
|
|
762
880
|
|
|
763
881
|
let heap_next = heap.length;
|
|
764
882
|
|
|
883
|
+
function isLikeNone(x) {
|
|
884
|
+
return x === undefined || x === null;
|
|
885
|
+
}
|
|
886
|
+
|
|
765
887
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
766
888
|
if (realloc === undefined) {
|
|
767
889
|
const buf = cachedTextEncoder.encode(arg);
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|