summaryrefslogtreecommitdiff
path: root/src/lj_func.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_func.c')
-rw-r--r--src/lj_func.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_func.c b/src/lj_func.c
index adc8c039..7d130176 100644
--- a/src/lj_func.c
+++ b/src/lj_func.c
@@ -112,8 +112,8 @@ GCfunc *lj_func_newL(lua_State *L, GCproto *pt, GCtab *env)
112 fn->l.gct = ~LJ_TFUNC; 112 fn->l.gct = ~LJ_TFUNC;
113 fn->l.ffid = FF_LUA; 113 fn->l.ffid = FF_LUA;
114 fn->l.nupvalues = cast_byte(pt->sizeuv); 114 fn->l.nupvalues = cast_byte(pt->sizeuv);
115 /* NOBARRIER: The GCfunc is new (marked white). */ 115 /* NOBARRIER: Really a setgcref. But the GCfunc is new (marked white). */
116 setgcref(fn->l.pt, obj2gco(pt)); 116 setmref(fn->l.pc, proto_bc(pt));
117 setgcref(fn->l.env, obj2gco(env)); 117 setgcref(fn->l.env, obj2gco(env));
118 fn->l.gate = (pt->flags & PROTO_IS_VARARG) ? lj_gate_lv : lj_gate_lf; 118 fn->l.gate = (pt->flags & PROTO_IS_VARARG) ? lj_gate_lv : lj_gate_lf;
119 return fn; 119 return fn;
@@ -137,7 +137,7 @@ GCfunc *lj_func_newL_gc(lua_State *L, GCproto *pt, GCfuncL *parent)
137 GCupval *uv; 137 GCupval *uv;
138 if ((v & 0x8000)) { 138 if ((v & 0x8000)) {
139 uv = func_finduv(L, base + (v & 0xff)); 139 uv = func_finduv(L, base + (v & 0xff));
140 uv->dhash = (uint32_t)(uintptr_t)gcref(parent->pt) ^ (v << 24); 140 uv->dhash = (uint32_t)(uintptr_t)mref(parent->pc, char) ^ (v << 24);
141 } else { 141 } else {
142 uv = &gcref(puv[v])->uv; 142 uv = &gcref(puv[v])->uv;
143 } 143 }