aboutsummaryrefslogtreecommitdiff
path: root/ldebug.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-01-28 14:40:29 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-01-28 14:40:29 -0300
commit949187b049ce329c93d6639b91e244f2b208c807 (patch)
treee758128392692fe349087e457fc743ea4f56e4bb /ldebug.h
parent58aa09a0b91cf81779d6710d7f9d855bb9d3712f (diff)
downloadlua-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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ldebug.h b/ldebug.h
index 55b3ae09..8e912a8e 100644
--- a/ldebug.h
+++ b/ldebug.h
@@ -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
29LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc); 39LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc);
30LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n, 40LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n,
31 StkId *pos); 41 StkId *pos);