UNPKG

bs-platform

Version:

bucklescript compiler, ocaml standard libary by bucklescript and its required runtime support

43 lines (32 loc) 813 B
import * as Caml_builtin_exceptions from "./caml_builtin_exceptions.js"; function div(x, y) { if (y === 0) { throw Caml_builtin_exceptions.division_by_zero; } return x / y | 0; } function mod_(x, y) { if (y === 0) { throw Caml_builtin_exceptions.division_by_zero; } return x % y; } function caml_bswap16(x) { return ((x & 255) << 8) | ((x & 65280) >>> 8); } function caml_int32_bswap(x) { return ((x & 255) << 24) | ((x & 65280) << 8) | ((x & 16711680) >>> 8) | ((x & 4278190080) >>> 24); } var imul = (Math.imul || function (x,y) { y |= 0; return ((((x >> 16) * y) << 16) + (x & 0xffff) * y)|0; }); var caml_nativeint_bswap = caml_int32_bswap; export { div , mod_ , caml_bswap16 , caml_int32_bswap , caml_nativeint_bswap , imul , } /* imul Not a pure module */