[前][次][番号順一覧][スレッド一覧]

ruby-changes:36076

From: ko1 <ko1@a...>
Date: Mon, 27 Oct 2014 16:02:11 +0900 (JST)
Subject: [ruby-changes:36076] ko1:r48157 (trunk): * gc.c: is_incremental_marking(), will_be_incremental_marking():

ko1	2014-10-27 16:02:03 +0900 (Mon, 27 Oct 2014)

  New Revision: 48157

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48157

  Log:
    * gc.c: is_incremental_marking(), will_be_incremental_marking():
      use `&&' with GC_ENABLE_INCREMENTAL_MARK intead of using
      #if/#else/#endif.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48156)
+++ ChangeLog	(revision 48157)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Oct 27 15:59:26 2014  Koichi Sasada  <ko1@a...>
+
+	* 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@r...>
 
 	* gc.c (gc_sweep_rest): sweep rest pages regardless of whether
Index: gc.c
===================================================================
--- gc.c	(revision 48156)
+++ gc.c	(revision 48157)
@@ -695,18 +695,10 @@ VALUE *ruby_initial_gc_stress_ptr = &rub https://github.com/ruby/ruby/blob/trunk/gc.c#L695
 #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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]