APIdia Launch Partner
Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.compiler

pack-priv abstract Class Expression

extends SyntaxTreeNode
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xalan.internal.xsltc.compiler.FilterExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.FilterParentPath, com.sun.org.apache.xalan.internal.xsltc.compiler.FunctionCall, com.sun.org.apache.xalan.internal.xsltc.compiler.IntExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.LiteralExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.LogicalExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.CastExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.FilteredAbsoluteLocationPath, com.sun.org.apache.xalan.internal.xsltc.compiler.RelativeLocationPath, com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern, com.sun.org.apache.xalan.internal.xsltc.compiler.Predicate, com.sun.org.apache.xalan.internal.xsltc.compiler.RealExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.RelationalExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.UnaryOpExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.UnionPathExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.VariableRefBase, com.sun.org.apache.xalan.internal.xsltc.compiler.AbsoluteLocationPath, com.sun.org.apache.xalan.internal.xsltc.compiler.AttributeValue, com.sun.org.apache.xalan.internal.xsltc.compiler.BinOpExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.BooleanExpr, com.sun.org.apache.xalan.internal.xsltc.compiler.EqualityExpr
Imports
com.sun.org.apache.bcel.internal.generic.BranchHandle, .ConstantPoolGen, .GOTO_W, .IFEQ, .InstructionHandle, .InstructionList, com.sun.org.apache.xalan.internal.xsltc.compiler.util.BooleanType, .ClassGenerator, .ErrorMsg, .MethodGenerator, .MethodType, .NodeSetType, .Type, .TypeCheckError, java.util.List

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen, Erwin Bolwidt

Field Summary

Modifier and TypeField and Description
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.

Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode:
_attributes_parent_qnameDummyIndentIncrement

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
public void
public final InstructionList
compile(ClassGenerator classGen, MethodGenerator methodGen)

Translate this node into a fresh instruction list.

public void
public Object
evaluateAtCompileTime()

Returns an object representing the compile-time evaluation of an expression.

public FlowList
public FlowList
public Type
public boolean
public boolean
public MethodType
lookupPrimop(SymbolTable stable, String op, MethodType ctype)

Search for a primop in the symbol table that matches the method type ctype.

public 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.

public 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.

public abstract String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
translate(ClassGenerator classGen, MethodGenerator methodGen)

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.translate.

Translate this node into JVM bytecodes.

public void
translateDesynthesized(ClassGenerator classGen, MethodGenerator methodGen)

Redefined by expressions of type boolean that use flow lists.

public Type
typeCheck(SymbolTable stable)

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.typeCheck.

Type check all the children of this node.

Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode:
addAttributeaddElementaddPrefixMappingcompileResultTreecontextDependentdependentContentsdisplaydisplayContentselementAtelementCountelementsgetAttributegetAttributegetAttributesgetContentsgetImportPrecedencegetLineNumbergetParentgetParsergetPrefixMappinggetQNamegetStylesheetgetSymbolTablegetTemplategetXSLTChasAttributehasContentsindentisDummylastChildlookupNamespacelookupPrefixnotTypeOfparseChildrenparseContentsremoveElementreportErrorreportWarningsetAttributessetFirstElementsetLineNumbersetParentsetParsersetPrefixMappingsetQNamesetQNametranslateContentstypeCheckContentsupdateScope

Field Detail

_falseListback to summary
protected FlowList _falseList

Instruction handles that comprise the false list.

_trueListback to summary
protected FlowList _trueList

Instruction handles that comprise the true list.

_typeback to summary
protected Type _type

The type of this expression. It is set after calling typeCheck().

Constructor Detail

Expressionback to summary
pack-priv Expression()

Method Detail

backPatchFalseListback to summary
public void backPatchFalseList(InstructionHandle ih)
backPatchTrueListback to summary
public void backPatchTrueList(InstructionHandle ih)
compileback to summary
public final InstructionList compile(ClassGenerator classGen, MethodGenerator methodGen)

Translate this node into a fresh instruction list. The original instruction list is saved and restored.

desynthesizeback to summary
public void desynthesize(ClassGenerator classGen, MethodGenerator methodGen)
evaluateAtCompileTimeback to summary
public Object evaluateAtCompileTime()

Returns an object representing the compile-time evaluation of an expression. We are only using this for function-available and element-available at this time.

getFalseListback to summary
public FlowList getFalseList()
getTrueListback to summary
public FlowList getTrueList()
getTypeback to summary
public Type getType()
hasLastCallback to summary
public boolean hasLastCall()
hasPositionCallback to summary
public boolean hasPositionCall()
lookupPrimopback to summary
public MethodType lookupPrimop(SymbolTable stable, String op, MethodType ctype)

Search for a primop in the symbol table that matches the method type 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.

startIteratorback to summary
public 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.

synthesizeback to summary
public 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. Returns the handle of the instruction to be backpatched.

toStringback to summary
public abstract String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

translateback to summary
public void translate(ClassGenerator classGen, MethodGenerator methodGen)

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.translate.

Translate this node into JVM bytecodes.

translateDesynthesizedback to summary
public void translateDesynthesized(ClassGenerator classGen, MethodGenerator methodGen)

Redefined by expressions of type boolean that use flow lists.

typeCheckback to summary
public Type typeCheck(SymbolTable stable) throws TypeCheckError

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.typeCheck.

Type check all the children of this node.