MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaV_shiftl

Function luaV_shiftl

lib/lua/src/lvm.c:787–796  ·  view source on GitHub ↗

** Shift left operation. (Shift right just negates 'y'.) */

Source from the content-addressed store, hash-verified

785** Shift left operation. (Shift right just negates 'y'.)
786*/
787lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y) {
788 if (y < 0) { /* shift right? */
789 if (y <= -NBITS) return 0;
790 else return intop(>>, x, -y);
791 }
792 else { /* shift left */
793 if (y >= NBITS) return 0;
794 else return intop(<<, x, y);
795 }
796}
797
798
799/*

Callers 2

luaV_executeFunction · 0.85
intarithFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected