From 6dbf55f1ba2d58640cbede440e81d0367dd008da Mon Sep 17 00:00:00 2001 From: mame Date: Thu, 22 May 2008 11:16:40 +0000 Subject: [PATCH] * iseq.c (iseq_load, iseq_data_to_ary): support ISEQ_TYPE_DEFINED_GUARD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ iseq.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 529ad48307..7b11bfeae0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu May 22 20:14:28 2008 Yusuke Endoh + + * iseq.c (iseq_load, iseq_data_to_ary): support + ISEQ_TYPE_DEFINED_GUARD. + Thu May 22 19:01:29 2008 Nobuyoshi Nakada * vm.c (vm_get_ruby_level_cfp): moved from eval_intern.h. diff --git a/iseq.c b/iseq.c index f6f443c21b..562a8ca526 100644 --- a/iseq.c +++ b/iseq.c @@ -388,6 +388,7 @@ iseq_load(VALUE self, VALUE data, VALUE parent, VALUE opt) st_insert(type_map, ID2SYM(rb_intern("rescue")), ISEQ_TYPE_RESCUE); st_insert(type_map, ID2SYM(rb_intern("ensure")), ISEQ_TYPE_ENSURE); st_insert(type_map, ID2SYM(rb_intern("eval")), ISEQ_TYPE_EVAL); + st_insert(type_map, ID2SYM(rb_intern("defined_guard")), ISEQ_TYPE_DEFINED_GUARD); } if (st_lookup(type_map, type, &iseq_type) == 0) { @@ -1000,6 +1001,7 @@ iseq_data_to_ary(rb_iseq_t *iseq) DECL_SYMBOL(rescue); DECL_SYMBOL(ensure); DECL_SYMBOL(eval); + DECL_SYMBOL(defined_guard); if (sym_top == 0) { int i; @@ -1013,6 +1015,7 @@ iseq_data_to_ary(rb_iseq_t *iseq) INIT_SYMBOL(rescue); INIT_SYMBOL(ensure); INIT_SYMBOL(eval); + INIT_SYMBOL(defined_guard); } /* type */ @@ -1024,6 +1027,7 @@ iseq_data_to_ary(rb_iseq_t *iseq) case ISEQ_TYPE_RESCUE: type = sym_rescue; break; case ISEQ_TYPE_ENSURE: type = sym_ensure; break; case ISEQ_TYPE_EVAL: type = sym_eval; break; + case ISEQ_TYPE_DEFINED_GUARD: type = sym_defined_guard; break; default: rb_bug("unsupported iseq type"); };