diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-11-24 10:20:15 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-11-24 10:20:15 -0300 |
commit | 152b51955aabb9dfb32302569fac810e999eda03 (patch) | |
tree | 68a5495c94326ac24023370779d231af468fbd9a /ldo.h | |
parent | ec61be9a7e828bfa366a35658b90f53b1ce39478 (diff) | |
download | lua-152b51955aabb9dfb32302569fac810e999eda03.tar.gz lua-152b51955aabb9dfb32302569fac810e999eda03.tar.bz2 lua-152b51955aabb9dfb32302569fac810e999eda03.zip |
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.)
Diffstat (limited to 'ldo.h')
-rw-r--r-- | ldo.h | 12 |
1 files changed, 0 insertions, 12 deletions
@@ -44,18 +44,6 @@ | |||
44 | p = restorestack(L, t__)) /* 'pos' part: restore 'p' */ | 44 | p = restorestack(L, t__)) /* 'pos' part: restore 'p' */ |
45 | 45 | ||
46 | 46 | ||
47 | /* macro to check stack size and GC, preserving 'p' */ | ||
48 | #define checkstackGCp(L,n,p) \ | ||
49 | luaD_checkstackaux(L, n, \ | ||
50 | ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \ | ||
51 | luaC_checkGC(L), /* stack grow uses memory */ \ | ||
52 | p = restorestack(L, t__)) /* 'pos' part: restore 'p' */ | ||
53 | |||
54 | |||
55 | /* macro to check stack size and GC */ | ||
56 | #define checkstackGC(L,fsize) \ | ||
57 | luaD_checkstackaux(L, (fsize), luaC_checkGC(L), (void)0) | ||
58 | |||
59 | 47 | ||
60 | /* type of protected functions, to be ran by 'runprotected' */ | 48 | /* type of protected functions, to be ran by 'runprotected' */ |
61 | typedef void (*Pfunc) (lua_State *L, void *ud); | 49 | typedef void (*Pfunc) (lua_State *L, void *ud); |