aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/lstate.h b/lstate.h
index aa9687ae..e12ca154 100644
--- a/lstate.h
+++ b/lstate.h
@@ -183,8 +183,6 @@ typedef struct stringtable {
183** yield (from the yield until the next resume); 183** yield (from the yield until the next resume);
184** - field 'nres' is used only while closing tbc variables when 184** - field 'nres' is used only while closing tbc variables when
185** returning from a function; 185** returning from a function;
186** - field 'transferinfo' is used only during call/returnhooks,
187** before the function starts or after it ends.
188*/ 186*/
189struct CallInfo { 187struct CallInfo {
190 StkIdRel func; /* function index in the stack */ 188 StkIdRel func; /* function index in the stack */
@@ -206,10 +204,6 @@ struct CallInfo {
206 int funcidx; /* called-function index */ 204 int funcidx; /* called-function index */
207 int nyield; /* number of values yielded */ 205 int nyield; /* number of values yielded */
208 int nres; /* number of values returned */ 206 int nres; /* number of values returned */
209 struct { /* info about transferred values (for call/return hooks) */
210 int ftransfer; /* offset of first value transferred */
211 int ntransfer; /* number of values transferred */
212 } transferinfo;
213 } u2; 207 } u2;
214 l_uint32 callstatus; 208 l_uint32 callstatus;
215}; 209};
@@ -236,15 +230,13 @@ struct CallInfo {
236#define CIST_HOOKYIELD (cast(l_uint32, 1) << 14) 230#define CIST_HOOKYIELD (cast(l_uint32, 1) << 14)
237/* function "called" a finalizer */ 231/* function "called" a finalizer */
238#define CIST_FIN (cast(l_uint32, 1) << 15) 232#define CIST_FIN (cast(l_uint32, 1) << 15)
239/* 'ci' has transfer information */
240#define CIST_TRAN (cast(l_uint32, 1) << 16)
241 /* function is closing tbc variables */ 233 /* function is closing tbc variables */
242#define CIST_CLSRET (cast(l_uint32, 1) << 17) 234#define CIST_CLSRET (cast(l_uint32, 1) << 16)
243/* Bits 18-20 are used for CIST_RECST (see below) */ 235/* Bits 17-19 are used for CIST_RECST (see below) */
244#define CIST_RECST 18 /* the offset, not the mask */ 236#define CIST_RECST 17 /* the offset, not the mask */
245#if defined(LUA_COMPAT_LT_LE) 237#if defined(LUA_COMPAT_LT_LE)
246/* using __lt for __le */ 238/* using __lt for __le */
247#define CIST_LEQ (cast(l_uint32, 1) << 21) 239#define CIST_LEQ (cast(l_uint32, 1) << 20)
248#endif 240#endif
249 241
250 242
@@ -354,6 +346,10 @@ struct lua_State {
354 int basehookcount; 346 int basehookcount;
355 int hookcount; 347 int hookcount;
356 volatile l_signalT hookmask; 348 volatile l_signalT hookmask;
349 struct { /* info about transferred values (for call/return hooks) */
350 int ftransfer; /* offset of first value transferred */
351 int ntransfer; /* number of values transferred */
352 } transferinfo;
357}; 353};
358 354
359 355