reserved words are stored in main string table; "marked" field is

used to indicate its type.
Table initializations centralized by "tree.c".
This commit is contained in:
Roberto Ierusalimschy
1996-02-14 10:35:51 -03:00
parent 0f4903a5d7
commit d1608c597e
6 changed files with 79 additions and 74 deletions

5
tree.h
View File

@@ -1,7 +1,7 @@
/*
** tree.h
** TecCGraf - PUC-Rio
** $Id: tree.h,v 1.11 1996/01/26 18:03:19 roberto Exp roberto $
** $Id: tree.h,v 1.12 1996/02/12 18:32:40 roberto Exp roberto $
*/
#ifndef tree_h
@@ -17,13 +17,12 @@ typedef struct TaggedString
unsigned short varindex; /* != NOT_USED if this is a symbol */
unsigned short constindex; /* != NOT_USED if this is a constant */
unsigned long hash; /* 0 if not initialized */
char marked; /* for garbage collection; 2 means "never collect" */
int marked; /* for garbage collection; never collect (nor change) if > 1 */
char str[1]; /* \0 byte already reserved */
} TaggedString;
TaggedString *lua_createstring (char *str);
TaggedString *luaI_createfixedstring (char *str);
Long lua_strcollector (void);
#endif