-@@ -693,7 +696,7 @@ void luaV_execute (lua_State *L, int nex
- }
- OPCODE_TARGET(SETUPVAL) {
- UpVal *uv = cl->upvals[GETARG_B(i)];
-- setobj(L, uv->v, ra);
-+ setobj(L, uv->v, luaV_ref(ra));
- luaC_barrier(L, uv, ra);
- continue;
- }
-@@ -856,7 +859,8 @@ void luaV_execute (lua_State *L, int nex
- }
- OPCODE_TARGET(TAILCALL) {
- int b = GETARG_B(i);
-- if (b != 0) L->top = ra+b; /* else previous instruction set top */
-+ if (b != 0)
-+ L->top = ra+b; /* else previous instruction set top */
- L->savedpc = pc;
- lua_assert(GETARG_C(i) - 1 == LUA_MULTRET);
- switch (luaD_precall(L, ra, LUA_MULTRET)) {
-@@ -870,7 +874,8 @@ void luaV_execute (lua_State *L, int nex
- L->base = ci->base = ci->func + ((ci+1)->base - pfunc);
- for (aux = 0; pfunc+aux < L->top; aux++) /* move frame down */
- setobjs2s(L, func+aux, pfunc+aux);
-- ci->top = L->top = func+aux; /* correct top */
-+ ci->top = func+aux; /* correct top */
-+ L->top = ci->top;
- lua_assert(L->top == L->base + clvalue(func)->l.p->maxstacksize);
- ci->savedpc = L->savedpc;
- ci->tailcalls++; /* one more call lost */