MCPcopy Create free account
hub / github.com/axmolengine/axmol / luaV_shiftl

Function luaV_shiftl

3rdparty/lua/plainlua/lvm.c:780–789  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 2

luaV_executeFunction · 0.85
intarithFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected