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

Function luaK_numberK

third-party/lua-5.2.4/src/lcode.c:326–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324
325
326int luaK_numberK (FuncState *fs, lua_Number r) {
327 int n;
328 lua_State *L = fs->ls->L;
329 TValue o;
330 setnvalue(&o, r);
331 if (r == 0 || luai_numisnan(NULL, r)) { /* handle -0 and NaN */
332 /* use raw representation as key to avoid numeric problems */
333 setsvalue(L, L->top++, luaS_newlstr(L, (char *)&r, sizeof(r)));
334 n = addk(fs, L->top - 1, &o);
335 L->top--;
336 }
337 else
338 n = addk(fs, &o, &o); /* regular case */
339 return n;
340}
341
342
343static int boolK (FuncState *fs, int b) {

Callers 3

fornumFunction · 0.70
discharge2regFunction · 0.70
luaK_exp2RKFunction · 0.70

Calls 2

luaS_newlstrFunction · 0.70
addkFunction · 0.70

Tested by

no test coverage detected