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

Function b_shift

third-party/lua-5.3.5/src/lbitlib.c:99–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98
99static int b_shift (lua_State *L, lua_Unsigned r, lua_Integer i) {
100 if (i < 0) { /* shift right? */
101 i = -i;
102 r = trim(r);
103 if (i >= LUA_NBITS) r = 0;
104 else r >>= i;
105 }
106 else { /* shift left */
107 if (i >= LUA_NBITS) r = 0;
108 else r <<= i;
109 r = trim(r);
110 }
111 pushunsigned(L, r);
112 return 1;
113}
114
115
116static int b_lshift (lua_State *L) {

Callers 3

b_lshiftFunction · 0.70
b_rshiftFunction · 0.70
b_arshiftFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected