freereg
function · lua · boundary
- Address
0x700cd0· 17 bytes, up to0x700ce0- 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.
| function | name | decided by |
|---|---|---|
0x700a50 | luaK_checkstack | free register plus n against the stack size (0x700a56..0x700a5f), 250 (0x700a63..0x700a73), store (0x700a7a) |
0x700a80 | luaK_reserveregs | luaK_checkstack (0x700a86), free register raised (0x700a91) |
0x700cd0 | freereg | at least the local count and below 250 (0x700cd0, 0x700cd5), lowered (0x700cdd) |
0x700d30 | freeexp | kind 11 (0x700d30), tail jmp to freereg (0x700d38) |
0x700790 | luaK_nil | no 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
- luaK_dischargevars lua
- freeexp lua
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.