Optimizations for line hook

The function 'changedline' tries harder to avoid calling
'luaG_getfuncline' plus small changes in the use of 'L->oldpc'.
This commit is contained in:
Roberto Ierusalimschy
2021-01-28 14:40:29 -03:00
parent 58aa09a0b9
commit 949187b049
4 changed files with 47 additions and 33 deletions

View File

@@ -26,6 +26,16 @@
*/
#define ABSLINEINFO (-0x80)
/*
** MAXimum number of successive Instructions WiTHout ABSolute line
** information.
*/
#if !defined(MAXIWTHABS)
#define MAXIWTHABS 120
#endif
LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc);
LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n,
StkId *pos);