@@ -490,7 +490,6 @@ var LibraryDylink = {
490
490
return ;
491
491
}
492
492
// if we can load dynamic libraries synchronously, do so, otherwise, preload
493
- #if WASM
494
493
if ( ! readBinary ) {
495
494
// we can't read binary data synchronously, so preload
496
495
addRunDependency ( 'preloadDylibs' ) ;
@@ -502,7 +501,6 @@ var LibraryDylink = {
502
501
} ) ;
503
502
return ;
504
503
}
505
- #endif
506
504
libs . forEach ( function ( lib ) {
507
505
// libraries linked to main never go away
508
506
loadDynamicLibrary ( lib , { global : true , nodelete : true } ) ;
@@ -607,7 +605,7 @@ var LibraryDylink = {
607
605
return result ;
608
606
}
609
607
610
- #if WASM && EMULATE_FUNCTION_POINTER_CASTS
608
+ #if EMULATE_FUNCTION_POINTER_CASTS
611
609
// for wasm with emulated function pointers, the i64 ABI is used for all
612
610
// function calls, so we can't just call addFunction on something JS
613
611
// can call (which does not use that ABI), as the function pointer would
@@ -623,19 +621,12 @@ var LibraryDylink = {
623
621
assert ( typeof result === 'number' , 'could not find function pointer for ' + symbol ) ;
624
622
#endif // ASSERTIONS
625
623
return result ;
626
- #else // WASM && EMULATE_FUNCTION_POINTER_CASTS
627
-
628
- #if WASM
624
+ #else // EMULATE_FUNCTION_POINTER_CASTS
629
625
// Insert the function into the wasm table. Since we know the function
630
626
// comes directly from the loaded wasm module we can insert it directly
631
627
// into the table, avoiding any JS interaction.
632
628
return addFunctionWasm ( result ) ;
633
- #else
634
- // convert the exported function into a function pointer using our generic
635
- // JS mechanism.
636
- return addFunction ( result ) ;
637
- #endif // WASM
638
- #endif // WASM && EMULATE_FUNCTION_POINTER_CASTS
629
+ #endif // EMULATE_FUNCTION_POINTER_CASTS
639
630
} ,
640
631
641
632
// char* dlerror(void);
0 commit comments