diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-01-28 14:40:29 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-01-28 14:40:29 -0300 |
commit | 949187b049ce329c93d6639b91e244f2b208c807 (patch) | |
tree | e758128392692fe349087e457fc743ea4f56e4bb /ldebug.h | |
parent | 58aa09a0b91cf81779d6710d7f9d855bb9d3712f (diff) | |
download | lua-949187b049ce329c93d6639b91e244f2b208c807.tar.gz lua-949187b049ce329c93d6639b91e244f2b208c807.tar.bz2 lua-949187b049ce329c93d6639b91e244f2b208c807.zip |
Optimizations for line hook
The function 'changedline' tries harder to avoid calling
'luaG_getfuncline' plus small changes in the use of 'L->oldpc'.
Diffstat (limited to 'ldebug.h')
-rw-r--r-- | ldebug.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -26,6 +26,16 @@ | |||
26 | */ | 26 | */ |
27 | #define ABSLINEINFO (-0x80) | 27 | #define ABSLINEINFO (-0x80) |
28 | 28 | ||
29 | |||
30 | /* | ||
31 | ** MAXimum number of successive Instructions WiTHout ABSolute line | ||
32 | ** information. | ||
33 | */ | ||
34 | #if !defined(MAXIWTHABS) | ||
35 | #define MAXIWTHABS 120 | ||
36 | #endif | ||
37 | |||
38 | |||
29 | LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc); | 39 | LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc); |
30 | LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n, | 40 | LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n, |
31 | StkId *pos); | 41 | StkId *pos); |