aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-27 07:02:03 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-27 07:02:03 +0000
commit3edcd548f73846a98cb1a33057fa0019d4ef5cc0 (patch)
treed3329dcff3444636c23d598ad76ab0e78f49d276
parent1b132cb25462e378b7d133b762d0f587b19e753f (diff)
downloadruby-3edcd548f73846a98cb1a33057fa0019d4ef5cc0.tar.gz
* gc.c: is_incremental_marking(), will_be_incremental_marking():
use `&&' with GC_ENABLE_INCREMENTAL_MARK intead of using #if/#else/#endif. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--gc.c12
2 files changed, 8 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 6106a23a3e..f581e13b01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Oct 27 15:59:26 2014 Koichi Sasada <ko1@atdot.net>
+
+ * gc.c: is_incremental_marking(), will_be_incremental_marking():
+ use `&&' with GC_ENABLE_INCREMENTAL_MARK intead of using
+ #if/#else/#endif.
+
Mon Oct 27 13:40:11 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (gc_sweep_rest): sweep rest pages regardless of whether
diff --git a/gc.c b/gc.c
index 63eb139445..d7ba2adc57 100644
--- a/gc.c
+++ b/gc.c
@@ -695,18 +695,10 @@ VALUE *ruby_initial_gc_stress_ptr = &ruby_initial_gc_stress;
#define is_marking(objspace) ((objspace)->flags.stat == gc_stat_marking)
#define is_sweeping(objspace) ((objspace)->flags.stat == gc_stat_sweeping)
#define is_full_marking(objspace) ((objspace)->flags.during_minor_gc == FALSE)
-#if GC_ENABLE_INCREMENTAL_MARK
-#define is_incremental_marking(objspace) ((objspace)->flags.during_incremental_marking != FALSE)
-#else
-#define is_incremental_marking(objspace) 0
-#endif
+#define is_incremental_marking(objspace) (GC_ENABLE_INCREMENTAL_MARK && (objspace)->flags.during_incremental_marking != FALSE)
+#define will_be_incremental_marking(objspace) (GC_ENABLE_INCREMENTAL_MARK && (objspace)->rgengc.need_major_gc != GPR_FLAG_NONE)
#define has_sweeping_pages(heap) ((heap)->sweep_pages != 0)
#define is_lazy_sweeping(heap) (GC_ENABLE_LAZY_SWEEP && has_sweeping_pages(heap))
-#if GC_ENABLE_INCREMENTAL_MARK
-#define will_be_incremental_marking(objspace) ((objspace)->rgengc.need_major_gc != GPR_FLAG_NONE)
-#else
-#define will_be_incremental_marking(objspace) 0
-#endif
#if SIZEOF_LONG == SIZEOF_VOIDP
# define nonspecial_obj_id(obj) (VALUE)((SIGNED_VALUE)(obj)|FIXNUM_FLAG)