mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-09-10 06:15:59 +00:00
Update Cobalt to 0.7
- Timeouts are now driven by an interrupt system, rather than polling. While we do not impose memory limits, this should close #1333. - Update the table library to largely match Lua 5.4: - Add table.move - Table methods (with the exception of foreach/foreachi) now use metamethods (closes #1088). There's still some remaining quirks (for instance, table.insert accepts values out-of-bounds), but I think that's fine. - Cobalt's threaded-coroutine system is gone (load now supports yielding), so we no longer track coroutine metrics. - Type errors now use __name. See #1355, though this does not apply to CC methods (either on the Java or CraftOS side), so is not enough to resolve it. See https://github.com/SquidDev/Cobalt/compare/v0.6.0...v0.7.0 for the full delta.
This commit is contained in:
@@ -21,7 +21,7 @@ CC: Tweaked is based off of the Cobalt Lua runtime, which uses Lua 5.1. However,
|
||||
| Hex literal fractional/exponent parts | ✔ | |
|
||||
| Empty statements | ❌ | |
|
||||
| `__len` metamethod | ✔ | |
|
||||
| `__ipairs` metamethod | ❌ | |
|
||||
| `__ipairs` metamethod | ❌ | Deprecated in Lua 5.3. `ipairs` uses `__len`/`__index` instead. |
|
||||
| `__pairs` metamethod | ✔ | |
|
||||
| `bit32` library | ✔ | |
|
||||
| `collectgarbage` isrunning, generational, incremental options | ❌ | `collectgarbage` does not exist in CC:T. |
|
||||
@@ -32,8 +32,8 @@ CC: Tweaked is based off of the Cobalt Lua runtime, which uses Lua 5.1. However,
|
||||
| `rawlen` function | ✔ | |
|
||||
| Negative index to `select` | ✔ | |
|
||||
| Removed `unpack` | 🔶 | Only if `disable_lua51_features` is enabled in the configuration. |
|
||||
| Arguments to `xpcall` | ❌ | |
|
||||
| Second return value from `coroutine.running` | ❌ | |
|
||||
| Arguments to `xpcall` | ✔ | |
|
||||
| Second return value from `coroutine.running` | ✔ | |
|
||||
| Removed `module` | ✔ | |
|
||||
| `package.loaders` -> `package.searchers` | ❌ | |
|
||||
| Second argument to loader functions | ✔ | |
|
||||
@@ -41,7 +41,7 @@ CC: Tweaked is based off of the Cobalt Lua runtime, which uses Lua 5.1. However,
|
||||
| `package.searchpath` | ✔ | |
|
||||
| Removed `package.seeall` | ✔ | |
|
||||
| `string.dump` on functions with upvalues (blanks them out) | ✔ | |
|
||||
| `string.rep` separator | ❌ | |
|
||||
| `string.rep` separator | ✔ | |
|
||||
| `%g` match group | ❌ | |
|
||||
| Removal of `%z` match group | ❌ | |
|
||||
| Removed `table.maxn` | 🔶 | Only if `disable_lua51_features` is enabled in the configuration. |
|
||||
@@ -64,7 +64,7 @@ CC: Tweaked is based off of the Cobalt Lua runtime, which uses Lua 5.1. However,
|
||||
| Removal of ambiguity error | ❌ | |
|
||||
| Identifiers may no longer use locale-dependent letters | ✔ | |
|
||||
| Ephemeron tables | ❌ | |
|
||||
| Identical functions may be reused | ❌ | |
|
||||
| Identical functions may be reused | ❌ | Removed in Lua 5.4 |
|
||||
| Generational garbage collector | ❌ | Cobalt uses the built-in Java garbage collector. |
|
||||
|
||||
## Lua 5.3
|
||||
@@ -75,10 +75,10 @@ CC: Tweaked is based off of the Cobalt Lua runtime, which uses Lua 5.1. However,
|
||||
| `\u{XXX}` escape sequence | ✔ | |
|
||||
| `utf8` library | ✔ | |
|
||||
| removed `__ipairs` metamethod | ✔ | |
|
||||
| `coroutine.isyieldable` | ❌ | |
|
||||
| `coroutine.isyieldable` | ✔ | |
|
||||
| `string.dump` strip argument | ✔ | |
|
||||
| `string.pack`/`string.unpack`/`string.packsize` | ✔ | |
|
||||
| `table.move` | ❌ | |
|
||||
| `table.move` | ✔ | |
|
||||
| `math.atan2` -> `math.atan` | ❌ | |
|
||||
| Removed `math.frexp`, `math.ldexp`, `math.pow`, `math.cosh`, `math.sinh`, `math.tanh` | ❌ | |
|
||||
| `math.maxinteger`/`math.mininteger` | ❌ | |
|
||||
@@ -87,7 +87,7 @@ CC: Tweaked is based off of the Cobalt Lua runtime, which uses Lua 5.1. However,
|
||||
| `math.ult` | ❌ | |
|
||||
| Removed `bit32` library | ❌ | |
|
||||
| Remove `*` from `file:read` modes | ✔ | |
|
||||
| Metamethods respected in `table.*`, `ipairs` | 🔶 | Only `__lt` is respected. |
|
||||
| Metamethods respected in `table.*`, `ipairs` | ✔ | |
|
||||
|
||||
## Lua 5.0
|
||||
| Feature | Supported? | Notes |
|
||||
|
Reference in New Issue
Block a user