diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-23 14:15:43 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-23 14:15:43 -0300 |
| commit | 753f2c1da4f80f78b12a4a7afa9a380067945e47 (patch) | |
| tree | 799d4bf888538d2e3363b0b8291e55d33a5d6c93 | |
| parent | b3b85806060013f660002a7c5e2d2e7d07efd1d1 (diff) | |
| download | lua-753f2c1da4f80f78b12a4a7afa9a380067945e47.tar.gz lua-753f2c1da4f80f78b12a4a7afa9a380067945e47.tar.bz2 lua-753f2c1da4f80f78b12a4a7afa9a380067945e47.zip | |
better(?) alignment for some structures (pointers first)
Diffstat (limited to '')
| -rw-r--r-- | lstate.h | 26 |
1 files changed, 13 insertions, 13 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.h,v 2.112 2014/07/18 13:36:14 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.113 2014/07/18 14:46:47 roberto Exp roberto $ |
| 3 | ** Global State | 3 | ** Global State |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -60,9 +60,6 @@ typedef struct CallInfo { | |||
| 60 | StkId func; /* function index in the stack */ | 60 | StkId func; /* function index in the stack */ |
| 61 | StkId top; /* top for this function */ | 61 | StkId top; /* top for this function */ |
| 62 | struct CallInfo *previous, *next; /* dynamic call link */ | 62 | struct CallInfo *previous, *next; /* dynamic call link */ |
| 63 | ptrdiff_t extra; | ||
| 64 | short nresults; /* expected number of results from this function */ | ||
| 65 | lu_byte callstatus; | ||
| 66 | union { | 63 | union { |
| 67 | struct { /* only for Lua functions */ | 64 | struct { /* only for Lua functions */ |
| 68 | StkId base; /* base for this function */ | 65 | StkId base; /* base for this function */ |
| @@ -74,6 +71,9 @@ typedef struct CallInfo { | |||
| 74 | lua_Ctx ctx; /* context info. in case of yields */ | 71 | lua_Ctx ctx; /* context info. in case of yields */ |
| 75 | } c; | 72 | } c; |
| 76 | } u; | 73 | } u; |
| 74 | ptrdiff_t extra; | ||
| 75 | short nresults; /* expected number of results from this function */ | ||
| 76 | lu_byte callstatus; | ||
| 77 | } CallInfo; | 77 | } CallInfo; |
| 78 | 78 | ||
| 79 | 79 | ||
| @@ -149,20 +149,20 @@ struct lua_State { | |||
| 149 | const Instruction *oldpc; /* last pc traced */ | 149 | const Instruction *oldpc; /* last pc traced */ |
| 150 | StkId stack_last; /* last free slot in the stack */ | 150 | StkId stack_last; /* last free slot in the stack */ |
| 151 | StkId stack; /* stack base */ | 151 | StkId stack; /* stack base */ |
| 152 | int stacksize; | ||
| 153 | unsigned short nny; /* number of non-yieldable calls in stack */ | ||
| 154 | unsigned short nCcalls; /* number of nested C calls */ | ||
| 155 | lu_byte hookmask; | ||
| 156 | lu_byte allowhook; | ||
| 157 | int basehookcount; | ||
| 158 | int hookcount; | ||
| 159 | lua_Hook hook; | ||
| 160 | UpVal *openupval; /* list of open upvalues in this stack */ | 152 | UpVal *openupval; /* list of open upvalues in this stack */ |
| 161 | GCObject *gclist; | 153 | GCObject *gclist; |
| 162 | struct lua_State *twups; /* list of threads with open upvalues */ | 154 | struct lua_State *twups; /* list of threads with open upvalues */ |
| 163 | struct lua_longjmp *errorJmp; /* current error recover point */ | 155 | struct lua_longjmp *errorJmp; /* current error recover point */ |
| 164 | ptrdiff_t errfunc; /* current error handling function (stack index) */ | ||
| 165 | CallInfo base_ci; /* CallInfo for first level (C calling Lua) */ | 156 | CallInfo base_ci; /* CallInfo for first level (C calling Lua) */ |
| 157 | lua_Hook hook; | ||
| 158 | ptrdiff_t errfunc; /* current error handling function (stack index) */ | ||
| 159 | int stacksize; | ||
| 160 | int basehookcount; | ||
| 161 | int hookcount; | ||
| 162 | unsigned short nny; /* number of non-yieldable calls in stack */ | ||
| 163 | unsigned short nCcalls; /* number of nested C calls */ | ||
| 164 | lu_byte hookmask; | ||
| 165 | lu_byte allowhook; | ||
| 166 | }; | 166 | }; |
| 167 | 167 | ||
| 168 | 168 | ||
