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

Function numarith

third-party/lua-5.3.5/src/lobject.c:103–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102
103static lua_Number numarith (lua_State *L, int op, lua_Number v1,
104 lua_Number v2) {
105 switch (op) {
106 case LUA_OPADD: return luai_numadd(L, v1, v2);
107 case LUA_OPSUB: return luai_numsub(L, v1, v2);
108 case LUA_OPMUL: return luai_nummul(L, v1, v2);
109 case LUA_OPDIV: return luai_numdiv(L, v1, v2);
110 case LUA_OPPOW: return luai_numpow(L, v1, v2);
111 case LUA_OPIDIV: return luai_numidiv(L, v1, v2);
112 case LUA_OPUNM: return luai_numunm(L, v1);
113 case LUA_OPMOD: {
114 lua_Number m;
115 luai_nummod(L, v1, v2, m);
116 return m;
117 }
118 default: lua_assert(0); return 0;
119 }
120}
121
122
123void luaO_arith (lua_State *L, int op, const TValue *p1, const TValue *p2,

Callers 1

luaO_arithFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected