benilla-re systems structs docs

freereg

function · lua · boundary

Address
0x700cd0 · 17 bytes, up to 0x700ce0
Meaning
Frees a temporary register
Confidence
verified, proof one
Finding
lua/codegen#registers

Finding: Registers in lua: the code generator

luaK_reserveregs takes registers above the first free one, raising the function's stack size through luaK_checkstack, which refuses 250 or more with function or expression too complex. freereg gives back a register that holds no local and is below 250, and freeexp the register of an expression held in one. luaK_nil emits OP_LOADNIL, or widens the previous instruction when it is an OP_LOADNIL that no jump targets and whose range meets the new one.

functionnamedecided by
0x700a50luaK_checkstackfree register plus n against the stack size (0x700a56..0x700a5f), 250 (0x700a63..0x700a73), store (0x700a7a)
0x700a80luaK_reserveregsluaK_checkstack (0x700a86), free register raised (0x700a91)
0x700cd0freeregat least the local count and below 250 (0x700cd0, 0x700cd5), lowered (0x700cdd)
0x700d30freeexpkind 11 (0x700d30), tail jmp to freereg (0x700d38)
0x700790luaK_nilno jump target here (0x700798), previous OP_LOADNIL (0x7007ae), range test (0x7007c0..0x7007c9), B widened (0x7007da..0x7007e7), else OP_LOADNIL (0x700800)

The derivation is in the doc.

Callers 2

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.