remove ssm and add string id

This commit is contained in:
Cloud Wu
2019-06-18 14:09:36 +08:00
committed by 云风
parent 7032f21d18
commit 5d26fb3f18
20 changed files with 183 additions and 1172 deletions

View File

@@ -130,8 +130,6 @@ typedef struct CallInfo {
#define setoah(st,v) ((st) = ((st) & ~CIST_OAH) | (v))
#define getoah(st) ((st) & CIST_OAH)
/* SSM (short string map) See lstring.c */
struct ssm_ref;
/*
** 'global state', shared by all threads of this state
@@ -143,6 +141,7 @@ typedef struct global_State {
l_mem GCdebt; /* bytes allocated not yet compensated by the collector */
lu_mem GCmemtrav; /* memory traversed by the GC */
lu_mem GCestimate; /* an estimate of the non-garbage memory in use */
stringtable strt; /* hash table for strings */
TValue l_registry;
lu_byte currentwhite;
lu_byte gcstate; /* state of garbage collector */
@@ -169,9 +168,6 @@ typedef struct global_State {
TString *tmname[TM_N]; /* array with tag-method names */
struct Table *mt[LUA_NUMTAGS]; /* metatables for basic types */
TString *strcache[STRCACHE_N][STRCACHE_M]; /* cache for strings in API */
struct ssm_ref *strsave;
struct ssm_ref *strmark;
struct ssm_ref *strfix;
} global_State;