diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-09-24 13:26:51 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-10-12 12:29:09 -0300 |
commit | 490d42b5f89563a94994505c75e24086b0a487e6 (patch) | |
tree | d8d9c68deb5879a99cf6574ab0903fba30cef7a4 /lstate.c | |
parent | 287b302acb8d925178e9edb800f0a8d18c7d35f6 (diff) | |
download | lua-490d42b5f89563a94994505c75e24086b0a487e6.tar.gz lua-490d42b5f89563a94994505c75e24086b0a487e6.tar.bz2 lua-490d42b5f89563a94994505c75e24086b0a487e6.zip |
Correct handling of 'luaV_execute' invocations
The previous stackless implementations marked all 'luaV_execute'
invocations as fresh. However, re-entering 'luaV_execute' when
resuming a coroutine should not be a fresh invocation. (It works
because 'unroll' called 'luaV_execute' for each call entry, but
it was slower than letting 'luaV_execute' finish all non-fresh
invocations.)
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -172,7 +172,7 @@ void luaE_checkcstack (lua_State *L) { | |||
172 | 172 | ||
173 | LUAI_FUNC void luaE_incCstack (lua_State *L) { | 173 | LUAI_FUNC void luaE_incCstack (lua_State *L) { |
174 | L->nCcalls++; | 174 | L->nCcalls++; |
175 | if (getCcalls(L) >= LUAI_MAXCCALLS) | 175 | if (unlikely(getCcalls(L) >= LUAI_MAXCCALLS)) |
176 | luaE_checkcstack(L); | 176 | luaE_checkcstack(L); |
177 | } | 177 | } |
178 | 178 | ||