summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-18 11:44:10 (GMT)
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-18 11:44:10 (GMT)
commitef9bc609dbcae4c054104e9d2aeeaab7211882bc (patch)
treed28cf90c0fb0c7b5c1e0b2b0558acede2b9f3333
parent37f0d53290f331f9db83c9450d788ca005e8d636 (diff)
Fix typos.
* rememberd -> remembered * refered -> referred git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--gc.c28
-rw-r--r--regcomp.c10
-rw-r--r--regparse.c2
-rw-r--r--regparse.h2
4 files changed, 21 insertions, 21 deletions
diff --git a/gc.c b/gc.c
index 0316cf24..7541575 100644
--- a/gc.c
+++ b/gc.c
@@ -1105,7 +1105,7 @@ check_rvalue_consistency(const VALUE obj)
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)
}
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_data_t v, void *ptr)
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 *objspace, struct heap_page *page, VALUE obj)
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 *objspace, struct heap_page *page, VALUE obj)
}
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 *objspace, struct heap_page *page, VALUE obj)
}
}
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 *objspace, struct heap_page *page, VALUE obj)
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 *objspace, struct heap_page *page, VALUE obj)
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;
}
/*
diff --git a/regcomp.c b/regcomp.c
index 59b1f40..0f6bee6 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -772,7 +772,7 @@ compile_length_quantifier_node(QtfrNode* qn, regex_t* reg)
}
}
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, regex_t* reg)
}
}
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* qn, regex_t* reg)
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, regex_t* reg)
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, ScanEnv* env)
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;
diff --git a/regparse.c b/regparse.c
index 431aad9..8a43fff 100644
--- a/regparse.c
+++ b/regparse.c
@@ -1315,7 +1315,7 @@ node_new_quantifier(int lower, int upper, int by_number)
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;
diff --git a/regparse.h b/regparse.h
index 888ebf4..acdd3e2 100644
--- a/regparse.h
+++ b/regparse.h
@@ -186,7 +186,7 @@ typedef struct {
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