| 11:40 | <Andreu Botella> | I just realized that V8 implements async functions as generators |
| 11:42 | <Andreu Botella> | I wonder if making generators work with AsyncContext would have any effect on async functions |
| 14:50 | <shu> | doesn't... everyone implement async functions as generators? |
| 14:50 | <shu> | even transpilers do i thought |
| 14:51 | <Andreu Botella> | implementing AsyncContext in V8 is my first time implementing something on a JS engine |
| 14:52 | <Andreu Botella> | so this is new to me |
| 14:55 | <shu> | ah |
| 14:56 | <shu> | basically the suspend/resumption mechanism you need for generators and async functions are the same, so you just build it once |
| 14:56 | <shu> | regardless whether a resume point is a yield or an await, still a resume point |
| 14:58 | <Andreu Botella> | yeah, I get that |
| 14:58 | <Andreu Botella> | I think I might have watched a livestream Yulia did implementing async functions in SM years ago, so it didn't quite come as a shock that this worked that way |
| 14:59 | <Andreu Botella> | I just hadn't realized that that would be the case when starting to think about changing generators here |
| 15:03 | <littledan> | Yeah, I'm pretty sure the redundancy here is unobservable (the promise reaction will "already" queue up the right AsyncContext) |
| 21:46 | <ljharb> | There’s a great babel transform that implements them as purely promises, but only for a lintable subset that excludes some loop patterns. It never got to Babel core tho, sadly. |