@@ -2917,7 +2917,6 @@ rb_gc_impl_new_obj(void *objspace_ptr, void *cache_ptr, VALUE klass, VALUE flags
29172917 gc_release_mark_lock (objspace );
29182918 }
29192919 if (borrowing ) {
2920- rb_register_received_obj (objspace -> local_gate , GET_RACTOR ()-> borrowing_sync .borrowing_id , obj );
29212920 rb_borrowing_sync_unlock (objspace -> ractor );
29222921 }
29232922
@@ -5132,22 +5131,9 @@ check_not_tnone(VALUE obj)
51325131static bool
51335132confirm_global_connections (rb_objspace_t * objspace , VALUE obj )
51345133{
5135- if (!ruby_single_main_objspace ) {
5136- if (objspace -> flags .during_global_gc ) {
5137- VM_ASSERT (is_full_marking (objspace ));
5138- if (objspace -> local_gate -> current_parent_objspace != GET_OBJSPACE_OF_VALUE (obj )) {
5139- check_not_tnone (obj );
5140- mark_in_external_reference_tbl (objspace -> local_gate -> current_parent_objspace -> local_gate , obj );
5141- }
5142- }
5143- else {
5144- if (!in_local_marking_range (objspace , obj )) {
5145- if (is_full_marking (objspace )) {
5146- check_not_tnone (obj );
5147- mark_in_external_reference_tbl (objspace -> local_gate , obj );
5148- }
5149- return false;
5150- }
5134+ if (using_local_limits (objspace )) {
5135+ if (!in_local_marking_range (objspace , obj )) {
5136+ return false;
51515137 }
51525138 }
51535139 return true;
@@ -6237,7 +6223,6 @@ gc_marks_finish(rb_objspace_t *objspace)
62376223
62386224 gc_update_weak_references (objspace );
62396225 gc_update_external_weak_references (objspace -> local_gate );
6240- if (is_full_marking (objspace )) update_shared_object_references (objspace -> local_gate );
62416226 if (!using_local_limits (objspace )) update_shareable_object_tbl (objspace -> local_gate );
62426227
62436228#if RGENGC_CHECK_MODE >= 2
@@ -6601,9 +6586,6 @@ gc_marks_prepare(rb_objspace_t *objspace, int full_mark)
66016586 gc_report (1 , objspace , "gc_marks_start: (%s)\n" , full_mark ? "full" : "minor" );
66026587 gc_mode_transition (objspace , gc_mode_marking );
66036588
6604- VM_ASSERT (count_objspaces (GET_VM ()) > 1 || (shared_reference_tbl_empty (objspace -> local_gate ) && external_reference_tbl_empty (objspace -> local_gate )));
6605- confirm_externally_added_external_references (objspace -> local_gate );
6606-
66076589 if (full_mark ) {
66086590 size_t incremental_marking_steps = (objspace -> rincgc .pooled_slots / INCREMENTAL_MARK_STEP_ALLOCATIONS ) + 1 ;
66096591 objspace -> rincgc .step_slots = (objspace -> marked_slots * 2 ) / incremental_marking_steps ;
@@ -10944,20 +10926,6 @@ rb_gc_impl_objspace_init(void *objspace_ptr, void *ractor)
1094410926 objspace_setup (objspace , ractor );
1094510927}
1094610928
10947- static VALUE
10948- gc_external_reference_p (VALUE _ , VALUE v )
10949- {
10950- rb_objspace_t * objspace = rb_gc_get_objspace ();
10951- return RBOOL (rb_external_reference_tbl_contains (objspace -> local_gate , v ));
10952- }
10953-
10954- static VALUE
10955- gc_shared_reference_p (VALUE _ , VALUE v )
10956- {
10957- rb_objspace_t * objspace = rb_gc_get_objspace ();
10958- return RBOOL (rb_shared_reference_tbl_contains (objspace -> local_gate , v ));
10959- }
10960-
1096110929void
1096210930rb_gc_impl_init (void )
1096310931{
@@ -10978,9 +10946,6 @@ rb_gc_impl_init(void)
1097810946 /* Internal constants in the garbage collector. */
1097910947 rb_define_const (rb_mGC , "INTERNAL_CONSTANTS" , gc_constants );
1098010948
10981- rb_define_singleton_method (rb_mGC , "external_reference?" , gc_external_reference_p , 1 );
10982- rb_define_singleton_method (rb_mGC , "shared_reference?" , gc_shared_reference_p , 1 );
10983-
1098410949 if (GC_COMPACTION_SUPPORTED ) {
1098510950 rb_define_singleton_method (rb_mGC , "compact" , gc_compact , 0 );
1098610951 rb_define_singleton_method (rb_mGC , "auto_compact" , gc_get_auto_compact , 0 );
0 commit comments