(final CompileContext cc)
| 123 | } |
| 124 | |
| 125 | @Override |
| 126 | public Expr optimize(final CompileContext cc) throws QueryException { |
| 127 | expr = expr.simplifyFor(Simplify.NUMBER, cc); |
| 128 | |
| 129 | final SeqType st = expr.seqType(); |
| 130 | single = st.zeroOrOne() && !st.mayBeWrapped(); |
| 131 | |
| 132 | // position() = .1e0 → false() |
| 133 | if(Function.POSITION.is(expr)) { |
| 134 | final long mn = Math.max((long) Math.ceil(min), 1), mx = (long) Math.floor(max); |
| 135 | return cc.replaceWith(this, IntPos.get(mn, mx, info)); |
| 136 | } |
| 137 | |
| 138 | return expr instanceof Value ? cc.preEval(this) : this; |
| 139 | } |
| 140 | |
| 141 | @Override |
| 142 | public Bln item(final QueryContext qc, final InputInfo ii) throws QueryException { |
no test coverage detected