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

ruby-changes:17492

From: ko1 <ko1@a...>
Date: Thu, 14 Oct 2010 22:19:35 +0900 (JST)
Subject: [ruby-changes:17492] Ruby:r29497 (trunk): * insns.def, iseq.c, vm_insnhelper.c: rename variable name

ko1	2010-10-14 22:19:30 +0900 (Thu, 14 Oct 2010)

  New Revision: 29497

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

  Log:
    * insns.def, iseq.c, vm_insnhelper.c: rename variable name
      (ip -> iseq).

  Modified files:
    trunk/ChangeLog
    trunk/insns.def
    trunk/iseq.c
    trunk/vm_insnhelper.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29496)
+++ ChangeLog	(revision 29497)
@@ -1,3 +1,8 @@
+Thu Oct 14 22:18:29 2010  Koichi Sasada  <ko1@a...>
+
+	* insns.def, iseq.c, vm_insnhelper.c: rename variable name
+	  (ip -> iseq).
+
 Thu Oct 14 20:41:27 2010  NARUSE, Yui  <naruse@r...>
 
 	* pack.c (pack_pack): support endian modifiers: < and >.
Index: insns.def
===================================================================
--- insns.def	(revision 29496)
+++ insns.def	(revision 29497)
@@ -816,16 +816,16 @@
 	}
 	break;
       case DEFINED_ZSUPER:{
-	rb_iseq_t *ip = GET_ISEQ();
-	while (ip) {
-	    if (ip->defined_method_id) {
+	rb_iseq_t *iseq = GET_ISEQ();
+	while (iseq) {
+	    if (iseq->defined_method_id) {
 		break;
 	    }
-	    ip = ip->parent_iseq;
+	    iseq = iseq->parent_iseq;
 	}
-	if (ip) {
-	    VALUE klass = vm_search_normal_superclass(ip->klass, GET_SELF());
-	    if (rb_method_boundp(klass, ip->defined_method_id, 0)) {
+	if (iseq) {
+	    VALUE klass = vm_search_normal_superclass(iseq->klass, GET_SELF());
+	    if (rb_method_boundp(klass, iseq->defined_method_id, 0)) {
 		expr_type = "super";
 	    }
 	}
Index: iseq.c
===================================================================
--- iseq.c	(revision 29496)
+++ iseq.c	(revision 29497)
@@ -748,9 +748,9 @@
 
       case TS_LINDEX:
 	{
-	    rb_iseq_t *ip = iseq->local_iseq;
-	    int lidx = ip->local_size - (int)op;
-	    const char *name = rb_id2name(ip->local_table[lidx]);
+	    rb_iseq_t *liseq = iseq->local_iseq;
+	    int lidx = liseq->local_size - (int)op;
+	    const char *name = rb_id2name(liseq->local_table[lidx]);
 
 	    if (name) {
 		ret = rb_str_new2(name);
@@ -762,13 +762,13 @@
 	}
       case TS_DINDEX:{
 	if (insn == BIN(getdynamic) || insn == BIN(setdynamic)) {
-	    rb_iseq_t *ip = iseq;
+	    rb_iseq_t *diseq = iseq;
 	    VALUE level = *pnop, i;
 	    const char *name;
 	    for (i = 0; i < level; i++) {
-		ip = ip->parent_iseq;
+		diseq = diseq->parent_iseq;
 	    }
-	    name = rb_id2name(ip->local_table[ip->local_size - op]);
+	    name = rb_id2name(diseq->local_table[diseq->local_size - op]);
 
 	    if (!name) {
 		name = "*";
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 29496)
+++ vm_insnhelper.c	(revision 29497)
@@ -1375,24 +1375,24 @@
 }
 
 static void
-vm_search_superclass(rb_control_frame_t *reg_cfp, rb_iseq_t *ip,
+vm_search_superclass(rb_control_frame_t *reg_cfp, rb_iseq_t *iseq,
 		     VALUE recv, VALUE sigval,
 		     ID *idp, VALUE *klassp)
 {
     ID id;
     VALUE klass;
 
-    while (ip && !ip->klass) {
-	ip = ip->parent_iseq;
+    while (iseq && !iseq->klass) {
+	iseq = iseq->parent_iseq;
     }
 
-    if (ip == 0) {
+    if (iseq == 0) {
 	rb_raise(rb_eNoMethodError, "super called outside of method");
     }
 
-    id = ip->defined_method_id;
+    id = iseq->defined_method_id;
 
-    if (ip != ip->local_iseq) {
+    if (iseq != iseq->local_iseq) {
 	/* defined by Module#define_method() */
 	rb_control_frame_t *lcfp = GET_CFP();
 
@@ -1401,7 +1401,7 @@
 	    rb_raise(rb_eRuntimeError, "implicit argument passing of super from method defined by define_method() is not supported. Specify all arguments explicitly.");
 	}
 
-	while (lcfp->iseq != ip) {
+	while (lcfp->iseq != iseq) {
 	    VALUE *tdfp = GET_PREV_DFP(lcfp->dfp);
 	    while (1) {
 		lcfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(lcfp);
@@ -1420,7 +1420,7 @@
 	klass = vm_search_normal_superclass(lcfp->me->klass, recv);
     }
     else {
-	klass = vm_search_normal_superclass(ip->klass, recv);
+	klass = vm_search_normal_superclass(iseq->klass, recv);
     }
 
     *idp = id;

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

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