try {
if (test.effectiveBooleanValue(null)) {
Block block = new Block();
block.setLocationId(allocateLocationId(getSystemId(), getLineNumber()));
compileChildren(exec, block, true);
return block.simplify(getStaticContext());
} else {
return null;
}
} catch (XPathException err) {
// can't happen, but if it does then we'll fall through to non-optimizing case