-@@ -693,7 +695,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);
+@@ -895,7 +900,7 @@ void luaV_execute (lua_State *L, int nex
+ if (--nexeccalls == 0) /* was previous function running `here'? */
+ return; /* no: return */
+ else { /* yes: continue its execution */
+- if (b) L->top = L->ci->top;
++ if (b) setlvmtop(L, L->ci->top);
+ lua_assert(isLua(L->ci));
+ lua_assert(GET_OPCODE(*((L->ci)->savedpc - 1)) == OP_CALL);
+ goto reentry;
+@@ -986,6 +991,7 @@ void luaV_execute (lua_State *L, int nex
+ for (; n > 0; n--) {
+ TValue *val = ra+n;
+ setobj2t(L, luaH_setint(L, h, last--), val);
++ setnilvalue(L, val);
+ luaC_barriert(L, h, val);
+ }