diff options
author | daurnimator <quae@daurnimator.com> | 2018-01-07 05:00:04 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-01-07 05:02:26 +1100 |
commit | 2968965c7e531ec0121190d5a5d0e66e0774306b (patch) | |
tree | 7f4a40c8c0b340a745975e7ee5618f6f4a38624d /src/lobject.js | |
parent | e0089c7adee8e313f7ff7b5d84ff0ea892c05287 (diff) | |
download | fengari-2968965c7e531ec0121190d5a5d0e66e0774306b.tar.gz fengari-2968965c7e531ec0121190d5a5d0e66e0774306b.tar.bz2 fengari-2968965c7e531ec0121190d5a5d0e66e0774306b.zip |
src/lvm.js: Add Math.imul shim; export new luaV_imul function
Diffstat (limited to 'src/lobject.js')
-rw-r--r-- | src/lobject.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lobject.js b/src/lobject.js index 641473e..ec4a9b3 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -667,7 +667,7 @@ const intarith = function(L, op, v1, v2) { switch (op) { case defs.LUA_OPADD: return (v1 + v2)|0; case defs.LUA_OPSUB: return (v1 - v2)|0; - case defs.LUA_OPMUL: return Math.imul(v1, v2); + case defs.LUA_OPMUL: return lvm.luaV_imul(v1, v2); case defs.LUA_OPMOD: return lvm.luaV_mod(L, v1, v2); case defs.LUA_OPIDIV: return lvm.luaV_div(L, v1, v2); case defs.LUA_OPBAND: return (v1 & v2); |