ruby-changes:31448
From: ko1 <ko1@a...>
Date: Tue, 5 Nov 2013 00:04:22 +0900 (JST)
Subject: [ruby-changes:31448] ko1:r43527 (trunk): * include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED.
ko1 2013-11-05 00:04:10 +0900 (Tue, 05 Nov 2013) New Revision: 43527 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43527 Log: * include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED. This flag represents that "this object is promoted at least once." * gc.c, debug.c, object.c: catch up this change. Modified files: trunk/ChangeLog trunk/debug.c trunk/gc.c trunk/include/ruby/ruby.h trunk/object.c Index: debug.c =================================================================== --- debug.c (revision 43526) +++ debug.c (revision 43527) @@ -34,7 +34,7 @@ const union { https://github.com/ruby/ruby/blob/trunk/debug.c#L34 RUBY_ENC_CODERANGE_VALID = ENC_CODERANGE_VALID, RUBY_ENC_CODERANGE_BROKEN = ENC_CODERANGE_BROKEN, RUBY_FL_WB_PROTECTED = FL_WB_PROTECTED, - RUBY_FL_OLDGEN = FL_OLDGEN, + RUBY_FL_PROMOTED = FL_PROMOTED, RUBY_FL_FINALIZE = FL_FINALIZE, RUBY_FL_TAINT = FL_TAINT, RUBY_FL_EXIVAR = FL_EXIVAR, Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 43526) +++ include/ruby/ruby.h (revision 43527) @@ -1124,7 +1124,7 @@ struct RBignum { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1124 #define FL_SINGLETON FL_USER0 #define FL_WB_PROTECTED (((VALUE)1)<<5) -#define FL_OLDGEN (((VALUE)1)<<6) +#define FL_PROMOTED (((VALUE)1)<<6) #define FL_FINALIZE (((VALUE)1)<<7) #define FL_TAINT (((VALUE)1)<<8) #define FL_UNTRUSTED FL_TAINT @@ -1178,7 +1178,7 @@ struct RBignum { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1178 #define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE) #if USE_RGENGC -#define OBJ_PROMOTED(x) (SPECIAL_CONST_P(x) ? 0 : FL_TEST_RAW((x), FL_OLDGEN)) +#define OBJ_PROMOTED(x) (SPECIAL_CONST_P(x) ? 0 : FL_TEST_RAW((x), FL_PROMOTED)) #define OBJ_WB_PROTECTED(x) (SPECIAL_CONST_P(x) ? 1 : FL_TEST_RAW((x), FL_WB_PROTECTED)) #define OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__) @@ -1215,7 +1215,7 @@ rb_obj_wb_unprotect(VALUE x, RB_UNUSED_V https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1215 if (FL_TEST_RAW((x), FL_WB_PROTECTED)) { RBASIC(x)->flags &= ~FL_WB_PROTECTED; - if (FL_TEST_RAW((x), FL_OLDGEN)) { + if (FL_TEST_RAW((x), FL_PROMOTED)) { rb_gc_writebarrier_unprotect_promoted(x); } } @@ -1232,8 +1232,8 @@ rb_obj_written(VALUE a, RB_UNUSED_VAR(VA https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1232 #if USE_RGENGC /* `a' should be an RVALUE object */ - if (FL_TEST_RAW((a), FL_OLDGEN) && - !SPECIAL_CONST_P(b) && !FL_TEST_RAW((b), FL_OLDGEN)) { + if (FL_TEST_RAW((a), FL_PROMOTED) && + !SPECIAL_CONST_P(b) && !FL_TEST_RAW((b), FL_PROMOTED)) { rb_gc_writebarrier(a, b); } #endif Index: ChangeLog =================================================================== --- ChangeLog (revision 43526) +++ ChangeLog (revision 43527) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Nov 5 00:02:00 2013 Koichi Sasada <ko1@a...> + + * include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED. + This flag represents that "this object is promoted at least once." + + * gc.c, debug.c, object.c: catch up this change. + Mon Nov 4 22:20:16 2013 Tanaka Akira <akr@f...> * test/xmlrpc: Don't use fixed ports: 8070 and 8071. Index: object.c =================================================================== --- object.c (revision 43526) +++ object.c (revision 43527) @@ -336,7 +336,7 @@ rb_obj_clone(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L336 } clone = rb_obj_alloc(rb_obj_class(obj)); RBASIC(clone)->flags &= FL_TAINT; - RBASIC(clone)->flags |= RBASIC(obj)->flags & ~(FL_OLDGEN|FL_FREEZE|FL_FINALIZE); + RBASIC(clone)->flags |= RBASIC(obj)->flags & ~(FL_PROMOTED|FL_FREEZE|FL_FINALIZE); singleton = rb_singleton_class_clone_and_attach(obj, clone); RBASIC_SET_CLASS(clone, singleton); Index: gc.c =================================================================== --- gc.c (revision 43526) +++ gc.c (revision 43527) @@ -622,7 +622,7 @@ static void rgengc_rememberset_mark(rb_o https://github.com/ruby/ruby/blob/trunk/gc.c#L622 #define FL_UNSET2(x,f) do {if (RGENGC_CHECK_MODE && SPECIAL_CONST_P(x)) rb_bug("FL_UNSET2: SPECIAL_CONST"); RBASIC(x)->flags &= ~(f);} while (0) #define RVALUE_SHADY(obj) (!FL_TEST2((check_bitmap_consistency((VALUE)obj)), FL_WB_PROTECTED)) -#define RVALUE_PROMOTED(obj) FL_TEST2(check_bitmap_consistency((VALUE)obj), FL_OLDGEN) +#define RVALUE_PROMOTED(obj) FL_TEST2(check_bitmap_consistency((VALUE)obj), FL_PROMOTED) #define RVALUE_PROMOTED_FROM_BITMAP(x) MARKED_IN_BITMAP(GET_HEAP_OLDGEN_BITS(x),x) @@ -632,9 +632,9 @@ check_bitmap_consistency(VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L632 #if RUBY_CHECK_MODE > 0 int oldgen_bitmap = MARKED_IN_BITMAP(GET_HEAP_OLDGEN_BITS(obj), obj) != 0; - if (FL_TEST2((obj), FL_OLDGEN) != oldgen_bitmap) { + if (FL_TEST2((obj), FL_PROMOTED) != oldgen_bitmap) { rb_bug("check_bitmap_consistency: oldgen flag of %p (%s) is %d, but bitmap is %d", - (void *)obj, obj_type_name(obj), FL_TEST2((obj), FL_OLDGEN), oldgen_bitmap); + (void *)obj, obj_type_name(obj), FL_TEST2((obj), FL_PROMOTED), oldgen_bitmap); } if (FL_TEST2((obj), FL_WB_PROTECTED)) { /* non-shady */ @@ -655,7 +655,7 @@ RVALUE_PROMOTE(VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L655 { check_bitmap_consistency(obj); MARK_IN_BITMAP(GET_HEAP_OLDGEN_BITS(obj), obj); - FL_SET2(obj, FL_OLDGEN); + FL_SET2(obj, FL_PROMOTED); #if RGENGC_PROFILE >= 1 { rb_objspace_t *objspace = &rb_objspace; @@ -671,7 +671,7 @@ static inline void https://github.com/ruby/ruby/blob/trunk/gc.c#L671 RVALUE_DEMOTE(VALUE obj) { check_bitmap_consistency(obj); - FL_UNSET2(obj, FL_OLDGEN); + FL_UNSET2(obj, FL_PROMOTED); CLEAR_IN_BITMAP(GET_HEAP_OLDGEN_BITS(obj), obj); } #endif @@ -3767,8 +3767,8 @@ gc_oldgen_bitmap2flag(struct heap_page * https://github.com/ruby/ruby/blob/trunk/gc.c#L3767 RVALUE *pend = p + page->limit; while (p < pend) { - if (MARKED_IN_BITMAP(oldgen_bits, p)) FL_SET2(p, FL_OLDGEN); - else FL_UNSET2(p, FL_OLDGEN); + if (MARKED_IN_BITMAP(oldgen_bits, p)) FL_SET2(p, FL_PROMOTED); + else FL_UNSET2(p, FL_PROMOTED); p++; } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/