# New Ticket Created by "Paul Cochrane"
# Please include the string: [perl #40483]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40483 >
Hi,
This patch uncuddles the else's in the C source, and makes the
t/codingstd/cuddled_else.t test pass.
Regards,
Paul
files affected:
src/utils.c
src/malloc-trace.c
src/tsq.c
src/resources.c
src/hll.c
src/stm/stm_internal.h
src/stm/backend.c
src/register.c
src/debug.c
src/inter_call.c
src/string.c
src/malloc.c
src/headers.c
src/string_primitives.c
src/objects.c
src/packfile/pf_items.c
src/jit/sun4/jit_emit.h
src/thread.c
src/dynext.c
src/mmd.c
src/packfile.c
src/io/io_buf.c
src/io/io_unix.c
src/sub.c
include/parrot/atomic/fallback.h
include/parrot/atomic/gcc_pcc.h
include/parrot/atomic/gcc_x86.h
include/parrot/atomic.h
compilers/imcc/cfg.c
compilers/imcc/pbc.c
compilers/imcc/optimizer.c
compilers/imcc/imcparser.c
compilers/imcc/imclexer.c
compilers/imcc/reg_alloc_bc.c
config/gen/platform/generic/exec.c
Index: src/utils.c
===================================================================
--- src/utils.c (revision 14862)
+++ src/utils.c (working copy)
@@ -684,13 +684,15 @@
if ( pred_index < 0 ) { /* pred has no predecessor */
move_reg(pred, node, c);
- } else { /* pred has a predecessor, so may be processed */
+ }
+ else { /* pred has a predecessor, so may be processed */
src = c->backup[pred_index];
if ( src < 0 ) { /* not visited */
move_reg(pred, node, c);
c->backup[pred_index] = node; /* marks pred*/
rec_climb_back_and_mark(pred_index, c);
- } else { /* already visited, use backup instead */
+ }
+ else { /* already visited, use backup instead */
move_reg(src, node, c);
}
}
Index: src/malloc-trace.c
===================================================================
--- src/malloc-trace.c (revision 14862)
+++ src/malloc-trace.c (working copy)
@@ -51,7 +51,8 @@
while(--s>cmdline && *s!='/');
if(*s == '/') s++;
sprintf(name, LOG_NAME ".%.12s.%d", s, pid);
- } else {
+ }
+ else {
sprintf(name, LOG_NAME ".%d", pid);
}
#else
Index: src/tsq.c
===================================================================
--- src/tsq.c (revision 14862)
+++ src/tsq.c (working copy)
@@ -82,7 +82,8 @@
if (queue->head == queue->tail) {
queue->head = NULL;
queue->tail = NULL;
- } else {
+ }
+ else {
queue->head = queue->head->next;
}
returnval->next = NULL;
@@ -134,7 +135,8 @@
if (queue->tail) {
queue->tail->next = entry;
queue->tail = entry;
- } else {
+ }
+ else {
queue->head = entry;
queue->tail = entry;
}
Index: src/resources.c
===================================================================
--- src/resources.c (revision 14862)
+++ src/resources.c (working copy)
@@ -841,7 +841,8 @@
next_block = cur_block->prev;
if (cur_block->free == cur_block->size) {
mem_internal_free(cur_block);
- } else {
+ }
+ else {
cur_block->next = NULL;
cur_block->prev = dest->top_block;
dest->top_block = cur_block;
Index: src/hll.c
===================================================================
--- src/hll.c (revision 14862)
+++ src/hll.c (working copy)
@@ -225,7 +225,8 @@
nelements = VTABLE_elements(interpreter, hll_info);
if (id < 0 || id >= nelements) {
ret = NULL;
- } else {
+ }
+ else {
PMC *entry;
PMC *name_pmc;
START_READ_HLL_INFO(interpreter, hll_info);
Index: src/stm/stm_internal.h
===================================================================
--- src/stm/stm_internal.h (revision 14862)
+++ src/stm/stm_internal.h (working copy)
@@ -18,7 +18,8 @@
struct STM_profile_data *profile = &PROFILE(log); \
if (cycles == 0) { \
++profile->num_non_waits; \
- } else { \
+ } \
+ else { \
if (time_bucket >= TIME_BUCKETS) { \
time_bucket = TIME_BUCKETS - 1; \
} else if (time_bucket == 0) { \
Index: src/stm/backend.c
===================================================================
--- src/stm/backend.c (revision 14862)
+++ src/stm/backend.c (working copy)
@@ -328,12 +328,14 @@
}
PARROT_ATOMIC_INT_SET(inner->status, STM_STATUS_ABORTED);
return 0;
- } else if (need_abort) {
+ }
+ else if (need_abort) {
/* leave as merged, abort the outer transaction since it is
* now invalid */
PARROT_ATOMIC_INT_SET(outer->status, STM_STATUS_ABORTED);
return 1;
- } else {
+ }
+ else {
return 1;
}
}
@@ -344,7 +346,8 @@
ret = VTABLE_share_ro(interp, pmc);
assert(PObj_is_PMC_shared_TEST(ret));
return ret;
- } else {
+ }
+ else {
return PMCNULL;
}
}
@@ -585,7 +588,8 @@
get_sublog(log, log->depth - 1), cursub, 1);
assert(successp); /* should always return true, since we pass
1 for the always argument */
- } else
+ }
+ else
successp = do_real_commit(interp, log);
if (!successp) {
@@ -1113,7 +1117,8 @@
write->saw_version = read->saw_version;
PARROT_ATOMIC_PTR_CAS(successp, handle->owner_or_version,
read->saw_version, cursub);
- } else {
+ }
+ else {
assert(outersub);
STM_TRACE("... from outer transaction's write record");
PARROT_ATOMIC_PTR_GET(write->saw_version,
@@ -1130,7 +1135,8 @@
write->value = PMCNULL;
else
write->value = local_pmc_copy(interp, old_value);
- } else {
+ }
+ else {
STM_TRACE("don't have old value");
/* avoiding creating write records when we are actually aborted
* XXX in the future we will do this by throwing an exception to
@@ -1145,7 +1151,8 @@
write->saw_version, cursub);
} while (!successp && !is_aborted(log));
STM_TRACE("... and acquired it");
- } else {
+ }
+ else {
STM_TRACE("... but already aborted anyways");
write->saw_version = NULL;
}
Index: src/register.c
===================================================================
--- src/register.c (revision 14862)
+++ src/register.c (working copy)
@@ -213,7 +213,8 @@
for (i = 0; i < ctx->n_regs_used[REGNO_NUM]; i++) {
CTX_REG_NUM(ctx, i) = -99.9;
}
- } else {
+ }
+ else {
for (i = 0; i < ctx->n_regs_used[REGNO_INT]; i++) {
CTX_REG_INT(ctx, i) = -888;
}
Index: src/debug.c
===================================================================
--- src/debug.c (revision 14862)
+++ src/debug.c (working copy)
@@ -2043,7 +2043,8 @@
interpreter->code->const_table->constants =
mem_sys_realloc(interpreter->code->const_table->constants,
k * sizeof(struct PackFile_Constant *));
- } else {
+ }
+ else {
interpreter->code->const_table->constants =
mem_sys_allocate(k * sizeof(struct PackFile_Constant *));
}
Index: src/inter_call.c
===================================================================
--- src/inter_call.c (revision 14862)
+++ src/inter_call.c (working copy)
@@ -316,7 +316,8 @@
}
if (st->src.sig & PARROT_ARG_FLATTEN) {
make_flattened(interpreter, st, UVal_pmc(st->val));
- } else {
+ }
+ else {
st->src.mode |= CALL_STATE_NEXT_ARG;
}
}
@@ -494,7 +495,8 @@
Parrot_fetch_arg(interpreter, st);
}
UVal_pmc(st->val) = slurped;
- } else {
+ }
+ else {
Parrot_convert_arg(interpreter, st);
st->dest.mode |= CALL_STATE_NEXT_ARG;
}
@@ -1188,7 +1190,8 @@
if (what == PARROT_OP_get_results_pc) {
if (!PARROT_ERRORS_test(interpreter, PARROT_ERRORS_RESULT_COUNT_FLAG))
err_check = 0;
- } else {
+ }
+ else {
if (!PARROT_ERRORS_test(interpreter, PARROT_ERRORS_PARAM_COUNT_FLAG))
err_check = 0;
}
Index: src/string.c
===================================================================
--- src/string.c (revision 14862)
+++ src/string.c (working copy)
@@ -315,7 +315,8 @@
if (representation == enum_stringrep_one) {
s->charset = PARROT_DEFAULT_CHARSET;
s->encoding = CHARSET_GET_PREFERRED_ENCODING(interpreter, s);;
- } else {
+ }
+ else {
internal_exception(INVALID_CHARTYPE, "Unsupported representation");
}
Index: src/malloc.c
===================================================================
--- src/malloc.c (revision 14862)
+++ src/malloc.c (working copy)
@@ -5471,7 +5471,8 @@
*kernel = (CHUNK_SIZE_T) (kernel64 / 10000);
*user = (CHUNK_SIZE_T) (user64 / 10000);
return TRUE;
- } else {
+ }
+ else {
__int64 creation64, exit64, kernel64, user64;
int rc = GetThreadTimes (GetCurrentThread (),
(FILETIME *) &creation64,
Index: src/headers.c
===================================================================
--- src/headers.c (revision 14862)
+++ src/headers.c (working copy)
@@ -780,7 +780,8 @@
PMC *p = (PMC *)b;
if (PObj_is_PMC_shared_TEST(p)) {
PMC_sync(p)->owner = dest_interp;
- } else {
+ }
+ else {
/* fprintf(stderr, "BAD PMC: address=%p,
base_type=%d\n",
p, p->vtable->base_type); */
Index: src/string_primitives.c
===================================================================
--- src/string_primitives.c (revision 14862)
+++ src/string_primitives.c (working copy)
@@ -195,7 +195,8 @@
workchar += codepoint - 'a' + 10;
} else if (codepoint >= 'A' && codepoint <= 'F') {
workchar += codepoint - 'A' + 10;
- } else {
+ }
+ else {
internal_exception(UNIMPLEMENTED,
"Illegal escape sequence inside {}");
}
@@ -203,7 +204,8 @@
if (*offset == len)
internal_exception(UNIMPLEMENTED,
"Illegal escape sequence no '}'");
- } else {
+ }
+ else {
internal_exception(UNIMPLEMENTED, "Illegal escape sequence in");
}
++*offset;
@@ -216,10 +218,12 @@
workchar += codepoint - 'a' + 10;
} else if (codepoint >= 'A' && codepoint <= 'F') {
workchar += codepoint - 'A' + 10;
- } else {
+ }
+ else {
return workchar;
}
- } else {
+ }
+ else {
return workchar;
}
++*offset;
@@ -228,7 +232,8 @@
codepoint = CHARSET_GET_BYTE(interpreter, string, *offset);
if (codepoint >= 'A' && codepoint <= 'Z') {
workchar = codepoint - 'A' + 1;
- } else {
+ }
+ else {
internal_exception(UNIMPLEMENTED, "Illegal escape sequence");
}
++*offset;
@@ -245,11 +250,13 @@
workchar += codepoint - 'a' + 10;
} else if (codepoint >= 'A' && codepoint <= 'F') {
workchar += codepoint - 'A' + 10;
- } else {
+ }
+ else {
internal_exception(UNIMPLEMENTED,
"Illegal escape sequence in uxxx escape");
}
- } else {
+ }
+ else {
internal_exception(UNIMPLEMENTED,
"Illegal escape sequence in uxxx escape - too short");
}
@@ -268,11 +275,13 @@
workchar += codepoint - 'a' + 10;
} else if (codepoint >= 'A' && codepoint <= 'F') {
workchar += codepoint - 'A' + 10;
- } else {
+ }
+ else {
internal_exception(UNIMPLEMENTED,
"Illegal escape sequence in Uxxx escape");
}
- } else {
+ }
+ else {
internal_exception(UNIMPLEMENTED,
"Illegal escape sequence in uxxx escape - too short");
}
@@ -293,10 +302,12 @@
codepoint = CHARSET_GET_BYTE(interpreter, string, *offset);
if (codepoint >= '0' && codepoint <= '7') {
workchar += codepoint - '0';
- } else {
+ }
+ else {
return workchar;
}
- } else {
+ }
+ else {
return workchar;
}
++*offset;
@@ -305,10 +316,12 @@
codepoint = CHARSET_GET_BYTE(interpreter, string, *offset);
if (codepoint >= '0' && codepoint <= '7') {
workchar += codepoint - '0';
- } else {
+ }
+ else {
return workchar;
}
- } else {
+ }
+ else {
return workchar;
}
++*offset;
Index: src/objects.c
===================================================================
--- src/objects.c (revision 14862)
+++ src/objects.c (working copy)
@@ -240,7 +240,8 @@
if (ro_vtable)
((void **)ro_vtable)[i] = ((void**)deleg_pmc_vtable)[i];
((void **)vtable)[i] = ((void**)deleg_pmc_vtable)[i];
- } else {
+ }
+ else {
((void **)vtable)[i] = ((void**)object_vtable)[i];
if (ro_vtable)
((void **)ro_vtable)[i] = ((void**)ro_object_vtable)[i];
@@ -1192,7 +1193,8 @@
if (type >= mc->mc_size) {
if (mc->idx) {
mc->idx = mem_sys_realloc(mc->idx, sizeof(UINTVAL*) * (type + 1));
- } else {
+ }
+ else {
mc->idx = mem_sys_allocate(sizeof(UINTVAL*) * (type + 1));
}
for (i = mc->mc_size; i <= type; ++i)
Index: src/packfile/pf_items.c
===================================================================
--- src/packfile/pf_items.c (revision 14862)
+++ src/packfile/pf_items.c (working copy)
@@ -737,7 +737,8 @@
pf->fetch_nv = fetch_buf_be_8;
else if (pf->header->floattype == 1)
pf->fetch_nv = cvt_num12_num8_be;
- } else {
+ }
+ else {
if (pf->header->wordsize == 4)
pf->fetch_op = fetch_op_le_4;
else
Index: src/jit/sun4/jit_emit.h
===================================================================
--- src/jit/sun4/jit_emit.h (revision 14862)
+++ src/jit/sun4/jit_emit.h (working copy)
@@ -876,7 +876,8 @@
case PARROT_ARG_IC:
if (emitm_simm13_const(pi)) {
emitm_mov_i(jit_info->native_ptr, pi, emitm_o(rdx));
- } else {
+ }
+ else {
emitm_sethi(jit_info->native_ptr, emitm_hi22(pi), emitm_o(rdx));
emitm_or_i(jit_info->native_ptr, emitm_o(rdx), emitm_lo10(pi), emitm_o(rdx));
}
@@ -1118,7 +1119,8 @@
/* PMC* pmc_new_noinit(Interp *interpreter, INTVAL base_type) */
if (emitm_simm13_const(i2)) {
emitm_mov_i(jit_info->native_ptr, i2, emitm_o(1));
- } else {
+ }
+ else {
emitm_sethi(jit_info->native_ptr, emitm_hi22(i2), emitm_o(1));
emitm_or_i(jit_info->native_ptr, emitm_o(1), emitm_lo10(i2), emitm_o(1));
}
Index: src/thread.c
===================================================================
--- src/thread.c (revision 14862)
+++ src/thread.c (working copy)
@@ -89,7 +89,8 @@
ret_val = Parrot_clone(interpreter, arg);
PMC_sub(ret_val)->seg = PMC_sub(arg)->seg;
Parrot_store_sub_in_namespace(interpreter, ret_val);
- } else {
+ }
+ else {
ret_val = Parrot_clone(interpreter, arg);
}
return ret_val;
@@ -177,7 +178,8 @@
SET_CLASS((SLOTTYPE*) PMC_data(pmc), pmc,
master->vtables[type_num]->class);
UNLOCK_INTERPRETER(master);
- } else {
+ }
+ else {
/* TODO this will need to change for thread pools
* XXX should we have a seperate interpreter for this?
*/
@@ -278,7 +280,8 @@
} while (interp->thread_data->state & THREAD_STATE_SUSPENDED_GC);
UNLOCK(interpreter_array_mutex);
LOCK(*mutex);
- } else {
+ }
+ else {
UNLOCK(interpreter_array_mutex);
}
}
@@ -365,7 +368,8 @@
interpreter->thread_data->tid,
except->msg,
except->error);
- } else {
+ }
+ else {
/* run normally */
push_new_c_exception_handler(interpreter, &exp);
Parrot_unblock_DOD(interpreter);
@@ -459,7 +463,8 @@
VTABLE_set_pmc_keyed_str(d, dest_ns, key, sub_ns);
}
pt_ns_clone(d, sub_ns, s, val);
- } else {
+ }
+ else {
PMC *dval;
dval = VTABLE_get_pmc_keyed_str(d, dest_ns, key);
if (PMC_IS_NULL(dval)) {
@@ -829,7 +834,8 @@
info->gc_stage = to_stage;
info->num_reached = 0;
COND_BROADCAST(info->gc_cond);
- } else {
+ }
+ else {
do {
COND_WAIT(info->gc_cond, interpreter_array_mutex);
} while (info->gc_stage != to_stage);
@@ -879,7 +885,8 @@
TRACE_THREAD("just waking it up");
interp->thread_data->state |= THREAD_STATE_SUSPENDED_GC;
COND_SIGNAL(interp->thread_data->interp_cond);
- } else {
+ }
+ else {
TRACE_THREAD("queuing event");
interp->thread_data->state |= THREAD_STATE_SUSPEND_GC_REQUESTED;
Parrot_new_suspend_for_gc_event(interp);
@@ -987,7 +994,8 @@
}
if (!(interp->thread_data->state & THREAD_STATE_SUSPENDED_GC)) {
interp->thread_data->state |= THREAD_STATE_SUSPENDED_GC;
- } else {
+ }
+ else {
TRACE_THREAD("no need to set suspended\n");
}
UNLOCK(interpreter_array_mutex);
@@ -1067,7 +1075,8 @@
dod_register_pmc(parent, parent_ret);
Parrot_unblock_DOD(parent);
retval = parent_ret;
- } else {
+ }
+ else {
retval = PMCNULL;
}
interpreter_array[tid] = NULL;
@@ -1374,7 +1383,8 @@
interpreter->thread_data->state |= THREAD_STATE_SUSPENDED_GC;
TRACE_THREAD("%p: detected request", interpreter);
UNLOCK(interpreter_array_mutex);
- } else {
+ }
+ else {
/* we need to stop the world */
TRACE_THREAD("stop the world");
UNLOCK(interpreter_array_mutex);
Index: src/dynext.c
===================================================================
--- src/dynext.c (revision 14862)
+++ src/dynext.c (working copy)
@@ -286,7 +286,8 @@
init_func = (void (*)(Interp *, PMC *))D2FPTR(Parrot_dlsym(handle,
cinit_func_name));
string_cstring_free(cinit_func_name);
- } else {
+ }
+ else {
load_func = (void *)NULL;
init_func = NULL;
}
@@ -384,7 +385,8 @@
}
return new_lib_pmc;
- } else {
+ }
+ else {
return run_init_lib(d, handle, lib_name, wo_ext);
}
}
@@ -408,7 +410,8 @@
if ( lib == NULL) {
wo_ext = string_from_const_cstring(interpreter, "", 0);
lib_name = NULL;
- } else {
+ }
+ else {
lib_name = parrot_split_path_ext(interpreter, lib, &wo_ext, &ext);
}
lib_pmc = is_loaded(interpreter, wo_ext);
Index: src/mmd.c
===================================================================
--- src/mmd.c (revision 14862)
+++ src/mmd.c (working copy)
@@ -611,7 +611,8 @@
interpreter->binop_mmd_funcs =
mem_sys_realloc(interpreter->binop_mmd_funcs,
(func_nr + 1) * sizeof(MMD_table));
- } else {
+ }
+ else {
interpreter->binop_mmd_funcs =
mem_sys_allocate((func_nr + 1) * sizeof(MMD_table));
}
Index: src/packfile.c
===================================================================
--- src/packfile.c (revision 14862)
+++ src/packfile.c (working copy)
@@ -720,7 +720,8 @@
mem_sys_realloc(dir->segments,
sizeof (struct PackFile_Segment *) *
(dir->num_segments+1));
- } else {
+ }
+ else {
dir->segments = mem_sys_allocate(sizeof (struct PackFile_Segment *) *
(dir->num_segments+1));
}
@@ -1451,7 +1452,8 @@
mem_sys_realloc (dir->segments,
sizeof(struct PackFile_Segment *) *
dir->num_segments);
- } else {
+ }
+ else {
dir->segments =
mem_sys_allocate(sizeof(struct PackFile_Segment *) *
dir->num_segments);
@@ -2519,7 +2521,8 @@
ret->u.key = new_sub;
return ret;
- } else {
+ }
+ else {
return old_const;
}
}
@@ -2529,7 +2532,8 @@
if (!n_interpreters || !interpreter->thread_data ||
interpreter->thread_data->tid == 0) {
return ct->constants;
- } else {
+ }
+ else {
Hash *tables;
struct PackFile_Constant **new_consts;
@@ -2864,7 +2868,8 @@
self->fixups =
mem_sys_realloc(self->fixups, self->fixup_count *
sizeof(struct PackFile_FixupEntry *));
- } else {
+ }
+ else {
self->fixups =
mem_sys_allocate(sizeof(struct PackFile_FixupEntry *));
}
Index: src/io/io_buf.c
===================================================================
--- src/io/io_buf.c (revision 14862)
+++ src/io/io_buf.c (working copy)
@@ -573,7 +573,8 @@
if (s->bufused < l) {
if (s->strstart) {
Parrot_reallocate_string(interpreter, s, l);
- } else {
+ }
+ else {
Parrot_allocate_string(interpreter, s, l);
}
}
@@ -588,7 +589,8 @@
if (s->bufused < l) {
if (s->strstart) {
Parrot_reallocate_string(interpreter, s, l);
- } else {
+ }
+ else {
Parrot_allocate_string(interpreter, s, l);
}
}
Index: src/io/io_unix.c
===================================================================
--- src/io/io_unix.c (revision 14862)
+++ src/io/io_unix.c (working copy)
@@ -924,7 +924,8 @@
*/
*s = string_make(interpreter, buf, bytesread, "ascii", 0);
return bytesread;
- } else {
+ }
+ else {
switch (errno) {
case EINTR:
goto AGAIN;
Index: src/sub.c
===================================================================
--- src/sub.c (revision 14862)
+++ src/sub.c (working copy)
@@ -287,7 +287,8 @@
s = PMC_sub(sub);
if (PMC_IS_NULL(s->namespace_stash)) {
return s->name;
- } else {
+ }
+ else {
PMC *ns_array;
STRING *j;
@@ -341,7 +342,8 @@
if (PMC_IS_NULL(sub->namespace)) {
info->nsname = string_from_cstring(interpreter, "", 0);
info->fullname = info->subname;
- } else {
+ }
+ else {
info->nsname = VTABLE_get_string(interpreter, sub->namespace);
info->fullname = Parrot_full_sub_name(interpreter, ctx->current_sub);
}
Index: include/parrot/atomic/fallback.h
===================================================================
--- include/parrot/atomic/fallback.h (revision 14862)
+++ include/parrot/atomic/fallback.h (working copy)
@@ -74,7 +74,8 @@
void * orig = (a).val; \
(a).val = update; \
result = 1; \
- } else { \
+ } \
+ else { \
result = 0; \
} \
UNLOCK((a).lock); \
@@ -87,7 +88,8 @@
INTVAL orig = (a).val; \
(a).val = update; \
result = 1; \
- } else { \
+ } \
+ else { \
result = 0; \
} \
UNLOCK((a).lock); \
Index: include/parrot/atomic/gcc_pcc.h
===================================================================
--- include/parrot/atomic/gcc_pcc.h (revision 14862)
+++ include/parrot/atomic/gcc_pcc.h (working copy)
@@ -71,7 +71,8 @@
do { \
if (parrot_ppc_cmpset(&(a).val, expect, update) == expect) { \
result = 1; \
- } else { \
+ } \
+ else { \
result = 0; \
} \
} while (0)
@@ -98,7 +99,8 @@
(void * volatile *) &(a).val, (void *) expect, \
(void *) update) == (void *) expect) { \
result = 1; \
- } else { \
+ } \
+ else { \
result = 0; \
} \
} while (0)
Index: include/parrot/atomic/gcc_x86.h
===================================================================
--- include/parrot/atomic/gcc_x86.h (revision 14862)
+++ include/parrot/atomic/gcc_x86.h (working copy)
@@ -53,7 +53,8 @@
do { \
if (expect == parrot_i386_cmpxchg(&(a).val, expect, update)) { \
result = 1; \
- } else { \
+ } \
+ else { \
result = 0; \
} \
} while (0)
@@ -76,7 +77,8 @@
(void * volatile *) &(a).val, \
(void *) expect, (void *) update)) { \
result = 1; \
- } else { \
+ } \
+ else { \
result = 0; \
} \
} while (0)
Index: include/parrot/atomic.h
===================================================================
--- include/parrot/atomic.h (revision 14862)
+++ include/parrot/atomic.h (working copy)
@@ -57,7 +57,8 @@
if (expect == orig) { \
ATOMIC_SET(a, update); \
result = 1; \
- } else { \
+ } \
+ else { \
result = 0; \
} \
} while (0)
@@ -73,7 +74,8 @@
if (expect == orig) { \
ATOMIC_SET(a, update); \
result = 1; \
- } else { \
+ } \
+ else { \
result = 0; \
} \
} while (0)
Index: compilers/imcc/cfg.c
===================================================================
--- compilers/imcc/cfg.c (revision 14862)
+++ compilers/imcc/cfg.c (working copy)
@@ -384,7 +384,8 @@
if (edge->from->succ_list == edge) {
edge->from->succ_list = edge->succ_next;
- } else {
+ }
+ else {
for (prev = edge->from->succ_list; prev; prev = prev->succ_next) {
if (prev->succ_next == edge) {
prev->succ_next = edge->succ_next;
@@ -394,7 +395,8 @@
if (edge->to->pred_list == edge) {
edge->to->pred_list = edge->pred_next;
- } else {
+ }
+ else {
for (prev = edge->to->pred_list; prev; prev = prev->pred_next) {
if (prev->pred_next == edge) {
prev->pred_next = edge->pred_next;
@@ -405,7 +407,8 @@
if (unit->edge_list == edge) {
unit->edge_list = edge->next;
free(edge);
- } else {
+ }
+ else {
for (prev = unit->edge_list; prev; prev = prev->next) {
if (prev->next == edge) {
prev->next = edge->next;
@@ -699,7 +702,8 @@
for (i = 1; i < n; i++) {
if (unit->bb_list[i]->pred_list) {
dominators[i] = set_make_full(n);
- } else {
+ }
+ else {
dominators[i] = set_make(n);
set_add(dominators[i], i);
}
@@ -975,7 +979,8 @@
{
preheader = unit->bb_list[edge->from->index]->index;
continue;
- } else {
+ }
+ else {
return -1;
}
}
Index: compilers/imcc/pbc.c
===================================================================
--- compilers/imcc/pbc.c (revision 14862)
+++ compilers/imcc/pbc.c (working copy)
@@ -1171,7 +1171,8 @@
mem_sys_realloc(interpreter->code->base.data, bytes);
interpreter->code->pic_index->data =
mem_sys_realloc(interpreter->code->pic_index->data, bytes/2);
- } else {
+ }
+ else {
interpreter->code->base.data = mem_sys_allocate(bytes);
interpreter->code->pic_index->data = mem_sys_allocate(bytes/2);
}
Index: compilers/imcc/optimizer.c
===================================================================
--- compilers/imcc/optimizer.c (revision 14862)
+++ compilers/imcc/optimizer.c (working copy)
@@ -539,7 +539,8 @@
" reduced to %I\n", tmp);
ins2 = prev->next;
}
- } else {
+ }
+ else {
op = check_op(interpreter, fullname, ins2->op,
ins2->r, ins2->n_r, ins2->keys);
if (op < 0) {
Index: compilers/imcc/imcparser.c
===================================================================
--- compilers/imcc/imcparser.c (revision 14862)
+++ compilers/imcc/imcparser.c (working copy)
@@ -425,7 +425,8 @@
constant[len - 1] = '\0';
strcpy(name, constant + 1);
free(constant);
- } else {
+ }
+ else {
name = constant;
}
switch (type_enum) {
@@ -4624,7 +4625,8 @@
IMCC_warning(interp, "error:imcc:%s", s);
IMCC_print_inc(interp);
IMCC_INFO(interp)->line++;
- } else {
+ }
+ else {
IMCC_warning(interp, "error:imcc:%s", s);
IMCC_print_inc(interp);
}
Index: compilers/imcc/imclexer.c
===================================================================
--- compilers/imcc/imclexer.c (revision 14862)
+++ compilers/imcc/imclexer.c (working copy)
@@ -5499,7 +5499,8 @@
if (m) {
mem_sys_free(name);
mem_sys_free(m->expansion);
- } else {
+ }
+ else {
m = mem_sys_allocate(sizeof(struct macro_t));
memset(m, 0, sizeof(struct macro_t));
@@ -5604,7 +5605,8 @@
frame->expansion.name[i] = strdup(s);
free(current);
}
- } else {
+ }
+ else {
len = strlen(current) - 1;
if (len >= 0 && current[len] == '$') { /* local label */
current[len] = '\0';
Index: compilers/imcc/reg_alloc_bc.c
===================================================================
--- compilers/imcc/reg_alloc_bc.c (revision 14862)
+++ compilers/imcc/reg_alloc_bc.c (working copy)
@@ -1050,7 +1050,8 @@
reglist[x]->color = G->V[j].col - 1;
IMCC_debug(interpreter, DEBUG_REG2,"APPLY node %d, reg=%ld\n",
x, reglist[x]->color);
- } else {
+ }
+ else {
IMCC_fatal(interpreter, 1,"apply_coloring",
"wants to use too high reg num");
}
@@ -1276,7 +1277,8 @@
if (u->col && avail[u->col]) {
c = u->col;
assert(avail[u->col]); /* verify no conflict */
- } else {
+ }
+ else {
if (u->col)
IMCC_debug(interpreter, DEBUG_REG,
"WARNING - ig_color_node: cannot give requested color to "
Index: config/gen/platform/generic/exec.c
===================================================================
--- config/gen/platform/generic/exec.c (revision 14862)
+++ config/gen/platform/generic/exec.c (working copy)
@@ -26,7 +26,8 @@
pid_t returnstat;
returnstat = waitpid(child, &status, 0);
return status;
- } else {
+ }
+ else {
/* child. Be horribly profligate with memory, since we're
about to be something else */
int status;
@@ -60,7 +61,8 @@
pid_t returnstat;
returnstat = waitpid(child, &status, 0);
return status;
- } else {
+ }
+ else {
/* child. Be horribly profligate with memory, since we're
about to be something else */
int status, i;