Revision of stackless implementation

- more organized handling of 'nCcalls'
- comments
- deprecation of 'setcstacklimit'
This commit is contained in:
Roberto Ierusalimschy
2020-09-23 10:18:01 -03:00
parent 5d8ce05b3f
commit 287b302acb
12 changed files with 127 additions and 283 deletions

View File

@@ -234,6 +234,17 @@ typedef l_uint32 Instruction;
#endif
/*
** Maximum depth for nested C calls, syntactical nested non-terminals,
** and other features implemented through recursion in C. (Value must
** fit in a 16-bit unsigned integer. It must also be compatible with
** the size of the C stack.)
*/
#if !defined(LUAI_MAXCCALLS)
#define LUAI_MAXCCALLS 200
#endif
/*
** macros that are executed whenever program enters the Lua core
** ('lua_lock') and leaves the core ('lua_unlock')