diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | compile.c | 14 | ||||
-rw-r--r-- | ext/objspace/objspace.c | 1 | ||||
-rw-r--r-- | gc.c | 1 | ||||
-rw-r--r-- | insns.def | 20 | ||||
-rw-r--r-- | node.h | 3 |
6 files changed, 10 insertions, 39 deletions
@@ -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. @@ -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 f78b43855c..33106382ca 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]); } @@ -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: @@ -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 */ /** @@ -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)) |