Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ jobs:
# - { key: cppflags, name: USE_GC_MALLOC_OBJ_INFO_DETAILS, value: '-DUSE_GC_MALLOC_OBJ_INFO_DETAILS' }
- { key: cppflags, name: USE_LAZY_LOAD, value: '-DUSE_LAZY_LOAD' }
# - { key: cppflags, name: USE_RINCGC=0, value: '-DUSE_RINCGC=0' }
- { key: cppflags, name: USE_RVARGC=1, value: '-DUSE_RVARGC=1' }
# - { key: cppflags, name: USE_SYMBOL_GC=0, value: '-DUSE_SYMBOL_GC=0' }
# - { key: cppflags, name: USE_THREAD_CACHE=0, value: '-DUSE_THREAD_CACHE=0' }
# - { key: cppflags, name: USE_TRANSIENT_HEAP=0, value: '-DUSE_TRANSIENT_HEAP=0' }
Expand Down
5 changes: 5 additions & 0 deletions class.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,13 @@ rb_class_detach_module_subclasses(VALUE klass)
static VALUE
class_alloc(VALUE flags, VALUE klass)
{
#if USE_RVARGC
NEWOBJ_OF_SIZE(obj, struct RClass, klass, (flags & T_MASK) | FL_PROMOTED1 /* start from age == 2 */ | (RGENGC_WB_PROTECTED_CLASS ? FL_WB_PROTECTED : 0), sizeof(rb_classext_t));
obj->ptr = rb_payload_start_zero((VALUE)obj);
#else
NEWOBJ_OF(obj, struct RClass, klass, (flags & T_MASK) | FL_PROMOTED1 /* start from age == 2 */ | (RGENGC_WB_PROTECTED_CLASS ? FL_WB_PROTECTED : 0));
obj->ptr = ZALLOC(rb_classext_t);
#endif
/* ZALLOC
RCLASS_IV_TBL(obj) = 0;
RCLASS_CONST_TBL(obj) = 0;
Expand Down
10 changes: 10 additions & 0 deletions ext/objspace/objspace_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,12 @@ dump_object(VALUE obj, struct dump_config *dc)
dump_append_ref(dc, obj);

dump_append(dc, ", \"type\":\"");
#if USE_RVARGC
if (rb_is_payload_object(obj)) {
dump_append(dc, "PAYLOAD\" }\n");
return;
}
#endif
dump_append(dc, obj_type(obj));
dump_append(dc, "\"");

Expand Down Expand Up @@ -636,7 +642,11 @@ objspace_dump_all(VALUE os, VALUE output, VALUE full, VALUE since)
}

/* dump all objects */
#if USE_RVARGC
rb_objspace_each_objects_with_payload(heap_i, &dc);
#else
rb_objspace_each_objects(heap_i, &dc);
#endif

return dump_result(&dc);
}
Expand Down
Loading