Skip to content

Commit 89cc459

Browse files
committed
Fix compilation after merging.
1 parent c7fca03 commit 89cc459

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

gc/default/default.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2610,7 +2610,7 @@ rb_gc_impl_new_obj(void *objspace_ptr, void *cache_ptr, VALUE klass, VALUE flags
26102610
// We first calculate the object size if the object were allocated using Ruby's own GC.
26112611
size_t size_pool_size = heap_slot_size(heap_idx);
26122612
RUBY_ASSERT(size_pool_size % MMTK_MIN_OBJ_ALIGN == 0);
2613-
return rb_mmtk_new_obj(objspace_ptr, cache_ptr, klass, flags, v1, v2, v3, wb_protected, alloc_size, size_pool_size);
2613+
return rb_mmtk_new_obj(objspace_ptr, cache_ptr, klass, flags, wb_protected, alloc_size, size_pool_size);
26142614
})
26152615

26162616
rb_ractor_newobj_cache_t *cache = (rb_ractor_newobj_cache_t *)cache_ptr;
@@ -2976,7 +2976,7 @@ void
29762976
rb_mmtk_each_object_safe(void (*func)(VALUE, void *), void *data)
29772977
{
29782978
// Allocate a tmpbuf object. It's OK if it triggers GC now.
2979-
volatile VALUE tmpbuf = rb_imemo_tmpbuf_auto_free_pointer();
2979+
volatile VALUE tmpbuf = rb_imemo_tmpbuf_new();
29802980

29812981
// Build an array of object references.
29822982
const size_t initial_capacity = 512;

internal/mmtk_support.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ size_t rb_mmtk_get_payload_size(VALUE object);
8686

8787
// Allocation
8888
VALUE
89-
rb_mmtk_new_obj(void *objspace_ptr, void *cache_ptr, VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, bool wb_protected, size_t alloc_size, size_t size_pool_size);
89+
rb_mmtk_new_obj(void *objspace_ptr, void *cache_ptr, VALUE klass, VALUE flags, bool wb_protected, size_t alloc_size, size_t size_pool_size);
9090

9191
// Write barrier
9292
void rb_mmtk_object_reference_write_post(struct rb_mmtk_mutator_local *local, MMTk_ObjectReference object);

mmtk_support.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ rb_mmtk_new_obj_raw(struct rb_mmtk_mutator_local *local, VALUE klass, VALUE flag
560560
// Use this to allocate any other Ruby objects.
561561
// Copied from mmtk.c, with lots of modification.
562562
VALUE
563-
rb_mmtk_new_obj(void *objspace_ptr, void *cache_ptr, VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, bool wb_protected, size_t alloc_size, size_t size_pool_size)
563+
rb_mmtk_new_obj(void *objspace_ptr, void *cache_ptr, VALUE klass, VALUE flags, bool wb_protected, size_t alloc_size, size_t size_pool_size)
564564
{
565565
#define MMTK_ALLOCATION_SEMANTICS_DEFAULT 0
566566
// struct objspace *objspace = objspace_ptr;
@@ -574,11 +574,6 @@ rb_mmtk_new_obj(void *objspace_ptr, void *cache_ptr, VALUE klass, VALUE flags, V
574574
// We just let default.c work out the size pool size and we shall allocate that size.
575575
VALUE obj = rb_mmtk_new_obj_raw(local, klass, flags, wb_protected, size_pool_size);
576576

577-
VALUE *alloc_obj = (VALUE*)obj;
578-
if (alloc_size > 16) alloc_obj[2] = v1;
579-
if (alloc_size > 24) alloc_obj[3] = v2;
580-
if (alloc_size > 32) alloc_obj[4] = v3;
581-
582577
rb_mmtk_maybe_register_initial_obj_free_candidate(local, obj);
583578
rb_mmtk_maybe_register_initial_ppp(local, obj);
584579

0 commit comments

Comments
 (0)