cosmopolitan/third_party
Michael Lenaghan 0dbf01bf1d
Bring Lua to 5.4.6. (#1214)
This essentially re-does the work of #875 on top of master.

This is what I did to check that Cosmo's Lua extensions still worked:

```
$ build/bootstrap/make MODE=aarch64 o/aarch64/third_party/lua/lua
$ ape o/aarch64/third_party/lua/lua
>: 10
10
>: 010
8
>: 0b10
2
>: string.byte("\e")
27
>: "Hello, %s" % {"world"}
Hello, world
>: "*" * 3
***
```

`luaL_traceback2` was used to show the stack trace with parameter
values; it's used in `LuaCallWithTrace`, which is used in Redbean to run
Lua code. You should be able to see the extended stack trace by running
something like this: `redbean -e "function a(b)c()end a(2)"` (with
"params" indicating the extended stack trace):

```
stack traceback:
 [string "function a(b)c()end a(2)"]:1: in function 'a', params: b = 2;
 [string "function a(b)c()end a(2)"]:1: in main chunk
```
@pkulchenko confirmed that I get the expected result with the updated
code.

This is what I did to check that Lua itself still worked:

```
$ cd third_party/lua/test/
$ ape ../../../o/aarch64/third_party/lua/lua all.lua
```

There's one test failure, in `files.lua`:

```
***** FILE 'files.lua'*****
testing i/o
../../../o/aarch64/third_party/lua/lua: files.lua:84: assertion failed!
stack traceback:
[C]: in function 'assert'
files.lua:84: in main chunk
(...tail calls...)
all.lua:195: in main chunk
[C]: in ?
.>>> closing state <<<
```

That isn't a result of these changes; the same test is failing in
master.

The failure is here:

```lua
if not _port then   -- invalid seek
  local status, msg, code = io.stdin:seek("set", 1000)
  assert(not status and type(msg) == "string" and type(code) == "number")
end
```

The test expects a seek to offset 1,000 on stdin to fail — but it
doesn't. `status` ends up being the new offset rather than `nil`.

If I comment out that one test, the remaining tests succeed.
2024-06-15 20:13:08 -04:00
..
aarch64 Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
argon2 Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
awk Add sysctlbyname() for MacOS 2024-05-02 23:21:43 -07:00
bash Implement proper time zone support 2024-05-04 23:06:37 -07:00
bzip2 Implement proper time zone support 2024-05-04 23:06:37 -07:00
chibicc Upgrade to 2022-era LLVM LIBCXX 2024-05-27 02:12:27 -07:00
compiler_rt Make malloc() go 200x faster 2024-06-05 02:02:14 -07:00
ctags Implement proper time zone support 2024-05-04 23:06:37 -07:00
dlmalloc Fix some nits 2024-06-05 04:05:49 -07:00
double-conversion Make malloc() go 200x faster 2024-06-05 02:02:14 -07:00
finger Implement proper time zone support 2024-05-04 23:06:37 -07:00
gdtoa Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
getopt Make malloc() go 200x faster 2024-06-05 02:02:14 -07:00
hiredis Implement proper time zone support 2024-05-04 23:06:37 -07:00
intel Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
less Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
libcxx Document __demangle() and fix a const func ptr bug 2024-06-02 04:15:48 -07:00
libcxxabi Upgrade to 2022-era LLVM LIBCXX 2024-05-27 02:12:27 -07:00
libunwind Make malloc() go 200x faster 2024-06-05 02:02:14 -07:00
linenoise Drop support for Windows 8 2024-05-29 19:37:47 -07:00
lua Bring Lua to 5.4.6. (#1214) 2024-06-15 20:13:08 -04:00
lz4cli Implement proper time zone support 2024-05-04 23:06:37 -07:00
make Introduce --timelog=FILE flag to GNU Make 2024-05-25 14:50:20 -07:00
maxmind Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
mbedtls Implement proper time zone support 2024-05-04 23:06:37 -07:00
musl Revert "Remove zlib namespacing (#1142)" 2024-05-14 20:45:23 -07:00
ncurses more modeline errata (#1019) 2023-12-16 23:07:10 -05:00
nsync Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
openmp Add some noexcept annotations 2024-06-01 03:19:53 -07:00
pcre Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
puff Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
python Make malloc() go 200x faster 2024-06-05 02:02:14 -07:00
qemu more modeline errata (#1019) 2023-12-16 23:07:10 -05:00
readline Fix --ftrace on Windows 2024-01-01 00:00:42 -08:00
regex Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
sed Implement proper time zone support 2024-05-04 23:06:37 -07:00
smallz4 Implement proper time zone support 2024-05-04 23:06:37 -07:00
sqlite3 Implement proper time zone support 2024-05-04 23:06:37 -07:00
stb Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
tidy Implement proper time zone support 2024-05-04 23:06:37 -07:00
tr Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
tree Implement proper time zone support 2024-05-04 23:06:37 -07:00
tz Update MODE=tiny time zone list (#1167) 2024-05-06 16:48:49 -07:00
unzip Implement proper time zone support 2024-05-04 23:06:37 -07:00
vqsort more modeline errata (#1019) 2023-12-16 23:07:10 -05:00
xed Rename _bsr/_bsf to bsr/bsf 2024-03-04 17:33:26 -08:00
xxhash Implement proper time zone support 2024-05-04 23:06:37 -07:00
zip Revert "Remove zlib namespacing (#1142)" 2024-05-14 20:45:23 -07:00
zlib Support avx512f + vpclmulqdq crc32() acceleration 2024-05-29 10:13:37 -07:00
zstd Implement proper time zone support 2024-05-04 23:06:37 -07:00
.clang-format Reduce header complexity 2023-11-28 14:39:42 -08:00
BUILD.mk Implement proper time zone support 2024-05-04 23:06:37 -07:00