From 9294302fc069e0b8d893521fa552b5ed66601024 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 22 May 2017 17:04:46 +1000 Subject: Fix lua_checkstack to check against LUAI_MAXSTACK. Adds luaD_growstack and luaD_reallocstack --- src/lstate.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lstate.js') diff --git a/src/lstate.js b/src/lstate.js index 5a65c12..d1789e8 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -14,6 +14,8 @@ const CT = defs.constant_types; const TS = defs.thread_status; const LUA_NUMTAGS = defs.LUA_NUMTAGS; +const EXTRA_STACK = 5; + const BASIC_STACK_SIZE = 2 * defs.LUA_MINSTACK; class CallInfo { @@ -200,6 +202,7 @@ module.exports.CIST_TAIL = (1<<5); /* call was tail called */ module.exports.CIST_HOOKYIELD = (1<<6); /* last hook called yielded */ module.exports.CIST_LEQ = (1<<7); /* using __lt for __le */ module.exports.CIST_FIN = (1<<8); /* call is running a finalizer */ +module.exports.EXTRA_STACK = EXTRA_STACK; module.exports.lua_close = lua_close; module.exports.lua_newstate = lua_newstate; module.exports.lua_newthread = lua_newthread; -- cgit v1.2.3-54-g00ecf