summaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-22 17:04:46 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-22 18:46:23 +1000
commit9294302fc069e0b8d893521fa552b5ed66601024 (patch)
tree8ef6f03a985fd7f7a672757039a35b266e978b7c /src/lstate.js
parent6e413992b24c760b149a8abf580811cc1d057d19 (diff)
downloadfengari-9294302fc069e0b8d893521fa552b5ed66601024.tar.gz
fengari-9294302fc069e0b8d893521fa552b5ed66601024.tar.bz2
fengari-9294302fc069e0b8d893521fa552b5ed66601024.zip
Fix lua_checkstack to check against LUAI_MAXSTACK. Adds luaD_growstack and luaD_reallocstack
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js3
1 files changed, 3 insertions, 0 deletions
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;