@@ -4,6 +4,26 @@ export function __wbg_set_wasm(val) {
4
4
}
5
5
6
6
7
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? ( 0 , module . require ) ( 'util' ) . TextDecoder : TextDecoder ;
8
+
9
+ let cachedTextDecoder = new lTextDecoder ( 'utf-8' , { ignoreBOM : true , fatal : true } ) ;
10
+
11
+ cachedTextDecoder . decode ( ) ;
12
+
13
+ let cachedUint8ArrayMemory0 = null ;
14
+
15
+ function getUint8ArrayMemory0 ( ) {
16
+ if ( cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0 . byteLength === 0 ) {
17
+ cachedUint8ArrayMemory0 = new Uint8Array ( wasm . memory . buffer ) ;
18
+ }
19
+ return cachedUint8ArrayMemory0 ;
20
+ }
21
+
22
+ function getStringFromWasm0 ( ptr , len ) {
23
+ ptr = ptr >>> 0 ;
24
+ return cachedTextDecoder . decode ( getUint8ArrayMemory0 ( ) . subarray ( ptr , ptr + len ) ) ;
25
+ }
26
+
7
27
const heap = new Array ( 128 ) . fill ( undefined ) ;
8
28
9
29
heap . push ( undefined , null , true , false ) ;
@@ -32,34 +52,14 @@ function takeObject(idx) {
32
52
dropObject ( idx ) ;
33
53
return ret ;
34
54
}
35
-
36
- const lTextDecoder = typeof TextDecoder === 'undefined' ? ( 0 , module . require ) ( 'util' ) . TextDecoder : TextDecoder ;
37
-
38
- let cachedTextDecoder = new lTextDecoder ( 'utf-8' , { ignoreBOM : true , fatal : true } ) ;
39
-
40
- cachedTextDecoder . decode ( ) ;
41
-
42
- let cachedUint8ArrayMemory0 = null ;
43
-
44
- function getUint8ArrayMemory0 ( ) {
45
- if ( cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0 . byteLength === 0 ) {
46
- cachedUint8ArrayMemory0 = new Uint8Array ( wasm . memory . buffer ) ;
47
- }
48
- return cachedUint8ArrayMemory0 ;
49
- }
50
-
51
- function getStringFromWasm0 ( ptr , len ) {
52
- ptr = ptr >>> 0 ;
53
- return cachedTextDecoder . decode ( getUint8ArrayMemory0 ( ) . subarray ( ptr , ptr + len ) ) ;
54
- }
55
55
/**
56
56
* @returns {string }
57
57
*/
58
- export function exported ( ) {
58
+ export function result_string ( ) {
59
59
let deferred2_0 ;
60
60
let deferred2_1 ;
61
61
try {
62
- const ret = wasm . exported ( ) ;
62
+ const ret = wasm . result_string ( ) ;
63
63
var ptr1 = ret [ 0 ] ;
64
64
var len1 = ret [ 1 ] ;
65
65
if ( ret [ 3 ] ) {
@@ -74,6 +74,29 @@ export function exported() {
74
74
}
75
75
}
76
76
77
+ export function result_void ( ) {
78
+ const ret = wasm . result_void ( ) ;
79
+ if ( ret [ 1 ] ) {
80
+ throw takeObject ( ret [ 0 ] ) ;
81
+ }
82
+ }
83
+
84
+ /**
85
+ * @returns {number }
86
+ */
87
+ export function result_i32 ( ) {
88
+ const ret = wasm . result_i32 ( ) ;
89
+ if ( ret [ 2 ] ) {
90
+ throw takeObject ( ret [ 1 ] ) ;
91
+ }
92
+ return ret [ 0 ] ;
93
+ }
94
+
95
+ export function __wbindgen_error_new ( arg0 , arg1 ) {
96
+ const ret = new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
97
+ return addHeapObject ( ret ) ;
98
+ } ;
99
+
77
100
export function __wbindgen_number_new ( arg0 ) {
78
101
const ret = arg0 ;
79
102
return addHeapObject ( ret ) ;
0 commit comments