mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
6f04138f75
commit
6dbf55f1ba
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu May 22 20:14:28 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* iseq.c (iseq_load, iseq_data_to_ary): support
|
||||
ISEQ_TYPE_DEFINED_GUARD.
|
||||
|
||||
Thu May 22 19:01:29 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm.c (vm_get_ruby_level_cfp): moved from eval_intern.h.
|
||||
|
|
4
iseq.c
4
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");
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue