Back to a stackless implementation
A "with stack" implementation gains too little in performance to be worth all the noise from C-stack overflows. This commit is almost a sketch, to test performance. There are several pending stuff: - review control of C-stack overflow and error messages; - what to do with setcstacklimit; - review comments; - review unroll of Lua calls.
This commit is contained in:
12
lparser.c
12
lparser.c
@@ -489,12 +489,14 @@ static void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Macros to limit the maximum recursion depth while parsing
|
||||
*/
|
||||
#define enterlevel(ls) luaE_enterCcall((ls)->L)
|
||||
static void enterlevel (LexState *ls) {
|
||||
lua_State *L = ls->L;
|
||||
L->nCcalls++;
|
||||
checklimit(ls->fs, getCcalls(L), LUAI_MAXCCALLS, "C levels");
|
||||
}
|
||||
|
||||
#define leavelevel(ls) luaE_exitCcall((ls)->L)
|
||||
|
||||
#define leavelevel(ls) ((ls)->L->nCcalls--)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user