Releases: cc-tweaked/Cobalt
v0.7.0
- 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 anInterruptHandler
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
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 usedebug.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
0.3.2
0.3.1
- 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
0.2.2 - Various improvements
- 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
- Fix
tostring
on large doubles - Ensure environments and metatables are tables
- Remove
rawset
/rawget
from non-table objects