summaryrefslogtreecommitdiff
path: root/src/ldo.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-10-09 07:49:20 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-11-09 12:56:17 +0100
commit97a52383d4194678b781e8826c6512fc6fe40288 (patch)
tree1ddc466da9adde4e2025cddd591ad85e0b3ff0ac /src/ldo.js
parenta5d5b5f695ad557e25911f08be2d132ab1be658c (diff)
downloadfengari-97a52383d4194678b781e8826c6512fc6fe40288.tar.gz
fengari-97a52383d4194678b781e8826c6512fc6fe40288.tar.bz2
fengari-97a52383d4194678b781e8826c6512fc6fe40288.zip
Removed incorrect use of llimits.MAX/MIN_INT
llimit.js is renamed to llimits.js
Diffstat (limited to 'src/ldo.js')
-rw-r--r--src/ldo.js38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/ldo.js b/src/ldo.js
index 9a1de38..c471e7e 100644
--- a/src/ldo.js
+++ b/src/ldo.js
@@ -2,21 +2,21 @@
const assert = require('assert');
-const defs = require('./defs.js');
-const lapi = require('./lapi.js');
-const ldebug = require('./ldebug.js');
-const lfunc = require('./lfunc.js');
-const llimit = require('./llimit.js');
-const lobject = require('./lobject.js');
-const lopcodes= require('./lopcodes.js');
-const lparser = require('./lparser.js');
-const lstate = require('./lstate.js');
-const lstring = require('./lstring.js');
-const ltm = require('./ltm.js');
-const luaconf = require('./luaconf.js');
-const lundump = require('./lundump.js');
-const lvm = require('./lvm.js');
-const lzio = require('./lzio.js');
+const defs = require('./defs.js');
+const lapi = require('./lapi.js');
+const ldebug = require('./ldebug.js');
+const lfunc = require('./lfunc.js');
+const llimits = require('./llimits.js');
+const lobject = require('./lobject.js');
+const lopcodes = require('./lopcodes.js');
+const lparser = require('./lparser.js');
+const lstate = require('./lstate.js');
+const lstring = require('./lstring.js');
+const ltm = require('./ltm.js');
+const luaconf = require('./luaconf.js');
+const lundump = require('./lundump.js');
+const lvm = require('./lvm.js');
+const lzio = require('./lzio.js');
const CT = defs.constant_types;
const TS = defs.thread_status;
@@ -322,9 +322,9 @@ const tryfuncTM = function(L, off, func) {
** allow overflow handling to work)
*/
const stackerror = function(L) {
- if (L.nCcalls === llimit.LUAI_MAXCCALLS)
+ if (L.nCcalls === llimits.LUAI_MAXCCALLS)
ldebug.luaG_runerror(L, defs.to_luastring("JS stack overflow", true));
- else if (L.nCcalls >= llimit.LUAI_MAXCCALLS + (llimit.LUAI_MAXCCALLS >> 3))
+ else if (L.nCcalls >= llimits.LUAI_MAXCCALLS + (llimits.LUAI_MAXCCALLS >> 3))
luaD_throw(L, TS.LUA_ERRERR); /* error while handing stack error */
};
@@ -335,7 +335,7 @@ const stackerror = function(L) {
** function position.
*/
const luaD_call = function(L, off, nResults) {
- if (++L.nCcalls >= llimit.LUAI_MAXCCALLS)
+ if (++L.nCcalls >= llimits.LUAI_MAXCCALLS)
stackerror(L);
if (!luaD_precall(L, off, nResults))
lvm.luaV_execute(L);
@@ -562,7 +562,7 @@ const lua_resume = function(L, from, nargs) {
return resume_error(L, "cannot resume dead coroutine", nargs);
L.nCcalls = from ? from.nCcalls + 1 : 1;
- if (L.nCcalls >= llimit.LUAI_MAXCCALLS)
+ if (L.nCcalls >= llimits.LUAI_MAXCCALLS)
return resume_error(L, "JS stack overflow", nargs);
L.nny = 0; /* allow yields */