[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Unused Barrier
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 26 Nov 2014 15:19:38 -0200
> In 5.3 beta, luaY_parser() there is
>
> funcstate.f = cl->p = luaF_newproto(L);
>
> funcstate.f->source = luaS_new(L, name); /* create and anchor TString */
>
> luaC_objbarrier(L, funcstate.f, funcstate.f->source);
>
> Is the "objcarrier" necessary? It seems that funcstate.f is for sure white
> and the barrier is always a no-op in this case.
I think you are right. (The previous call to 'luaS_new' can trigger an
emergency collection, but then all objects will be white after it.)
Thanks for the feedback,
-- Roberto