* insns.def (defined): adjust indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ad065375f
commit
826aa8c376
62
insns.def
62
insns.def
@ -787,19 +787,19 @@ defined
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DEFINED_METHOD:{
|
case DEFINED_METHOD:{
|
||||||
VALUE klass = CLASS_OF(v);
|
VALUE klass = CLASS_OF(v);
|
||||||
const rb_method_entry_t *me = rb_method_entry(klass, SYM2ID(obj));
|
const rb_method_entry_t *me = rb_method_entry(klass, SYM2ID(obj));
|
||||||
|
|
||||||
if (me) {
|
if (me) {
|
||||||
if (!(me->flag & NOEX_PRIVATE)) {
|
if (!(me->flag & NOEX_PRIVATE)) {
|
||||||
if (!((me->flag & NOEX_PROTECTED) &&
|
if (!((me->flag & NOEX_PROTECTED) &&
|
||||||
!rb_obj_is_kind_of(GET_SELF(),
|
!rb_obj_is_kind_of(GET_SELF(),
|
||||||
rb_class_real(klass)))) {
|
rb_class_real(klass)))) {
|
||||||
expr_type = "method";
|
expr_type = "method";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEFINED_YIELD:
|
case DEFINED_YIELD:
|
||||||
if (GET_BLOCK_PTR()) {
|
if (GET_BLOCK_PTR()) {
|
||||||
@ -807,27 +807,27 @@ defined
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DEFINED_ZSUPER:{
|
case DEFINED_ZSUPER:{
|
||||||
rb_iseq_t *ip = GET_ISEQ();
|
rb_iseq_t *ip = GET_ISEQ();
|
||||||
while (ip) {
|
while (ip) {
|
||||||
if (ip->defined_method_id) {
|
if (ip->defined_method_id) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ip = ip->parent_iseq;
|
ip = ip->parent_iseq;
|
||||||
}
|
}
|
||||||
if (ip) {
|
if (ip) {
|
||||||
VALUE klass = vm_search_normal_superclass(ip->klass, GET_SELF());
|
VALUE klass = vm_search_normal_superclass(ip->klass, GET_SELF());
|
||||||
if (rb_method_boundp(klass, ip->defined_method_id, 0)) {
|
if (rb_method_boundp(klass, ip->defined_method_id, 0)) {
|
||||||
expr_type = "super";
|
expr_type = "super";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEFINED_REF:{
|
case DEFINED_REF:{
|
||||||
val = vm_getspecial(th, GET_LFP(), Qfalse, FIX2INT(obj));
|
val = vm_getspecial(th, GET_LFP(), Qfalse, FIX2INT(obj));
|
||||||
if (val != Qnil) {
|
if (val != Qnil) {
|
||||||
expr_type = "global-variable";
|
expr_type = "global-variable";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
rb_bug("unimplemented defined? type (VM)");
|
rb_bug("unimplemented defined? type (VM)");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user