small changes in field order in some structs to reduce padding

This commit is contained in:
Roberto Ierusalimschy 2014-05-15 17:41:27 -03:00
parent 8927c14317
commit 0aa32fa0cb
2 changed files with 14 additions and 14 deletions

View File

@ -1,5 +1,5 @@
/*
** $Id: lobject.h,v 2.90 2014/05/07 11:12:51 roberto Exp roberto $
** $Id: lobject.h,v 2.91 2014/05/15 20:28:39 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@ -373,14 +373,9 @@ typedef struct LocVar {
*/
typedef struct Proto {
CommonHeader;
TValue *k; /* constants used by the function */
Instruction *code;
struct Proto **p; /* functions defined inside the function */
int *lineinfo; /* map from opcodes to source lines (debug information) */
LocVar *locvars; /* information about local variables (debug information) */
Upvaldesc *upvalues; /* upvalue information */
union Closure *cache; /* last created closure with this prototype */
TString *source; /* used for debug information */
lu_byte numparams; /* number of fixed parameters */
lu_byte is_vararg;
lu_byte maxstacksize; /* maximum stack used by this function */
int sizeupvalues; /* size of 'upvalues' */
int sizek; /* size of `k' */
int sizecode;
@ -389,10 +384,15 @@ typedef struct Proto {
int sizelocvars;
int linedefined;
int lastlinedefined;
TValue *k; /* constants used by the function */
Instruction *code;
struct Proto **p; /* functions defined inside the function */
int *lineinfo; /* map from opcodes to source lines (debug information) */
LocVar *locvars; /* information about local variables (debug information) */
Upvaldesc *upvalues; /* upvalue information */
union Closure *cache; /* last created closure with this prototype */
TString *source; /* used for debug information */
GCObject *gclist;
lu_byte numparams; /* number of fixed parameters */
lu_byte is_vararg;
lu_byte maxstacksize; /* maximum stack used by this function */
} Proto;

View File

@ -1,5 +1,5 @@
/*
** $Id: lstate.h,v 2.101 2014/02/18 13:39:37 roberto Exp roberto $
** $Id: lstate.h,v 2.102 2014/02/18 13:46:26 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@ -69,9 +69,9 @@ typedef struct CallInfo {
const Instruction *savedpc;
} l;
struct { /* only for C functions */
int ctx; /* context info. in case of yields */
lua_CFunction k; /* continuation in case of yields */
ptrdiff_t old_errfunc;
int ctx; /* context info. in case of yields */
lu_byte old_allowhook;
lu_byte status;
} c;