Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lua/lua
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: luainkernel/lua
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: lunatik
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 35 files changed
  • 2 contributors

Commits on Sep 22, 2026

  1. update Lunatik patch to Lua v5.5.1

    The Lunatik patch on top of the v5.5.1 release, fenced with _KERNEL so that the same sources build
    inside a kernel and, with the kernel configuration, on a host.
    
    Configuration: luaconf.h includes <lunatik_conf.h> under _KERNEL, which sets lua_Number to
    lua_Integer and the rest of the kernel side; lua.h reports LUA_VERSION as "Lua 5.5-kernel" and
    carries the Lunatik copyright lines beside Lua's; lua_pushnumber is lua_pushinteger and
    lua_tonumberx is lua_tointegerx.
    
    Numbers: there are no floats. The float tag, conversions and arithmetic (lobject.c, lvm.c) are
    compiled out, tables take no float keys, the lexer reads integers only (a decimal point or an
    exponent is a malformed number, there is no TK_FLT), tostring formats integers only, numeric for
    loops take integers only, and constant folding fails on anything that is not an integer. The
    operators '/' and '^' do not exist: '/' parses as OPR_IDIV, and OP_LOADF, OP_POW, OP_POWK, OP_DIV
    and OP_DIVK go with LUA_OPPOW and LUA_OPDIV, which renumbers the opcodes and the arithmetic
    operators after them; the jump table, the opcode names and the metamethod names follow. ldump.c and
    lundump.c dump and load no float constants, and the chunk header's lua_Number probe is the
    integer's.
    
    Libraries: os is not opened. io is the kernel's, over the stdio the Lunatik tree provides: open,
    lines and type, with read, write, lines, flush, seek and close on a file; no standard streams,
    popen, tmpfile or setvbuf. math keeps abs, tointeger, ult, max, min, maxinteger and mininteger,
    without pi, huge or random. string keeps no float formats, quoting or pack options, and its
    arithmetic metamethods are integer ones. debug drops debug.debug. package has no cpath: searcher_C
    looks up a symbol of an already linked kernel module through the lsys_* hooks lunatik_conf.h
    defines. lauxlib drops luaL_execresult and the float version message; its stdio file loader,
    replaced in the kernel by lunatik_loadfile, stays where LUA_USE_POSIX says there is a libc, so a
    host build of the core with the kernel configuration (the bytecode compiler) links.
    
    Kernel side: luaS_hash is exported under LUNATIK_RUNTIME; the short string copy goes through
    unsafe_memcpy under CONFIG_FORTIFY_SOURCE, its bounds being checked by the callers; flexible array
    members replace the one-element arrays of Udata, CClosure and LClosure; LUNATIK_GCCOUNT makes
    LUA_GCCOUNT report bytes instead of Kbytes. In llex, the exponent handling the kernel never reaches
    is fenced, which is the one -Wall warning of the host build.
    
    Co-Authored-By: Claude Fable 5.1 <[email protected]>
    lneto and claude committed Sep 22, 2026
    Configuration menu
    Copy the full SHA
    5b667f6 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2026

  1. ldump: hand the writer one block per element under _KERNEL

    A chunk is portable across every Lunatik target but for its byte order: int, Instruction and lua_Integer have one size everywhere and the constants are varints, so what the other order needs reversed is what the dumper writes raw, the instruction vector, abslineinfo and the header probes. Under _KERNEL, dumpVector and dumpLiteral hand the writer one block per element and abslineinfo goes out as ints, so every block wider than a byte that reaches a writer is one raw value; a writer that must serve the other byte order reverses those blocks, and the output is byte for byte the same otherwise.
    
    Co-Authored-By: Claude Fable 5.1 <[email protected]>
    lneto and claude committed Sep 23, 2026
    Configuration menu
    Copy the full SHA
    74f1f10 View commit details
    Browse the repository at this point in the history
Loading