diff options
| -rw-r--r-- | lapi.c | 4 | ||||
| -rw-r--r-- | ldo.c | 4 | ||||
| -rw-r--r-- | lfunc.c | 8 | ||||
| -rw-r--r-- | lfunc.h | 4 | ||||
| -rw-r--r-- | lgc.c | 10 | ||||
| -rw-r--r-- | ltests.c | 4 |
6 files changed, 17 insertions, 17 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 2.195 2014/02/13 17:25:20 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.196 2014/02/14 16:43:14 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -1296,7 +1296,7 @@ LUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1, | |||
| 1296 | luaC_upvdeccount(L, *up1); | 1296 | luaC_upvdeccount(L, *up1); |
| 1297 | *up1 = *up2; | 1297 | *up1 = *up2; |
| 1298 | (*up1)->refcount++; | 1298 | (*up1)->refcount++; |
| 1299 | if (upisopen(*up1)) (*up1)->u.op.touched = 1; | 1299 | if (upisopen(*up1)) (*up1)->u.open.touched = 1; |
| 1300 | luaC_upvalbarrier(L, *up1); | 1300 | luaC_upvalbarrier(L, *up1); |
| 1301 | } | 1301 | } |
| 1302 | 1302 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 2.111 2013/09/17 15:40:06 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.112 2013/11/08 18:16:33 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -143,7 +143,7 @@ static void correctstack (lua_State *L, TValue *oldstack) { | |||
| 143 | CallInfo *ci; | 143 | CallInfo *ci; |
| 144 | UpVal *up; | 144 | UpVal *up; |
| 145 | L->top = (L->top - oldstack) + L->stack; | 145 | L->top = (L->top - oldstack) + L->stack; |
| 146 | for (up = L->openupval; up != NULL; up = up->u.op.next) | 146 | for (up = L->openupval; up != NULL; up = up->u.open.next) |
| 147 | up->v = (up->v - oldstack) + L->stack; | 147 | up->v = (up->v - oldstack) + L->stack; |
| 148 | for (ci = L->ci; ci != NULL; ci = ci->previous) { | 148 | for (ci = L->ci; ci != NULL; ci = ci->previous) { |
| 149 | ci->top = (ci->top - oldstack) + L->stack; | 149 | ci->top = (ci->top - oldstack) + L->stack; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.c,v 2.38 2013/09/11 12:26:14 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 2.39 2014/02/13 12:11:34 roberto Exp roberto $ |
| 3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -56,12 +56,12 @@ UpVal *luaF_findupval (lua_State *L, StkId level) { | |||
| 56 | lua_assert(upisopen(p)); | 56 | lua_assert(upisopen(p)); |
| 57 | if (p->v == level) /* found a corresponding upvalue? */ | 57 | if (p->v == level) /* found a corresponding upvalue? */ |
| 58 | return p; /* return it */ | 58 | return p; /* return it */ |
| 59 | pp = &p->u.op.next; | 59 | pp = &p->u.open.next; |
| 60 | } | 60 | } |
| 61 | /* not found: create a new one */ | 61 | /* not found: create a new one */ |
| 62 | uv = luaM_new(L, UpVal); | 62 | uv = luaM_new(L, UpVal); |
| 63 | uv->refcount = 0; | 63 | uv->refcount = 0; |
| 64 | uv->u.op.next = *pp; | 64 | uv->u.open.next = *pp; |
| 65 | *pp = uv; | 65 | *pp = uv; |
| 66 | uv->v = level; /* current value lives in the stack */ | 66 | uv->v = level; /* current value lives in the stack */ |
| 67 | return uv; | 67 | return uv; |
| @@ -72,7 +72,7 @@ void luaF_close (lua_State *L, StkId level) { | |||
| 72 | UpVal *uv; | 72 | UpVal *uv; |
| 73 | while (L->openupval != NULL && (uv = L->openupval)->v >= level) { | 73 | while (L->openupval != NULL && (uv = L->openupval)->v >= level) { |
| 74 | lua_assert(upisopen(uv)); | 74 | lua_assert(upisopen(uv)); |
| 75 | L->openupval = uv->u.op.next; /* remove from `open' list */ | 75 | L->openupval = uv->u.open.next; /* remove from `open' list */ |
| 76 | if (uv->refcount == 0) /* no references? */ | 76 | if (uv->refcount == 0) /* no references? */ |
| 77 | luaM_free(L, uv); /* free upvalue */ | 77 | luaM_free(L, uv); /* free upvalue */ |
| 78 | else { | 78 | else { |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.h,v 2.10 2013/08/27 18:53:35 roberto Exp roberto $ | 2 | ** $Id: lfunc.h,v 2.11 2013/09/11 15:17:00 roberto Exp roberto $ |
| 3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -28,7 +28,7 @@ struct UpVal { | |||
| 28 | struct { /* (when open) */ | 28 | struct { /* (when open) */ |
| 29 | UpVal *next; /* linked list */ | 29 | UpVal *next; /* linked list */ |
| 30 | int touched; /* mark to avoid cycles with dead threads */ | 30 | int touched; /* mark to avoid cycles with dead threads */ |
| 31 | } op; | 31 | } open; |
| 32 | TValue value; /* the value (when closed) */ | 32 | TValue value; /* the value (when closed) */ |
| 33 | } u; | 33 | } u; |
| 34 | }; | 34 | }; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lgc.c,v 2.173 2014/02/13 17:25:20 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 2.174 2014/02/14 16:43:14 roberto Exp roberto $ |
| 3 | ** Garbage Collector | 3 | ** Garbage Collector |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -296,10 +296,10 @@ static void remarkupvals (global_State *g) { | |||
| 296 | lua_assert(!isblack(thread)); /* threads are never black */ | 296 | lua_assert(!isblack(thread)); /* threads are never black */ |
| 297 | if (!isgray(thread)) { /* dead thread? */ | 297 | if (!isgray(thread)) { /* dead thread? */ |
| 298 | UpVal *uv = gco2th(thread)->openupval; | 298 | UpVal *uv = gco2th(thread)->openupval; |
| 299 | for (; uv != NULL; uv = uv->u.op.next) { | 299 | for (; uv != NULL; uv = uv->u.open.next) { |
| 300 | if (uv->u.op.touched) { | 300 | if (uv->u.open.touched) { |
| 301 | markvalue(g, uv->v); /* remark upvalue's value */ | 301 | markvalue(g, uv->v); /* remark upvalue's value */ |
| 302 | uv->u.op.touched = 0; | 302 | uv->u.open.touched = 0; |
| 303 | } | 303 | } |
| 304 | } | 304 | } |
| 305 | } | 305 | } |
| @@ -466,7 +466,7 @@ static lu_mem traverseLclosure (global_State *g, LClosure *cl) { | |||
| 466 | UpVal *uv = cl->upvals[i]; | 466 | UpVal *uv = cl->upvals[i]; |
| 467 | if (uv != NULL) { | 467 | if (uv != NULL) { |
| 468 | if (upisopen(uv)) | 468 | if (upisopen(uv)) |
| 469 | uv->u.op.touched = 1; /* can be marked in 'remarkupvals' */ | 469 | uv->u.open.touched = 1; /* can be marked in 'remarkupvals' */ |
| 470 | else | 470 | else |
| 471 | markvalue(g, uv->v); | 471 | markvalue(g, uv->v); |
| 472 | } | 472 | } |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.163 2014/02/11 12:18:12 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.164 2014/02/13 12:11:34 roberto Exp roberto $ |
| 3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -301,7 +301,7 @@ static void checkstack (global_State *g, lua_State *L1) { | |||
| 301 | CallInfo *ci; | 301 | CallInfo *ci; |
| 302 | UpVal *uv; | 302 | UpVal *uv; |
| 303 | lua_assert(!isdead(g, obj2gco(L1))); | 303 | lua_assert(!isdead(g, obj2gco(L1))); |
| 304 | for (uv = L1->openupval; uv != NULL; uv = uv->u.op.next) | 304 | for (uv = L1->openupval; uv != NULL; uv = uv->u.open.next) |
| 305 | lua_assert(upisopen(uv)); /* must be open */ | 305 | lua_assert(upisopen(uv)); /* must be open */ |
| 306 | for (ci = L1->ci; ci != NULL; ci = ci->previous) { | 306 | for (ci = L1->ci; ci != NULL; ci = ci->previous) { |
| 307 | lua_assert(ci->top <= L1->stack_last); | 307 | lua_assert(ci->top <= L1->stack_last); |
