|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.xsltc.compiler.SyntaxTreeNode org.apache.xalan.xsltc.compiler.Expression
abstract class Expression
Field Summary | |
---|---|
protected FlowList |
_falseList
Instruction handles that comprise the false list. |
protected FlowList |
_trueList
Instruction handles that comprise the true list. |
protected Type |
_type
The type of this expression. |
Fields inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode |
---|
_attributes, _parent, _qname, Dummy, IndentIncrement, UNKNOWN_STYLESHEET_NODE_ID |
Constructor Summary | |
---|---|
Expression()
|
Method Summary | |
---|---|
void |
backPatchFalseList(InstructionHandle ih)
|
void |
backPatchTrueList(InstructionHandle ih)
|
InstructionList |
compile(ClassGenerator classGen,
MethodGenerator methodGen)
Translate this node into a fresh instruction list. |
void |
desynthesize(ClassGenerator classGen,
MethodGenerator methodGen)
|
java.lang.Object |
evaluateAtCompileTime()
Returns an object representing the compile-time evaluation of an expression. |
FlowList |
getFalseList()
|
FlowList |
getTrueList()
|
Type |
getType()
|
boolean |
hasLastCall()
|
boolean |
hasPositionCall()
|
MethodType |
lookupPrimop(SymbolTable stable,
java.lang.String op,
MethodType ctype)
Search for a primop in the symbol table that matches the method type ctype . |
void |
startIterator(ClassGenerator classGen,
MethodGenerator methodGen)
If this expression is of type node-set and it is not a variable reference, then call setStartNode() passing the context node. |
void |
synthesize(ClassGenerator classGen,
MethodGenerator methodGen)
Synthesize a boolean expression, i.e., either push a 0 or 1 onto the operand stack for the next statement to succeed. |
abstract java.lang.String |
toString()
|
void |
translate(ClassGenerator classGen,
MethodGenerator methodGen)
Translate this node into JVM bytecodes. |
void |
translateDesynthesized(ClassGenerator classGen,
MethodGenerator methodGen)
Redefined by expressions of type boolean that use flow lists. |
Type |
typeCheck(SymbolTable stable)
Type check all the children of this node. |
Methods inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode |
---|
addAttribute, addElement, addPrefixMapping, compileResultTree, contextDependent, dependentContents, display, displayContents, elementAt, elementCount, elements, getAttribute, getAttribute, getAttributes, getContents, getImportPrecedence, getLineNumber, getNodeIDForStylesheetNSLookup, getParent, getParser, getPrefixMapping, getQName, getStylesheet, getSymbolTable, getTemplate, getXSLTC, hasAttribute, hasContents, indent, isDummy, lastChild, lookupNamespace, lookupPrefix, parseChildren, parseContents, removeElement, reportError, reportWarning, setAttributes, setFirstElement, setLineNumber, setParent, setParser, setPrefixMapping, setQName, setQName, translateContents, typeCheckContents, updateScope |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Type _type
typeCheck()
.
protected FlowList _trueList
protected FlowList _falseList
Constructor Detail |
---|
Expression()
Method Detail |
---|
public Type getType()
public abstract java.lang.String toString()
toString
in class java.lang.Object
public boolean hasPositionCall()
public boolean hasLastCall()
public java.lang.Object evaluateAtCompileTime()
public Type typeCheck(SymbolTable stable) throws TypeCheckError
typeCheck
in class SyntaxTreeNode
stable
- The compiler/parser's symbol table
TypeCheckError
public void translate(ClassGenerator classGen, MethodGenerator methodGen)
translate
in class SyntaxTreeNode
classGen
- BCEL Java class generatormethodGen
- BCEL Java method generatorpublic final InstructionList compile(ClassGenerator classGen, MethodGenerator methodGen)
public void translateDesynthesized(ClassGenerator classGen, MethodGenerator methodGen)
public void startIterator(ClassGenerator classGen, MethodGenerator methodGen)
public void synthesize(ClassGenerator classGen, MethodGenerator methodGen)
public void desynthesize(ClassGenerator classGen, MethodGenerator methodGen)
public FlowList getFalseList()
public FlowList getTrueList()
public void backPatchFalseList(InstructionHandle ih)
public void backPatchTrueList(InstructionHandle ih)
public MethodType lookupPrimop(SymbolTable stable, java.lang.String op, MethodType ctype)
ctype
. Two methods match if they have the same arity.
If a primop is overloaded then the "closest match" is returned. The
first entry in the vector of primops that has the right arity is
considered to be the default one.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |