public class SwitchExpressionCompiler extends ToIteratorCompiler
Constructor and Description |
---|
SwitchExpressionCompiler() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<AtomicMatchKey,Expression> |
compileMap(CompilerService compiler,
java.util.Map<AtomicMatchKey,Operand> in,
int evaluationMode)
Internal method to generate a map containing the compiled "case" expressions
|
void |
compileToItem(CompilerService compiler,
Expression expression)
Generate bytecode to evaluate the expression as an Item
Precondition: none.
|
void |
compileToIterator(CompilerService compiler,
Expression expression)
Generate bytecode to evaluate the expression as a
SequenceIterator
Precondition: none. |
void |
compileToPush(CompilerService compiler,
Expression expression)
Generate bytecode to evaluate the expression in push mode
Precondition: none.
|
compileToBoolean
allocateStatic, compileItemFromInt, compileToLoop, compileToPrimitive, generateMethod, handleEmptyStringResult, printStackTop, unboxItem, verify, visitAnnotation, visitLineNumber
public void compileToItem(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompiler
compileToItem
in class ToIteratorCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledCannotCompileException
public void compileToPush(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompiler
compileToPush
in class ToIteratorCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledCannotCompileException
public void compileToIterator(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompiler
SequenceIterator
Precondition: none.
Postcondition: at execution time, the stack contains a SequenceIterator representing the result of the expressioncompileToIterator
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledCannotCompileException
public java.util.Map<AtomicMatchKey,Expression> compileMap(CompilerService compiler, java.util.Map<AtomicMatchKey,Operand> in, int evaluationMode) throws CannotCompileException
compiler
- the compiler servicein
- the map containing interpreted expressionsevaluationMode
- the expression evaluation mode (e.g. compile as item, compile as iterator, compile push)CannotCompileException
- if any of the expressions cannot be compiledCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.