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

ruby-changes:42378

From: ko1 <ko1@a...>
Date: Thu, 31 Mar 2016 17:49:13 +0900 (JST)
Subject: [ruby-changes:42378] ko1:r54452 (trunk): * gc.c (gc_marks_finish): fix syntax error.

ko1	2016-03-31 17:49:09 +0900 (Thu, 31 Mar 2016)

  New Revision: 54452

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

  Log:
    * gc.c (gc_marks_finish): fix syntax error.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
    trunk/vm_insnhelper.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54451)
+++ ChangeLog	(revision 54452)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Mar 31 17:48:25 2016  Koichi Sasada  <ko1@a...>
+
+	* gc.c (gc_marks_finish): fix syntax error.
+
 Thu Mar 31 16:49:36 2016  Koichi Sasada  <ko1@a...>
 
 	* gc.c: simplify allocate/free detecting logic at the end of marking.
Index: gc.c
===================================================================
--- gc.c	(revision 54451)
+++ gc.c	(revision 54452)
@@ -5383,8 +5383,8 @@ gc_marks_finish(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L5383
 	/* check free_min */
 	if (min_free_slots < gc_params.heap_free_slots) min_free_slots = gc_params.heap_free_slots;
 
-	if (sweep_slots < min_free_slots) {
 #if USE_RGENGC
+	if (sweep_slots < min_free_slots) {
 	    if (!full_marking) {
 		if (objspace->profile.count - objspace->rgengc.last_major_gc < RVALUE_OLD_AGE) {
 		    full_marking = TRUE;
@@ -5426,11 +5426,12 @@ gc_marks_finish(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L5426
 		  objspace->rgengc.need_major_gc ? "major" : "minor");
 
 #else /* USE_RGENGC */
+	if (sweep_slots < min_free_slots) {
 	    gc_report(1, objspace, "gc_marks_finish: heap_set_increment!!\n");
 	    heap_set_increment(objspace, heap_extend_pages(objspace, sweep_slot, total_slot));
 	    heap_increment(objspace, heap);
-#endif
 	}
+#endif
     }
 
     gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_END_MARK, 0);
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 54451)
+++ vm_insnhelper.c	(revision 54452)
@@ -663,7 +663,7 @@ vm_get_ev_const(rb_thread_t *th, VALUE o https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L663
 	/* in current lexical scope */
 	const rb_cref_t *root_cref = rb_vm_get_cref(th->cfp->ep);
 	const rb_cref_t *cref;
-	VALUE klass = orig_klass;
+	VALUE klass = Qnil;
 
 	while (root_cref && CREF_PUSHED_BY_EVAL(root_cref)) {
 	    root_cref = CREF_NEXT(root_cref);

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

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