Removed GC checks from function calls

Function calls do not create new objects. (It may use memory with
stack reallocation, but now that is irrelevant to the GC.)
This commit is contained in:
Roberto Ierusalimschy
2022-11-24 10:20:15 -03:00
parent ec61be9a7e
commit 152b51955a
5 changed files with 10 additions and 20 deletions

12
ldo.h
View File

@@ -44,18 +44,6 @@
p = restorestack(L, t__)) /* 'pos' part: restore 'p' */
/* macro to check stack size and GC, preserving 'p' */
#define checkstackGCp(L,n,p) \
luaD_checkstackaux(L, n, \
ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \
luaC_checkGC(L), /* stack grow uses memory */ \
p = restorestack(L, t__)) /* 'pos' part: restore 'p' */
/* macro to check stack size and GC */
#define checkstackGC(L,fsize) \
luaD_checkstackaux(L, (fsize), luaC_checkGC(L), (void)0)
/* type of protected functions, to be ran by 'runprotected' */
typedef void (*Pfunc) (lua_State *L, void *ud);