summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-28 06:44:24 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-28 06:44:24 +0000
commite3990633cb2e44f19588c16a436516a8ecae0459 (patch)
treef446eae742ccfc218897ead0a363627ea9727284
parent64f5b6aedc25dc8b6ef086f40d7f3c6cd401ee3e (diff)
* insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.
* compile.c (iseq_compile_each): ditto. * node.h: remove unused node `NODE_OPTBLOCK'. * ext/objspace/objspace.c, gc.c (gc_mark_children): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--compile.c14
-rw-r--r--ext/objspace/objspace.c1
-rw-r--r--gc.c1
-rw-r--r--insns.def20
-rw-r--r--node.h3
6 files changed, 10 insertions, 39 deletions
diff --git a/ChangeLog b/ChangeLog
index 0ac2730..5ac7be4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Fri Sep 28 15:15:41 2012 Koichi Sasada <ko1@atdot.net>
+
+ * insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.
+
+ * compile.c (iseq_compile_each): ditto.
+
+ * node.h: remove unused node `NODE_OPTBLOCK'.
+
+ * ext/objspace/objspace.c, gc.c (gc_mark_children): ditto.
+
Fri Sep 28 13:14:34 2012 Koichi Sasada <ko1@atdot.net>
* vm_core.h: now VM_DEBUG_BP_CHECK should be 1.
diff --git a/compile.c b/compile.c
index 368e3cf..535084b 100644
--- a/compile.c
+++ b/compile.c
@@ -5131,20 +5131,6 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
- case NODE_OPTBLOCK:{
- /* for optimize */
- LABEL *redo_label = NEW_LABEL(0);
- LABEL *next_label = NEW_LABEL(0);
-
- iseq->compile_data->start_label = next_label;
- iseq->compile_data->redo_label = redo_label;
-
- ADD_LABEL(ret, redo_label);
- COMPILE_(ret, "optblock body", node->nd_head, 1 /* pop */ );
- ADD_LABEL(ret, next_label);
- ADD_INSN(ret, 0, opt_checkenv);
- break;
- }
case NODE_PRELUDE:{
COMPILE_POPED(ret, "prelude", node->nd_head);
COMPILE_(ret, "body", node->nd_body, poped);
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index f78b438..3310638 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -531,7 +531,6 @@ count_nodes(int argc, VALUE *argv, VALUE os)
COUNT_NODE(NODE_ATTRASGN);
COUNT_NODE(NODE_PRELUDE);
COUNT_NODE(NODE_LAMBDA);
- COUNT_NODE(NODE_OPTBLOCK);
#undef COUNT_NODE
default: node = INT2FIX(nodes[i]);
}
diff --git a/gc.c b/gc.c
index 333cb2a..a36c607 100644
--- a/gc.c
+++ b/gc.c
@@ -2459,7 +2459,6 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr, int lev)
gc_mark(objspace, (VALUE)obj->as.node.u2.node, lev);
/* fall through */
case NODE_BLOCK: /* 1,3 */
- case NODE_OPTBLOCK:
case NODE_ARRAY:
case NODE_DSTR:
case NODE_DXSTR:
diff --git a/insns.def b/insns.def
index bbbac39..a5d97ad 100644
--- a/insns.def
+++ b/insns.def
@@ -1305,26 +1305,6 @@ opt_case_dispatch
}
}
-/**
- @c optimize
- @e check environment
- @j 将来の拡張用。
- */
-DEFINE_INSN
-opt_checkenv
-()
-()
-()
-{
- if (vm_base_ptr(reg_cfp) != GET_EP() + 1) {
- VALUE *ep = vm_base_ptr(reg_cfp) - 1;
- /* TODO: copy env and clean stack at creating env? */
- *ep = *GET_EP();
- SET_EP(ep);
- }
-}
-
-
/** simple functions */
/**
diff --git a/node.h b/node.h
index 42a24c2..19e9129 100644
--- a/node.h
+++ b/node.h
@@ -230,8 +230,6 @@ enum node_type {
#define NODE_PRELUDE NODE_PRELUDE
NODE_LAMBDA,
#define NODE_LAMBDA NODE_LAMBDA
- NODE_OPTBLOCK,
-#define NODE_OPTBLOCK NODE_OPTBLOCK
NODE_LAST
#define NODE_LAST NODE_LAST
};
@@ -456,7 +454,6 @@ typedef struct RNode {
#define NEW_BMETHOD(b) NEW_NODE(NODE_BMETHOD,0,0,b)
#define NEW_ATTRASGN(r,m,a) NEW_NODE(NODE_ATTRASGN,r,m,a)
#define NEW_PRELUDE(p,b) NEW_NODE(NODE_PRELUDE,p,b,0)
-#define NEW_OPTBLOCK(a) NEW_NODE(NODE_OPTBLOCK,a,0,0)
#define NEW_MEMO(a,b,c) NEW_NODE(NODE_MEMO,a,b,c)
#define roomof(x, y) ((sizeof(x) + sizeof(y) - 1) / sizeof(y))