lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 0aa32fa0cbe8d9fea52e0311d09225b37697e085
parent 8927c143175f02084c93a39392d2b58d3a4fb5f4
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu, 15 May 2014 17:41:02 -0300

small changes in field order in some structs to reduce padding

Diffstat:
Mlobject.h | 24++++++++++++------------
Mlstate.h | 4++--
2 files changed, 14 insertions(+), 14 deletions(-)

diff --git 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 @@ -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;