Method | Description | |
---|---|---|
Optimize ( ) : |
Perform normalization and annotation.
|
|
XmlILOptimizerVisitor ( QilExpression qil, bool optimize ) : System |
Method | Description | |
---|---|---|
AllowReplace ( XmlILOptimization pattern, QilNode original ) : bool |
Strongly-typed AllowReplace.
|
|
NoReplace ( QilNode node ) : QilNode |
Called when all replacements have already been made and all annotations are complete.
|
|
NonPositional ( QilNode expr, QilNode iter ) : bool |
Returns true if there is no PositionOf operator within the "expr" subtree that references iterator "iter".
|
|
RecalculateType ( QilNode node, XmlQueryType oldType ) : void |
Override the RecalculateType method so that global variable type is not recalculated.
|
|
Replace ( XmlILOptimization pattern, QilNode original, QilNode replacement ) : QilNode |
Strongly-typed Replace.
|
|
Visit ( QilNode nd ) : QilNode |
Override the Visit method in order to scan for redundant namespaces and compute side-effect bit.
|
|
VisitAdd ( |
||
VisitAfter ( |
||
VisitAncestor ( |
||
VisitAncestorOrSelf ( |
||
VisitAnd ( |
||
VisitAttribute ( |
||
VisitAttributeCtor ( |
||
VisitAverage ( |
||
VisitBefore ( |
||
VisitChoice ( |
||
VisitCommentCtor ( |
||
VisitConditional ( |
||
VisitContent ( |
||
VisitDataSource ( |
||
VisitDeref ( |
||
VisitDescendant ( |
||
VisitDescendantOrSelf ( |
||
VisitDifference ( |
||
VisitDivide ( |
||
VisitDocOrderDistinct ( |
||
VisitDocumentCtor ( |
||
VisitElementCtor ( |
||
VisitEq ( |
||
VisitError ( |
||
VisitFilter ( |
||
VisitFollowingSibling ( |
||
VisitFunction ( |
||
VisitGe ( |
||
VisitGt ( |
||
VisitIntersection ( |
||
VisitInvoke ( |
||
VisitIs ( |
||
VisitIsEmpty ( |
||
VisitIsType ( |
||
VisitLe ( |
||
VisitLength ( |
||
VisitLet ( |
||
VisitLocalNameOf ( |
||
VisitLoop ( |
||
VisitLt ( |
||
VisitMaximum ( |
||
VisitMinimum ( |
||
VisitModulo ( |
||
VisitMultiply ( |
||
VisitNameOf ( |
||
VisitNamespaceDecl ( |
||
VisitNamespaceUriOf ( |
||
VisitNe ( |
||
VisitNegate ( |
||
VisitNodeRange ( |
||
VisitNop ( |
||
VisitNot ( |
||
VisitOptimizeBarrier ( |
||
VisitOr ( |
||
VisitPICtor ( |
||
VisitParent ( |
||
VisitPositionOf ( |
||
VisitPreceding ( |
||
VisitPrecedingSibling ( |
||
VisitPrefixOf ( |
||
VisitQilExpression ( |
||
VisitRawTextCtor ( |
||
VisitReference ( QilNode oldNode ) : QilNode |
Override the VisitReference method in order to possibly substitute.
|
|
VisitRoot ( |
||
VisitRtfCtor ( |
||
VisitSequence ( |
||
VisitSort ( |
||
VisitSortKey ( |
||
VisitStrConcat ( |
||
VisitStrLength ( |
||
VisitStrParseQName ( |
||
VisitSubtract ( |
||
VisitSum ( |
||
VisitTextCtor ( |
||
VisitTypeAssert ( |
||
VisitUnion ( |
||
VisitWarning ( |
||
VisitXPathFollowing ( |
||
VisitXPathNamespace ( |
||
VisitXPathNodeValue ( |
||
VisitXPathPreceding ( |
||
VisitXsltConvert ( |
||
VisitXsltCopy ( |
||
VisitXsltCopyOf ( QilUnary local0 ) : QilNode | ||
VisitXsltGenerateId ( QilUnary local0 ) : QilNode |
Method | Description | |
---|---|---|
AddStepPattern ( QilNode nd, QilNode input ) : void |
Mark the specified node as matching the Step pattern and set the step node and step input arguments.
|
|
AllowDodReverse ( QilNode nd ) : bool |
True if the DodReverse pattern is allowed to match the specified node.
|
|
AllowJoinAndDod ( QilNode nd ) : bool |
True if the JoinAndDod pattern is allowed to match the specified node.
|
|
AreLiteralArgs ( QilNode nd ) : bool |
Return true if all children of "nd" are constant.
|
|
CanFoldArithmetic ( QilNodeType opType, |
Return true if arithmetic operation "opType" can be computed over two literal operands without causing an overflow or divide by zero exception.
|
|
CanFoldXsltConvert ( QilNode ndLiteral, XmlQueryType typTarget ) : bool |
Return true if XsltConvert applied to a Literal can be folded (i.e. the XsltConvert eliminated).
|
|
CanFoldXsltConvertNonLossy ( QilNode ndLiteral, XmlQueryType typTarget ) : bool |
Return true if XsltConvert applied to a Literal can be folded (i.e. the XsltConvert eliminated), without any loss of information.
|
|
DependsOn ( QilNode expr, QilNode target ) : bool |
Returns true if any operator within the "expr" subtree references "target".
|
|
ExtractLiteralValue ( QilNode nd ) : object |
Extract the value of a literal.
|
|
FoldArithmetic ( QilNodeType opType, |
Compute the arithmetic operation "opType" over two literal operands and return the result as a QilLiteral. Arithmetic operations are always checked; in the case of an overflow or divide by zero exception, return the unfolded result.
|
|
FoldComparison ( QilNodeType opType, QilNode left, QilNode right ) : QilNode |
Compute the arithmetic operation "opType" over two literal operands and return the result as a QilLiteral. In the case of an overflow or divide by zero exception, return the unfolded result.
|
|
FoldXsltConvert ( QilNode ndLiteral, XmlQueryType typTarget ) : QilNode |
Fold a XsltConvert applied to a Literal into another Literal. If the fold results in some kind of conversion error, or if the QilExpression cannot represent the result as a Literal, return an unfolded XsltConvert expression.
|
|
HasNestedSequence ( QilNode nd ) : bool |
Return true if "nd" has a child of type Sequence.
|
|
IsConstructedExpression ( QilNode nd ) : bool |
True if the specified expression constructs one or more nodes using QilExpression constructor operators. This information is used to determine whether the results of a function should be streamed to a writer rather than cached.
|
|
IsDocOrderDistinct ( QilNode nd ) : bool |
Return true if "nd" matches the Step pattern and the StepType argument is equal to "stepType".
|
|
IsGlobalVariable ( |
True if the specified iterator is a global variable Let iterator.
|
|
IsLiteral ( QilNode nd ) : bool |
True if the specified expression is a literal value.
|
|
IsPrimitiveNumeric ( XmlQueryType typ ) : bool |
Return true if "typ" is xs:decimal=, xs:integer=, xs:int=, xs:double=, or xs:float=.
|
|
IsStepPattern ( |
Return true if "patt" matches the Step pattern and the StepType argument is equal to "stepType".
|
|
IsStepPattern ( QilNode nd, QilNodeType stepType ) : bool |
Return true if "nd" matches the Step pattern and the StepType argument is equal to "stepType".
|
|
MatchesContentTest ( XmlQueryType typ ) : bool |
Returns true if "typ" matches one of the XPath content node tests: *, text(), comment(), pi(), or node().
|
|
Subs ( QilNode expr, QilNode refOld, QilNode refNew ) : QilNode |
Scans "expr" subtree, looking for "refOld" references and replacing them with "refNew" references.
|
|
XmlILOptimizerVisitor ( ) : System | ||
this ( XmlILOptimization ann ) : bool |
Selectively enable/disable optimizations
|
protected AllowReplace ( XmlILOptimization pattern, QilNode original ) : bool | ||
pattern | XmlILOptimization | |
original | QilNode | |
return | bool |
protected NoReplace ( QilNode node ) : QilNode | ||
node | QilNode | |
return | QilNode |
protected NonPositional ( QilNode expr, QilNode iter ) : bool | ||
expr | QilNode | |
iter | QilNode | |
return | bool |
public Optimize ( ) : |
||
return |
protected RecalculateType ( QilNode node, XmlQueryType oldType ) : void | ||
node | QilNode | |
oldType | XmlQueryType | |
return | void |
protected Replace ( XmlILOptimization pattern, QilNode original, QilNode replacement ) : QilNode | ||
pattern | XmlILOptimization | |
original | QilNode | |
replacement | QilNode | |
return | QilNode |
protected VisitAdd ( |
||
local0 | ||
return | QilNode |
protected VisitAfter ( |
||
local0 | ||
return | QilNode |
protected VisitAncestor ( |
||
local0 | ||
return | QilNode |
protected VisitAncestorOrSelf ( |
||
local0 | ||
return | QilNode |
protected VisitAnd ( |
||
local0 | ||
return | QilNode |
protected VisitAttribute ( |
||
local0 | ||
return | QilNode |
protected VisitAttributeCtor ( |
||
local0 | ||
return | QilNode |
protected VisitAverage ( |
||
local0 | ||
return | QilNode |
protected VisitBefore ( |
||
local0 | ||
return | QilNode |
protected VisitChoice ( |
||
local0 | ||
return | QilNode |
protected VisitCommentCtor ( |
||
local0 | ||
return | QilNode |
protected VisitConditional ( |
||
local0 | ||
return | QilNode |
protected VisitContent ( |
||
local0 | ||
return | QilNode |
protected VisitDataSource ( |
||
local0 | ||
return | QilNode |
protected VisitDeref ( |
||
local0 | ||
return | QilNode |
protected VisitDescendant ( |
||
local0 | ||
return | QilNode |
protected VisitDescendantOrSelf ( |
||
local0 | ||
return | QilNode |
protected VisitDifference ( |
||
local0 | ||
return | QilNode |
protected VisitDivide ( |
||
local0 | ||
return | QilNode |
protected VisitDocOrderDistinct ( |
||
local0 | ||
return | QilNode |
protected VisitDocumentCtor ( |
||
local0 | ||
return | QilNode |
protected VisitElementCtor ( |
||
local0 | ||
return | QilNode |
protected VisitEq ( |
||
local0 | ||
return | QilNode |
protected VisitError ( |
||
local0 | ||
return | QilNode |
protected VisitFilter ( |
||
local0 | ||
return | QilNode |
protected VisitFollowingSibling ( |
||
local0 | ||
return | QilNode |
protected VisitFunction ( |
||
local0 | ||
return | QilNode |
protected VisitGe ( |
||
local0 | ||
return | QilNode |
protected VisitGt ( |
||
local0 | ||
return | QilNode |
protected VisitIntersection ( |
||
local0 | ||
return | QilNode |
protected VisitInvoke ( |
||
local0 | ||
return | QilNode |
protected VisitIs ( |
||
local0 | ||
return | QilNode |
protected VisitIsEmpty ( |
||
local0 | ||
return | QilNode |
protected VisitIsType ( |
||
local0 | ||
return | QilNode |
protected VisitLe ( |
||
local0 | ||
return | QilNode |
protected VisitLength ( |
||
local0 | ||
return | QilNode |
protected VisitLet ( |
||
local0 | ||
return | QilNode |
protected VisitLocalNameOf ( |
||
local0 | ||
return | QilNode |
protected VisitLoop ( |
||
local0 | ||
return | QilNode |
protected VisitLt ( |
||
local0 | ||
return | QilNode |
protected VisitMaximum ( |
||
local0 | ||
return | QilNode |
protected VisitMinimum ( |
||
local0 | ||
return | QilNode |
protected VisitModulo ( |
||
local0 | ||
return | QilNode |
protected VisitMultiply ( |
||
local0 | ||
return | QilNode |
protected VisitNameOf ( |
||
local0 | ||
return | QilNode |
protected VisitNamespaceDecl ( |
||
local0 | ||
return | QilNode |
protected VisitNamespaceUriOf ( |
||
local0 | ||
return | QilNode |
protected VisitNe ( |
||
local0 | ||
return | QilNode |
protected VisitNegate ( |
||
local0 | ||
return | QilNode |
protected VisitNodeRange ( |
||
local0 | ||
return | QilNode |
protected VisitNop ( |
||
local0 | ||
return | QilNode |
protected VisitNot ( |
||
local0 | ||
return | QilNode |
protected VisitOptimizeBarrier ( |
||
local0 | ||
return | QilNode |
protected VisitOr ( |
||
local0 | ||
return | QilNode |
protected VisitPICtor ( |
||
local0 | ||
return | QilNode |
protected VisitParent ( |
||
local0 | ||
return | QilNode |
protected VisitPositionOf ( |
||
local0 | ||
return | QilNode |
protected VisitPreceding ( |
||
local0 | ||
return | QilNode |
protected VisitPrecedingSibling ( |
||
local0 | ||
return | QilNode |
protected VisitPrefixOf ( |
||
local0 | ||
return | QilNode |
protected VisitQilExpression ( |
||
local0 | ||
return | QilNode |
protected VisitRawTextCtor ( |
||
local0 | ||
return | QilNode |
protected VisitReference ( QilNode oldNode ) : QilNode | ||
oldNode | QilNode | |
return | QilNode |
protected VisitRoot ( |
||
local0 | ||
return | QilNode |
protected VisitRtfCtor ( |
||
local0 | ||
return | QilNode |
protected VisitSequence ( |
||
local0 | ||
return | QilNode |
protected VisitSort ( |
||
local0 | ||
return | QilNode |
protected VisitSortKey ( |
||
local0 | ||
return | QilNode |
protected VisitStrConcat ( |
||
local0 | ||
return | QilNode |
protected VisitStrLength ( |
||
local0 | ||
return | QilNode |
protected VisitStrParseQName ( |
||
local0 | ||
return | QilNode |
protected VisitSubtract ( |
||
local0 | ||
return | QilNode |
protected VisitSum ( |
||
local0 | ||
return | QilNode |
protected VisitTextCtor ( |
||
local0 | ||
return | QilNode |
protected VisitTypeAssert ( |
||
local0 | ||
return | QilNode |
protected VisitUnion ( |
||
local0 | ||
return | QilNode |
protected VisitWarning ( |
||
local0 | ||
return | QilNode |
protected VisitXPathFollowing ( |
||
local0 | ||
return | QilNode |
protected VisitXPathNamespace ( |
||
local0 | ||
return | QilNode |
protected VisitXPathNodeValue ( |
||
local0 | ||
return | QilNode |
protected VisitXPathPreceding ( |
||
local0 | ||
return | QilNode |
protected VisitXsltConvert ( |
||
local0 | ||
return | QilNode |
protected VisitXsltCopy ( |
||
local0 | ||
return | QilNode |
protected VisitXsltCopyOf ( QilUnary local0 ) : QilNode | ||
local0 | QilUnary | |
return | QilNode |
protected VisitXsltGenerateId ( QilUnary local0 ) : QilNode | ||
local0 | QilUnary | |
return | QilNode |
public XmlILOptimizerVisitor ( QilExpression qil, bool optimize ) : System | ||
qil | QilExpression | |
optimize | bool | |
return | System |