gnu.expr
Interface TypeValue
- AttributeType, ElementType, LangPrimType, NodeType, OccurrenceType
public interface TypeValue
A Type or a Type expression.
Can be used for higher-level types that do not map directly to a Type.
emitIsInstance
public void emitIsInstance(Variable incoming,
Compilation comp,
Target target)
incoming
- Contains the value we are testing to see if it has the
the type of 'this'. If null, use top-of-stack.comp
- The compilation state.target
- Where to leave the result.
emitTestIf
public void emitTestIf(Variable incoming,
Declaration decl,
Compilation comp)
Emit code for
if (incoming instanceof this_type) decl = incoming ....
This method is designed for typeswitch applications, where this
call is the first part of a conditional, so it must be followed
by calls to emitElse and emitFi.
incoming
- Contains the value we are testing to see if it has the
type of this. If null, use top-of-stack.decl
- If non-null, assign value after coercion to Declaration.comp
- The compilation state.
getImplementationType
public Type getImplementationType()
The lower-level Type used to represent instances of this type.