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 /gc.c | |
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
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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)) |