benilla-re systems structs docs

enterblock

function · lua · boundary

Address
0x6fcf50 · 41 bytes, up to 0x6fcf78
Meaning
Opens a block scope, breakable or not, on the function state
Confidence
verified, proof one
Finding
lua/compiler#function-states-and-blocks

Finding: Function states and blocks in lua: the compiler

open_func starts a function state with a new prototype and constant table, no pending jumps and a stack of two registers; close_func appends the final return and trims the code, line, constant, nested-prototype, local and upvalue vectors to their used sizes. chunk parses statements until block_follow sees else, elseif, end, until or the end, resetting the free register after each, and allows 200 nested levels. body compiles a function into a new prototype that pushclosure adds to its parent.

functionnamedecided by
0x6fca90open_funcluaF_newproto (0x6fca9a), pending jumps -1 (0x6fcabd), luaH_new (0x6fcad0), stack size 2 (0x6fcaee)
0x6fcb00close_funcremovevars 0 (0x6fcb14), OP_RETURN 0 1 0 (0x6fcb26), six luaM_irealloc (0x6fcb48..0x6fcc26)
0x6fcc90chunklevel above 200 (0x6fcc99), block_follow (0x6fccb3), statement (0x6fccbe), ; (0x6fcccc), free register reset (0x6fccd9)
0x6fcd10block_followbyte-table switch over 260 to 287 (0x6fcd16, 0x6fcd22)
0x6fcd60statementbyte-table switch over 258 to 277 (0x6fcd6b, 0x6fcd7f), 1 after return and break (0x6fce26, 0x6fce35), else exprstat (0x6fce3e)
0x6fcf20blockenterblock 0 (0x6fcf34), chunk (0x6fcf3b), leaveblock (0x6fcf42)
0x6fcf50enterblockbreak list -1 (0x6fcf56), the block linked in (0x6fcf72)
0x6fcf80leaveblockremovevars (0x6fcf92), OP_CLOSE for an upvalue (0x6fcfad), tail jmp to luaK_patchtohere (0x6fcfbf)
0x6fd7c0bodyopen_func (0x6fd7d6), self (0x6fd801), parlist (0x6fd808), chunk (0x6fd81b), close_func (0x6fd834), pushclosure (0x6fd842)
0x6fd980pushclosureluaM_growaux (0x6fd9af), OP_CLOSURE (0x6fd9d6), OP_MOVE or OP_GETUPVAL per upvalue (0x6fd9fe..0x6fda0f)
0x6fda30parlistnames (0x6fda6b), ... (0x6fda4d), <name> or `...' expected (0x6fda52), code_params (0x6fda85, 0x6fda9d)

The derivation is in the doc.

Callers 5

Callees 0

None by a direct call or jump.

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