public class ValueComparisonCompiler extends ToBooleanCompiler
Constructor and Description |
---|
ValueComparisonCompiler() |
Modifier and Type | Method and Description |
---|---|
static void |
compile(CompilerService compiler,
Expression expression,
Expression[] operands,
int op,
AtomicComparer comparer,
boolean toItem)
This method handles both compileToBoolean and compileToItem.
|
void |
compileToBoolean(CompilerService compiler,
Expression expression)
Generate bytecode to evaluate the ValueComparison as a boolean value
Precondition: none.
|
void |
compileToItem(CompilerService compiler,
Expression expression)
Generate bytecode to evaluate the expression as an Item
Precondition: none.
|
static int |
translateOperator(int op) |
compileToIterator, compileToPush
allocateStatic, compileItemFromInt, compileToLoop, compileToPrimitive, generateMethod, handleEmptyStringResult, unboxItem, verify, visitAnnotation, visitLineNumber
public void compileToItem(CompilerService compiler, Expression expression) throws CannotCompileException
compileToItem
in class ToBooleanCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledCannotCompileException
public void compileToBoolean(CompilerService compiler, Expression expression) throws CannotCompileException
compileToBoolean
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledCannotCompileException
public static void compile(CompilerService compiler, Expression expression, Expression[] operands, int op, AtomicComparer comparer, boolean toItem) throws CannotCompileException
compiler
- the compiler serviceexpression
- the expression to be compiledoperands
- the two operands of the comparisonop
- the Operatorcomparer
- the AtomicComparer used to compare the two atomic valuestoItem
- true if compiling to an Item rather than to a booleanCannotCompileException
- if the expression cannot be compiledpublic static int translateOperator(int op)
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.