summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-12 18:47:43 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-12 18:47:43 (GMT)
commit163d436d428b1e72bc342c51ebc6add818101913 (patch)
tree863fc65cab3a27b59f45fe777ef0478da603e929 /compile.c
parent1944eecb2af56e3d0617ae2550ad8000e348f528 (diff)
* vm_insnhelper.c (vm_call_iseq_setup_normal): do not clear local
variables here. vm_push_frame() clears. * vm_insnhelper.c (vm_call_iseq_setup_tailcall): ditto. * vm_insnhelper.c (vm_push_frame): move check code to vm_check_frame(). Reorder initialization timing to reuse same values (sp). * compile.c (rb_iseq_compile_node): use iseq_set_exception_local_table() for ISEQ_TYPE_DEFINED_GUARD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 857d994..98c3b09 100644
--- a/compile.c
+++ b/compile.c
@@ -548,7 +548,7 @@ rb_iseq_compile_node(rb_iseq_t *iseq, NODE *node)
COMPILE_POPED(ret, "ensure", node);
break;
case ISEQ_TYPE_DEFINED_GUARD:
- iseq_set_local_table(iseq, 0);
+ iseq_set_exception_local_table(iseq);
COMPILE(ret, "defined guard", node);
break;
default:
@@ -1054,6 +1054,9 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
static int
iseq_set_exception_local_table(rb_iseq_t *iseq)
{
+ /* TODO: every id table is same -> share it.
+ * Current problem is iseq_free().
+ */
ID id_dollar_bang;
ID *ids = (ID *)ALLOC_N(ID, 1);