diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_gc.c | 7 | ||||
| -rw-r--r-- | src/lj_obj.h | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c index 69e78706..bfa4daa8 100644 --- a/src/lj_gc.c +++ b/src/lj_gc.c | |||
| @@ -554,7 +554,6 @@ static void gc_finalize(lua_State *L) | |||
| 554 | setcdataV(L, &tmp, gco2cd(o)); | 554 | setcdataV(L, &tmp, gco2cd(o)); |
| 555 | tv = lj_tab_set(L, tabref(g->gcroot[GCROOT_FFI_FIN]), &tmp); | 555 | tv = lj_tab_set(L, tabref(g->gcroot[GCROOT_FFI_FIN]), &tmp); |
| 556 | if (!tvisnil(tv)) { | 556 | if (!tvisnil(tv)) { |
| 557 | g->gc.nocdatafin = 0; | ||
| 558 | copyTV(L, &tmp, tv); | 557 | copyTV(L, &tmp, tv); |
| 559 | setnilV(tv); /* Clear entry in finalizer table. */ | 558 | setnilV(tv); /* Clear entry in finalizer table. */ |
| 560 | gc_call_finalizer(g, L, &tmp, o); | 559 | gc_call_finalizer(g, L, &tmp, o); |
| @@ -689,9 +688,6 @@ static size_t gc_onestep(lua_State *L) | |||
| 689 | lj_str_resize(L, g->str.mask >> 1); /* Shrink string table. */ | 688 | lj_str_resize(L, g->str.mask >> 1); /* Shrink string table. */ |
| 690 | if (gcref(g->gc.mmudata)) { /* Need any finalizations? */ | 689 | if (gcref(g->gc.mmudata)) { /* Need any finalizations? */ |
| 691 | g->gc.state = GCSfinalize; | 690 | g->gc.state = GCSfinalize; |
| 692 | #if LJ_HASFFI | ||
| 693 | g->gc.nocdatafin = 1; | ||
| 694 | #endif | ||
| 695 | } else { /* Otherwise skip this phase to help the JIT. */ | 691 | } else { /* Otherwise skip this phase to help the JIT. */ |
| 696 | g->gc.state = GCSpause; /* End of GC cycle. */ | 692 | g->gc.state = GCSpause; /* End of GC cycle. */ |
| 697 | g->gc.debt = 0; | 693 | g->gc.debt = 0; |
| @@ -711,9 +707,6 @@ static size_t gc_onestep(lua_State *L) | |||
| 711 | g->gc.estimate -= GCFINALIZECOST; | 707 | g->gc.estimate -= GCFINALIZECOST; |
| 712 | return GCFINALIZECOST; | 708 | return GCFINALIZECOST; |
| 713 | } | 709 | } |
| 714 | #if LJ_HASFFI | ||
| 715 | if (!g->gc.nocdatafin) lj_tab_rehash(L, tabref(g->gcroot[GCROOT_FFI_FIN])); | ||
| 716 | #endif | ||
| 717 | g->gc.state = GCSpause; /* End of GC cycle. */ | 710 | g->gc.state = GCSpause; /* End of GC cycle. */ |
| 718 | g->gc.debt = 0; | 711 | g->gc.debt = 0; |
| 719 | return 0; | 712 | return 0; |
diff --git a/src/lj_obj.h b/src/lj_obj.h index c0817663..d8b69641 100644 --- a/src/lj_obj.h +++ b/src/lj_obj.h | |||
| @@ -595,7 +595,7 @@ typedef struct GCState { | |||
| 595 | GCSize threshold; /* Memory threshold. */ | 595 | GCSize threshold; /* Memory threshold. */ |
| 596 | uint8_t currentwhite; /* Current white color. */ | 596 | uint8_t currentwhite; /* Current white color. */ |
| 597 | uint8_t state; /* GC state. */ | 597 | uint8_t state; /* GC state. */ |
| 598 | uint8_t nocdatafin; /* No cdata finalizer called. */ | 598 | uint8_t unused0; |
| 599 | #if LJ_64 | 599 | #if LJ_64 |
| 600 | uint8_t lightudnum; /* Number of lightuserdata segments - 1. */ | 600 | uint8_t lightudnum; /* Number of lightuserdata segments - 1. */ |
| 601 | #else | 601 | #else |
