** Shift left operation. (Shift right just negates 'y'.) */
| 637 | ** Shift left operation. (Shift right just negates 'y'.) |
| 638 | */ |
| 639 | lua_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 | /* |