MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / luaV_shiftl

Function luaV_shiftl

Dependencies/lua/src/lvm.c:777–786  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

775** Shift left operation. (Shift right just negates 'y'.)
776*/
777lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y) {
778 if (y < 0) { /* shift right? */
779 if (y <= -NBITS) return 0;
780 else return intop(>>, x, -y);
781 }
782 else { /* shift left */
783 if (y >= NBITS) return 0;
784 else return intop(<<, x, y);
785 }
786}
787
788
789/*

Callers 2

luaV_executeFunction · 0.85
intarithFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected