summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-02-25 14:36:56 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-02-26 16:00:10 +0900
commit62c2b8c74e47652fc5bbaf6150f4acd092dfd72b (patch)
tree0dbeb1e98c6dfd22508a7dd2b4e36099935034c7 /include
parente7bcb416af64b6a935ff4ff18476aea606d12ab9 (diff)
kill USE_RGENGC=0
This compile-time option has been broken for years (at least since commit 49369ef17316cd5d5819b038f286e1d951972b52, according to git bisect). Let's delete codes that no longer works.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2925
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h20
1 files changed, 3 insertions, 17 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index a97f87fc08..b6d1e542ba 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -751,16 +751,13 @@ VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
#define CLONESETUP(clone,obj) rb_clone_setup(clone,obj)
#define DUPSETUP(dup,obj) rb_dup_setup(dup,obj)
-#ifndef USE_RGENGC
+#ifdef USE_RGENGC
+#undef USE_RGENGC
+#endif
#define USE_RGENGC 1
#ifndef USE_RINCGC
#define USE_RINCGC 1
#endif
-#endif
-
-#if USE_RGENGC == 0
-#define USE_RINCGC 0
-#endif
#ifndef RGENGC_WB_PROTECTED_ARRAY
#define RGENGC_WB_PROTECTED_ARRAY 1
@@ -1442,7 +1439,6 @@ rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
#define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_, RUBY_UNTYPED_DATA_WARNING)
#endif
-#if USE_RGENGC
#define RB_OBJ_PROMOTED_RAW(x) RB_FL_ALL_RAW(x, RUBY_FL_PROMOTED)
#define RB_OBJ_PROMOTED(x) (RB_SPECIAL_CONST_P(x) ? 0 : RB_OBJ_PROMOTED_RAW(x))
#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
@@ -1450,10 +1446,6 @@ rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
void rb_gc_writebarrier(VALUE a, VALUE b);
void rb_gc_writebarrier_unprotect(VALUE obj);
-#else /* USE_RGENGC */
-#define RB_OBJ_PROMOTED(x) 0
-#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
-#endif
#define OBJ_PROMOTED_RAW(x) RB_OBJ_PROMOTED_RAW(x)
#define OBJ_PROMOTED(x) RB_OBJ_PROMOTED(x)
#define OBJ_WB_UNPROTECT(x) RB_OBJ_WB_UNPROTECT(x)
@@ -1487,9 +1479,7 @@ rb_obj_wb_unprotect(VALUE x, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(
#ifdef RGENGC_LOGGING_WB_UNPROTECT
RGENGC_LOGGING_WB_UNPROTECT((void *)x, filename, line);
#endif
-#if USE_RGENGC
rb_gc_writebarrier_unprotect(x);
-#endif
return x;
}
@@ -1500,11 +1490,9 @@ rb_obj_written(VALUE a, RB_UNUSED_VAR(VALUE oldv), VALUE b, RB_UNUSED_VAR(const
RGENGC_LOGGING_OBJ_WRITTEN(a, oldv, b, filename, line);
#endif
-#if USE_RGENGC
if (!RB_SPECIAL_CONST_P(b)) {
rb_gc_writebarrier(a, b);
}
-#endif
return a;
}
@@ -1518,9 +1506,7 @@ rb_obj_write(VALUE a, VALUE *slot, VALUE b, RB_UNUSED_VAR(const char *filename),
*slot = b;
-#if USE_RGENGC
rb_obj_written(a, RUBY_Qundef /* ignore `oldv' now */, b, filename, line);
-#endif
return a;
}