MCPcopy Create free account
hub / github.com/BaseXdb/basex / optimize

Method optimize

basex-core/src/main/java/org/basex/query/expr/Pos.java:161–167  ·  view source on GitHub ↗
(final CompileContext cc)

Source from the content-addressed store, hash-verified

159 }
160
161 @Override
162 public Expr optimize(final CompileContext cc) throws QueryException {
163 expr = expr.simplifyFor(Simplify.NUMBER, cc).simplifyFor(Simplify.DISTINCT, cc);
164
165 final Expr ex = get(expr, CmpOp.EQ, info, cc, this);
166 return ex != null ? cc.replaceWith(this, ex) : this;
167 }
168
169 @Override
170 public Bln item(final QueryContext qc, final InputInfo ii) throws QueryException {

Callers 1

getMethod · 0.45

Calls 3

getMethod · 0.95
replaceWithMethod · 0.80
simplifyForMethod · 0.45

Tested by

no test coverage detected