From: <pet...@us...> - 2007-04-29 02:51:16
|
Revision: 12107 http://svn.sourceforge.net/jikesrvm/?rev=12107&view=rev Author: peter_donald Date: 2007-04-28 19:51:15 -0700 (Sat, 28 Apr 2007) Log Message: ----------- Continue cleaning up PMD violations Modified Paths: -------------- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_BranchSimplifier.java rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_DefUse.java rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_EnterSSA.java rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_GlobalValueNumberState.java rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_SortedGraphIterator.java rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/VM_OptExceptionTable.java rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/ir/OPT_BasicBlock.java rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/ir/OPT_IR.java Modified: rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_BranchSimplifier.java =================================================================== --- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_BranchSimplifier.java 2007-04-29 02:44:28 UTC (rev 12106) +++ rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_BranchSimplifier.java 2007-04-29 02:51:15 UTC (rev 12107) @@ -316,7 +316,7 @@ OPT_InstructionEnumeration ie = OPT_IREnumeration.forwardIntraBlockIE(firstGoto, end); ie.next(); - for (; ie.hasMoreElements();) { + while (ie.hasMoreElements()) { OPT_Instruction s = ie.next(); if (GuardResultCarrier.conforms (s)) insertTrueGuard (s, GuardResultCarrier.getGuardResult (s)); Modified: rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_DefUse.java =================================================================== --- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_DefUse.java 2007-04-29 02:44:28 UTC (rev 12106) +++ rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_DefUse.java 2007-04-29 02:51:15 UTC (rev 12107) @@ -80,7 +80,7 @@ OPT_OperandEnumeration defs = instr.getPureDefs(); OPT_OperandEnumeration uses = instr.getUses(); - for ( ; defs.hasMoreElements();) { + while (defs.hasMoreElements()) { OPT_Operand op = defs.next(); if (op instanceof OPT_RegisterOperand) { OPT_RegisterOperand rop = (OPT_RegisterOperand)op; @@ -88,7 +88,7 @@ } } // for ( defs = ... ) - for ( ; uses.hasMoreElements() ;) { + while (uses.hasMoreElements()) { OPT_Operand op = uses.next(); if (op instanceof OPT_RegisterOperand) { OPT_RegisterOperand rop = (OPT_RegisterOperand)op; Modified: rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_EnterSSA.java =================================================================== --- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_EnterSSA.java 2007-04-29 02:44:28 UTC (rev 12106) +++ rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_EnterSSA.java 2007-04-29 02:51:15 UTC (rev 12107) @@ -498,7 +498,7 @@ */ private void insertHeapPhiFunctions (OPT_IR ir) { Iterator<OPT_HeapVariable<Object>> e = ir.HIRInfo.SSADictionary.getHeapVariables(); - for (; e.hasNext();) { + while (e.hasNext()) { OPT_HeapVariable<Object> H = e.next(); if (DEBUG) System.out.println("Inserting phis for Heap " + H); Modified: rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_GlobalValueNumberState.java =================================================================== --- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_GlobalValueNumberState.java 2007-04-29 02:44:28 UTC (rev 12106) +++ rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_GlobalValueNumberState.java 2007-04-29 02:51:15 UTC (rev 12107) @@ -354,7 +354,7 @@ // now check that each other target matches the first element // if not, add this class to the work list // - for (; i.hasNext();) { + while (i.hasNext()) { OPT_ValueGraphVertex v = i.next(); if (!checkCongruence(first, v)) { workList.push(c); @@ -379,7 +379,7 @@ // representative ArrayList<OPT_ValueGraphVertex> toRemove = new ArrayList<OPT_ValueGraphVertex>(); - for (; i.hasNext();) { + while (i.hasNext()) { OPT_ValueGraphVertex v = i.next(); if (!checkCongruence(first, v)) { // NOT CONGRUENT!! split the partition. first check if Modified: rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_SortedGraphIterator.java =================================================================== --- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_SortedGraphIterator.java 2007-04-29 02:44:28 UTC (rev 12106) +++ rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/OPT_SortedGraphIterator.java 2007-04-29 02:51:15 UTC (rev 12107) @@ -107,7 +107,7 @@ else e = currentNode.getInNodes(); - for (; e.hasMoreElements(); ) { + while (e.hasMoreElements()) { // Select the node with the smallest sort number among the "successor" nodes OPT_SortedGraphNode outNode = e.nextElement(); if (outNode.getSortNumber(forward) < barrierOrder) { // anything larger than barrier will be visited later Modified: rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/VM_OptExceptionTable.java =================================================================== --- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/VM_OptExceptionTable.java 2007-04-29 02:44:28 UTC (rev 12106) +++ rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/VM_OptExceptionTable.java 2007-04-29 02:51:15 UTC (rev 12107) @@ -104,8 +104,8 @@ e = bblock.getExceptionHandlers(); else e = reachBBe; - - for ( ; e.hasMoreElements();) { + + while (e.hasMoreElements()) { OPT_ExceptionHandlerBasicBlock eBlock = (OPT_ExceptionHandlerBasicBlock)e.nextElement(); for (java.util.Enumeration<OPT_TypeOperand> ets = eBlock.getExceptionTypes(); Modified: rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/ir/OPT_BasicBlock.java =================================================================== --- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/ir/OPT_BasicBlock.java 2007-04-29 02:44:28 UTC (rev 12106) +++ rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/ir/OPT_BasicBlock.java 2007-04-29 02:51:15 UTC (rev 12107) @@ -1752,7 +1752,7 @@ */ public final boolean isIn(OPT_BasicBlock bb) { InEdgeEnum iee = new InEdgeEnum(this); - for (; iee.hasMoreElements(); ) + while (iee.hasMoreElements()) if (iee.next() == bb) return true; return false; @@ -1785,7 +1785,7 @@ */ public final boolean isOut(OPT_BasicBlock bb) { OutEdgeEnum oee = new OutEdgeEnum(this); - for (; oee.hasMoreElements(); ) + while (oee.hasMoreElements()) if (oee.next() == bb) return true; return false; @@ -1811,7 +1811,7 @@ */ public final boolean isNormalOut(OPT_BasicBlock bb) { NormalOutEdgeEnum noee = new NormalOutEdgeEnum(this); - for (; noee.hasMoreElements(); ) + while (noee.hasMoreElements()) if (noee.next() == bb) return true; return false; @@ -1842,7 +1842,7 @@ public final boolean isExceptionalOut(OPT_BasicBlock bb) { if (!canThrowExceptions()) return false; ExceptionOutEdgeEnum eoee = new ExceptionOutEdgeEnum(this); - for (; eoee.hasMoreElements(); ) + while (eoee.hasMoreElements()) if (eoee.next() == bb) return true; return false; Modified: rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/ir/OPT_IR.java =================================================================== --- rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/ir/OPT_IR.java 2007-04-29 02:44:28 UTC (rev 12106) +++ rvmroot/trunk/rvm/src/org/jikesrvm/compilers/opt/ir/OPT_IR.java 2007-04-29 02:51:15 UTC (rev 12107) @@ -497,7 +497,7 @@ stack = new Stack<OPT_BasicBlock>(); int size = bits.length(); Enumeration<OPT_BasicBlock> bbEnum = ir.getBasicBlocks(); - for ( ; bbEnum.hasMoreElements(); ) { + while (bbEnum.hasMoreElements()) { OPT_BasicBlock block = bbEnum.nextElement(); int number = block.getNumber(); if (number < size && bits.get(number)) stack.push(block); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |