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

Function luaV_arith

third-party/lua-5.2.4/src/lvm.c:360–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358
359
360void luaV_arith (lua_State *L, StkId ra, const TValue *rb,
361 const TValue *rc, TMS op) {
362 TValue tempb, tempc;
363 const TValue *b, *c;
364 if ((b = luaV_tonumber(rb, &tempb)) != NULL &&
365 (c = luaV_tonumber(rc, &tempc)) != NULL) {
366 lua_Number res = luaO_arith(op - TM_ADD + LUA_OPADD, nvalue(b), nvalue(c));
367 setnvalue(ra, res);
368 }
369 else if (!call_binTM(L, rb, rc, ra, op))
370 luaG_aritherror(L, rb, rc);
371}
372
373
374/*

Callers 2

luaV_executeFunction · 0.85
lua_arithFunction · 0.85

Calls 4

luaV_tonumberFunction · 0.70
luaO_arithFunction · 0.70
call_binTMFunction · 0.70
luaG_aritherrorFunction · 0.70

Tested by

no test coverage detected