diff options
author | Mike Pall <mike> | 2010-04-21 01:45:58 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2010-04-21 01:45:58 +0200 |
commit | ab45481199e9c9dd3efec922647bcec122504bcb (patch) | |
tree | 0484341edff50a0afe98133ad66fb6a59915996a /src/lj_opt_fold.c | |
parent | d8cb69ed076c3444258f63314662451c9d117cae (diff) | |
download | luajit-ab45481199e9c9dd3efec922647bcec122504bcb.tar.gz luajit-ab45481199e9c9dd3efec922647bcec122504bcb.tar.bz2 luajit-ab45481199e9c9dd3efec922647bcec122504bcb.zip |
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_opt_fold.c')
-rw-r--r-- | src/lj_opt_fold.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c index c91f3382..69ade882 100644 --- a/src/lj_opt_fold.c +++ b/src/lj_opt_fold.c | |||
@@ -1351,8 +1351,9 @@ LJFOLDF(fwd_xload) | |||
1351 | /* Write barriers are amenable to CSE, but not across any incremental | 1351 | /* Write barriers are amenable to CSE, but not across any incremental |
1352 | ** GC steps. | 1352 | ** GC steps. |
1353 | ** | 1353 | ** |
1354 | ** The same logic applies to open upvalue references, because the stack | 1354 | ** The same logic applies to open upvalue references, because a stack |
1355 | ** may be resized during a GC step. | 1355 | ** may be resized during a GC step (not the current stack, but maybe that |
1356 | ** of a coroutine). | ||
1356 | */ | 1357 | */ |
1357 | LJFOLD(TBAR any) | 1358 | LJFOLD(TBAR any) |
1358 | LJFOLD(OBAR any any) | 1359 | LJFOLD(OBAR any any) |