summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
-rw-r--r--gc.c25
1 files changed, 23 insertions, 2 deletions
@@ -106,6 +106,7 @@
#include "symbol.h"
#include "transient_heap.h"
#include "vm_core.h"
#include "builtin.h"
@@ -2892,6 +2893,9 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
case imemo_parser_strterm:
RB_DEBUG_COUNTER_INC(obj_imemo_parser_strterm);
break;
default:
/* unreachable */
break;
@@ -5202,7 +5206,10 @@ gc_mark_ptr(rb_objspace_t *objspace, VALUE obj)
if (LIKELY(objspace->mark_func_data == NULL)) {
rgengc_check_relation(objspace, obj);
if (!gc_mark_set(objspace, obj)) return; /* already marked */
- if (RB_TYPE_P(obj, T_NONE)) rb_bug("try to mark T_NONE object"); /* check here will help debugging */
gc_aging(objspace, obj);
gc_grey(objspace, obj);
}
@@ -5326,6 +5333,8 @@ gc_mark_imemo(rb_objspace_t *objspace, VALUE obj)
case imemo_parser_strterm:
rb_strterm_mark(obj);
return;
#if VM_CHECK_MODE > 0
default:
VM_UNREACHABLE(gc_mark_imemo);
@@ -8119,6 +8128,7 @@ gc_ref_update_imemo(rb_objspace_t *objspace, VALUE obj)
break;
case imemo_parser_strterm:
case imemo_tmpbuf:
break;
default:
rb_bug("not reachable %d", imemo_type(obj));
@@ -11595,6 +11605,7 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
IMEMO_NAME(tmpbuf);
IMEMO_NAME(ast);
IMEMO_NAME(parser_strterm);
#undef IMEMO_NAME
default: UNREACHABLE;
}
@@ -11621,6 +11632,16 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
rb_raw_iseq_info(BUFF_ARGS, iseq);
break;
}
default:
break;
}
@@ -11676,7 +11697,7 @@ rb_obj_info_dump(VALUE obj)
fprintf(stderr, "rb_obj_info_dump: %s\n", rb_raw_obj_info(buff, 0x100, obj));
}
-void
rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func)
{
char buff[0x100];