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 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)
-
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:
compileToItem
in 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:
compileToBoolean
in 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)
-
-