aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/lstate.h b/lstate.h
index ab567213..1c81b6ed 100644
--- a/lstate.h
+++ b/lstate.h
@@ -221,16 +221,24 @@ struct CallInfo {
221*/ 221*/
222/* bits 0-7 are the expected number of results from this function + 1 */ 222/* bits 0-7 are the expected number of results from this function + 1 */
223#define CIST_NRESULTS 0xffu 223#define CIST_NRESULTS 0xffu
224/* Bits 8-10 are used for CIST_RECST (see below) */ 224
225#define CIST_RECST 8 /* the offset, not the mask */ 225/* bits 8-11 count call metamethods (and their extra arguments) */
226/* original value of 'allowhook' */ 226#define CIST_CCMT 8 /* the offset, not the mask */
227#define CIST_OAH (cast(l_uint32, 1) << 11) 227#define MAX_CCMT (0xfu << CIST_CCMT)
228/* call is running a C function */ 228
229#define CIST_C (CIST_OAH << 1) 229/* Bits 12-14 are used for CIST_RECST (see below) */
230#define CIST_RECST 12 /* the offset, not the mask */
231
232/* call is running a C function (still in first 16 bits) */
233#define CIST_C (1u << (CIST_RECST + 3))
230/* call is on a fresh "luaV_execute" frame */ 234/* call is on a fresh "luaV_execute" frame */
231#define CIST_FRESH (CIST_C << 1) 235#define CIST_FRESH cast(l_uint32, CIST_C << 1)
236/* function is closing tbc variables */
237#define CIST_CLSRET (CIST_FRESH << 1)
238/* original value of 'allowhook' */
239#define CIST_OAH (CIST_CLSRET << 1)
232/* call is running a debug hook */ 240/* call is running a debug hook */
233#define CIST_HOOKED (CIST_FRESH << 1) 241#define CIST_HOOKED (CIST_OAH << 1)
234/* doing a yieldable protected call */ 242/* doing a yieldable protected call */
235#define CIST_YPCALL (CIST_HOOKED << 1) 243#define CIST_YPCALL (CIST_HOOKED << 1)
236/* call was tail called */ 244/* call was tail called */
@@ -239,11 +247,9 @@ struct CallInfo {
239#define CIST_HOOKYIELD (CIST_TAIL << 1) 247#define CIST_HOOKYIELD (CIST_TAIL << 1)
240/* function "called" a finalizer */ 248/* function "called" a finalizer */
241#define CIST_FIN (CIST_HOOKYIELD << 1) 249#define CIST_FIN (CIST_HOOKYIELD << 1)
242 /* function is closing tbc variables */
243#define CIST_CLSRET (CIST_FIN << 1)
244#if defined(LUA_COMPAT_LT_LE) 250#if defined(LUA_COMPAT_LT_LE)
245/* using __lt for __le */ 251/* using __lt for __le */
246#define CIST_LEQ (CIST_CLSRET << 1) 252#define CIST_LEQ (CIST_FIN << 1)
247#endif 253#endif
248 254
249 255