MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaK_exp2anyreg

Function luaK_exp2anyreg

extlibs/lua/src/lcode.c:940–952  ·  view source on GitHub ↗

** Ensures final expression result is in some (any) register ** and return that register. */

Source from the content-addressed store, hash-verified

938** and return that register.
939*/
940int luaK_exp2anyreg (FuncState *fs, expdesc *e) {
941 luaK_dischargevars(fs, e);
942 if (e->k == VNONRELOC) { /* expression already has a register? */
943 if (!hasjumps(e)) /* no jumps? */
944 return e->u.info; /* result is already in a register */
945 if (e->u.info >= luaY_nvarstack(fs)) { /* reg. is not a local? */
946 exp2reg(fs, e, e->u.info); /* put final result in it */
947 return e->u.info;
948 }
949 }
950 luaK_exp2nextreg(fs, e); /* otherwise, use next available register */
951 return e->u.info;
952}
953
954
955/*

Callers 13

retstatFunction · 0.85
luaK_exp2anyregupFunction · 0.85
luaK_exp2valFunction · 0.85
luaK_exp2RKFunction · 0.85
luaK_storevarFunction · 0.85
luaK_selfFunction · 0.85
luaK_indexedFunction · 0.85
codeunexpvalFunction · 0.85
finishbinexpvalFunction · 0.85
codebinexpvalFunction · 0.85
codeorderFunction · 0.85
codeeqFunction · 0.85

Calls 4

luaK_dischargevarsFunction · 0.85
luaY_nvarstackFunction · 0.85
exp2regFunction · 0.85
luaK_exp2nextregFunction · 0.85

Tested by

no test coverage detected