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

ruby-changes:12435

From: ko1 <ko1@a...>
Date: Thu, 16 Jul 2009 09:01:24 +0900 (JST)
Subject: [ruby-changes:12435] Ruby:r24135 (trunk): * node.h, vm_core.h, variable.c: rename global_entry to rb_global_entry.

ko1	2009-07-16 09:01:06 +0900 (Thu, 16 Jul 2009)

  New Revision: 24135

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

  Log:
    * node.h, vm_core.h, variable.c: rename global_entry to rb_global_entry.
    * compile.c, insns.def, iseq.c, vm_insnhelper.h: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
    trunk/insns.def
    trunk/iseq.c
    trunk/node.h
    trunk/variable.c
    trunk/vm_core.h
    trunk/vm_insnhelper.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 24134)
+++ ChangeLog	(revision 24135)
@@ -1,3 +1,9 @@
+Thu Jul 16 08:59:22 2009  Koichi Sasada  <ko1@a...>
+
+	* node.h, vm_core.h, variable.c: rename global_entry to rb_global_entry.
+
+	* compile.c, insns.def, iseq.c, vm_insnhelper.h: ditto.
+
 Thu Jul 16 08:57:44 2009  Koichi Sasada  <ko1@a...>
 
 	* vm_method.c: separate clearing cache entry code.
Index: insns.def
===================================================================
--- insns.def	(revision 24134)
+++ insns.def	(revision 24135)
@@ -761,7 +761,7 @@
 	klass = vm_get_cbase(GET_ISEQ(), GET_LFP(), GET_DFP());
 	break;
       case DEFINED_GVAR:
-	if (rb_gvar_defined((struct global_entry *)(obj & ~1))) {
+	if (rb_gvar_defined((struct rb_global_entry *)(obj & ~1))) {
 	    expr_type = "global-variable";
 	}
 	break;
Index: variable.c
===================================================================
--- variable.c	(revision 24134)
+++ variable.c	(revision 24135)
@@ -289,6 +289,7 @@
 }
 
 #define global_variable rb_global_variable
+#define global_entry rb_global_entry
 
 #define gvar_getter_t rb_gvar_getter_t
 #define gvar_setter_t rb_gvar_setter_t
@@ -311,11 +312,6 @@
     struct trace_var *trace;
 };
 
-struct global_entry {
-    struct global_variable *var;
-    ID id;
-};
-
 #define undef_getter	rb_gvar_undef_getter
 #define undef_setter	rb_gvar_undef_setter
 #define undef_marker	rb_gvar_undef_marker
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 24134)
+++ vm_core.h	(revision 24135)
@@ -491,16 +491,6 @@
     VALUE env;
 } rb_binding_t;
 
-struct global_entry {
-    struct global_variable *var;
-    ID id;
-};
-
-struct global_entry *rb_global_entry(ID);
-VALUE rb_gvar_get(struct global_entry *);
-VALUE rb_gvar_set(struct global_entry *, VALUE);
-VALUE rb_gvar_defined(struct global_entry *);
-
 /* used by compile time and send insn */
 #define VM_CALL_ARGS_SPLAT_BIT     (0x01 << 1)
 #define VM_CALL_ARGS_BLOCKARG_BIT  (0x01 << 2)
Index: iseq.c
===================================================================
--- iseq.c	(revision 24134)
+++ iseq.c	(revision 24135)
@@ -791,7 +791,7 @@
 	}
       case TS_GENTRY:
 	{
-	    struct global_entry *entry = (struct global_entry *)op;
+	    struct rb_global_entry *entry = (struct rb_global_entry *)op;
 	    ret = rb_str_dup(rb_id2str(entry->id));
 	}
 	break;
@@ -1213,7 +1213,7 @@
 		break;
 	      case TS_GENTRY:
 		{
-		    struct global_entry *entry = (struct global_entry *)*seq;
+		    struct rb_global_entry *entry = (struct rb_global_entry *)*seq;
 		    rb_ary_push(ary, ID2SYM(entry->id));
 		}
 		break;
Index: compile.c
===================================================================
--- compile.c	(revision 24134)
+++ compile.c	(revision 24135)
@@ -1447,8 +1447,8 @@
 			break;
 		      case TS_GENTRY:
 			{
-			    struct global_entry *entry =
-				(struct global_entry *)(operands[j] & (~1));
+			    struct rb_global_entry *entry =
+				(struct rb_global_entry *)(operands[j] & (~1));
 			    generated_iseq[pos + 1 + j] = (VALUE)entry;
 			}
 			break;
@@ -4975,7 +4975,7 @@
 		break;
 	      case TS_GENTRY:
 		{
-		    struct global_entry *entry = (struct global_entry *)
+		    struct rb_global_entry *entry = (struct rb_global_entry *)
 		      (OPERAND_AT(iobj, j) & (~1));
 		    rb_str_cat2(str, rb_id2name(entry->id));
 		}
Index: vm_insnhelper.h
===================================================================
--- vm_insnhelper.h	(revision 24134)
+++ vm_insnhelper.h	(revision 24135)
@@ -137,8 +137,8 @@
 
 #define GET_PREV_DFP(dfp)                ((VALUE *)((dfp)[0] & ~0x03))
 
-#define GET_GLOBAL(entry)       rb_gvar_get((struct global_entry*)entry)
-#define SET_GLOBAL(entry, val)  rb_gvar_set((struct global_entry*)entry, val)
+#define GET_GLOBAL(entry)       rb_gvar_get((struct rb_global_entry*)entry)
+#define SET_GLOBAL(entry, val)  rb_gvar_set((struct rb_global_entry*)entry, val)
 
 #define GET_CONST_INLINE_CACHE(dst) ((IC) * (GET_PC() + (dst) + 2))
 
Index: node.h
===================================================================
--- node.h	(revision 24134)
+++ node.h	(revision 24135)
@@ -252,7 +252,7 @@
 	struct RNode *node;
 	ID id;
 	long state;
-	struct global_entry *entry;
+	struct rb_global_entry *entry;
 	long cnt;
 	VALUE value;
     } u3;
@@ -463,6 +463,16 @@
 NODE *rb_node_newnode(enum node_type,VALUE,VALUE,VALUE);
 NODE *rb_node_newnode_longlife(enum node_type,VALUE,VALUE,VALUE);
 
+struct rb_global_entry {
+    struct rb_global_variable *var;
+    ID id;
+};
+
+struct rb_global_entry *rb_global_entry(ID);
+VALUE rb_gvar_get(struct rb_global_entry *);
+VALUE rb_gvar_set(struct rb_global_entry *, VALUE);
+VALUE rb_gvar_defined(struct rb_global_entry *);
+
 #if defined(__cplusplus)
 #if 0
 { /* satisfy cc-mode */

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

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