benilla-re systems structs docs

ops

global · lua

Address
0x811e08 · 24 bytes, up to 0x811e1f
Type
int32_t[6]
Meaning
Holds the comparison opcode of each operator from ~= to >= for the code generator
Confidence
verified, proof one
Finding
lua/codegen#conditions-and-operators

Finding: Conditions and operators in lua: the code generator

luaK_goiftrue makes an expression jump when false and luaK_goiffalse when true: a constant needs no jump or always jumps, a comparison inverts or keeps its jump, and anything else gets OP_TEST through jumponcond, which folds a preceding OP_NOT. luaK_infix prepares the left operand and luaK_posfix combines: and and or merge jump lists, .. chains OP_CONCAT into one instruction, and codebinop emits arithmetic or a comparison and jump, swapping the operands of > and >=. luaK_prefix folds - of a number constant.

functionnamedecided by
0x7010b0luaK_storevarswitch on kind 5 to 8 (0x7010bd..0x7010cb), local (0x7010e6), OP_SETUPVAL (0x701101), OP_SETGLOBAL (0x70111d), OP_SETTABLE (0x70114b), freeexp (0x701154)
0x701170luaK_selfluaK_exp2anyreg (0x70117a), two registers (0x701190), OP_SELF (0x7011ac)
0x701410luaK_indexedluaK_exp2RK (0x701419), kind 8 (0x701421)
0x7011d0luaK_goiftrueswitch on kind 2 to 9 (0x7011dd..0x7011e5), luaK_jump (0x7011ff), invertjump (0x701216), jumponcond 0 (0x701232), false list (0x7011f5)
0x701380luaK_goiffalseswitch on kind 1 to 9 (0x70138d..0x70139a), luaK_jump (0x7013b4), jumponcond 1 (0x7013de), true list (0x7013aa)
0x701270invertjumpgetjumpcontrol (0x701273), A inverted (0x701278..0x701291)
0x7012a0jumponcondOP_NOT (0x7012be), pc lowered (0x7012d9), discharge2anyreg (0x7012e4), OP_TEST with A 255 (0x7012fc, 0x701301), luaK_condjump (0x701306)
0x7014c0codenotswitch on kind 1 to 11 (0x7014cb..0x7014da), constants (0x7014e8, 0x7014fd), invertjump (0x70150f), OP_NOT (0x701544), lists swapped (0x701552..0x70155c)
0x701430luaK_prefixminus (0x701433), number constant fchs and luaK_numberK (0x701445..0x70146a), OP_UNM (0x701497), else codenot (0x7014ae)
0x701590luaK_infix.. (0x701596, 0x7015f9), and (0x7015da..0x7015e9), or (0x7015b9..0x7015c8), else luaK_exp2RK (0x7015a9)
0x701610luaK_posfixand (0x70166c..0x70169c), or (0x7016a6..0x7016d6), OP_CONCAT chained (0x7016fd..0x70172b) or new (0x70176d), else codebinop (0x70165e)
0x701790codebinoparithmetic OP_ADD plus the operator (0x701796..0x7017ab), swap (0x7017be..0x7017d3), ~= sense 0 (0x7017d9..0x7017de), ops (0x7017e9), luaK_condjump (0x7017f0)

The derivation is in the doc.