ruby-changes:49802
From: hsbt <ko1@a...>
Date: Thu, 18 Jan 2018 20:44:15 +0900 (JST)
Subject: [ruby-changes:49802] hsbt:r61933 (trunk): Fix typos.
hsbt 2018-01-18 20:44:10 +0900 (Thu, 18 Jan 2018) New Revision: 61933 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61933 Log: Fix typos. * rememberd -> remembered * refered -> referred Modified files: trunk/gc.c trunk/regcomp.c trunk/regparse.c trunk/regparse.h Index: regparse.c =================================================================== --- regparse.c (revision 61932) +++ regparse.c (revision 61933) @@ -1315,7 +1315,7 @@ node_new_quantifier(int lower, int upper https://github.com/ruby/ruby/blob/trunk/regparse.c#L1315 NQTFR(node)->target_empty_info = NQ_TARGET_ISNOT_EMPTY; NQTFR(node)->head_exact = NULL_NODE; NQTFR(node)->next_head_exact = NULL_NODE; - NQTFR(node)->is_refered = 0; + NQTFR(node)->is_referred = 0; if (by_number != 0) NQTFR(node)->state |= NST_BY_NUMBER; Index: regparse.h =================================================================== --- regparse.h (revision 61932) +++ regparse.h (revision 61933) @@ -186,7 +186,7 @@ typedef struct { https://github.com/ruby/ruby/blob/trunk/regparse.h#L186 int target_empty_info; struct _Node* head_exact; struct _Node* next_head_exact; - int is_refered; /* include called node. don't eliminate even if {0} */ + int is_referred; /* include called node. don't eliminate even if {0} */ #ifdef USE_COMBINATION_EXPLOSION_CHECK int comb_exp_check_num; /* 1,2,3...: check, 0: no check */ #endif Index: regcomp.c =================================================================== --- regcomp.c (revision 61932) +++ regcomp.c (revision 61933) @@ -772,7 +772,7 @@ compile_length_quantifier_node(QtfrNode* https://github.com/ruby/ruby/blob/trunk/regcomp.c#L772 } } else if (qn->upper == 0) { - if (qn->is_refered != 0) /* /(?<n>..){0}/ */ + if (qn->is_referred != 0) /* /(?<n>..){0}/ */ len = SIZE_OP_JUMP + tlen; else len = 0; @@ -901,7 +901,7 @@ compile_quantifier_node(QtfrNode* qn, re https://github.com/ruby/ruby/blob/trunk/regcomp.c#L901 } } else if (qn->upper == 0) { - if (qn->is_refered != 0) { /* /(?<n>..){0}/ */ + if (qn->is_referred != 0) { /* /(?<n>..){0}/ */ r = add_opcode_rel_addr(reg, OP_JUMP, tlen); if (r) return r; r = compile_tree(qn->target, reg); @@ -1005,7 +1005,7 @@ compile_length_quantifier_node(QtfrNode* https://github.com/ruby/ruby/blob/trunk/regcomp.c#L1005 else len += SIZE_OP_JUMP + mod_tlen + SIZE_OP_PUSH; } - else if (qn->upper == 0 && qn->is_refered != 0) { /* /(?<n>..){0}/ */ + else if (qn->upper == 0 && qn->is_referred != 0) { /* /(?<n>..){0}/ */ len = SIZE_OP_JUMP + tlen; } else if (!infinite && qn->greedy && @@ -1124,7 +1124,7 @@ compile_quantifier_node(QtfrNode* qn, re https://github.com/ruby/ruby/blob/trunk/regcomp.c#L1124 r = add_opcode_rel_addr(reg, OP_PUSH, -(mod_tlen + (int )SIZE_OP_PUSH)); } } - else if (qn->upper == 0 && qn->is_refered != 0) { /* /(?<n>..){0}/ */ + else if (qn->upper == 0 && qn->is_referred != 0) { /* /(?<n>..){0}/ */ r = add_opcode_rel_addr(reg, OP_JUMP, tlen); if (r) return r; r = compile_tree(qn->target, reg); @@ -3106,7 +3106,7 @@ subexp_recursive_check_trav(Node* node, https://github.com/ruby/ruby/blob/trunk/regcomp.c#L3106 r = subexp_recursive_check_trav(NQTFR(node)->target, env); if (NQTFR(node)->upper == 0) { if (r == FOUND_CALLED_NODE) - NQTFR(node)->is_refered = 1; + NQTFR(node)->is_referred = 1; } break; Index: gc.c =================================================================== --- gc.c (revision 61932) +++ gc.c (revision 61933) @@ -1105,7 +1105,7 @@ check_rvalue_consistency(const VALUE obj https://github.com/ruby/ruby/blob/trunk/gc.c#L1105 rb_bug("check_rvalue_consistency: %s is uncollectible, but not old (age: %d) and not WB unprotected.", obj_info(obj), age); } if (remembered_bit && age != RVALUE_OLD_AGE) { - rb_bug("check_rvalue_consistency: %s is rememberd, but not old (age: %d).", obj_info(obj), age); + rb_bug("check_rvalue_consistency: %s is remembered, but not old (age: %d).", obj_info(obj), age); } } @@ -4928,7 +4928,7 @@ reflist_dump(struct reflist *refs) https://github.com/ruby/ruby/blob/trunk/gc.c#L4928 } static int -reflist_refered_from_machine_context(struct reflist *refs) +reflist_referred_from_machine_context(struct reflist *refs) { int i; for (i=0; i<refs->pos; i++) { @@ -5071,7 +5071,7 @@ gc_check_after_marks_i(st_data_t k, st_d https://github.com/ruby/ruby/blob/trunk/gc.c#L5071 fprintf(stderr, "gc_check_after_marks_i: %p is referred from ", (void *)obj); reflist_dump(refs); - if (reflist_refered_from_machine_context(refs)) { + if (reflist_referred_from_machine_context(refs)) { fprintf(stderr, " (marked from machine stack).\n"); /* marked from machine context can be false positive */ } @@ -5222,7 +5222,7 @@ gc_verify_heap_page(rb_objspace_t *objsp https://github.com/ruby/ruby/blob/trunk/gc.c#L5222 int i; unsigned int has_remembered_shady = FALSE; unsigned int has_remembered_old = FALSE; - int rememberd_old_objects = 0; + int remembered_old_objects = 0; int free_objects = 0; int zombie_objects = 0; @@ -5235,7 +5235,7 @@ gc_verify_heap_page(rb_objspace_t *objsp https://github.com/ruby/ruby/blob/trunk/gc.c#L5235 } if (RVALUE_PAGE_MARKING(page, val)) { has_remembered_old = TRUE; - rememberd_old_objects++; + remembered_old_objects++; } } @@ -5249,7 +5249,7 @@ gc_verify_heap_page(rb_objspace_t *objsp https://github.com/ruby/ruby/blob/trunk/gc.c#L5249 } } rb_bug("page %p's has_remembered_objects should be false, but there are remembered old objects (%d). %s", - (void *)page, rememberd_old_objects, obj ? obj_info(obj) : ""); + (void *)page, remembered_old_objects, obj ? obj_info(obj) : ""); } if (page->flags.has_uncollectible_shady_objects == FALSE && has_remembered_shady == TRUE) { @@ -5267,7 +5267,7 @@ gc_verify_heap_page(rb_objspace_t *objsp https://github.com/ruby/ruby/blob/trunk/gc.c#L5267 rb_bug("page %p's final_slots should be %d, but %d\n", (void *)page, (int)page->final_slots, zombie_objects); } - return rememberd_old_objects; + return remembered_old_objects; #else return 0; #endif @@ -5276,25 +5276,25 @@ gc_verify_heap_page(rb_objspace_t *objsp https://github.com/ruby/ruby/blob/trunk/gc.c#L5276 static int gc_verify_heap_pages_(rb_objspace_t *objspace, struct heap_page *page) { - int rememberd_old_objects = 0; + int remembered_old_objects = 0; while (page) { if (page->flags.has_remembered_objects == FALSE) { - rememberd_old_objects += gc_verify_heap_page(objspace, page, Qfalse); + remembered_old_objects += gc_verify_heap_page(objspace, page, Qfalse); } page = page->next; } - return rememberd_old_objects; + return remembered_old_objects; } static int gc_verify_heap_pages(rb_objspace_t *objspace) { - int rememberd_old_objects = 0; - rememberd_old_objects = gc_verify_heap_pages_(objspace, heap_eden->pages); - rememberd_old_objects = gc_verify_heap_pages_(objspace, heap_tomb->pages); - return rememberd_old_objects; + int remembered_old_objects = 0; + remembered_old_objects = gc_verify_heap_pages_(objspace, heap_eden->pages); + remembered_old_objects = gc_verify_heap_pages_(objspace, heap_tomb->pages); + return remembered_old_objects; } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/