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

Shigeru Chiba chiba at is.titech.ac.jp
Sun May 6 11:41:43 EDT 2007


  User: chiba   
  Date: 07/05/06 11:41:43

  Modified:    src/main/javassist/bytecode  StackMapTable.java
  Log:
  implemented javassist.bytecode.stackmap package.
  
  Revision  Changes    Path
  1.8       +12 -5     javassist/src/main/javassist/bytecode/StackMapTable.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: StackMapTable.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/bytecode/StackMapTable.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- StackMapTable.java	26 Apr 2007 14:58:16 -0000	1.7
  +++ StackMapTable.java	6 May 2007 15:41:43 -0000	1.8
  @@ -595,6 +595,7 @@
   
       static class Printer extends Walker {
           private PrintWriter writer;
  +        private int offset;
   
           /**
            * Prints the stack table map.
  @@ -611,30 +612,36 @@
           Printer(byte[] data, PrintWriter pw) {
               super(data);
               writer = pw;
  +            offset = -1;
           }
   
           public void sameFrame(int pos, int offsetDelta) {
  -            writer.println("same frame: " + offsetDelta);
  +            offset += offsetDelta + 1;
  +            writer.println(offset + " same frame: " + offsetDelta);
           }
   
           public void sameLocals(int pos, int offsetDelta, int stackTag, int stackData) {
  -            writer.println("same locals: " + offsetDelta);
  +            offset += offsetDelta + 1;
  +            writer.println(offset + " same locals: " + offsetDelta);
               printTypeInfo(stackTag, stackData);
           }
   
           public void chopFrame(int pos, int offsetDelta, int k) {
  -            writer.println("chop frame: " + offsetDelta + ",    " + k + " last locals");
  +            offset += offsetDelta + 1;
  +            writer.println(offset + " chop frame: " + offsetDelta + ",    " + k + " last locals");
           }
   
           public void appendFrame(int pos, int offsetDelta, int[] tags, int[] data) {
  -            writer.println("append frame: " + offsetDelta);
  +            offset += offsetDelta + 1;
  +            writer.println(offset + " append frame: " + offsetDelta);
               for (int i = 0; i < tags.length; i++)
                   printTypeInfo(tags[i], data[i]);
           }
   
           public void fullFrame(int pos, int offsetDelta, int[] localTags, int[] localData,
                                 int[] stackTags, int[] stackData) {
  -            writer.println("full frame: " + offsetDelta);
  +            offset += offsetDelta + 1;
  +            writer.println(offset + " full frame: " + offsetDelta);
               writer.println("[locals]");
               for (int i = 0; i < localTags.length; i++)
                   printTypeInfo(localTags[i], localData[i]);
  
  
  



More information about the jboss-cvs-commits mailing list