New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation
authorIvan Maidanski <ivmai@mail.ru>
Sun, 1 Jul 2018 13:53:15 +0000 (16:53 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 1 Jul 2018 13:53:15 +0000 (16:53 +0300)
commit2e7daad62ee243556b67109535ddfacfb11a0160
treecfaaf493c0fe2642721f0b7ec1e8eae9fa8d1f62
parentc6107dca026f023f96af3f66f465a0727389ff7c
New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation

* cord/cordbscs.c (CORD_cat_char_star, CORD_cat, CORD_from_fn_inner,
CORD_substr_closure): Replace the last store to the heap-allocated
object, GC_END_STUBBORN_CHANGE() and GC_reachable_here() with
GC_PTR_STORE_AND_DIRTY() call.
* cord/tests/de.c (prune_map, add_map, replace_line): Likewise.
* include/gc_inline.h (GC_CONS): Likewise.
* tests/disclaim_test.c (pair_dct, pair_new): Likewise.
* tests/test.c [!VERY_SMALL_CONFIG] (cons): Likewise.
* tests/test.c (small_cons, small_cons_uncollectable,
reverse_test_inner, mktree): Likewise.
* tests/test.c [GC_GCJ_SUPPORT] (gcj_cons): Likewise.
* tests/test.c [GC_PTHREADS && !SMALL_CONFIG && !GC_DEBUG]
(alloc8bytes): Likewise.
* tests/test.c [!NO_TYPED_TEST] (typed_test): Likewise.
* tests/test_cpp.cc (main): Likewise.
* dbg_mlc.c (GC_debug_ptr_store_and_dirty): Implement.
* mallocx.c (GC_ptr_store_and_dirty): Likewise.
* include/gc.h (GC_PTR_STORE_AND_DIRTY): New public macro.
* include/gc.h (GC_debug_ptr_store_and_dirty, GC_ptr_store_and_dirty):
Declare new public API function; add comment.
* tests/test.c (reverse_test_inner): Remove tmp local variable.
* tests/test.c (mktree): Remove right_left local variable.
cord/cordbscs.c
cord/tests/de.c
dbg_mlc.c
include/gc.h
include/gc_inline.h
mallocx.c
tests/disclaim_test.c
tests/test.c
tests/test_cpp.cc