No longer let the GC replace dead keys with the LJ_TDEADKEY tag.
Important: this changes the semantics of the write barrier! Carefully read the big comment block in lj_obj.h This helps HREFK key slot specialization and allows safely hoisting HREF/HREFK across GC steps, too (fix for a barely reproducible bug). Dead keys are only removed during a table resize (as before).
This commit is contained in:
@@ -1351,8 +1351,9 @@ LJFOLDF(fwd_xload)
|
||||
/* Write barriers are amenable to CSE, but not across any incremental
|
||||
** GC steps.
|
||||
**
|
||||
** The same logic applies to open upvalue references, because the stack
|
||||
** may be resized during a GC step.
|
||||
** The same logic applies to open upvalue references, because a stack
|
||||
** may be resized during a GC step (not the current stack, but maybe that
|
||||
** of a coroutine).
|
||||
*/
|
||||
LJFOLD(TBAR any)
|
||||
LJFOLD(OBAR any any)
|
||||
|
||||
Reference in New Issue
Block a user