Roberto Ierusalimschy 10 years ago
parent
commit
2b37f2150e
1 changed files with 5 additions and 5 deletions
  1. 5 5
      lobject.h

+ 5 - 5
lobject.h

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lobject.h,v 2.107 2015/01/16 16:54:37 roberto Exp roberto $
+** $Id: lobject.h,v 2.108 2015/03/02 16:04:52 roberto Exp roberto $
 ** Type definitions for Lua objects
 ** Type definitions for Lua objects
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -391,7 +391,7 @@ typedef union UUdata {
 */
 */
 typedef struct Upvaldesc {
 typedef struct Upvaldesc {
   TString *name;  /* upvalue name (for debug information) */
   TString *name;  /* upvalue name (for debug information) */
-  lu_byte instack;  /* whether it is in stack */
+  lu_byte instack;  /* whether it is in stack (register) */
   lu_byte idx;  /* index of upvalue (in stack or in outer function's list) */
   lu_byte idx;  /* index of upvalue (in stack or in outer function's list) */
 } Upvaldesc;
 } Upvaldesc;
 
 
@@ -414,7 +414,7 @@ typedef struct Proto {
   CommonHeader;
   CommonHeader;
   lu_byte numparams;  /* number of fixed parameters */
   lu_byte numparams;  /* number of fixed parameters */
   lu_byte is_vararg;
   lu_byte is_vararg;
-  lu_byte maxstacksize;  /* maximum stack used by this function */
+  lu_byte maxstacksize;  /* number of registers needed by this function */
   int sizeupvalues;  /* size of 'upvalues' */
   int sizeupvalues;  /* size of 'upvalues' */
   int sizek;  /* size of 'k' */
   int sizek;  /* size of 'k' */
   int sizecode;
   int sizecode;
@@ -424,12 +424,12 @@ typedef struct Proto {
   int linedefined;
   int linedefined;
   int lastlinedefined;
   int lastlinedefined;
   TValue *k;  /* constants used by the function */
   TValue *k;  /* constants used by the function */
-  Instruction *code;
+  Instruction *code;  /* opcodes */
   struct Proto **p;  /* functions defined inside the function */
   struct Proto **p;  /* functions defined inside the function */
   int *lineinfo;  /* map from opcodes to source lines (debug information) */
   int *lineinfo;  /* map from opcodes to source lines (debug information) */
   LocVar *locvars;  /* information about local variables (debug information) */
   LocVar *locvars;  /* information about local variables (debug information) */
   Upvaldesc *upvalues;  /* upvalue information */
   Upvaldesc *upvalues;  /* upvalue information */
-  struct LClosure *cache;  /* last created closure with this prototype */
+  struct LClosure *cache;  /* last-created closure with this prototype */
   TString  *source;  /* used for debug information */
   TString  *source;  /* used for debug information */
   GCObject *gclist;
   GCObject *gclist;
 } Proto;
 } Proto;