From 0aa32fa0cbe8d9fea52e0311d09225b37697e085 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 15 May 2014 17:41:27 -0300 Subject: small changes in field order in some structs to reduce padding --- lobject.h | 24 ++++++++++++------------ lstate.h | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lobject.h b/lobject.h index 793309b0..e552ba04 100644 --- a/lobject.h +++ b/lobject.h @@ -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; diff --git a/lstate.h b/lstate.h index a876f35f..fd21fb9f 100644 --- a/lstate.h +++ b/lstate.h @@ -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; -- cgit v1.2.3-55-g6feb