Avoid variable name "new", use more concrete name instead
Also confusing for syntax highlighter/indexer of some editors/IDEs
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10320 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/callgrind/bbcc.c b/callgrind/bbcc.c
index c1eaab3..dfe737b 100644
--- a/callgrind/bbcc.c
+++ b/callgrind/bbcc.c
@@ -247,13 +247,13 @@
{
BBCC** bbccs;
int i;
-
+
bbccs = (BBCC**) CLG_MALLOC("cl.bbcc.nr.1", sizeof(BBCC*) * size);
for(i=0;i<size;i++)
bbccs[i] = 0;
CLG_DEBUG(3," new_recursion(size %d): %p\n", size, bbccs);
-
+
return bbccs;
}
@@ -267,40 +267,40 @@
static __inline__
BBCC* new_bbcc(BB* bb)
{
- BBCC* new;
+ BBCC* bbcc;
Int i;
/* We need cjmp_count+1 JmpData structs:
* the last is for the unconditional jump/call/ret at end of BB
*/
- new = (BBCC*)CLG_MALLOC("cl.bbcc.nb.1",
- sizeof(BBCC) +
- (bb->cjmp_count+1) * sizeof(JmpData));
- new->bb = bb;
- new->tid = CLG_(current_tid);
+ bbcc = (BBCC*)CLG_MALLOC("cl.bbcc.nb.1",
+ sizeof(BBCC) +
+ (bb->cjmp_count+1) * sizeof(JmpData));
+ bbcc->bb = bb;
+ bbcc->tid = CLG_(current_tid);
- new->ret_counter = 0;
- new->skipped = 0;
- new->cost = CLG_(get_costarray)(bb->cost_count);
+ bbcc->ret_counter = 0;
+ bbcc->skipped = 0;
+ bbcc->cost = CLG_(get_costarray)(bb->cost_count);
for(i=0;i<bb->cost_count;i++)
- new->cost[i] = 0;
+ bbcc->cost[i] = 0;
for(i=0; i<=bb->cjmp_count; i++) {
- new->jmp[i].ecounter = 0;
- new->jmp[i].jcc_list = 0;
+ bbcc->jmp[i].ecounter = 0;
+ bbcc->jmp[i].jcc_list = 0;
}
- new->ecounter_sum = 0;
+ bbcc->ecounter_sum = 0;
/* Init pointer caches (LRU) */
- new->lru_next_bbcc = 0;
- new->lru_from_jcc = 0;
- new->lru_to_jcc = 0;
+ bbcc->lru_next_bbcc = 0;
+ bbcc->lru_from_jcc = 0;
+ bbcc->lru_to_jcc = 0;
CLG_(stat).distinct_bbccs++;
CLG_DEBUG(3, " new_bbcc(BB %#lx): %p (now %d)\n",
- bb_addr(bb), new, CLG_(stat).distinct_bbccs);
+ bb_addr(bb), bbcc, CLG_(stat).distinct_bbccs);
- return new;
+ return bbcc;
}
@@ -369,12 +369,12 @@
*/
static BBCC* clone_bbcc(BBCC* orig, Context* cxt, Int rec_index)
{
- BBCC* new;
+ BBCC* bbcc;
CLG_DEBUG(3,"+ clone_bbcc(BB %#lx, rec %d, fn %s)\n",
bb_addr(orig->bb), rec_index, cxt->fn[0]->name);
- new = new_bbcc(orig->bb);
+ bbcc = new_bbcc(orig->bb);
if (rec_index == 0) {
@@ -382,12 +382,12 @@
CLG_ASSERT((orig->tid != CLG_(current_tid)) ||
(orig->cxt != cxt));
- new->rec_index = 0;
- new->cxt = cxt;
- new->rec_array = new_recursion(cxt->fn[0]->separate_recursions);
- new->rec_array[0] = new;
+ bbcc->rec_index = 0;
+ bbcc->cxt = cxt;
+ bbcc->rec_array = new_recursion(cxt->fn[0]->separate_recursions);
+ bbcc->rec_array[0] = bbcc;
- insert_bbcc_into_hash(new);
+ insert_bbcc_into_hash(bbcc);
}
else {
if (CLG_(clo).separate_threads)
@@ -399,30 +399,30 @@
CLG_ASSERT(orig->rec_array[rec_index] ==0);
/* new BBCC will only have differing recursion level */
- new->rec_index = rec_index;
- new->cxt = cxt;
- new->rec_array = orig->rec_array;
- new->rec_array[rec_index] = new;
+ bbcc->rec_index = rec_index;
+ bbcc->cxt = cxt;
+ bbcc->rec_array = orig->rec_array;
+ bbcc->rec_array[rec_index] = bbcc;
}
/* update list of BBCCs for same BB */
- new->next_bbcc = orig->bb->bbcc_list;
- orig->bb->bbcc_list = new;
+ bbcc->next_bbcc = orig->bb->bbcc_list;
+ orig->bb->bbcc_list = bbcc;
CLG_DEBUGIF(3)
- CLG_(print_bbcc)(-2, new);
+ CLG_(print_bbcc)(-2, bbcc);
CLG_DEBUG(2,"- clone_BBCC(%p, %d) for BB %#lx\n"
" orig %s\n"
" new %s\n",
orig, rec_index, bb_addr(orig->bb),
mangled_cxt(orig->cxt, orig->rec_index),
- mangled_cxt(new->cxt, new->rec_index));
+ mangled_cxt(bbcc->cxt, bbcc->rec_index));
CLG_(stat).bbcc_clones++;
- return new;
+ return bbcc;
};