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

ruby-changes:32219

From: ko1 <ko1@a...>
Date: Fri, 20 Dec 2013 16:02:00 +0900 (JST)
Subject: [ruby-changes:32219] ko1:r44298 (trunk): * include/ruby/ruby.h: add a comment for WB interfaces.

ko1	2013-12-20 16:01:52 +0900 (Fri, 20 Dec 2013)

  New Revision: 44298

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

  Log:
    * include/ruby/ruby.h: add a comment for WB interfaces.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/ruby.h
Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 44297)
+++ include/ruby/ruby.h	(revision 44298)
@@ -1199,6 +1199,17 @@ void rb_gc_writebarrier_unprotect_promot https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1199
 #define OBJ_WB_UNPROTECT(x)         rb_obj_wb_unprotect(x, __FILE__, __LINE__)
 #endif
 
+/* Write barrier (WB) interfaces:
+ * - OBJ_WRITE(a, slot, b): WB for new reference from `a' to `b'.
+ *     Write `b' into `*slot'. `slot' is a pointer in `a'.
+ * - OBJ_WRITTEN(a, oldv, b): WB for new reference from `a' to `b'.
+ *     This doesn't write any values, but only a WB declaration.
+ *     `oldv' is replaced value with `b' (not used in current Ruby).
+ * 
+ * NOTE: The following core interfaces can be changed in the future.
+ *       Please catch up if you want to insert WB into C-extensions
+ *       correctly.
+ */
 #define OBJ_WRITE(a, slot, b)       rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)
 #define OBJ_WRITTEN(a, oldv, b)     rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__)
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44297)
+++ ChangeLog	(revision 44298)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Dec 20 16:01:35 2013  Koichi Sasada  <ko1@a...>
+
+	* include/ruby/ruby.h: add a comment for WB interfaces.
+
 Fri Dec 20 16:00:52 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in: DLDFLAGS is defined in --with-opt-dir handler, so

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

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