Skip to content

0.5.0

Compare
Choose a tag to compare
@SquidDev SquidDev released this 07 Feb 12:49
· 192 commits to master since this release

There is also a blog post which discusses changes in more detail

  • Run nested Lua functions within one interpreter loop. When calling a Lua function from another Lua function, we do so within the same interpreter, rather than creating a new one. This allows us to increase the call stack depth to ~2^31.

  • Change how stack unwinding works on errors: The stack is now unwound within pcall/xpcall, rather than when the error is thrown. This means that return debug hooks are more reliable, and one may now use debug.traceback on coroutines which have errored.

  • Make coroutines "true" green threads: Previously every coroutine would be backed by a Java thread. While we optimised this as much as possible, it still had a considerable overhead.

    Coroutines have been rewritten, so that a yield or resume unwinds the Java stack, and resumes execution on the next coroutine. For backwards compatibility reasons, we still may execute coroutines on multiple threads, in cases where the current function does not handle unwinding (such as load).

  • Allow suspending coroutines: The entire Lua VM may now be paused and resumed at arbitrary execution points. This uses the same mechanisms as yields, and so will have the same limitations.