You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Henry Zongaro (JIRA)" <xa...@xml.apache.org> on 2006/03/15 19:18:58 UTC

[jira] Commented: (XALANJ-1122) Branch target offset too large for short

    [ http://issues.apache.org/jira/browse/XALANJ-1122?page=comments#action_12370543 ] 

Henry Zongaro commented on XALANJ-1122:
---------------------------------------

Clare, I don't know whether this usability problem with XSLTC is still important to you.  If it is, and you're so inclined, please try the patch attached to XALANJ-1324, which rewrites branch instructions to avoid branches that exceed the 32KB relative offset limit, and which also attempts to break up methods that would have been larger than 64KB in length into smaller methods.

As I don't have access to your stylesheet, I am unable to try it myself.

> Branch target offset too large for short
> ----------------------------------------
>
>          Key: XALANJ-1122
>          URL: http://issues.apache.org/jira/browse/XALANJ-1122
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: 2.3
>  Environment: Operating System: All
> Platform: All
>     Reporter: Clare Myers

>
> With certain xsl (which I cannot divulge) when I try to compile using java 
> org.apache.xalan.xsltc.cmdline.Compile stylesheet.xsl I get the following error:
>      Branch target offset too large for short
> According to BCEL it is an xsltc problem:
> Q: (Typically for users of Xalan (XSLTC)) I'm getting 
>     ...
>     ClassGenException: Branch target offset too large for short
> when compiling large files. 
> A: The answer lies in internal limitations of the JVM, branch instruction like 
> goto can not address offsets larger than a short integer, i.e. offsets >= 32767.
> The solution is to split the branch into in intermediate hops, which the XSLTC 
> obviously doesn't take care off. (In fact you could replace gotos with the 
> goto_w instruction, but this wouldn't help in the other cases).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org