Package com.saxonica.ee.bytecode
Class ValueComparisonCompiler
- java.lang.Object
-
- com.saxonica.ee.bytecode.ExpressionCompiler
-
- com.saxonica.ee.bytecode.ToBooleanCompiler
-
- com.saxonica.ee.bytecode.ValueComparisonCompiler
-
public class ValueComparisonCompiler extends ToBooleanCompiler
Generate code for a ValueComparison
-
-
Constructor Summary
Constructors Constructor Description ValueComparisonCompiler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompileToBoolean(CompilerService compiler, Expression expression)Generate bytecode to evaluate the ValueComparison as a boolean value Precondition: none.voidcompileToItem(CompilerService compiler, Expression expression)Generate bytecode to evaluate the expression as an Item Precondition: none.static inttranslateOperator(int op)-
Methods inherited from class com.saxonica.ee.bytecode.ToBooleanCompiler
compileToIterator, compileToPush
-
Methods inherited from class com.saxonica.ee.bytecode.ExpressionCompiler
allocateStatic, compileItemFromInt, compileToPrimitive, generateMethod, handleEmptyStringResult, printStackTop, verify, visitAnnotation, visitLineNumber
-
-
-
-
Method Detail
-
compileToItem
public void compileToItem(CompilerService compiler, Expression expression) throws CannotCompileException
Generate bytecode to evaluate the expression as an Item Precondition: none. Postcondition: the stack contains either an item (the result of the expression), or null (representing an empty sequence).- Overrides:
compileToItemin classToBooleanCompiler- Parameters:
compiler- the compiler serviceexpression- the expression to be compiled- Throws:
CannotCompileException- if the expression cannot be compiled to bytecode
-
compileToBoolean
public void compileToBoolean(CompilerService compiler, Expression expression) throws CannotCompileException
Generate bytecode to evaluate the ValueComparison as a boolean value Precondition: none. Postcondition: the stack contains an boolean value representing the result of the expression- Specified by:
compileToBooleanin classExpressionCompiler- Parameters:
compiler- the compiler serviceexpression- the expression to be compiled- Throws:
CannotCompileException- if the expression cannot be compiled to bytecode
-
translateOperator
public static int translateOperator(int op)
-
-