11let wasm ;
22
3- function isLikeNone ( x ) {
4- return x === undefined || x === null ;
5- }
6-
7- let cachedFloat64Memory0 = null ;
8-
9- function getFloat64Memory0 ( ) {
10- if ( cachedFloat64Memory0 === null || cachedFloat64Memory0 . byteLength === 0 ) {
11- cachedFloat64Memory0 = new Float64Array ( wasm . memory . buffer ) ;
12- }
13- return cachedFloat64Memory0 ;
14- }
15-
16- let cachedInt32Memory0 = null ;
17-
18- function getInt32Memory0 ( ) {
19- if ( cachedInt32Memory0 === null || cachedInt32Memory0 . byteLength === 0 ) {
20- cachedInt32Memory0 = new Int32Array ( wasm . memory . buffer ) ;
21- }
22- return cachedInt32Memory0 ;
23- }
24-
253function debugString ( val ) {
264 // primitive types
275 const type = typeof val ;
@@ -98,7 +76,7 @@ function getUint8Memory0() {
9876 return cachedUint8Memory0 ;
9977}
10078
101- const cachedTextEncoder = new TextEncoder ( 'utf-8' ) ;
79+ const cachedTextEncoder = ( typeof TextEncoder !== 'undefined' ? new TextEncoder ( 'utf-8' ) : { encode : ( ) => { throw Error ( 'TextEncoder not available' ) } } ) ;
10280
10381const encodeString = ( typeof cachedTextEncoder . encodeInto === 'function'
10482 ? function ( arg , view ) {
@@ -117,14 +95,14 @@ function passStringToWasm0(arg, malloc, realloc) {
11795
11896 if ( realloc === undefined ) {
11997 const buf = cachedTextEncoder . encode ( arg ) ;
120- const ptr = malloc ( buf . length ) ;
98+ const ptr = malloc ( buf . length , 1 ) >>> 0 ;
12199 getUint8Memory0 ( ) . subarray ( ptr , ptr + buf . length ) . set ( buf ) ;
122100 WASM_VECTOR_LEN = buf . length ;
123101 return ptr ;
124102 }
125103
126104 let len = arg . length ;
127- let ptr = malloc ( len ) ;
105+ let ptr = malloc ( len , 1 ) >>> 0 ;
128106
129107 const mem = getUint8Memory0 ( ) ;
130108
@@ -140,7 +118,7 @@ function passStringToWasm0(arg, malloc, realloc) {
140118 if ( offset !== 0 ) {
141119 arg = arg . slice ( offset ) ;
142120 }
143- ptr = realloc ( ptr , len , len = offset + arg . length * 3 ) ;
121+ ptr = realloc ( ptr , len , len = offset + arg . length * 3 , 1 ) >>> 0 ;
144122 const view = getUint8Memory0 ( ) . subarray ( ptr + offset , ptr + len ) ;
145123 const ret = encodeString ( arg , view ) ;
146124
@@ -151,11 +129,21 @@ function passStringToWasm0(arg, malloc, realloc) {
151129 return ptr ;
152130}
153131
154- const cachedTextDecoder = new TextDecoder ( 'utf-8' , { ignoreBOM : true , fatal : true } ) ;
132+ let cachedInt32Memory0 = null ;
155133
156- cachedTextDecoder . decode ( ) ;
134+ function getInt32Memory0 ( ) {
135+ if ( cachedInt32Memory0 === null || cachedInt32Memory0 . byteLength === 0 ) {
136+ cachedInt32Memory0 = new Int32Array ( wasm . memory . buffer ) ;
137+ }
138+ return cachedInt32Memory0 ;
139+ }
140+
141+ const cachedTextDecoder = ( typeof TextDecoder !== 'undefined' ? new TextDecoder ( 'utf-8' , { ignoreBOM : true , fatal : true } ) : { decode : ( ) => { throw Error ( 'TextDecoder not available' ) } } ) ;
142+
143+ if ( typeof TextDecoder !== 'undefined' ) { cachedTextDecoder . decode ( ) ; } ;
157144
158145function getStringFromWasm0 ( ptr , len ) {
146+ ptr = ptr >>> 0 ;
159147 return cachedTextDecoder . decode ( getUint8Memory0 ( ) . subarray ( ptr , ptr + len ) ) ;
160148}
161149
@@ -187,7 +175,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
187175 CLOSURE_DTORS . register ( real , state , state ) ;
188176 return real ;
189177}
190- function __wbg_adapter_20 ( arg0 , arg1 , arg2 ) {
178+ function __wbg_adapter_18 ( arg0 , arg1 , arg2 ) {
191179 wasm . closure5_externref_shim ( arg0 , arg1 , arg2 ) ;
192180}
193181
@@ -216,7 +204,11 @@ function handleError(f, args) {
216204 }
217205}
218206
219- async function load ( module , imports ) {
207+ function isLikeNone ( x ) {
208+ return x === undefined || x === null ;
209+ }
210+
211+ async function __wbg_load ( module , imports ) {
220212 if ( typeof Response === 'function' && module instanceof Response ) {
221213 if ( typeof WebAssembly . instantiateStreaming === 'function' ) {
222214 try {
@@ -247,7 +239,7 @@ async function load(module, imports) {
247239 }
248240}
249241
250- function getImports ( ) {
242+ function __wbg_get_imports ( ) {
251243 const imports = { } ;
252244 imports . wbg = { } ;
253245 imports . wbg . __wbg_classList_c4ebb3813d3a2f5d = function ( arg0 ) {
@@ -282,15 +274,6 @@ function getImports() {
282274 const ret = arg0 . currentTarget ;
283275 return isLikeNone ( ret ) ? 0 : addToExternrefTable0 ( ret ) ;
284276 } ;
285- imports . wbg . __wbindgen_cb_drop = function ( arg0 ) {
286- const obj = arg0 . original ;
287- if ( obj . cnt -- == 1 ) {
288- obj . a = 0 ;
289- return true ;
290- }
291- const ret = false ;
292- return ret ;
293- } ;
294277 imports . wbg . __wbg_setAttribute_79c9562d32d05e66 = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 , arg3 , arg4 ) {
295278 var v0 = getCachedStringFromWasm0 ( arg1 , arg2 ) ;
296279 var v1 = getCachedStringFromWasm0 ( arg3 , arg4 ) ;
@@ -328,40 +311,6 @@ function getImports() {
328311 imports . wbg . __wbg_replaceWith_047ccd5d5d7fe68c = function ( ) { return handleError ( function ( arg0 , arg1 ) {
329312 arg0 . replaceWith ( arg1 ) ;
330313 } , arguments ) } ;
331- imports . wbg . __wbg_setonpopstate_3231b4d447477861 = function ( arg0 , arg1 ) {
332- arg0 . onpopstate = arg1 ;
333- } ;
334- imports . wbg . __wbg_location_797a1856892cc2de = function ( arg0 ) {
335- const ret = arg0 . location ;
336- return ret ;
337- } ;
338- imports . wbg . __wbg_baseURI_183bb1b65bdb30f8 = function ( ) { return handleError ( function ( arg0 , arg1 ) {
339- const ret = arg1 . baseURI ;
340- var ptr0 = isLikeNone ( ret ) ? 0 : passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
341- var len0 = WASM_VECTOR_LEN ;
342- getInt32Memory0 ( ) [ arg0 / 4 + 1 ] = len0 ;
343- getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr0 ;
344- } , arguments ) } ;
345- imports . wbg . __wbg_href_bb86bb94d1c6861b = function ( ) { return handleError ( function ( arg0 , arg1 ) {
346- const ret = arg1 . href ;
347- const ptr0 = passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
348- const len0 = WASM_VECTOR_LEN ;
349- getInt32Memory0 ( ) [ arg0 / 4 + 1 ] = len0 ;
350- getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr0 ;
351- } , arguments ) } ;
352- imports . wbg . __wbg_pathname_7b2f7ba43a0fdd6e = function ( ) { return handleError ( function ( arg0 , arg1 ) {
353- const ret = arg1 . pathname ;
354- const ptr0 = passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
355- const len0 = WASM_VECTOR_LEN ;
356- getInt32Memory0 ( ) [ arg0 / 4 + 1 ] = len0 ;
357- getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr0 ;
358- } , arguments ) } ;
359- imports . wbg . __wbindgen_number_get = function ( arg0 , arg1 ) {
360- const obj = arg1 ;
361- const ret = typeof ( obj ) === 'number' ? obj : undefined ;
362- getFloat64Memory0 ( ) [ arg0 / 8 + 1 ] = isLikeNone ( ret ) ? 0 : ret ;
363- getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ! isLikeNone ( ret ) ;
364- } ;
365314 imports . wbg . __wbg_createElement_e2a0e21263eb5416 = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 ) {
366315 var v0 = getCachedStringFromWasm0 ( arg1 , arg2 ) ;
367316 const ret = arg0 . createElement ( v0 ) ;
@@ -380,10 +329,10 @@ function getImports() {
380329 } ;
381330 imports . wbg . __wbindgen_debug_string = function ( arg0 , arg1 ) {
382331 const ret = debugString ( arg1 ) ;
383- const ptr0 = passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
384- const len0 = WASM_VECTOR_LEN ;
385- getInt32Memory0 ( ) [ arg0 / 4 + 1 ] = len0 ;
386- getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr0 ;
332+ const ptr1 = passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
333+ const len1 = WASM_VECTOR_LEN ;
334+ getInt32Memory0 ( ) [ arg0 / 4 + 1 ] = len1 ;
335+ getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr1 ;
387336 } ;
388337 imports . wbg . __wbindgen_throw = function ( arg0 , arg1 ) {
389338 throw new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
@@ -396,6 +345,15 @@ function getImports() {
396345 const ret = Promise . resolve ( arg0 ) ;
397346 return ret ;
398347 } ;
348+ imports . wbg . __wbindgen_cb_drop = function ( arg0 ) {
349+ const obj = arg0 . original ;
350+ if ( obj . cnt -- == 1 ) {
351+ obj . a = 0 ;
352+ return true ;
353+ }
354+ const ret = false ;
355+ return ret ;
356+ } ;
399357 imports . wbg . __wbg_then_ec5db6d509eb475f = function ( arg0 , arg1 ) {
400358 const ret = arg0 . then ( arg1 ) ;
401359 return ret ;
@@ -439,16 +397,12 @@ function getImports() {
439397 const ret = result ;
440398 return ret ;
441399 } ;
442- imports . wbg . __wbindgen_closure_wrapper127 = function ( arg0 , arg1 , arg2 ) {
443- const ret = makeMutClosure ( arg0 , arg1 , 6 , __wbg_adapter_20 ) ;
400+ imports . wbg . __wbindgen_closure_wrapper123 = function ( arg0 , arg1 , arg2 ) {
401+ const ret = makeMutClosure ( arg0 , arg1 , 6 , __wbg_adapter_18 ) ;
444402 return ret ;
445403 } ;
446- imports . wbg . __wbindgen_closure_wrapper233 = function ( arg0 , arg1 , arg2 ) {
447- const ret = makeMutClosure ( arg0 , arg1 , 6 , __wbg_adapter_20 ) ;
448- return ret ;
449- } ;
450- imports . wbg . __wbindgen_closure_wrapper839 = function ( arg0 , arg1 , arg2 ) {
451- const ret = makeMutClosure ( arg0 , arg1 , 6 , __wbg_adapter_20 ) ;
404+ imports . wbg . __wbindgen_closure_wrapper797 = function ( arg0 , arg1 , arg2 ) {
405+ const ret = makeMutClosure ( arg0 , arg1 , 6 , __wbg_adapter_18 ) ;
452406 return ret ;
453407 } ;
454408 imports . wbg . __wbindgen_init_externref_table = function ( ) {
@@ -465,14 +419,13 @@ function getImports() {
465419 return imports ;
466420}
467421
468- function initMemory ( imports , maybe_memory ) {
422+ function __wbg_init_memory ( imports , maybe_memory ) {
469423
470424}
471425
472- function finalizeInit ( instance , module ) {
426+ function __wbg_finalize_init ( instance , module ) {
473427 wasm = instance . exports ;
474- init . __wbindgen_wasm_module = module ;
475- cachedFloat64Memory0 = null ;
428+ __wbg_init . __wbindgen_wasm_module = module ;
476429 cachedInt32Memory0 = null ;
477430 cachedUint8Memory0 = null ;
478431
@@ -481,35 +434,39 @@ function finalizeInit(instance, module) {
481434}
482435
483436function initSync ( module ) {
484- const imports = getImports ( ) ;
437+ if ( wasm !== undefined ) return wasm ;
438+
439+ const imports = __wbg_get_imports ( ) ;
485440
486- initMemory ( imports ) ;
441+ __wbg_init_memory ( imports ) ;
487442
488443 if ( ! ( module instanceof WebAssembly . Module ) ) {
489444 module = new WebAssembly . Module ( module ) ;
490445 }
491446
492447 const instance = new WebAssembly . Instance ( module , imports ) ;
493448
494- return finalizeInit ( instance , module ) ;
449+ return __wbg_finalize_init ( instance , module ) ;
495450}
496451
497- async function init ( input ) {
452+ async function __wbg_init ( input ) {
453+ if ( wasm !== undefined ) return wasm ;
454+
498455 if ( typeof input === 'undefined' ) {
499- input = new URL ( 'js-framework-benchmark-silkenweb-c1debd87db51acf2_bg .wasm' , import . meta. url ) ;
456+ input = new URL ( 'js-framework-benchmark-silkenweb-fa1762b6e678dcf6_bg .wasm' , import . meta. url ) ;
500457 }
501- const imports = getImports ( ) ;
458+ const imports = __wbg_get_imports ( ) ;
502459
503460 if ( typeof input === 'string' || ( typeof Request === 'function' && input instanceof Request ) || ( typeof URL === 'function' && input instanceof URL ) ) {
504461 input = fetch ( input ) ;
505462 }
506463
507- initMemory ( imports ) ;
464+ __wbg_init_memory ( imports ) ;
508465
509- const { instance, module } = await load ( await input , imports ) ;
466+ const { instance, module } = await __wbg_load ( await input , imports ) ;
510467
511- return finalizeInit ( instance , module ) ;
468+ return __wbg_finalize_init ( instance , module ) ;
512469}
513470
514471export { initSync }
515- export default init ;
472+ export default __wbg_init ;
0 commit comments