jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r897708 - in /jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic: GOTO.java JSR.java
Date Sun, 10 Jan 2010 21:22:17 GMT
Author: tcurdt
Date: Sun Jan 10 21:22:16 2010
New Revision: 897708

URL: http://svn.apache.org/viewvc?rev=897708&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=45230 by Timothy Alper

fixed alignment of operands


Modified:
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GOTO.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/JSR.java

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GOTO.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GOTO.java?rev=897708&r1=897707&r2=897708&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GOTO.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GOTO.java Sun Jan 10 21:22:16
2010
@@ -64,8 +64,9 @@
         position += offset; // Position may be shifted by preceding expansions
         if (Math.abs(i) >= (32767 - max_offset)) { // to large for short (estimate)
             opcode = org.apache.bcel.Constants.GOTO_W;
+            short old_length = length;
             length = 5;
-            return 2; // 5 - 3
+            return length - old_length;
         }
         return 0;
     }

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/JSR.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/JSR.java?rev=897708&r1=897707&r2=897708&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/JSR.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/JSR.java Sun Jan 10 21:22:16
2010
@@ -61,8 +61,9 @@
         position += offset; // Position may be shifted by preceding expansions
         if (Math.abs(i) >= (32767 - max_offset)) { // to large for short (estimate)
             opcode = org.apache.bcel.Constants.JSR_W;
+            short old_length = length;
             length = 5;
-            return 2; // 5 - 3
+            return length - old_length;
         }
         return 0;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org


Mime
View raw message