benilla-re systems structs docs

luaG_ordererror

function · lua · boundary

Address
0x6fc730 · 80 bytes, up to 0x6fc77f
Meaning
Raises an order comparison error naming one or two types
Confidence
verified, proof two
Finding
lua/runtime#error-messages

Finding: Error messages in lua: calls, states and the collector

Run-time errors name what failed. luaG_typeerror builds attempt to <op> <kind> `<name>' (a <type> value) when the operand is on the stack and getobjname finds a name for it (a local, a global, a field or a method), else attempt to <op> a <type> value; luaG_concaterror, luaG_aritherror and luaG_ordererror pick the operand and the verb. addinfo prefixes the message with source:line: of a Lua function. currentpc and currentline read the position, funcinfo the source and kind of a function, getluaproto the prototype of a call record.

functionnamedecided by
0x6fba10currentpcC flag test (0x6fba13), frame flag copies the live pc (0x6fba1b), (pc - code) >> 2 minus 1 (0x6fba35)
0x6fbb90getluaprotoC flag test (0x6fbb90), function at base[-1], prototype at closure +0xc (0x6fbb9b)
0x6fbef0currentlinecurrentpc (0x6fbef0), negative gives -1 (0x6fbef9), the line table of the prototype indexed by the pc (0x6fbf0c)
0x6fbf20funcinfoC: =[C] (0x6fbf2c) and luaO_chunkid (0x6fbf49); Lua: main (0x6fbf66) or Lua (0x6fbf6d), luaO_chunkid (0x6fbf7d)
0x6fc4c0getobjnameluaF_getlocalname (0x6fc4f5), luaG_symbexec (0x6fc508), opcode 5 gives global (0x6fc577), 6 field (0x6fc59a), 0xb method (0x6fc5bd)
0x6fc5f0knameindex minus 250 (0x6fc5f0), negative gives the question mark, string tag test (0x6fc603), text at +0x10 (0x6fc60b)
0x6fc620luaG_typeerrorisinstack (0x6fc63e), getobjname (0x6fc658), the formats attempt to %s %s `%s' (a %s value) (0x6fc66b) and attempt to %s a %s value (0x6fc687)
0x6fc6a0isinstackslot loop from base to top in steps of 16 (0x6fc6b0..0x6fc6b9), 1 on equal (0x6fc6be)
0x6fc6d0luaG_concaterrorstring tag test (0x6fc6d3), the verb concatenate (0x6fc6db), luaG_typeerror (0x6fc6e0)
0x6fc6f0luaG_aritherrorluaV_tonumber (0x6fc701), the verb perform arithmetic on (0x6fc70f), luaG_typeerror (0x6fc716)
0x6fc730luaG_ordererrorthird characters of the type names compared, the two formats (0x6fc754, 0x6fc76b)
0x6fc8a0addinfoC flag test (0x6fc8ad), currentline (0x6fc8b9), getluaproto (0x6fc8c4), luaO_chunkid (0x6fc8d2), the format %s:%d: %s (0x6fc8e0), luaO_pushfstring (0x6fc8e6)

The derivation is in the doc.

Callers 2

Callees 1

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