diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-05-15 17:41:27 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-05-15 17:41:27 -0300 |
commit | 0aa32fa0cbe8d9fea52e0311d09225b37697e085 (patch) | |
tree | a30fea36648e377b81db8b90b2cb2ae6f6b6b68e | |
parent | 8927c143175f02084c93a39392d2b58d3a4fb5f4 (diff) | |
download | lua-0aa32fa0cbe8d9fea52e0311d09225b37697e085.tar.gz lua-0aa32fa0cbe8d9fea52e0311d09225b37697e085.tar.bz2 lua-0aa32fa0cbe8d9fea52e0311d09225b37697e085.zip |
small changes in field order in some structs to reduce padding
-rw-r--r-- | lobject.h | 24 | ||||
-rw-r--r-- | lstate.h | 4 |
2 files changed, 14 insertions, 14 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.90 2014/05/07 11:12:51 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.91 2014/05/15 20:28:39 roberto Exp roberto $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -373,14 +373,9 @@ typedef struct LocVar { | |||
373 | */ | 373 | */ |
374 | typedef struct Proto { | 374 | typedef struct Proto { |
375 | CommonHeader; | 375 | CommonHeader; |
376 | TValue *k; /* constants used by the function */ | 376 | lu_byte numparams; /* number of fixed parameters */ |
377 | Instruction *code; | 377 | lu_byte is_vararg; |
378 | struct Proto **p; /* functions defined inside the function */ | 378 | lu_byte maxstacksize; /* maximum stack used by this function */ |
379 | int *lineinfo; /* map from opcodes to source lines (debug information) */ | ||
380 | LocVar *locvars; /* information about local variables (debug information) */ | ||
381 | Upvaldesc *upvalues; /* upvalue information */ | ||
382 | union Closure *cache; /* last created closure with this prototype */ | ||
383 | TString *source; /* used for debug information */ | ||
384 | int sizeupvalues; /* size of 'upvalues' */ | 379 | int sizeupvalues; /* size of 'upvalues' */ |
385 | int sizek; /* size of `k' */ | 380 | int sizek; /* size of `k' */ |
386 | int sizecode; | 381 | int sizecode; |
@@ -389,10 +384,15 @@ typedef struct Proto { | |||
389 | int sizelocvars; | 384 | int sizelocvars; |
390 | int linedefined; | 385 | int linedefined; |
391 | int lastlinedefined; | 386 | int lastlinedefined; |
387 | TValue *k; /* constants used by the function */ | ||
388 | Instruction *code; | ||
389 | struct Proto **p; /* functions defined inside the function */ | ||
390 | int *lineinfo; /* map from opcodes to source lines (debug information) */ | ||
391 | LocVar *locvars; /* information about local variables (debug information) */ | ||
392 | Upvaldesc *upvalues; /* upvalue information */ | ||
393 | union Closure *cache; /* last created closure with this prototype */ | ||
394 | TString *source; /* used for debug information */ | ||
392 | GCObject *gclist; | 395 | GCObject *gclist; |
393 | lu_byte numparams; /* number of fixed parameters */ | ||
394 | lu_byte is_vararg; | ||
395 | lu_byte maxstacksize; /* maximum stack used by this function */ | ||
396 | } Proto; | 396 | } Proto; |
397 | 397 | ||
398 | 398 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 2.101 2014/02/18 13:39:37 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.102 2014/02/18 13:46:26 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 | */ |
@@ -69,9 +69,9 @@ typedef struct CallInfo { | |||
69 | const Instruction *savedpc; | 69 | const Instruction *savedpc; |
70 | } l; | 70 | } l; |
71 | struct { /* only for C functions */ | 71 | struct { /* only for C functions */ |
72 | int ctx; /* context info. in case of yields */ | ||
73 | lua_CFunction k; /* continuation in case of yields */ | 72 | lua_CFunction k; /* continuation in case of yields */ |
74 | ptrdiff_t old_errfunc; | 73 | ptrdiff_t old_errfunc; |
74 | int ctx; /* context info. in case of yields */ | ||
75 | lu_byte old_allowhook; | 75 | lu_byte old_allowhook; |
76 | lu_byte status; | 76 | lu_byte status; |
77 | } c; | 77 | } c; |