Bug #4044
closedTail call optimization of xsl:call-template with bytecode generation
100%
Description
Test case xslt30extra/opt-025 fails (with a StackOverflow) when run with bytecode:1 which forces bytecode generation
Updated by Michael Kay over 5 years ago
Note also, the failure only occurs with export:off.
Updated by Michael Kay over 5 years ago
In 9.8, bytecode generation is not attempted for a template that is marked as tail-recursive. This means the interpreted code is used, and interpreted tail-call optimization kicks in. In 9.9, bytecode generation is attempted but generates code without tail call optimization.
Updated by Michael Kay over 5 years ago
- Status changed from New to Resolved
- Fix Committed on Branch 9.9 added
I made some unsuccessful attempts to compile code for an optimized tail call, but it's more difficult than I thought -- we have to generate a processLeavingTail() method instead of a process() method, so it all gets quite complicated.
Instead I have reverted to what 9.8 did: if the template body is tail-recursive, then we don't wrap the body in a ByteCodeCandidate and therefore bytecode doesn't get generated for the template body as a whole (or for the call-template instruction in particular).
Updated by O'Neil Delpratt about 5 years ago
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.9.1.1 added
Bug fix applied to the Saxon 9.9.1.1 maintenance release.
Updated by O'Neil Delpratt about 5 years ago
- Status changed from Resolved to Closed
Please register to edit this issue