mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 23:44:08 +00:00
Initialise uv->immutable for upvalues of loaded chunks.
This commit is contained in:
parent
03b03ef683
commit
64f69f658f
@ -140,7 +140,9 @@ GCfunc *lj_func_newL_empty(lua_State *L, GCproto *pt, GCtab *env)
|
|||||||
/* NOBARRIER: The GCfunc is new (marked white). */
|
/* NOBARRIER: The GCfunc is new (marked white). */
|
||||||
for (i = 0; i < nuv; i++) {
|
for (i = 0; i < nuv; i++) {
|
||||||
GCupval *uv = func_emptyuv(L);
|
GCupval *uv = func_emptyuv(L);
|
||||||
uv->dhash = (uint32_t)(uintptr_t)pt ^ ((uint32_t)proto_uv(pt)[i] << 24);
|
uint32_t v = proto_uv(pt)[i];
|
||||||
|
uv->immutable = ((v / PROTO_UV_IMMUTABLE) & 1);
|
||||||
|
uv->dhash = (uint32_t)(uintptr_t)pt ^ (v << 24);
|
||||||
setgcref(fn->l.uvptr[i], obj2gco(uv));
|
setgcref(fn->l.uvptr[i], obj2gco(uv));
|
||||||
}
|
}
|
||||||
fn->l.nupvalues = (uint8_t)nuv;
|
fn->l.nupvalues = (uint8_t)nuv;
|
||||||
|
Loading…
Reference in New Issue
Block a user