MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / isSCnumber

Function isSCnumber

third-party/lua-5.4.6/src/lcode.c:1257–1271  ·  view source on GitHub ↗

** Check whether expression 'e' is a literal integer or float in ** proper range to fit in a register (sB or sC). */

Source from the content-addressed store, hash-verified

1255** proper range to fit in a register (sB or sC).
1256*/
1257static int isSCnumber (expdesc *e, int *pi, int *isfloat) {
1258 lua_Integer i;
1259 if (e->k == VKINT)
1260 i = e->u.ival;
1261 else if (e->k == VKFLT && luaV_flttointeger(e->u.nval, &i, F2Ieq))
1262 *isfloat = 1;
1263 else
1264 return 0; /* not a number */
1265 if (!hasjumps(e) && fitsC(i)) {
1266 *pi = int2sC(cast_int(i));
1267 return 1;
1268 }
1269 else
1270 return 0;
1271}
1272
1273
1274/*

Callers 3

codeorderFunction · 0.70
codeeqFunction · 0.70
luaK_infixFunction · 0.70

Calls 2

luaV_flttointegerFunction · 0.70
fitsCFunction · 0.70

Tested by

no test coverage detected