diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-03-30 16:36:31 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 20:36:31 +1300 |
commit | 42a0bed351979cb4a59c641fa5f03e49609561fd (patch) | |
tree | 615a891e8fa9fbf6f3747d070fc03302341974dc /mjit.c | |
parent | 8d27d00af514153819e44eb8e5f4f8631830ae55 (diff) |
Prefix ccan headers (#4568)
* Prefixed ccan headers
* Remove unprefixed names in ccan/build_assert
* Remove unprefixed names in ccan/check_type
* Remove unprefixed names in ccan/container_of
* Remove unprefixed names in ccan/list
Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
Notes
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -117,7 +117,7 @@ mjit_update_references(const rb_iseq_t *iseq) // `ISEQ_BODY(iseq)->jit_unit` anymore (because new one replaces that). So we need to check them too. // TODO: we should be able to reduce the number of units checked here. struct rb_mjit_unit *unit = NULL; - list_for_each(&stale_units.head, unit, unode) { + ccan_list_for_each(&stale_units.head, unit, unode) { if (unit->iseq == iseq) { unit->iseq = (rb_iseq_t *)rb_gc_location((VALUE)unit->iseq); } @@ -145,7 +145,7 @@ mjit_free_iseq(const rb_iseq_t *iseq) // `ISEQ_BODY(iseq)->jit_unit` anymore (because new one replaces that). So we need to check them too. // TODO: we should be able to reduce the number of units checked here. struct rb_mjit_unit *unit = NULL; - list_for_each(&stale_units.head, unit, unode) { + ccan_list_for_each(&stale_units.head, unit, unode) { if (unit->iseq == iseq) { unit->iseq = NULL; } @@ -161,8 +161,8 @@ free_list(struct rb_mjit_unit_list *list, bool close_handle_p) { struct rb_mjit_unit *unit = 0, *next; - list_for_each_safe(&list->head, unit, next, unode) { - list_del(&unit->unode); + ccan_list_for_each_safe(&list->head, unit, next, unode) { + ccan_list_del(&unit->unode); if (!close_handle_p) unit->handle = NULL; /* Skip dlclose in free_unit() */ if (list == &stale_units) { // `free_unit(unit)` crashes after GC.compact on `stale_units` @@ -886,7 +886,7 @@ skip_cleaning_object_files(struct rb_mjit_unit_list *list) struct rb_mjit_unit *unit = NULL, *next; // No mutex for list, assuming MJIT worker does not exist yet since it's immediately after fork. - list_for_each_safe(&list->head, unit, next, unode) { + ccan_list_for_each_safe(&list->head, unit, next, unode) { #if defined(_WIN32) // mswin doesn't reach here either. This is for MinGW. if (unit->so_file) unit->so_file = NULL; #endif @@ -930,7 +930,7 @@ mjit_dump_total_calls(void) { struct rb_mjit_unit *unit; fprintf(stderr, "[MJIT_COUNTER] total_calls of active_units:\n"); - list_for_each(&active_units.head, unit, unode) { + ccan_list_for_each(&active_units.head, unit, unode) { const rb_iseq_t *iseq = unit->iseq; fprintf(stderr, "%8ld: %s@%s:%d\n", ISEQ_BODY(iseq)->total_calls, RSTRING_PTR(ISEQ_BODY(iseq)->location.label), RSTRING_PTR(rb_iseq_path(iseq)), FIX2INT(ISEQ_BODY(iseq)->location.first_lineno)); @@ -1036,7 +1036,7 @@ mjit_mark(void) i++; } } - list_for_each(&active_units.head, unit, unode) { + ccan_list_for_each(&active_units.head, unit, unode) { iseqs[i] = unit->iseq; i++; } |