diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-09 04:52:52 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-09 04:52:52 +0000 |
commit | a11aa75662f88ead04d340330c81bf243806ad57 (patch) | |
tree | 98422f3065a428b14a4f7b5ded7323c4fc88e510 | |
parent | 93ccab82c55f36fc2e5aee2b53cbc90f56bb94a0 (diff) | |
download | ruby-a11aa75662f88ead04d340330c81bf243806ad57.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gc.c | 16 |
2 files changed, 22 insertions, 2 deletions
@@ -1,3 +1,11 @@ +Sun Nov 9 13:47:02 2014 Koichi Sasada <ko1@atdot.net> + + * 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@ruby-lang.org> * lib/securerandom.rb (SecureRandom.gen_random): separate @@ -694,9 +694,21 @@ 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) +#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)) |