[jboss-cvs] javassist/src/main/javassist/bytecode ...

Shigeru Chiba chiba at is.titech.ac.jp
Wed Mar 18 08:20:53 EDT 2009


  User: chiba   
  Date: 09/03/18 08:20:53

  Modified:    src/main/javassist/bytecode  CodeIterator.java
  Log:
  JASSIST-74
  
  Revision  Changes    Path
  1.17      +13 -5     javassist/src/main/javassist/bytecode/CodeIterator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CodeIterator.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/bytecode/CodeIterator.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- CodeIterator.java	4 Jun 2007 03:11:09 -0000	1.16
  +++ CodeIterator.java	18 Mar 2009 12:20:53 -0000	1.17
  @@ -376,7 +376,7 @@
        * Inserts a gap
        * before the next instruction that would be returned by
        * <code>next()</code> (not before the instruction returned
  -     * by tha last call to <code>next()</code>).
  +     * by the last call to <code>next()</code>).
        * Branch offsets and the exception table are also updated.
        * The inserted gap is filled with NOP.  The gap length may be
        * extended to a multiple of 4.
  @@ -718,8 +718,12 @@
   
                   int i0 = i;
                   int i2 = (i & ~3) + 4;  // 0-3 byte padding
  -                while (i0 < i2)
  -                    newcode[j++] = code[i0++];
  +                while (i0 < i2) {
  +                    // IBM JVM 1.4.2 cannot run the following line:
  +                    // newcode[j++] = code[i0++];
  +                    // see JIRA JASSIST-74.
  +                    newcode[j++] = 0; i0++;
  +                }
   
                   int defaultbyte = newOffset(i, ByteArray.read32bit(code, i2),
                                               where, gapLength, exclusive);
  @@ -745,8 +749,12 @@
   
                   int i0 = i;
                   int i2 = (i & ~3) + 4;  // 0-3 byte padding
  -                while (i0 < i2)
  -                    newcode[j++] = code[i0++];
  +                while (i0 < i2) {
  +                    // IBM JVM 1.4.2 cannot run the following line:
  +                    // newcode[j++] = code[i0++];
  +                    // see JIRA JASSIST-74.
  +                    newcode[j++] = 0; i0++;
  +                }
   
                   int defaultbyte = newOffset(i, ByteArray.read32bit(code, i2),
                                               where, gapLength, exclusive);
  
  
  



More information about the jboss-cvs-commits mailing list