diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-11-08 10:15:10 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-11-08 10:15:10 -0300 |
| commit | be908a7d4d8130264ad67c5789169769f824c5d1 (patch) | |
| tree | 3601b5fe16b27045d0604fb27e4cc5c5ece6883c | |
| parent | 9ede317c70ad82279f2e3962eb52904a17bf4b55 (diff) | |
| download | lua-be908a7d4d8130264ad67c5789169769f824c5d1.tar.gz lua-be908a7d4d8130264ad67c5789169769f824c5d1.tar.bz2 lua-be908a7d4d8130264ad67c5789169769f824c5d1.zip | |
Removed unused field 'UpVal.tbc'
| -rw-r--r-- | lfunc.c | 5 | ||||
| -rw-r--r-- | lobject.h | 1 |
2 files changed, 2 insertions, 4 deletions
| @@ -62,12 +62,11 @@ void luaF_initupvals (lua_State *L, LClosure *cl) { | |||
| 62 | ** Create a new upvalue at the given level, and link it to the list of | 62 | ** Create a new upvalue at the given level, and link it to the list of |
| 63 | ** open upvalues of 'L' after entry 'prev'. | 63 | ** open upvalues of 'L' after entry 'prev'. |
| 64 | **/ | 64 | **/ |
| 65 | static UpVal *newupval (lua_State *L, int tbc, StkId level, UpVal **prev) { | 65 | static UpVal *newupval (lua_State *L, StkId level, UpVal **prev) { |
| 66 | GCObject *o = luaC_newobj(L, LUA_VUPVAL, sizeof(UpVal)); | 66 | GCObject *o = luaC_newobj(L, LUA_VUPVAL, sizeof(UpVal)); |
| 67 | UpVal *uv = gco2upv(o); | 67 | UpVal *uv = gco2upv(o); |
| 68 | UpVal *next = *prev; | 68 | UpVal *next = *prev; |
| 69 | uv->v.p = s2v(level); /* current value lives in the stack */ | 69 | uv->v.p = s2v(level); /* current value lives in the stack */ |
| 70 | uv->tbc = tbc; | ||
| 71 | uv->u.open.next = next; /* link it to list of open upvalues */ | 70 | uv->u.open.next = next; /* link it to list of open upvalues */ |
| 72 | uv->u.open.previous = prev; | 71 | uv->u.open.previous = prev; |
| 73 | if (next) | 72 | if (next) |
| @@ -96,7 +95,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) { | |||
| 96 | pp = &p->u.open.next; | 95 | pp = &p->u.open.next; |
| 97 | } | 96 | } |
| 98 | /* not found: create a new upvalue after 'pp' */ | 97 | /* not found: create a new upvalue after 'pp' */ |
| 99 | return newupval(L, 0, level, pp); | 98 | return newupval(L, level, pp); |
| 100 | } | 99 | } |
| 101 | 100 | ||
| 102 | 101 | ||
| @@ -628,7 +628,6 @@ typedef struct Proto { | |||
| 628 | */ | 628 | */ |
| 629 | typedef struct UpVal { | 629 | typedef struct UpVal { |
| 630 | CommonHeader; | 630 | CommonHeader; |
| 631 | lu_byte tbc; /* true if it represents a to-be-closed variable */ | ||
| 632 | union { | 631 | union { |
| 633 | TValue *p; /* points to stack or to its own value */ | 632 | TValue *p; /* points to stack or to its own value */ |
| 634 | ptrdiff_t offset; /* used while the stack is being reallocated */ | 633 | ptrdiff_t offset; /* used while the stack is being reallocated */ |
