@@ -345,7 +345,9 @@ mergeInto(LibraryManager.library, {
345
345
// We must first unwind, so things are spilled to the stack. We
346
346
// can resume right after unwinding, no need for a timeout.
347
347
Asyncify . afterUnwind = function ( ) {
348
- { { { makeDynCall ( 'vii' ) } } } ( func , Asyncify . currData + 8 , HEAP32 [ Asyncify . currData >> 2 ] ) ;
348
+ var stackBegin = Asyncify . currData + { { { C_STRUCTS . asyncify_data_s . __size__ } } } ;
349
+ var stackEnd = HEAP32 [ Asyncify . currData >> 2 ] ;
350
+ { { { makeDynCall ( 'vii' ) } } } ( func , stackBegin , stackEnd ) ;
349
351
wakeUp ( ) ;
350
352
} ;
351
353
} ) ;
@@ -408,7 +410,7 @@ mergeInto(LibraryManager.library, {
408
410
var userData = { { { makeGetValue ( 'newFiber' , C_STRUCTS . emscripten_fiber_s . user_data , 'i32' ) } } } ;
409
411
{ { { makeDynCall ( 'vi' ) } } } ( entryPoint , userData ) ;
410
412
} else {
411
- var asyncifyData = newFiber + 20 ;
413
+ var asyncifyData = newFiber + { { { C_STRUCTS . emscripten_fiber_s . asyncify_data } } } ;
412
414
Asyncify . currData = asyncifyData ;
413
415
414
416
#if ASYNCIFY_DEBUG
@@ -487,36 +489,17 @@ mergeInto(LibraryManager.library, {
487
489
Asyncify . currData = null ;
488
490
}
489
491
} ,
490
-
491
- emscripten_coroutine_create: function ( ) {
492
- throw 'emscripten_coroutine_create has been removed. Please use the Fibers API' ;
493
- } ,
494
- emscripten_coroutine_next : function ( ) {
495
- throw 'emscripten_coroutine_next has been removed. Please use the Fibers API' ;
496
- } ,
497
- emscripten_yield : function ( ) {
498
- throw 'emscripten_yield has been removed. Please use the Fibers API' ;
499
- } ,
500
492
#else // ASYNCIFY
501
493
emscripten_sleep: function ( ) {
502
494
throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_sleep' ;
503
495
} ,
504
- emscripten_coroutine_create : function ( ) {
505
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_coroutine_create' ;
506
- } ,
507
- emscripten_coroutine_next : function ( ) {
508
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_coroutine_next' ;
509
- } ,
510
- emscripten_yield : function ( ) {
511
- throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_yield' ;
512
- } ,
513
- emscripten_wget : function ( url , file ) {
496
+ emscripten_wget : function ( ) {
514
497
throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_wget' ;
515
498
} ,
516
- emscripten_wget_data : function ( url , file ) {
499
+ emscripten_wget_data : function ( ) {
517
500
throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_wget_data' ;
518
501
} ,
519
- emscripten_scan_registers : function ( url , file ) {
502
+ emscripten_scan_registers : function ( ) {
520
503
throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_scan_registers' ;
521
504
} ,
522
505
emscripten_fiber_init : function ( ) {
0 commit comments