News for hackers. Stuff that matters.
Re:Await in Rust by pron on Monday August 12, 2019 @03:43PM (#20679170)
This liveness analysis isn't strictly necessary for async/await, either. You can do it in both cases or in none. In any event, it is not a matter of storing more stack, but of the level of optimization in the stack representation. Interaction with a GC brings its own complications as well as opportunities.
Re:Await in Rust by naasking on Wednesday August 14, 2019 @09:43AM (#20695454)
You're right that it's not strictly necessary, but as I said, it falls out naturally from computing the required continuations. This optimization doesn't necessarily happen naturally when compiling direct code, depending on your intermediate IR of course, ie. say, if your IR is already continuation-based.

It'll be interesting to see how this plays out on the JVM though.