harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r677212 - in /harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200: ./ bytecode/ bytecode/forms/
Date Wed, 16 Jul 2008 09:34:10 GMT
Author: sjanuary
Date: Wed Jul 16 02:34:09 2008
New Revision: 677212

URL: http://svn.apache.org/viewvc?rev=677212&view=rev
Log:
Pack200 - remove some unnecessary assignments of default values to fields

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentConstantPoolArrayCache.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/BCIRenumberedAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPClass.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFieldRef.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInterfaceMethodRef.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethod.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethodRef.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPNameAndType.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPRef.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPString.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPUTF8.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/OperandManager.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ClassRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LabelForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SingleByteReferenceForm.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
Wed Jul 16 02:34:09 2008
@@ -69,12 +69,12 @@
     protected String C2; // outer class
     protected String N; // name
 
-    private boolean predictSimple = false;
-    private boolean predictOuter = false;
-    private String cachedOuterClassString = null;
-    private String cachedSimpleClassName = null;
-    private boolean initialized = false;
-    private boolean anonymous = false;
+    private boolean predictSimple;
+    private boolean predictOuter;
+    private String cachedOuterClassString;
+    private String cachedSimpleClassName;
+    private boolean initialized;
+    private boolean anonymous;
     private boolean member = true;
     private int cachedOuterClassIndex = -1;
     private int cachedSimpleClassNameIndex = -1;

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentConstantPoolArrayCache.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentConstantPoolArrayCache.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentConstantPoolArrayCache.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentConstantPoolArrayCache.java
Wed Jul 16 02:34:09 2008
@@ -41,9 +41,9 @@
 
     protected IdentityHashMap knownArrays = new IdentityHashMap(1000);
 
-    protected List lastIndexes = null;
-    protected String[] lastArray = null;
-    protected String lastKey = null;
+    protected List lastIndexes;
+    protected String[] lastArray;
+    protected String lastKey;
 
     /**
      * Answer the indices for the given key in the given

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/BCIRenumberedAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/BCIRenumberedAttribute.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/BCIRenumberedAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/BCIRenumberedAttribute.java
Wed Jul 16 02:34:09 2008
@@ -28,7 +28,7 @@
  */
 public abstract class BCIRenumberedAttribute extends Attribute {
 
-    protected boolean renumbered = false;
+    protected boolean renumbered;
 
     /*
      * (non-Javadoc)

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
Wed Jul 16 02:34:09 2008
@@ -47,7 +47,7 @@
     private int[] rewrite;
 
     private int byteCodeOffset = -1;
-    private int[] byteCodeTargets = null;
+    private int[] byteCodeTargets;
 
     protected ByteCode(int opcode) {
         this(opcode, ClassFileEntry.NONE);
@@ -104,7 +104,7 @@
         return getByteCodeForm().getOperandType();
     }
 
-    private boolean hashcodeComputed = false;
+    private boolean hashcodeComputed;
     private int cachedHashCode;
 
     private void generateHashCode() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPClass.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPClass.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPClass.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPClass.java
Wed Jul 16 02:34:09 2008
@@ -61,7 +61,7 @@
         return new ClassFileEntry[] { utf8, };
     }
 
-    private boolean hashcodeComputed = false;
+    private boolean hashcodeComputed;
     private int cachedHashCode;
 
     private void generateHashCode() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFieldRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFieldRef.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFieldRef.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFieldRef.java
Wed Jul 16 02:34:09 2008
@@ -54,7 +54,7 @@
         return "FieldRef: " + className + "#" + nameAndType;
     }
 
-    private boolean hashcodeComputed = false;
+    private boolean hashcodeComputed;
     private int cachedHashCode;
 
     private void generateHashCode() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInterfaceMethodRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInterfaceMethodRef.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInterfaceMethodRef.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInterfaceMethodRef.java
Wed Jul 16 02:34:09 2008
@@ -33,7 +33,7 @@
         return nameAndType.invokeInterfaceCount();
     }
 
-    private boolean hashcodeComputed = false;
+    private boolean hashcodeComputed;
     private int cachedHashCode;
 
     private void generateHashCode() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethod.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethod.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethod.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethod.java
Wed Jul 16 02:34:09 2008
@@ -31,7 +31,7 @@
         return "Method: " + name + "(" + descriptor + ")";
     }
 
-    private boolean hashcodeComputed = false;
+    private boolean hashcodeComputed;
     private int cachedHashCode;
 
     private void generateHashCode() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethodRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethodRef.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethodRef.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethodRef.java
Wed Jul 16 02:34:09 2008
@@ -30,7 +30,7 @@
     }
 
 
-    private boolean hashcodeComputed = false;
+    private boolean hashcodeComputed;
     private int cachedHashCode;
 
     private void generateHashCode() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPNameAndType.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPNameAndType.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPNameAndType.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPNameAndType.java
Wed Jul 16 02:34:09 2008
@@ -76,7 +76,7 @@
         return "NameAndType: " + name + "(" + descriptor + ")";
     }
 
-    private boolean hashcodeComputed = false;
+    private boolean hashcodeComputed;
     private int cachedHashCode;
 
     private void generateHashCode() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPRef.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPRef.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPRef.java
Wed Jul 16 02:34:09 2008
@@ -85,7 +85,7 @@
         classNameIndex = pool.indexOf(className);
     }
 
-    protected String cachedToString = null;
+    protected String cachedToString;
 
     public String toString() {
         if (cachedToString == null) {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPString.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPString.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPString.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPString.java
Wed Jul 16 02:34:09 2008
@@ -54,7 +54,7 @@
         return new ClassFileEntry[] { name };
     }
 
-    private boolean hashcodeComputed = false;
+    private boolean hashcodeComputed;
     private int cachedHashCode;
 
     private void generateHashCode() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPUTF8.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPUTF8.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPUTF8.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPUTF8.java
Wed Jul 16 02:34:09 2008
@@ -57,7 +57,7 @@
         return utf8.equals(other.utf8);
     }
 
-    private boolean hashcodeComputed = false;
+    private boolean hashcodeComputed;
     private int cachedHashCode;
 
     private void generateHashCode() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java
Wed Jul 16 02:34:09 2008
@@ -37,7 +37,7 @@
 
     private final HashSet mustStartClassPool = new HashSet();
 
-    protected Map indexCache = null;
+    protected Map indexCache;
 
     public String toString() {
         return entries.toString();

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/OperandManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/OperandManager.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/OperandManager.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/OperandManager.java
Wed Jul 16 02:34:09 2008
@@ -49,33 +49,33 @@
     int[] bcInitRef;
     int[] wideByteCodes;
 
-    int bcCaseCountIndex = 0;
-    int bcCaseValueIndex = 0;
-    int bcByteIndex = 0;
-    int bcShortIndex = 0;
-    int bcLocalIndex = 0;
-    int bcLabelIndex = 0;
-    int bcIntRefIndex = 0;
-    int bcFloatRefIndex = 0;
-    int bcLongRefIndex = 0;
-    int bcDoubleRefIndex = 0;
-    int bcStringRefIndex = 0;
-    int bcClassRefIndex = 0;
-    int bcFieldRefIndex = 0;
-    int bcMethodRefIndex = 0;
-    int bcIMethodRefIndex = 0;
-    int bcThisFieldIndex = 0;
-    int bcSuperFieldIndex = 0;
-    int bcThisMethodIndex = 0;
-    int bcSuperMethodIndex = 0;
-    int bcInitRefIndex = 0;
-    int wideByteCodeIndex = 0;
-
-    Segment segment = null;
-
-    String currentClass = null;
-    String superClass = null;
-    String newClass = null;
+    int bcCaseCountIndex;
+    int bcCaseValueIndex;
+    int bcByteIndex;
+    int bcShortIndex;
+    int bcLocalIndex;
+    int bcLabelIndex;
+    int bcIntRefIndex;
+    int bcFloatRefIndex;
+    int bcLongRefIndex;
+    int bcDoubleRefIndex;
+    int bcStringRefIndex;
+    int bcClassRefIndex;
+    int bcFieldRefIndex;
+    int bcMethodRefIndex;
+    int bcIMethodRefIndex;
+    int bcThisFieldIndex;
+    int bcSuperFieldIndex;
+    int bcThisMethodIndex;
+    int bcSuperMethodIndex;
+    int bcInitRefIndex;
+    int wideByteCodeIndex;
+
+    Segment segment;
+
+    String currentClass;
+    String superClass;
+    String newClass;
 
     public OperandManager(int[] bcCaseCount, int[] bcCaseValue, int[] bcByte,
             int[] bcShort, int[] bcLocal, int[] bcLabel, int[] bcIntRef,

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ClassRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ClassRefForm.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ClassRefForm.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ClassRefForm.java
Wed Jul 16 02:34:09 2008
@@ -28,7 +28,7 @@
  */
 public class ClassRefForm extends ReferenceForm {
 
-    protected boolean widened = false;
+    protected boolean widened;
 
     public ClassRefForm(int opcode, String name, int[] rewrite) {
         super(opcode, name, rewrite);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LabelForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LabelForm.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LabelForm.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LabelForm.java
Wed Jul 16 02:34:09 2008
@@ -26,7 +26,7 @@
  */
 public class LabelForm extends ByteCodeForm {
 
-    protected boolean widened = false;
+    protected boolean widened;
 
     public LabelForm(int opcode, String name, int[] rewrite) {
         super(opcode, name, rewrite);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SingleByteReferenceForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SingleByteReferenceForm.java?rev=677212&r1=677211&r2=677212&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SingleByteReferenceForm.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SingleByteReferenceForm.java
Wed Jul 16 02:34:09 2008
@@ -26,7 +26,7 @@
  */
 public abstract class SingleByteReferenceForm extends ReferenceForm {
 
-    protected boolean widened = false;
+    protected boolean widened;
 
     public SingleByteReferenceForm(int opcode, String name, int[] rewrite) {
         super(opcode, name, rewrite);



Mime
View raw message