yarv-diff:183
From: ko1 atdot.net
Date: 29 Dec 2005 03:29:26 -0000
Subject: [yarv-diff:183] r341 - trunk
Author: ko1
Date: 2005-12-29 12:29:26 +0900 (Thu, 29 Dec 2005)
New Revision: 341
Modified:
trunk/ChangeLog
trunk/compile.c
trunk/yarvcore.h
Log:
* compile.c, yarvcore.h :
remvoe needless yarv_iseq_t#rewind_frame_size
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2005-12-29 02:24:32 UTC (rev 340)
+++ trunk/ChangeLog 2005-12-29 03:29:26 UTC (rev 341)
@@ -4,6 +4,12 @@
# from Mon, 03 May 2004 01:24:19 +0900
#
+2005-12-29(Thu) 12:27:12 +0900 Koichi Sasada <ko1 atdot.net>
+
+ * compile.c, yarvcore.h :
+ remvoe needless yarv_iseq_t#rewind_frame_size
+
+
2005-12-29(Thu) 11:17:58 +0900 Koichi Sasada <ko1 atdot.net>
* common.mk : add dependency to test-all rule
Modified: trunk/compile.c
===================================================================
--- trunk/compile.c 2005-12-29 02:24:32 UTC (rev 340)
+++ trunk/compile.c 2005-12-29 03:29:26 UTC (rev 341)
@@ -129,10 +129,6 @@
#include "optunifs.inc"
#endif
-#define REWIND_DSIZE() 1
-#define MREWIND_DSIZE() 2
-
-
VALUE
iseq_compile(VALUE self, VALUE narg)
{
@@ -169,11 +165,9 @@
/* with sn_body->nd_head */
if(iseq->type == ISEQ_TYPE_METHOD){
- iseq->rewind_frame_size = iseq->local_size + MREWIND_DSIZE();
COMPILE(list_anchor, "normal method", sn_body->nd_next);
}
else if(iseq->type == ISEQ_TYPE_CLASS){
- iseq->rewind_frame_size = iseq->local_size + REWIND_DSIZE();
COMPILE(list_anchor, "class/module", sn_body->nd_next);
}
else{
@@ -185,11 +179,9 @@
/* normal block */
if(iseq->type == ISEQ_TYPE_CLASS){
- iseq->rewind_frame_size = iseq->local_size + REWIND_DSIZE();
COMPILE(list_anchor, "class/module", sn_body);
}
else if(iseq->type == ISEQ_TYPE_BLOCK){
- iseq->rewind_frame_size = iseq->local_size + REWIND_DSIZE();
COMPILE(list_anchor, "normal block", sn_body);
}
else{
@@ -201,25 +193,19 @@
/* empty method */
/* some method attribute process */
debugs("empty method\n");
-
+
set_arguments(iseq, list_anchor, sn_body);
ADD_INSN(list_anchor, nd_line(sn_body), putnil);
-
- iseq->rewind_frame_size = iseq->local_size + MREWIND_DSIZE();
break;
default:
COMPILE(list_anchor, "other scope", sn_body);
-
- iseq->rewind_frame_size = iseq->local_size + REWIND_DSIZE();
break;
}
}
else{
/* sn_body == 0 */
ADD_INSN(list_anchor, 0, putnil);
-
- iseq->rewind_frame_size = iseq->local_size + REWIND_DSIZE();
}
}
else{
@@ -228,8 +214,6 @@
LABEL *start = iseq->compile_data->start_label = NEW_LABEL(0);
LABEL *end = iseq->compile_data->end_label = NEW_LABEL(0);
- iseq->rewind_frame_size = iseq->local_size + REWIND_DSIZE();
-
ADD_LABEL(list_anchor, iseq->compile_data->start_label);
COMPILE(list_anchor, "block body", node);
ADD_LABEL(list_anchor, iseq->compile_data->end_label);
@@ -240,22 +224,18 @@
}
else if(iseq->type == ISEQ_TYPE_TOP){
set_localtbl(iseq, GET_THREAD()->top_local_tbl);
- iseq->rewind_frame_size = iseq->local_size + REWIND_DSIZE();
COMPILE(list_anchor, "top level node", node);
}
else if(iseq->type == ISEQ_TYPE_EVAL){
- iseq->rewind_frame_size = iseq->local_size + REWIND_DSIZE();
set_localtbl_eval(iseq, GET_THREAD()->top_local_tbl);
COMPILE(list_anchor, "eval node", node);
}
else if(iseq->type == ISEQ_TYPE_RESCUE){
set_exception_tbl(iseq);
- iseq->rewind_frame_size = iseq->local_size + REWIND_DSIZE();
COMPILE(list_anchor, "rescue", node);
}
else if(iseq->type == ISEQ_TYPE_ENSURE){
set_exception_tbl(iseq);
- iseq->rewind_frame_size = iseq->local_size + REWIND_DSIZE();
COMPILE_POPED(list_anchor, "ensure", node);
}
else if(iseq->type == ISEQ_TYPE_DEFINED_GUARD){
Modified: trunk/yarvcore.h
===================================================================
--- trunk/yarvcore.h 2005-12-29 02:24:32 UTC (rev 340)
+++ trunk/yarvcore.h 2005-12-29 03:29:26 UTC (rev 341)
@@ -245,9 +245,6 @@
int arg_opts;
VALUE *arg_opt_tbl;
- /* rewind frame size from dfp */
- int rewind_frame_size;
-
/* for stack overflow check */
int stack_max;
--
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml