1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* expand tabs. [ci skip]

Tabs were expanded because the file did not have any tab indentation in unedited lines.
Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
This commit is contained in:
git 2022-09-27 01:21:58 +09:00
parent 9ddfd2ca00
commit 830b5b5c35
3 changed files with 21 additions and 21 deletions

View file

@ -2459,7 +2459,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
generated_iseq[code_index + 1 + j] = (VALUE)ic; generated_iseq[code_index + 1 + j] = (VALUE)ic;
} }
break; break;
case TS_IVC: /* inline ivar cache */ case TS_IVC: /* inline ivar cache */
{ {
unsigned int ic_index = FIX2UINT(operands[j]); unsigned int ic_index = FIX2UINT(operands[j]);
vm_ic_attr_index_initialize(((IVC)&body->is_entries[ic_index]), INVALID_SHAPE_ID); vm_ic_attr_index_initialize(((IVC)&body->is_entries[ic_index]), INVALID_SHAPE_ID);

4
gc.c
View file

@ -3779,8 +3779,8 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
RB_DEBUG_COUNTER_INC(obj_imemo_shape); RB_DEBUG_COUNTER_INC(obj_imemo_shape);
break; break;
} }
} }
return TRUE; return TRUE;
default: default:
rb_bug("gc_sweep(): unknown data type 0x%x(%p) 0x%"PRIxVALUE, rb_bug("gc_sweep(): unknown data type 0x%x(%p) 0x%"PRIxVALUE,

View file

@ -1048,7 +1048,7 @@ rb_mark_generic_ivar(VALUE obj)
#if !SHAPE_IN_BASIC_FLAGS #if !SHAPE_IN_BASIC_FLAGS
rb_gc_mark((VALUE)rb_shape_get_shape_by_id(ivtbl->shape_id)); rb_gc_mark((VALUE)rb_shape_get_shape_by_id(ivtbl->shape_id));
#endif #endif
gen_ivtbl_mark(ivtbl); gen_ivtbl_mark(ivtbl);
} }
} }
@ -1077,7 +1077,7 @@ rb_generic_ivar_memsize(VALUE obj)
struct gen_ivtbl *ivtbl; struct gen_ivtbl *ivtbl;
if (rb_gen_ivtbl_get(obj, 0, &ivtbl)) if (rb_gen_ivtbl_get(obj, 0, &ivtbl))
return gen_ivtbl_bytes(ivtbl->numiv); return gen_ivtbl_bytes(ivtbl->numiv);
return 0; return 0;
} }
@ -1779,17 +1779,17 @@ rb_ivar_count(VALUE obj)
switch (BUILTIN_TYPE(obj)) { switch (BUILTIN_TYPE(obj)) {
case T_OBJECT: case T_OBJECT:
if (rb_shape_get_shape(obj)->iv_count > 0) { if (rb_shape_get_shape(obj)->iv_count > 0) {
st_index_t i, count, num = ROBJECT_NUMIV(obj); st_index_t i, count, num = ROBJECT_NUMIV(obj);
const VALUE *const ivptr = ROBJECT_IVPTR(obj); const VALUE *const ivptr = ROBJECT_IVPTR(obj);
for (i = count = 0; i < num; ++i) { for (i = count = 0; i < num; ++i) {
if (ivptr[i] != Qundef) { if (ivptr[i] != Qundef) {
count++; count++;
} }
} }
return count; return count;
} }
break; break;
case T_CLASS: case T_CLASS:
case T_MODULE: case T_MODULE:
if ((tbl = RCLASS_IV_TBL(obj)) != 0) { if ((tbl = RCLASS_IV_TBL(obj)) != 0) {
@ -1800,11 +1800,11 @@ rb_ivar_count(VALUE obj)
if (FL_TEST(obj, FL_EXIVAR)) { if (FL_TEST(obj, FL_EXIVAR)) {
struct gen_ivtbl *ivtbl; struct gen_ivtbl *ivtbl;
if (rb_gen_ivtbl_get(obj, 0, &ivtbl)) { if (rb_gen_ivtbl_get(obj, 0, &ivtbl)) {
return gen_ivtbl_count(ivtbl); return gen_ivtbl_count(ivtbl);
} }
} }
break; break;
} }
return 0; return 0;
} }