summaryrefslogtreecommitdiff
path: root/src/lj_gc.h
diff options
context:
space:
mode:
authorMike Pall <mike>2010-04-21 01:45:58 +0200
committerMike Pall <mike>2010-04-21 01:45:58 +0200
commitab45481199e9c9dd3efec922647bcec122504bcb (patch)
tree0484341edff50a0afe98133ad66fb6a59915996a /src/lj_gc.h
parentd8cb69ed076c3444258f63314662451c9d117cae (diff)
downloadluajit2-ab45481199e9c9dd3efec922647bcec122504bcb.tar.gz
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).
Diffstat (limited to 'src/lj_gc.h')
-rw-r--r--src/lj_gc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lj_gc.h b/src/lj_gc.h
index 7279b93c..3d213eb3 100644
--- a/src/lj_gc.h
+++ b/src/lj_gc.h
@@ -69,6 +69,8 @@ LJ_FUNC void lj_gc_barriertrace(global_State *g, void *T);
#endif
/* Barrier for stores to table objects. TValue and GCobj variant. */
+#define lj_gc_anybarriert(L, t) \
+ { if (isblack(obj2gco(t))) lj_gc_barrierback(G(L), (t)); }
#define lj_gc_barriert(L, t, tv) \
{ if (tviswhite(tv) && isblack(obj2gco(t))) \
lj_gc_barrierback(G(L), (t)); }