@@ -60,65 +60,52 @@ mergeInto(LibraryManager.library, {
6060  //       WASM_BIGINT so the pointer is just a single argument, just like in 
6161  //       wasm32). 
6262  _wasmfs_jsimpl_async_alloc_file__deps : [ '$runtimeKeepalivePush' ,  '$runtimeKeepalivePop' ] , 
63-   _wasmfs_jsimpl_async_alloc_file : async  function ( backend ,   file ,   fptr ,   arg )  { 
63+   _wasmfs_jsimpl_async_alloc_file : async  function ( ctx ,   backend ,   file )  { 
6464#if ASSERTIONS 
6565    assert ( wasmFS$backends [ backend ] ) ; 
6666#endif
67-     { { {  runtimeKeepalivePush ( )  } } } 
6867    await  wasmFS$backends [ backend ] . allocFile ( file ) ; 
69-     { { {  runtimeKeepalivePop ( )  } } } 
70-     { { {  makeDynCall ( 'vi' ,  'fptr' )  } } } ( arg ) ; 
68+     _emscripten_proxy_finish ( ctx ) ; 
7169  } , 
7270
7371  _wasmfs_jsimpl_async_free_file__deps :  [ '$runtimeKeepalivePush' ,  '$runtimeKeepalivePop' ] , 
74-   _wasmfs_jsimpl_async_free_file : async  function ( backend ,   file ,   fptr ,   arg )  { 
72+   _wasmfs_jsimpl_async_free_file : async  function ( ctx ,   backend ,   file )  { 
7573#if ASSERTIONS 
7674    assert ( wasmFS$backends [ backend ] ) ; 
7775#endif
78-     { { {  runtimeKeepalivePush ( )  } } } 
7976    await  wasmFS$backends [ backend ] . freeFile ( file ) ; 
80-     { { {  runtimeKeepalivePop ( )  } } } 
81-     { { {  makeDynCall ( 'vi' ,  'fptr' )  } } } ( arg ) ; 
77+     _emscripten_proxy_finish ( ctx ) ; 
8278  } , 
8379
8480  _wasmfs_jsimpl_async_write__deps : [ '$runtimeKeepalivePush' ,  '$runtimeKeepalivePop' ] , 
85-   _wasmfs_jsimpl_async_write : async  function ( backend ,  file ,  buffer ,  length ,  { { {  defineI64Param ( 'offset' )  } } } ,  fptr ,   arg )  { 
81+   _wasmfs_jsimpl_async_write : async  function ( ctx ,   backend ,  file ,  buffer ,  length ,  { { {  defineI64Param ( 'offset' )  } } } ,  result_p )  { 
8682    { { {  receiveI64ParamAsDouble ( 'offset' )  } } } 
8783#if ASSERTIONS 
8884    assert ( wasmFS$backends [ backend ] ) ; 
8985#endif
90-     { { {  runtimeKeepalivePush ( )  } } } 
91-     var  size  =  await  wasmFS$backends [ backend ] . write ( file ,  buffer ,  length ,  offset ) ; 
92-     { { {  runtimeKeepalivePop ( )  } } } 
93-     { { {  makeSetValue ( 'arg' ,  C_STRUCTS . CallbackState . result ,  '0' ,  'i32' )  } } } ; 
94-     { { {  makeSetValue ( 'arg' ,  C_STRUCTS . CallbackState . offset ,  'size' ,  'i64' )  } } } ; 
95-     { { {  makeDynCall ( 'vi' ,  'fptr' )  } } } ( arg ) ; 
86+     var  result  =  await  wasmFS$backends [ backend ] . write ( file ,  buffer ,  length ,  offset ) ; 
87+     { { {  makeSetValue ( 'result_p' ,  0 ,  'result' ,  'i64' )  } } } ; 
88+     _emscripten_proxy_finish ( ctx ) ; 
9689  } , 
9790
9891  _wasmfs_jsimpl_async_read__deps : [ '$runtimeKeepalivePush' ,  '$runtimeKeepalivePop' ] , 
99-   _wasmfs_jsimpl_async_read : async  function ( backend ,  file ,  buffer ,  length ,  { { {  defineI64Param ( 'offset' )  } } } ,  fptr ,   arg )  { 
92+   _wasmfs_jsimpl_async_read : async  function ( ctx ,   backend ,  file ,  buffer ,  length ,  { { {  defineI64Param ( 'offset' )  } } } ,  result_p )  { 
10093    { { {  receiveI64ParamAsDouble ( 'offset' )  } } } 
10194#if ASSERTIONS 
10295    assert ( wasmFS$backends [ backend ] ) ; 
10396#endif
104-     { { {  runtimeKeepalivePush ( )  } } } 
105-     var  size  =  await  wasmFS$backends [ backend ] . read ( file ,  buffer ,  length ,  offset ) ; 
106-     { { {  runtimeKeepalivePop ( )  } } } 
107-     { { {  makeSetValue ( 'arg' ,  C_STRUCTS . CallbackState . result ,  '0' ,  'i32' )  } } } ; 
108-     { { {  makeSetValue ( 'arg' ,  C_STRUCTS . CallbackState . offset ,  'size' ,  'i64' )  } } } ; 
109-     { { {  makeDynCall ( 'vi' ,  'fptr' )  } } } ( arg ) ; 
97+     var  result  =  await  wasmFS$backends [ backend ] . read ( file ,  buffer ,  length ,  offset ) ; 
98+     { { {  makeSetValue ( 'result_p' ,  0 ,  'result' ,  'i32' )  } } } ; 
99+     _emscripten_proxy_finish ( ctx ) ; 
110100  } , 
111101
112102  _wasmfs_jsimpl_async_get_size__deps :  [ '$runtimeKeepalivePush' ,  '$runtimeKeepalivePop' ] , 
113-   _wasmfs_jsimpl_async_get_size : async  function ( backend ,  file ,  fptr ,   arg )  { 
103+   _wasmfs_jsimpl_async_get_size : async  function ( ctx ,   backend ,  file ,  size_p )  { 
114104#if ASSERTIONS 
115105    assert ( wasmFS$backends [ backend ] ) ; 
116106#endif
117-     { { {  runtimeKeepalivePush ( )  } } } 
118107    var  size  =  await  wasmFS$backends [ backend ] . getSize ( file ) ; 
119-     { { {  runtimeKeepalivePop ( )  } } } 
120-     { { {  makeSetValue ( 'arg' ,  C_STRUCTS . CallbackState . result ,  '0' ,  'i32' )  } } } ; 
121-     { { {  makeSetValue ( 'arg' ,  C_STRUCTS . CallbackState . offset ,  'size' ,  'i64' )  } } } ; 
122-     { { {  makeDynCall ( 'vi' ,  'fptr' )  } } } ( arg ) ; 
108+     { { {  makeSetValue ( 'size_p' ,  0 ,  'size' ,  'i64' )  } } } ; 
109+     _emscripten_proxy_finish ( ctx ) ; 
123110  } , 
124111} ) ; 
0 commit comments