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

ruby-changes:34232

From: ko1 <ko1@a...>
Date: Mon, 2 Jun 2014 15:51:53 +0900 (JST)
Subject: [ruby-changes:34232] ko1:r46313 (trunk): * eval.c (rb_using_refinement): add write-barriers for

ko1	2014-06-02 15:51:41 +0900 (Mon, 02 Jun 2014)

  New Revision: 46313

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

  Log:
    * eval.c (rb_using_refinement): add write-barriers for
      cref->nd_refinements.

  Modified files:
    trunk/ChangeLog
    trunk/eval.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46312)
+++ ChangeLog	(revision 46313)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun  2 15:50:24 2014  Koichi Sasada  <ko1@a...>
+
+	* eval.c (rb_using_refinement): add write-barriers for
+	  cref->nd_refinements.
+
 Mon Jun  2 12:26:08 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
 
 	* CONTRIBUTING.md: added contibuting guide for github. [fix GH-625]
Index: eval.c
===================================================================
--- eval.c	(revision 46312)
+++ eval.c	(revision 46313)
@@ -1132,11 +1132,11 @@ rb_using_refinement(NODE *cref, VALUE kl https://github.com/ruby/ruby/blob/trunk/eval.c#L1132
     Check_Type(klass, T_CLASS);
     Check_Type(module, T_MODULE);
     if (NIL_P(cref->nd_refinements)) {
-	cref->nd_refinements = hidden_identity_hash_new();
+	RB_OBJ_WRITE(cref, &cref->nd_refinements, hidden_identity_hash_new());
     }
     else {
 	if (cref->flags & NODE_FL_CREF_OMOD_SHARED) {
-	    cref->nd_refinements = rb_hash_dup(cref->nd_refinements);
+	    RB_OBJ_WRITE(cref, &cref->nd_refinements, rb_hash_dup(cref->nd_refinements));
 	    cref->flags &= ~NODE_FL_CREF_OMOD_SHARED;
 	}
 	if (!NIL_P(c = rb_hash_lookup(cref->nd_refinements, klass))) {

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

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