From 542b6cfc02d57e66db7afc23a1d8350ae189e3c6 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 10 Jun 2014 15:51:21 -0300 Subject: no need for field 'status' in structure 'CallInfo' (after removal of 'lua_getctx') + field 'old_allowhook' can be packed into a single bit --- lstate.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 67b43c29..bc9c454b 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.103 2014/05/15 20:41:27 roberto Exp roberto $ +** $Id: lstate.h,v 2.104 2014/06/10 17:41:38 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -60,9 +60,9 @@ typedef struct CallInfo { StkId func; /* function index in the stack */ StkId top; /* top for this function */ struct CallInfo *previous, *next; /* dynamic call link */ + ptrdiff_t extra; short nresults; /* expected number of results from this function */ lu_byte callstatus; - ptrdiff_t extra; union { struct { /* only for Lua functions */ StkId base; /* base for this function */ @@ -72,8 +72,6 @@ typedef struct CallInfo { lua_KFunction k; /* continuation in case of yields */ ptrdiff_t old_errfunc; int ctx; /* context info. in case of yields */ - lu_byte old_allowhook; - lu_byte status; } c; } u; } CallInfo; @@ -88,9 +86,9 @@ typedef struct CallInfo { luaV_execute of previous call */ #define CIST_YIELDED (1<<3) /* call reentered after suspension */ #define CIST_YPCALL (1<<4) /* call is a yieldable protected call */ -#define CIST_STAT (1<<5) /* call has an error status (pcall) */ -#define CIST_TAIL (1<<6) /* call was tail called */ -#define CIST_HOOKYIELD (1<<7) /* last hook called yielded */ +#define CIST_TAIL (1<<5) /* call was tail called */ +#define CIST_HOOKYIELD (1<<6) /* last hook called yielded */ +#define CIST_OAH (1<<7) /* original value of 'allowhook' */ #define isLua(ci) ((ci)->callstatus & CIST_LUA) -- cgit v1.2.3-55-g6feb