ruby-changes:36254
From: ko1 <ko1@a...>
Date: Sun, 9 Nov 2014 13:53:07 +0900 (JST)
Subject: [ruby-changes:36254] ko1:r48335 (trunk): * gc.c (is_incremental_marking): use #if/#else because
ko1 2014-11-09 13:52:52 +0900 (Sun, 09 Nov 2014) New Revision: 48335 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48335 Log: * gc.c (is_incremental_marking): use #if/#else because rb_objspace_t::flags::during_incremental_marking is not defined when GC_ENABLE_INCREMENTAL_MARK is 0. * gc.c (will_be_incremental_marking, is_full_marking): similar fix. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 48334) +++ ChangeLog (revision 48335) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Nov 9 13:47:02 2014 Koichi Sasada <ko1@a...> + + * gc.c (is_incremental_marking): use #if/#else because + rb_objspace_t::flags::during_incremental_marking is not defined + when GC_ENABLE_INCREMENTAL_MARK is 0. + + * gc.c (will_be_incremental_marking, is_full_marking): similar fix. + Sun Nov 9 12:16:22 2014 Nobuyoshi Nakada <nobu@r...> * lib/securerandom.rb (SecureRandom.gen_random): separate Index: gc.c =================================================================== --- gc.c (revision 48334) +++ gc.c (revision 48335) @@ -694,9 +694,21 @@ VALUE *ruby_initial_gc_stress_ptr = &rub https://github.com/ruby/ruby/blob/trunk/gc.c#L694 #define is_marking(objspace) ((objspace)->flags.stat == gc_stat_marking) #define is_sweeping(objspace) ((objspace)->flags.stat == gc_stat_sweeping) +#if USE_RGENGC #define is_full_marking(objspace) ((objspace)->flags.during_minor_gc == FALSE) -#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) +#else +#define is_full_marking(objspace) TRUE +#endif +#if GC_ENABLE_INCREMENTAL_MARK +#define is_incremental_marking(objspace) ((objspace)->flags.during_incremental_marking != FALSE) +#else +#define is_incremental_marking(objspace) FALSE +#endif +#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) FALSE +#endif #define has_sweeping_pages(heap) ((heap)->sweep_pages != 0) #define is_lazy_sweeping(heap) (GC_ENABLE_LAZY_SWEEP && has_sweeping_pages(heap)) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/