nimskull icon indicating copy to clipboard operation
nimskull copied to clipboard

asyncjs: don't use JavaScript `async`

Open zerbina opened this issue 1 month ago • 0 comments

Summary

  • asyncjs no longer uses JavaScript's async
  • result in .async procedures now works like it does everywhere else
  • methods can no longer use .async

Details

  • the goal is removing the usage of the deprecated .codegenDecl pragma
  • routines marked with the .async pragma internally use a closure iterator that is then chained to a promise object when awaiting

To-Do

  • [ ] make imported exceptions properly catchable within closure iterators (separate PR)
  • [ ] re-add support for returning Futures from .async procedures
  • [ ] write a proper commit message

Notes for Reviewers

  • prior discussion about this can be found here
  • an important prerequisite for the new JavaScript code generator

zerbina avatar Jun 26 '24 17:06 zerbina