MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaV_shiftl

Function luaV_shiftl

src/Chain/libraries/glua/lvm.cpp:639–648  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

637** Shift left operation. (Shift right just negates 'y'.)
638*/
639lua_Integer luaV_shiftl(lua_Integer x, lua_Integer y) {
640 if (y < 0) { /* shift right? */
641 if (y <= -NBITS) return 0;
642 else return intop(>> , x, -y);
643 }
644 else { /* shift left */
645 if (y >= NBITS) return 0;
646 else return intop(<< , x, y);
647 }
648}
649
650
651/*

Callers 2

vmcaseFunction · 0.85
intarithFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected