-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use AO_t type for hb_marks, hb_sz, hb_descr fields
(refactoring) * docs/tree.md (A picture): Change type of hb_marks[] from word to AO_t. * include/private/gc_pmark.h [USE_MARK_BYTES] (SET_MARK_BIT_EXIT_IF_SET): Reformat code. * include/private/gc_pmark.h [USE_MARK_BYTES && (!PARALLEL_MARK || !AO_HAVE_char_store || BASE_ATOMIC_OPS_EMULATED)] (SET_MARK_BIT_EXIT_IF_SET): Change type of mark_byte_addr local variable from char* to ptr_t. * include/private/gc_pmark.h [!USE_MARK_BYTES && (PARALLEL_MARK || THREAD_SANITIZER && THREADS)] (MARK_WORD_READ): New macro. * include/private/gc_pmark.h [!USE_MARK_BYTES] (OR_WORD_EXIT_IF_SET): Remove macro. * include/private/gc_pmark.h [!USE_MARK_BYTES] (SET_MARK_BIT_EXIT_IF_SET): Expand OR_WORD_EXIT_IF_SET() macro. * include/private/gc_pmark.h [!USE_MARK_BYTES && (PARALLEL_MARK || THREAD_SANITIZER && THREADS)] (SET_MARK_BIT_EXIT_IF_SET): Use MARK_WORD_READ(). * include/private/gc_priv.h [THREADS && AO_HAVE_or] (set_pht_entry_from_index_concurrent): Remove cast of bl argument. * include/private/gc_priv.h (word_ptr_ao_u): Remove type. * include/private/gc_priv.h [AO_HAVE_load] (hblkhdr.hb_sz, hblkhdr.hb_descr): Use volatile AO_t type instead of size_t; reformat comment. * include/private/gc_priv.h [!USE_MARK_BYTES && (PARALLEL_MARK || THREAD_SANITIZER && THREADS)] (hblkhdr.hb_marks): Use volatile AO_t[] type instead of word[]. * include/private/gc_priv.h [PARALLEL_MARK] (GC_ms_entry.mse_descr): Use volatile AO_t type instead of word_ptr_ao_u. * include/private/gc_priv.h [!PARALLEL_MARK] (GC_ms_entry.mse_descr): Use word type instead of word_ptr_ao_u. * include/private/gc_priv.h (mark_bit_from_hdr): Reformat comments. * include/private/gc_priv.h [USE_MARK_BYTES] (set_mark_bit_from_hdr): Cast result to void. * include/private/gc_priv.h (clear_mark_bit_from_hdr): Likewise. * include/private/gc_priv.h [!USE_MARK_BYTES && (PARALLEL_MARK || THREAD_SANITIZER && THREADS)] (OR_WORD): Do not cast arguments. * mallocx.c [AO_HAVE_store] (GC_realloc): Remove assertion about sizeof hb_sz. * mark.c [AO_HAVE_load] (GC_clear_hdr_marks, GC_push_marked): Remove cast of AO_load() actual argument. * mallocx.c [AO_HAVE_store] (GC_realloc): Likewise. * reclaim.c [AO_HAVE_load] (IS_PTRFREE_SAFE, GC_reclaim_block): Likewise. * mark.c [AO_HAVE_load] (GC_clear_hdr_marks): Pass hhdr->hb_marks to BZERO() thru CAST_AWAY_VOLATILE_PVOID(). * mark.c (GC_mark_from, GC_push_all, GC_signal_mark_stack_overflow): Remove ".w" for mse_descr field access. * mark.c [PARALLEL_MARK] (GC_steal_mark_stack, GC_help_marker): Likewise. * typd_mlc.c (GC_push_complex_descriptor, GC_array_mark_proc): Likewise. * mark.c [!SMALL_CONFIG && !USE_MARK_BYTES && !MARK_BIT_PER_OBJ && GC_GRANULE_PTRS<=4] (GC_push_marked1, GC_push_marked2, GC_push_marked4): Use CAST_AWAY_VOLATILE_PVOID() to set mark_word_addr local variable. * misc.c [!CPPCHECK && AO_HAVE_store] (GC_init): Add assertion that sizeof AO_t is same as that of word; add comment. * misc.c (block_add_size): Remove redundant casts to word. * reclaim.c [!NO_DEBUGGING && USE_MARK_BYTES] (GC_n_set_marks): Cast hhdr->hb_marks[i] to unsigned.
- Loading branch information
Showing
8 changed files
with
96 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.