From 949187b049ce329c93d6639b91e244f2b208c807 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 28 Jan 2021 14:40:29 -0300 Subject: Optimizations for line hook The function 'changedline' tries harder to avoid calling 'luaG_getfuncline' plus small changes in the use of 'L->oldpc'. --- ldebug.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ldebug.h') diff --git a/ldebug.h b/ldebug.h index 55b3ae09..8e912a8e 100644 --- a/ldebug.h +++ b/ldebug.h @@ -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); -- cgit v1.2.3-55-g6feb