morten      01/10/10 02:16:38

  Modified:    java/src/org/apache/xalan/xsltc/compiler
                        AbsolutePathPattern.java
  Log:
  Updated the absolute location path's branch instruction to allow for long
  code branches. This is a common problem with large stylesheets. Some code
  fragments similar to:
      IFEQ(target)
  Must be replaced with:
      IFNE(skip)
      GOTO_W(target)
  skip:
      NOP
  This allows for branches with large branch target offsets.
  PR:           n/a
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.4       +6 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/AbsolutePathPattern.java
  
  Index: AbsolutePathPattern.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/AbsolutePathPattern.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbsolutePathPattern.java  2001/08/27 09:07:19     1.3
  +++ AbsolutePathPattern.java  2001/10/10 09:16:38     1.4
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: AbsolutePathPattern.java,v 1.3 2001/08/27 09:07:19 morten Exp $
  + * @(#)$Id: AbsolutePathPattern.java,v 1.4 2001/10/10 09:16:38 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -140,7 +140,11 @@
        }
        il.append(new INVOKEINTERFACE(getType, 2));
        il.append(new PUSH(cpg, DOM.ROOT));
  -     _falseList.add(il.append(new IF_ICMPNE(null)));
  +     
  +     // long jump: _falseList.add(il.append(new IF_ICMPNE(null)));
  +     final BranchHandle skip = il.append(new IF_ICMPEQ(null));
  +     _falseList.add(il.append(new GOTO_W(null)));
  +     skip.setTarget(il.append(NOP));
       }
        
       public String toString() {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to