Adjust styles and indents [ci skip]
This commit is contained in:
parent
76c20b06aa
commit
c30b8ae947
@ -3880,7 +3880,8 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
|
||||
if ((flag & VM_CALL_ARGS_SPLAT) && !(flag & (VM_CALL_KW_SPLAT|VM_CALL_ARGS_BLOCKARG))) {
|
||||
OPERAND_AT(iobj, 0) = Qfalse;
|
||||
}
|
||||
} else if (IS_NEXT_INSN_ID(niobj, getlocal) || IS_NEXT_INSN_ID(niobj, getinstancevariable)) {
|
||||
}
|
||||
else if (IS_NEXT_INSN_ID(niobj, getlocal) || IS_NEXT_INSN_ID(niobj, getinstancevariable)) {
|
||||
niobj = niobj->next;
|
||||
|
||||
if (IS_NEXT_INSN_ID(niobj, send)) {
|
||||
|
3
cont.c
3
cont.c
@ -3299,7 +3299,8 @@ rb_fiber_m_kill(VALUE self)
|
||||
else if (fiber->status != FIBER_TERMINATED) {
|
||||
if (fiber_current() == fiber) {
|
||||
fiber_check_killed(fiber);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
fiber_raise(fiber_ptr(self), Qnil);
|
||||
}
|
||||
}
|
||||
|
12
parse.y
12
parse.y
@ -12068,7 +12068,8 @@ rb_node_lit_new(struct parser_params *p, VALUE nd_lit, const YYLTYPE *loc)
|
||||
}
|
||||
|
||||
static rb_node_integer_t *
|
||||
rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc) {
|
||||
rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
|
||||
{
|
||||
rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
|
||||
n->val = val;
|
||||
n->minus = FALSE;
|
||||
@ -12078,7 +12079,8 @@ rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE
|
||||
}
|
||||
|
||||
static rb_node_float_t *
|
||||
rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc) {
|
||||
rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
|
||||
{
|
||||
rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
|
||||
n->val = val;
|
||||
n->minus = FALSE;
|
||||
@ -12087,7 +12089,8 @@ rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc) {
|
||||
}
|
||||
|
||||
static rb_node_rational_t *
|
||||
rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc) {
|
||||
rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
|
||||
{
|
||||
rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
|
||||
n->val = val;
|
||||
n->minus = FALSE;
|
||||
@ -12098,7 +12101,8 @@ rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_poin
|
||||
}
|
||||
|
||||
static rb_node_imaginary_t *
|
||||
rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc) {
|
||||
rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
|
||||
{
|
||||
rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
|
||||
n->val = val;
|
||||
n->minus = FALSE;
|
||||
|
@ -17,8 +17,7 @@ compile_negative_numeric(VALUE val)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
switch (OBJ_BUILTIN_TYPE(val))
|
||||
{
|
||||
switch (OBJ_BUILTIN_TYPE(val)) {
|
||||
case T_BIGNUM:
|
||||
BIGNUM_NEGATE(val);
|
||||
val = rb_big_norm(val);
|
||||
@ -79,7 +78,8 @@ compile_rational_literal(char* node_val, int base, int seen_point)
|
||||
memmove(point, point+1, fraclen+1);
|
||||
|
||||
lit = rb_rational_new(compile_numeric_literal(val, base), rb_int_positive_pow(10, fraclen));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
lit = rb_rational_raw1(compile_numeric_literal(val, base));
|
||||
}
|
||||
|
||||
|
@ -921,7 +921,8 @@ timer_thread_polling(rb_vm_t *vm)
|
||||
// wakeup timerthread
|
||||
RUBY_DEBUG_LOG("comm from fd:%d", timer_th.comm_fds[1]);
|
||||
consume_communication_pipe(timer_th.comm_fds[0]);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// wakeup specific thread by IO
|
||||
RUBY_DEBUG_LOG("io event. wakeup_th:%u event:%s%s",
|
||||
rb_th_serial(th),
|
||||
@ -940,7 +941,8 @@ timer_thread_polling(rb_vm_t *vm)
|
||||
th->sched.waiting_reason.data.result = filter;
|
||||
|
||||
timer_thread_wakeup_thread(th);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// already released
|
||||
}
|
||||
}
|
||||
|
@ -216,7 +216,8 @@ rb_mod_set_temporary_name(VALUE mod, VALUE name)
|
||||
if (NIL_P(name)) {
|
||||
// Set the temporary classpath to NULL (anonymous):
|
||||
RCLASS_SET_CLASSPATH(mod, 0, FALSE);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// Ensure the name is a string:
|
||||
StringValue(name);
|
||||
|
||||
|
@ -551,7 +551,8 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co
|
||||
arg_rest_dup(args);
|
||||
rb_ary_push(args->rest, converted_keyword_hash);
|
||||
keyword_hash = Qnil;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
keyword_hash = converted_keyword_hash;
|
||||
}
|
||||
|
||||
|
@ -5884,7 +5884,8 @@ rb_vm_opt_getconstant_path(rb_execution_context_t *ec, rb_control_frame_t *const
|
||||
val = ice->value;
|
||||
|
||||
VM_ASSERT(val == vm_get_ev_const_chain(ec, segments));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ruby_vm_constant_cache_misses++;
|
||||
val = vm_get_ev_const_chain(ec, segments);
|
||||
vm_ic_track_const_chain(GET_CFP(), ic, segments);
|
||||
|
@ -1767,7 +1767,8 @@ rb_postponed_job_preregister(unsigned int flags, rb_postponed_job_func_t func, v
|
||||
* datas being written */
|
||||
RUBY_ATOMIC_PTR_EXCHANGE(pjq->table[i].data, data);
|
||||
return (rb_postponed_job_handle_t)i;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
/* Try the next slot if this one already has a func in it */
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user