From: <ls...@us...> - 2007-01-27 12:57:12
|
Revision: 3092 http://jnode.svn.sourceforge.net/jnode/?rev=3092&view=rev Author: lsantha Date: 2007-01-27 04:57:10 -0800 (Sat, 27 Jan 2007) Log Message: ----------- Replaced StringBuffer with StringBuilder. Modified Paths: -------------- trunk/core/src/core/org/jnode/util/Counter.java trunk/core/src/core/org/jnode/vm/bytecode/BasicBlock.java trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java trunk/core/src/core/org/jnode/vm/scheduler/IRQThread.java trunk/core/src/core/org/jnode/vm/x86/X86CpuID.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86RegisterPool.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86RegisterPool.java Modified: trunk/core/src/core/org/jnode/util/Counter.java =================================================================== --- trunk/core/src/core/org/jnode/util/Counter.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/util/Counter.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -100,10 +100,10 @@ * @see java.lang.Object#toString() */ public String toString() { - StringBuffer stringBuffer = new StringBuffer(getName()); - stringBuffer.append(is); - stringBuffer.append(counter); + StringBuilder sb = new StringBuilder(getName()); + sb.append(is); + sb.append(counter); - return stringBuffer.toString(); + return sb.toString(); } } Modified: trunk/core/src/core/org/jnode/vm/bytecode/BasicBlock.java =================================================================== --- trunk/core/src/core/org/jnode/vm/bytecode/BasicBlock.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/bytecode/BasicBlock.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -105,7 +105,7 @@ * @return String */ public String toString() { - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); buf.append(startPC); buf.append('-'); buf.append(endPC); @@ -120,7 +120,7 @@ return buf.toString(); } - private void addEntryBlockInfo(StringBuffer buf) { + private void addEntryBlockInfo(StringBuilder buf) { boolean first = true; for (BasicBlock bb : entryBlocks) { if (first) { Modified: trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java =================================================================== --- trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -158,7 +158,7 @@ * @see java.lang.Object#toString() */ public String toString() { - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); buf.append('{'); for (int i = 0; i < tos; i++) { if (i > 0) { Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -406,7 +406,7 @@ } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (IRBasicBlock<T> bb : this) { sb.append(bb.toString()); sb.append(":\n predecessors:"); Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -58,7 +58,7 @@ } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("phi("); int n = sources.size(); for (int i=0; i<n; i+=1) { Modified: trunk/core/src/core/org/jnode/vm/scheduler/IRQThread.java =================================================================== --- trunk/core/src/core/org/jnode/vm/scheduler/IRQThread.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/scheduler/IRQThread.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -194,7 +194,7 @@ * @return String */ public String toString() { - final StringBuffer b = new StringBuffer(); + final StringBuilder b = new StringBuilder(); if (shared) { b.append("shared "); } Modified: trunk/core/src/core/org/jnode/vm/x86/X86CpuID.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/X86CpuID.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/x86/X86CpuID.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -148,7 +148,7 @@ */ public String getVendor() { if (vendor == null) { - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); intToString(buf, data[1]); intToString(buf, data[3]); intToString(buf, data[2]); @@ -173,7 +173,7 @@ return getVendor().equals(X86Vendor.AMD.getId()); } - private final void intToString(StringBuffer buf, int value) { + private final void intToString(StringBuilder buf, int value) { buf.append((char) (value & 0xFF)); buf.append((char) ((value >> 8) & 0xFF)); buf.append((char) ((value >> 16) & 0xFF)); @@ -310,7 +310,7 @@ * @return The available features. */ private final String getFeatureString() { - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); getFeatureString(buf, FEAT_FPU, "FPU"); getFeatureString(buf, FEAT_VME, "VME"); getFeatureString(buf, FEAT_DE, "DE"); @@ -347,7 +347,7 @@ return buf.toString(); } - private final void getFeatureString(StringBuffer buf, int feature, String featName) { + private final void getFeatureString(StringBuilder buf, int feature, String featName) { if (hasFeature(feature)) { if (buf.length() > 0) { buf.append(','); @@ -356,7 +356,7 @@ } } - private final void getFeatureString(StringBuffer buf, long feature, String featName) { + private final void getFeatureString(StringBuilder buf, long feature, String featName) { if (hasFeature(feature)) { if (buf.length() > 0) { buf.append(','); @@ -371,7 +371,7 @@ * @see java.lang.Object#toString() */ public String toString() { - final StringBuffer sb = new StringBuffer(); + final StringBuilder sb = new StringBuilder(); sb.append("CPU:"); sb.append(" name:"); sb.append(getName()); sb.append(" family:"); sb.append(getFamily()); Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemStack.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemStack.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemStack.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -170,7 +170,7 @@ if (tos == 0) { return "EMPTY"; } - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); for (int i = 0; i < tos; i++) { if (i != 0) { buf.append(','); Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -404,7 +404,7 @@ if (tos == 0) { return "EMPTY"; } - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); for (int i = 0; i < tos; i++) { if (i != 0) { buf.append(','); Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86RegisterPool.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86RegisterPool.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86RegisterPool.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -274,7 +274,7 @@ * @see java.lang.Object#toString() */ public final String toString() { - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); for (int i = 0; i < regCount; i++) { buf.append(registers[i].toString()); buf.append("\n"); Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemStack.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemStack.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemStack.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -170,7 +170,7 @@ if (tos == 0) { return "EMPTY"; } - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); for (int i = 0; i < tos; i++) { if (i != 0) { buf.append(','); Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -404,7 +404,7 @@ if (tos == 0) { return "EMPTY"; } - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); for (int i = 0; i < tos; i++) { if (i != 0) { buf.append(','); Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86RegisterPool.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86RegisterPool.java 2007-01-27 11:43:17 UTC (rev 3091) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86RegisterPool.java 2007-01-27 12:57:10 UTC (rev 3092) @@ -274,7 +274,7 @@ * @see java.lang.Object#toString() */ public final String toString() { - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); for (int i = 0; i < regCount; i++) { buf.append(registers[i].toString()); buf.append("\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |