[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Question regarding back-porting Lua 5.4 GC to 5.3
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 22 Jun 2020 10:39:15 -0300
> I am trying to understand whether to backport the 5.4 GC to 5.3 one
> would need some of the other changes that were made or are these
> orthogonal to the GC. In particular will the 5.4 GC work correctly if
> the UpValue model was left as is in 5.3?
The changes themselves are certainly not orthogonal, as the
implementation of the GC is intimately connected to the implementation
of the data graph. In a more abstract level, I don't know. In
particular, the management of upvalues is somewhat complex, due to the
fact that stacks do not have write barriers, so Lua can change the
values of open upvalues behind their backs.
However, the upvalue model was changed after the new GC, so there
was a time when Lua (internally) had generational GC with the
old upvalue model. I don't remember exactly why we changed. The
comment says only "simpler and better for generational mode"
(see commit a3d36fe2).