зеркало из https://github.com/github/ruby.git
* expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
96990203b7
Коммит
61c8247d55
2
gc.c
2
gc.c
|
@ -4303,7 +4303,7 @@ mark_method_entry(rb_objspace_t *objspace, const rb_method_entry_t *me)
|
|||
gc_mark(objspace, def->body.attr.location);
|
||||
break;
|
||||
case VM_METHOD_TYPE_BMETHOD:
|
||||
gc_mark(objspace, def->body.bmethod.proc);
|
||||
gc_mark(objspace, def->body.bmethod.proc);
|
||||
if (def->body.bmethod.hooks) rb_hook_list_mark(def->body.bmethod.hooks);
|
||||
break;
|
||||
case VM_METHOD_TYPE_ALIAS:
|
||||
|
|
4
iseq.c
4
iseq.c
|
@ -3091,7 +3091,7 @@ rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events)
|
|||
return;
|
||||
}
|
||||
else {
|
||||
unsigned int pc;
|
||||
unsigned int pc;
|
||||
const struct rb_iseq_constant_body *const body = iseq->body;
|
||||
VALUE *iseq_encoded = (VALUE *)body->iseq_encoded;
|
||||
rb_event_flag_t enabled_events;
|
||||
|
@ -3100,7 +3100,7 @@ rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events)
|
|||
enabled_events = turnon_events | local_events;
|
||||
|
||||
for (pc=0; pc<body->iseq_size;) {
|
||||
rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pc);
|
||||
rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pc);
|
||||
pc += encoded_iseq_trace_instrument(&iseq_encoded[pc], pc_events & enabled_events);
|
||||
}
|
||||
}
|
||||
|
|
4
proc.c
4
proc.c
|
@ -2342,7 +2342,7 @@ rb_method_entry_min_max_arity(const rb_method_entry_t *me, int *max)
|
|||
def = def->body.alias.original_me->def;
|
||||
goto again;
|
||||
case VM_METHOD_TYPE_BMETHOD:
|
||||
return rb_proc_min_max_arity(def->body.bmethod.proc, max);
|
||||
return rb_proc_min_max_arity(def->body.bmethod.proc, max);
|
||||
case VM_METHOD_TYPE_ISEQ:
|
||||
return rb_iseq_min_max_arity(rb_iseq_check(def->body.iseq.iseqptr), max);
|
||||
case VM_METHOD_TYPE_UNDEF:
|
||||
|
@ -2494,7 +2494,7 @@ method_def_iseq(const rb_method_definition_t *def)
|
|||
case VM_METHOD_TYPE_ISEQ:
|
||||
return rb_iseq_check(def->body.iseq.iseqptr);
|
||||
case VM_METHOD_TYPE_BMETHOD:
|
||||
return rb_proc_get_iseq(def->body.bmethod.proc, 0);
|
||||
return rb_proc_get_iseq(def->body.bmethod.proc, 0);
|
||||
case VM_METHOD_TYPE_ALIAS:
|
||||
return method_def_iseq(def->body.alias.original_me->def);
|
||||
case VM_METHOD_TYPE_CFUNC:
|
||||
|
|
2
thread.c
2
thread.c
|
@ -5340,7 +5340,7 @@ rb_resolve_me_location(const rb_method_entry_t *me, VALUE resolved_location[5])
|
|||
break;
|
||||
}
|
||||
case VM_METHOD_TYPE_BMETHOD: {
|
||||
const rb_iseq_t *iseq = rb_proc_get_iseq(me->def->body.bmethod.proc, 0);
|
||||
const rb_iseq_t *iseq = rb_proc_get_iseq(me->def->body.bmethod.proc, 0);
|
||||
if (iseq) {
|
||||
rb_iseq_location_t *loc;
|
||||
rb_iseq_check(iseq);
|
||||
|
|
|
@ -485,7 +485,7 @@ struct rb_iseq_struct {
|
|||
int index;
|
||||
} loader;
|
||||
|
||||
rb_event_flag_t global_trace_events;
|
||||
rb_event_flag_t global_trace_events;
|
||||
} aux;
|
||||
};
|
||||
|
||||
|
@ -1835,7 +1835,7 @@ void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *
|
|||
rb_hook_list_t *hooks_arg_ = (hooks_); \
|
||||
if (UNLIKELY((hooks_arg_)->events & (flag_arg_))) { \
|
||||
/* defer evaluating the other arguments */ \
|
||||
rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); \
|
||||
rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
|
|
@ -3892,7 +3892,7 @@ vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *p
|
|||
else {
|
||||
const rb_iseq_t *iseq = reg_cfp->iseq;
|
||||
size_t pos = pc - iseq->body->iseq_encoded;
|
||||
rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pos);
|
||||
rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pos);
|
||||
rb_hook_list_t *local_hooks = iseq->local_hooks;
|
||||
rb_event_flag_t local_hook_events = local_hooks != NULL ? local_hooks->events : 0;
|
||||
enabled_flags |= local_hook_events;
|
||||
|
|
10
vm_method.c
10
vm_method.c
|
@ -152,7 +152,7 @@ rb_method_definition_release(rb_method_definition_t *def, int complemented)
|
|||
VM_ASSERT(complemented_count >= 0);
|
||||
|
||||
if (alias_count + complemented_count == 0) {
|
||||
if (METHOD_DEBUG) fprintf(stderr, "-%p-%s:%d,%d (remove)\n", (void *)def,
|
||||
if (METHOD_DEBUG) fprintf(stderr, "-%p-%s:%d,%d (remove)\n", (void *)def,
|
||||
rb_id2name(def->original_id), alias_count, complemented_count);
|
||||
VM_ASSERT(def->type == VM_METHOD_TYPE_BMETHOD ? def->body.bmethod.hooks == NULL : TRUE);
|
||||
xfree(def);
|
||||
|
@ -279,7 +279,7 @@ rb_method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *de
|
|||
return;
|
||||
}
|
||||
case VM_METHOD_TYPE_BMETHOD:
|
||||
RB_OBJ_WRITE(me, &def->body.bmethod.proc, (VALUE)opts);
|
||||
RB_OBJ_WRITE(me, &def->body.bmethod.proc, (VALUE)opts);
|
||||
return;
|
||||
case VM_METHOD_TYPE_NOTIMPLEMENTED:
|
||||
setup_method_cfunc_struct(UNALIGNED_MEMBER_PTR(def, body.cfunc), rb_f_notimplement, -1);
|
||||
|
@ -320,7 +320,7 @@ method_definition_reset(const rb_method_entry_t *me)
|
|||
RB_OBJ_WRITTEN(me, Qundef, def->body.attr.location);
|
||||
break;
|
||||
case VM_METHOD_TYPE_BMETHOD:
|
||||
RB_OBJ_WRITTEN(me, Qundef, def->body.bmethod.proc);
|
||||
RB_OBJ_WRITTEN(me, Qundef, def->body.bmethod.proc);
|
||||
/* give up to check all in a list */
|
||||
if (def->body.bmethod.hooks) rb_gc_writebarrier_remember((VALUE)me);
|
||||
break;
|
||||
|
@ -583,7 +583,7 @@ rb_method_entry_make(VALUE klass, ID mid, VALUE defined_class, rb_method_visibil
|
|||
iseq = def_iseq_ptr(old_def);
|
||||
break;
|
||||
case VM_METHOD_TYPE_BMETHOD:
|
||||
iseq = rb_proc_get_iseq(old_def->body.bmethod.proc, 0);
|
||||
iseq = rb_proc_get_iseq(old_def->body.bmethod.proc, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1525,7 +1525,7 @@ rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_defini
|
|||
case VM_METHOD_TYPE_IVAR:
|
||||
return d1->body.attr.id == d2->body.attr.id;
|
||||
case VM_METHOD_TYPE_BMETHOD:
|
||||
return RTEST(rb_equal(d1->body.bmethod.proc, d2->body.bmethod.proc));
|
||||
return RTEST(rb_equal(d1->body.bmethod.proc, d2->body.bmethod.proc));
|
||||
case VM_METHOD_TYPE_MISSING:
|
||||
return d1->original_id == d2->original_id;
|
||||
case VM_METHOD_TYPE_ZSUPER:
|
||||
|
|
|
@ -206,7 +206,7 @@ static void
|
|||
clean_hooks_check(const rb_execution_context_t *ec, rb_hook_list_t *list)
|
||||
{
|
||||
if (UNLIKELY(list->need_clean != FALSE)) {
|
||||
if (list->running == 0) {
|
||||
if (list->running == 0) {
|
||||
clean_hooks(ec, list);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче