harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r763568 - /harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java
Date Thu, 09 Apr 2009 09:15:09 GMT
Author: sjanuary
Date: Thu Apr  9 09:15:07 2009
New Revision: 763568

URL: http://svn.apache.org/viewvc?rev=763568&view=rev
Log:
Pack200 - some cleanup and minor bug fixes in code for packing bytecode

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java?rev=763568&r1=763567&r2=763568&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java
Thu Apr  9 09:15:07 2009
@@ -61,7 +61,6 @@
     private final List bcInitRef = new ArrayList();
 
     private String currentClass;
-    private String superClass;
 
     private static final int MULTIANEWARRAY = 197;
     private static final int ALOAD_0 = 42;
@@ -82,10 +81,6 @@
         currentClass = name;
     }
 
-    public void setSuperClass(String superName) {
-        superClass = superName;
-    }
-
     public void finaliseBands() {
         bcThisField = getIndexInClass(bcThisField);
         bcThisMethod = getIndexInClass(bcThisMethod);
@@ -229,7 +224,7 @@
     }
 
     public void visitIincInsn(int var, int increment) {
-        if (increment > Byte.MAX_VALUE) {
+        if (var > 255 || increment > 255) {
             byteCodeOffset += 6;
             bcCodes.add(WIDE);
             bcCodes.add(IINC);
@@ -427,7 +422,7 @@
 
     public void visitVarInsn(int opcode, int var) {
         // ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or RET
-        if (var > Byte.MAX_VALUE) {
+        if (var > 255) {
             byteCodeOffset += 4;
             bcCodes.add(WIDE);
             bcCodes.add(opcode);



Mime
View raw message