diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-09 13:16:06 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-09 13:16:06 -0200 |
| commit | b1379936cf35787d3ef3aab82d1607a3e1562eef (patch) | |
| tree | fe47cb5c35fddab945faf731f0bc175bf5431352 /ldo.h | |
| parent | 4e0de3a43cc30a83334c272cb7575bf8412bfeae (diff) | |
| download | lua-b1379936cf35787d3ef3aab82d1607a3e1562eef.tar.gz lua-b1379936cf35787d3ef3aab82d1607a3e1562eef.tar.bz2 lua-b1379936cf35787d3ef3aab82d1607a3e1562eef.zip | |
vararg back to '...' (but with another implementation)
new implementation should have zero overhead for non-vararg functions
Diffstat (limited to 'ldo.h')
| -rw-r--r-- | ldo.h | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.h,v 2.39 2018/01/10 19:19:27 roberto Exp roberto $ | 2 | ** $Id: ldo.h,v 2.40 2018/02/06 19:16:56 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -42,6 +42,11 @@ | |||
| 42 | p = restorestack(L, t__)) /* 'pos' part: restore 'p' */ | 42 | p = restorestack(L, t__)) /* 'pos' part: restore 'p' */ |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | /* macro to check stack size and GC */ | ||
| 46 | #define checkstackGC(L,fsize) \ | ||
| 47 | luaD_checkstackaux(L, (fsize), (void)0, luaC_checkGC(L)) | ||
| 48 | |||
| 49 | |||
| 45 | /* type of protected functions, to be ran by 'runprotected' */ | 50 | /* type of protected functions, to be ran by 'runprotected' */ |
| 46 | typedef void (*Pfunc) (lua_State *L, void *ud); | 51 | typedef void (*Pfunc) (lua_State *L, void *ud); |
| 47 | 52 | ||
| @@ -57,7 +62,10 @@ LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, | |||
| 57 | ptrdiff_t oldtop, ptrdiff_t ef); | 62 | ptrdiff_t oldtop, ptrdiff_t ef); |
| 58 | LUAI_FUNC void luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, | 63 | LUAI_FUNC void luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, |
| 59 | int nres); | 64 | int nres); |
| 65 | LUAI_FUNC void luaD_rethook (lua_State *L, CallInfo *ci); | ||
| 60 | LUAI_FUNC int luaD_reallocstack (lua_State *L, int newsize, int raiseerror); | 66 | LUAI_FUNC int luaD_reallocstack (lua_State *L, int newsize, int raiseerror); |
| 67 | LUAI_FUNC void luaD_moveresults (lua_State *L, StkId firstResult, StkId res, | ||
| 68 | int nres, int wanted); | ||
| 61 | LUAI_FUNC int luaD_growstack (lua_State *L, int n, int raiseerror); | 69 | LUAI_FUNC int luaD_growstack (lua_State *L, int n, int raiseerror); |
| 62 | LUAI_FUNC void luaD_shrinkstack (lua_State *L); | 70 | LUAI_FUNC void luaD_shrinkstack (lua_State *L); |
| 63 | LUAI_FUNC void luaD_inctop (lua_State *L); | 71 | LUAI_FUNC void luaD_inctop (lua_State *L); |
