[jboss-cvs] javassist/src/main/javassist/compiler ...
Shigeru Chiba
chiba at is.titech.ac.jp
Tue Jun 9 06:59:33 EDT 2009
User: chiba
Date: 09/06/09 06:59:33
Modified: src/main/javassist/compiler CodeGen.java
Log:
fixed JIRA JASSIST-67
Revision Changes Path
1.33 +12 -3 javassist/src/main/javassist/compiler/CodeGen.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CodeGen.java
===================================================================
RCS file: /cvsroot/jboss/javassist/src/main/javassist/compiler/CodeGen.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- CodeGen.java 4 Jun 2007 03:11:09 -0000 1.32
+++ CodeGen.java 9 Jun 2009 10:59:33 -0000 1.33
@@ -1737,9 +1737,18 @@
if (doDup && isPost)
bytecode.addIload(var);
+ int delta = token == PLUSPLUS ? 1 : -1;
+ if (var > 0xff) {
+ bytecode.addOpcode(WIDE);
+ bytecode.addOpcode(IINC);
+ bytecode.addIndex(var);
+ bytecode.addIndex(delta);
+ }
+ else {
bytecode.addOpcode(IINC);
bytecode.add(var);
- bytecode.add(token == PLUSPLUS ? 1 : -1);
+ bytecode.add(delta);
+ }
if (doDup && !isPost)
bytecode.addIload(var);
More information about the jboss-cvs-commits
mailing list