8
8
// Async support via ASYNCIFY
9
9
//
10
10
11
+ if ( ! ASYNCIFY ) {
12
+ throw "To link with the async library you must use -s ASYNCIFY" ;
13
+ }
14
+
11
15
mergeInto ( LibraryManager . library , {
12
16
// error handling
13
17
@@ -19,7 +23,6 @@ mergeInto(LibraryManager.library, {
19
23
}
20
24
} ,
21
25
22
- #if ASYNCIFY
23
26
$Asyncify__deps : [ '$Browser' , '$runAndAbortIfError' ] ,
24
27
$Asyncify : {
25
28
State : {
@@ -489,50 +492,6 @@ mergeInto(LibraryManager.library, {
489
492
Asyncify . currData = null ;
490
493
}
491
494
} ,
492
-
493
- emscripten_coroutine_create: function ( ) {
494
- throw 'emscripten_coroutine_create has been removed. Please use the Fibers API' ;
495
- } ,
496
- emscripten_coroutine_next : function ( ) {
497
- throw 'emscripten_coroutine_next has been removed. Please use the Fibers API' ;
498
- } ,
499
- emscripten_yield : function ( ) {
500
- throw 'emscripten_yield has been removed. Please use the Fibers API' ;
501
- } ,
502
- #else // ASYNCIFY
503
- emscripten_sleep : function ( ) {
504
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_sleep' ;
505
- } ,
506
- emscripten_coroutine_create : function ( ) {
507
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_coroutine_create' ;
508
- } ,
509
- emscripten_coroutine_next : function ( ) {
510
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_coroutine_next' ;
511
- } ,
512
- emscripten_yield : function ( ) {
513
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_yield' ;
514
- } ,
515
- emscripten_wget : function ( ) {
516
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_wget' ;
517
- } ,
518
- emscripten_wget_data : function ( ) {
519
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_wget_data' ;
520
- } ,
521
- emscripten_scan_registers : function ( ) {
522
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_scan_registers' ;
523
- } ,
524
- emscripten_fiber_init : function ( ) {
525
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_fiber_init' ;
526
- } ,
527
- emscripten_fiber_init_from_current_context : function ( ) {
528
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_fiber_init_from_current_context' ;
529
- } ,
530
- emscripten_fiber_swap : function ( ) {
531
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_fiber_swap' ;
532
- } ,
533
- #endif // ASYNCIFY
534
495
} ) ;
535
496
536
- if ( ASYNCIFY ) {
537
- DEFAULT_LIBRARY_FUNCS_TO_INCLUDE . push ( '$Asyncify' ) ;
538
- }
497
+ DEFAULT_LIBRARY_FUNCS_TO_INCLUDE . push ( '$Asyncify' ) ;
0 commit comments