aboutsummaryrefslogtreecommitdiff
path: root/src/llimit.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-24 12:01:42 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-24 12:09:49 +0200
commit656758c86ad929b07bb6422eb0f44cf9f2347aac (patch)
tree9463a52cfa7e49245054577804f1bd6dcaf22ff8 /src/llimit.js
parentd15e00af0798783bdce5e27d2ab43de3ecb3fa4e (diff)
downloadfengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.tar.gz
fengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.tar.bz2
fengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.zip
Use maximum 32bit number instead of Number.MAX_SAFE_INTEGER
Diffstat (limited to 'src/llimit.js')
-rw-r--r--src/llimit.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/llimit.js b/src/llimit.js
index 9c02eb0..06b8370 100644
--- a/src/llimit.js
+++ b/src/llimit.js
@@ -1,6 +1,15 @@
/*jshint esversion: 6 */
"use strict";
-module.exports.LUAI_MAXCCALLS = 200;
-module.exports.LUA_MAXINTEGER = 2147483647;
-module.exports.LUA_MININTEGER = -2147483647; \ No newline at end of file
+const LUAI_MAXCCALLS = 200;
+module.exports.LUAI_MAXCCALLS = LUAI_MAXCCALLS;
+const LUA_MAXINTEGER = 2147483647;
+module.exports.LUA_MAXINTEGER = LUA_MAXINTEGER;
+const LUA_MININTEGER = -2147483647;
+module.exports.LUA_MININTEGER = LUA_MININTEGER;
+
+// If later integers are more than 32bit, LUA_MAXINTEGER will then be != MAX_INT
+const MAX_INT = 2147483647;
+module.exports.MAX_INT = MAX_INT;
+const MIN_INT = -2147483647;
+module.exports.MIN_INT = MIN_INT;