@@ -1903,10 +1903,12 @@ addToLibrary({
19031903 $setWasmTableEntry__internal : true ,
19041904 $setWasmTableEntry__deps : [ '$wasmTableMirror' , '$wasmTable' ] ,
19051905 $setWasmTableEntry : ( idx , func ) => {
1906+ /** @suppress {checkTypes} */
19061907 wasmTable . set ( { { { toIndexType ( 'idx' ) } } } , func ) ;
19071908 // With ABORT_ON_WASM_EXCEPTIONS wasmTable.get is overridden to return wrapped
19081909 // functions so we need to call it here to retrieve the potential wrapper correctly
19091910 // instead of just storing 'func' directly into wasmTableMirror
1911+ /** @suppress {checkTypes} */
19101912 wasmTableMirror [ idx ] = wasmTable . get ( { { { toIndexType ( 'idx' ) } } } ) ;
19111913 } ,
19121914
@@ -1922,6 +1924,7 @@ addToLibrary({
19221924 var func = wasmTableMirror [ funcPtr ] ;
19231925 if ( ! func ) {
19241926 if ( funcPtr >= wasmTableMirror . length ) wasmTableMirror . length = funcPtr + 1 ;
1927+ /** @suppress {checkTypes} */
19251928 wasmTableMirror [ funcPtr ] = func = wasmTable . get ( { { { toIndexType ( 'funcPtr' ) } } } ) ;
19261929#if ASYNCIFY == 2
19271930 if ( Asyncify . isAsyncExport ( func ) ) {
@@ -1930,23 +1933,21 @@ addToLibrary({
19301933#endif
19311934 }
19321935#if ASSERTIONS && ASYNCIFY != 2 // With JSPI the function stored in the table will be a wrapper.
1936+ /** @suppress {checkTypes} */
19331937 assert ( wasmTable . get ( { { { toIndexType ( 'funcPtr' ) } } } ) == func , 'JavaScript-side Wasm function table mirror is out of date!' ) ;
19341938#endif
19351939 return func ;
19361940 } ,
19371941
19381942#else
19391943
1944+ $setWasmTableEntry__docs : '/** @suppress{checkTypes} */' ,
19401945 $setWasmTableEntry__deps : [ '$wasmTable' ] ,
19411946 $setWasmTableEntry : ( idx , func ) => wasmTable . set ( { { { toIndexType ( 'idx' ) } } } , func ) ,
19421947
1948+ $getWasmTableEntry__docs : '/** @suppress{checkTypes} */' ,
19431949 $getWasmTableEntry__deps : [ '$wasmTable' ] ,
19441950 $getWasmTableEntry : ( funcPtr ) => {
1945- #if MEMORY64
1946- // Function pointers are 64-bit, but wasmTable.get() requires a Number.
1947- // https://github.com/emscripten-core/emscripten/issues/18200
1948- funcPtr = Number ( funcPtr ) ;
1949- #endif
19501951 // In -Os and -Oz builds, do not implement a JS side wasm table mirror for small
19511952 // code size, but directly access wasmTable, which is a bit slower as uncached.
19521953 return wasmTable . get ( { { { toIndexType ( 'funcPtr' ) } } } ) ;
0 commit comments