Skip to content

Releases: cc-tweaked/Cobalt

v0.7.0

26 Mar 18:55
c5c44f9
Compare
Choose a tag to compare
  • Remove Cobalt's threaded coroutine system. All functions are capable of unwinding and restoring their state, so it is no longer needed.
  • Remove DebugHandler. One may now either use debug hooks (which are now inherited across coroutines) or add an InterruptHandler instead.
  • Many changes to the stdlib to bring it more in line with Lua 5.4.
  • Add a new test system, which can be run against both Cobalt and other Lua implementations, to ensure better compliance.

0.5.0

07 Feb 12:49
Compare
Choose a tag to compare

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.

v0.4.0

02 Feb 09:16
Compare
Choose a tag to compare
  • Construct Lua states using a builder instead.
  • Run Lua coroutines using an executor. This allows you to pool threads for short-lived coroutines if desired, as well as set custom properties on the threads (such as priority and name).

0.3.2

03 Aug 18:47
Compare
Choose a tag to compare
  • Add argument info to debug.getlocal and debug.getinfo. This is strictly from Lua 5.2, but I'll cope.
  • Default to using little endian in string.dump
  • Remove propagation of debug hooks to child coroutines

0.3.1

02 Feb 12:22
Compare
Choose a tag to compare
  • Use [C] instead of function name in traceback. This makes it slightly closer to PUC Lua.
  • Various improvements to string formatting:
    • Handle %o and %g converters correctly
    • Use longs instead of integers
    • Ensure unsigned longs are formatted as such
    • Correctly handle alternate form
  • Fix crashes when coercing strings with non-ASCII characters to numbers.

0.3.0

14 Nov 18:45
Compare
Choose a tag to compare
  • Fix table keys corrupting the table's linked list.
  • Optimise concatenation for runs of strings.
  • Add a modified version of LuaJ 3.0's bit32 library.
  • Fix several out-of-bounds errors in pattern matching.

0.2.2 - Various improvements

17 Apr 11:56
Compare
Choose a tag to compare
  • Make LuaError a checked exception.
  • Change the table system to be closer to Lua's.
  • Fix string metatable not being used for arithmetic operators.

0.2 - Prep for LuaJC

27 Aug 18:45
Compare
Choose a tag to compare
  • Fix tostring on large doubles
  • Ensure environments and metatables are tables
  • Remove rawset/rawget from non-table objects

0.1.5

15 Apr 09:35
Compare
Choose a tag to compare
  • Add primitive profiler
  • Easier Java side debug hooks
  • Weak metatable support
  • Correct function names

0.1.4

17 Mar 08:04
Compare
Choose a tag to compare
  • Grow Lua stack instead of creating at max size. Also increase max size to 512
  • Fix call error messages