gnu.xquery.util
public class OrderedMap extends MethodProc implements CanInline, Inlineable
for $x1 in exp1, $x2 in exp2 where cond order by comparator1 ... return bodyis represented as
ordered-map(tuple-sequence, body-function,
comparator-function1, flags1, collation1, ...)
Here tuple-sequence is an expression that returns a sequence of tuples,
which are currently implemnted as Java Object[] arrays.
After inlining we get:
ordered-map(tuple-sequence.
OrderedTuples.make$V(body-function,
new Object[]{comparator-function1, flags1, collation1, ...}))
A future optimization would be to create an instance of a new sub-class
of OrderedTuples. Then the body-function and comparator-functions
could be compiled as methods to that class. That wins especially
if it saves us having to create extra frame classes.
| Field Summary | |
|---|---|
| static OrderedMap | orderedMap |
| Method Summary | |
|---|---|
| void | apply(CallContext ctx) |
| void | compile(ApplyExp exp, Compilation comp, Target target) |
| Type | getReturnType(Expression[] args) |
| Expression | inline(ApplyExp exp, ExpWalker walker) |
| static Object[] | makeTuple$V(Object[] values) |