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

Function isSCnumber

third-party/lua-5.5.0/src/lcode.c:1300–1314  ·  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

1298** proper range to fit in a register (sB or sC).
1299*/
1300static int isSCnumber (expdesc *e, int *pi, int *isfloat) {
1301 lua_Integer i;
1302 if (e->k == VKINT)
1303 i = e->u.ival;
1304 else if (e->k == VKFLT && luaV_flttointeger(e->u.nval, &i, F2Ieq))
1305 *isfloat = 1;
1306 else
1307 return 0; /* not a number */
1308 if (!hasjumps(e) && fitsC(i)) {
1309 *pi = int2sC(cast_int(i));
1310 return 1;
1311 }
1312 else
1313 return 0;
1314}
1315
1316
1317/*

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