diff options
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -70,6 +70,24 @@ typedef struct stringtable { | |||
70 | 70 | ||
71 | 71 | ||
72 | /* | 72 | /* |
73 | ** informations about a call | ||
74 | */ | ||
75 | typedef struct CallInfo { | ||
76 | StkId base; /* base for called function */ | ||
77 | const Instruction *savedpc; | ||
78 | lua_Hook linehook; | ||
79 | /* extra information for debugging */ | ||
80 | const Instruction **pc; | ||
81 | int lastpc; /* last pc traced */ | ||
82 | int line; /* current line */ | ||
83 | int refi; /* current index in `lineinfo' */ | ||
84 | } CallInfo; | ||
85 | |||
86 | #define ci_func(ci) (clvalue((ci)->base - 1)) | ||
87 | |||
88 | |||
89 | |||
90 | /* | ||
73 | ** `global state', shared by all threads of this state | 91 | ** `global state', shared by all threads of this state |
74 | */ | 92 | */ |
75 | typedef struct global_State { | 93 | typedef struct global_State { |
@@ -98,6 +116,9 @@ struct lua_State { | |||
98 | StkId stack_last; /* last free slot in the stack */ | 116 | StkId stack_last; /* last free slot in the stack */ |
99 | StkId stack; /* stack base */ | 117 | StkId stack; /* stack base */ |
100 | int stacksize; | 118 | int stacksize; |
119 | CallInfo *end_ci; /* points after end of ci array*/ | ||
120 | CallInfo *base_ci; /* array of CallInfo's */ | ||
121 | int size_ci; /* size of array `base_ci' */ | ||
101 | global_State *_G; | 122 | global_State *_G; |
102 | lua_Hook callhook; | 123 | lua_Hook callhook; |
103 | lua_Hook linehook; | 124 | lua_Hook linehook; |
@@ -106,7 +127,6 @@ struct lua_State { | |||
106 | UpVal *openupval; /* list of open upvalues in this stack */ | 127 | UpVal *openupval; /* list of open upvalues in this stack */ |
107 | lua_State *next; /* circular double linked list of states */ | 128 | lua_State *next; /* circular double linked list of states */ |
108 | lua_State *previous; | 129 | lua_State *previous; |
109 | CallInfo basefunc; | ||
110 | }; | 130 | }; |
111 | 131 | ||
112 | 132 | ||