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

Kabir Khan kkhan at jboss.com
Sun Dec 24 08:47:46 EST 2006


  User: kkhan   
  Date: 06/12/24 08:47:46

  Modified:    src/main/javassist  CodeConverter.java
  Log:
  Add ability to replace xASTORE and xALOAD calls with invokevirtual
  
  Revision  Changes    Path
  1.10      +7 -2      javassist/src/main/javassist/CodeConverter.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CodeConverter.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/CodeConverter.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- CodeConverter.java	23 Nov 2006 02:49:03 -0000	1.9
  +++ CodeConverter.java	24 Dec 2006 13:47:46 -0000	1.10
  @@ -17,6 +17,7 @@
   
   import javassist.bytecode.*;
   import javassist.convert.*;
  +import javassist.convert.TransformAccessArrayField.MethodNames;
   
   /**
    * Simple translator of method bodies
  @@ -202,6 +203,11 @@
                                                  calledMethod);
       }
   
  +    public void replaceArrayAccess(CtClass calledClass, MethodNames names) throws NotFoundException
  +    {
  +       transformers = new TransformAccessArrayField(transformers, calledClass.getName(), names);
  +    }
  +    
       /**
        * Modify method invocations in a method body so that a different
        * method will be invoked.
  @@ -366,7 +372,6 @@
           throws CannotCompileException
       {
           Transformer t;
  -
           CodeAttribute codeAttr = minfo.getCodeAttribute();
           if (codeAttr == null || transformers == null)
               return;
  
  
  



More information about the jboss-cvs-commits mailing list