+ tleft.toSignature()
+ tright.toSignature()
+ "I"
+ DOM_INTF_SIG
+ ")Z");
il.append(new INVOKESTATIC(cmp));
return;
}
// Next, node-set/t for t in {real, string, node-set, result-tree}
_left.translate(classGen, methodGen);
_left.startIterator(classGen, methodGen);
_right.translate(classGen, methodGen);
_right.startIterator(classGen, methodGen);
// Cast a result tree to a string to use an existing compare
if (tright instanceof ResultTreeType) {
tright.translateTo(classGen, methodGen, Type.String);
tright = Type.String;
}
// Call the appropriate compare() from the BasisLibrary
il.append(new PUSH(cpg, _op));
il.append(methodGen.loadDOM());
final int compare = cpg.addMethodref(BASIS_LIBRARY_CLASS,
"compare",
"("
+ tleft.toSignature()
+ tright.toSignature()
+ "I"
+ DOM_INTF_SIG
+ ")Z");
il.append(new INVOKESTATIC(compare));
}