summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-02-14 19:40:05 +0000
committerPeter Zhu <peter@peterzhu.ca>2023-02-17 09:49:45 -0500
commit81dc3a1780319f4bc232af407edea60a35d251ed (patch)
treed133ed00c8f893635bc299329d5fe83e679f98cd /include
parenta7beb4cfad58064fc0a45b9d147030e794c33b30 (diff)
downloadruby-81dc3a1780319f4bc232af407edea60a35d251ed.tar.gz
Remove USE_RGENGC_LOGGING_WB_UNPROTECT
This macro is broken when set to anything other than 0. And has had a comment saying that it's broken for 3 years. This commit deletes it and the associated logging code. It's clearly not being used. Co-Authored-By: Peter Zhu <peter@peterzhu.ca>
Diffstat (limited to 'include')
-rw-r--r--include/ruby/internal/rgengc.h33
1 files changed, 2 insertions, 31 deletions
diff --git a/include/ruby/internal/rgengc.h b/include/ruby/internal/rgengc.h
index f65595f357..35f312b2e9 100644
--- a/include/ruby/internal/rgengc.h
+++ b/include/ruby/internal/rgengc.h
@@ -56,14 +56,6 @@
#endif
/**
- * @deprecated This macro seems broken. Setting this to anything other than
- * zero just doesn't compile. We need to KonMari.
- */
-#ifndef USE_RGENGC_LOGGING_WB_UNPROTECT
-# define USE_RGENGC_LOGGING_WB_UNPROTECT 0
-#endif
-
-/**
* @private
*
* This is a compile-time flag to enable/disable write barrier for
@@ -302,22 +294,6 @@ void rb_gc_writebarrier(VALUE old, VALUE young);
*/
void rb_gc_writebarrier_unprotect(VALUE obj);
-#if USE_RGENGC_LOGGING_WB_UNPROTECT
-/**
- * @private
- *
- * This is the implementation of #RGENGC_LOGGING_WB_UNPROTECT(). People
- * don't use it directly.
- *
- * @param[in] objptr Don't know why this is a pointer to void but in
- * reality this is a pointer to an object that is about
- * to be un-protected.
- * @param[in] filename Pass C's `__FILE__` here.
- * @param[in] line Pass C's `__LINE__` here.
- */
-void rb_gc_unprotect_logging(void *objptr, const char *filename, int line);
-#endif
-
RBIMPL_SYMBOL_EXPORT_END()
RBIMPL_ATTR_PURE_UNLESS_DEBUG()
@@ -378,13 +354,12 @@ rb_obj_wb_unprotect(
RBIMPL_ATTR_MAYBE_UNUSED()
int line)
{
-#if USE_RGENGC_LOGGING_WB_UNPROTECT
- RGENGC_LOGGING_WB_UNPROTECT(RBIMPL_CAST((void *)x), filename, line);
-#endif
rb_gc_writebarrier_unprotect(x);
return x;
}
+#define RGENGC_LOGGING_OBJ_WRITTEN rb_gc_obj_written_logging
+
/**
* @private
*
@@ -409,10 +384,6 @@ rb_obj_written(
RBIMPL_ATTR_MAYBE_UNUSED()
int line)
{
-#if USE_RGENGC_LOGGING_WB_UNPROTECT
- RGENGC_LOGGING_OBJ_WRITTEN(a, oldv, b, filename, line);
-#endif
-
if (!RB_SPECIAL_CONST_P(b)) {
rb_gc_writebarrier(a, b);
}