165 references to OptimizerPatternName
System.Data.SqlXml (165)
System\Xml\Xsl\IlGen\OptimizerPatterns.cs (22)
57
private static readonly int PatternCount = Enum.GetValues(typeof(
OptimizerPatternName
)).Length;
79
optPatt.AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
80
optPatt.AddPattern(
OptimizerPatternName
.SameDepth);
92
optPatt.AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
129
optPatt.AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
130
optPatt.AddPattern(
OptimizerPatternName
.SameDepth);
133
optPatt.AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
143
public static void Inherit(QilNode ndSrc, QilNode ndDst,
OptimizerPatternName
pattern) {
152
case
OptimizerPatternName
.Step:
157
case
OptimizerPatternName
.FilterElements:
161
case
OptimizerPatternName
.FilterContentKind:
165
case
OptimizerPatternName
.EqualityIndex:
170
case
OptimizerPatternName
.DodReverse:
171
case
OptimizerPatternName
.JoinAndDod:
175
case
OptimizerPatternName
.MaxPosition:
179
case
OptimizerPatternName
.SingleTextRtf:
221
public void AddPattern(
OptimizerPatternName
pattern) {
222
Debug.Assert(Enum.IsDefined(typeof(
OptimizerPatternName
), pattern));
231
public bool MatchesPattern(
OptimizerPatternName
pattern) {
232
Debug.Assert(Enum.IsDefined(typeof(
OptimizerPatternName
), pattern));
250
if (MatchesPattern((
OptimizerPatternName
) pattNum)) {
254
s += ((
OptimizerPatternName
) pattNum).ToString();
System\Xml\Xsl\IlGen\TailCallAnalyzer.cs (1)
45
OptimizerPatterns.Write(nd).AddPattern(
OptimizerPatternName
.TailCall);
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (121)
133
OptimizerPatterns.Write(newNode).AddPattern(
OptimizerPatternName
.IsReferenced);
165
OptimizerPatterns.Write(node).AddPattern(
OptimizerPatternName
.MaybeSideEffects);
186
if (OptimizerPatterns.Read(node[i]).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects))
247
OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0),
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0),
OptimizerPatternName
.SameDepth); }
329
OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0),
OptimizerPatternName
.Step); OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0),
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0),
OptimizerPatternName
.SameDepth); }
358
OptimizerPatterns.Write((QilNode) (local1)).AddPattern(
OptimizerPatternName
.IsPositional); }
617
if (( ( (local1).XmlType ).IsSingleton ) && ( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) )) {
729
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); }
736
AddStepPattern((QilNode) (local0), (QilNode) ( OptimizerPatterns.Read((QilNode) (local1)).GetArgument(OptimizerPatternArgument.StepInput) )); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SameDepth); }
811
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); }
884
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); }
1394
OptimizerPatterns.Write((QilNode) (local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); }
1593
OptimizerPatterns.Write((QilNode) (local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); }
1676
OptimizerPatterns.Write((QilNode) (local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); }
1745
OptimizerPatterns.Write((QilNode) (local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); }
1814
OptimizerPatterns.Write((QilNode) (local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); }
1883
OptimizerPatterns.Write((QilNode) (local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); }
2001
if ( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.IsPositional) ) {
2024
if ( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) ) {
2058
if ((( (local1).NodeType == QilNodeType.Let ) || ( ( ( (QilNode) (local1)[0] ).XmlType ).IsSingleton )) && ( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) )) {
2163
OptimizerPatterns.Inherit((QilNode) (local2), (QilNode) (local0),
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local2), (QilNode) (local0),
OptimizerPatternName
.SameDepth); }
2171
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SameDepth); }
2177
if ( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(
OptimizerPatternName
.SameDepth) ) {
2181
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SameDepth); OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0),
OptimizerPatternName
.IsDocOrderDistinct); }
2189
if (((( IsStepPattern(local2, QilNodeType.Attribute) ) || ( IsStepPattern(local2, QilNodeType.XPathNamespace) )) || ( OptimizerPatterns.Read((QilNode) (local2)).MatchesPattern(
OptimizerPatternName
.FilterAttributeKind) )) && ( (local1) == ( OptimizerPatterns.Read((QilNode) (local2)).GetArgument(OptimizerPatternArgument.StepInput) ) )) {
2192
OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0),
OptimizerPatternName
.SameDepth); OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0),
OptimizerPatternName
.IsDocOrderDistinct); }
2199
if ( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(
OptimizerPatternName
.SameDepth) ) {
2203
OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0),
OptimizerPatternName
.IsDocOrderDistinct); }
2231
if ( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) ) {
2303
if (( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) ) && (!( ( (QilNode) (local1)[0] ).NodeType == QilNodeType.OptimizeBarrier ))) {
2304
if ((!(DependsOn(local2,local1))) && ( !OptimizerPatterns.Read(local2).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) )) {
2323
OptimizerPatterns.Write((QilNode) (local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local6); }
2340
OptimizerPatterns.Write((QilNode) (local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local6); }
2357
OptimizerPatterns.Write((QilNode) (local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local6 - 1 ); }
2368
OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0),
OptimizerPatternName
.Step); OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0),
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0),
OptimizerPatternName
.SameDepth); }
2374
if ( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(
OptimizerPatternName
.Axis) ) {
2394
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.FilterElements); OptimizerPatterns.Write((QilNode) (local0)).AddArgument(OptimizerPatternArgument.ElementQName, local11); }
2410
if ( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(
OptimizerPatternName
.Axis) ) {
2420
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.FilterContentKind); OptimizerPatterns.Write((QilNode) (local0)).AddArgument(OptimizerPatternArgument.KindTestType, local6); }
2441
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.FilterAttributeKind); }
2533
if ((( OptimizerPatterns.Read((QilNode) (local7)).MatchesPattern(
OptimizerPatternName
.FilterElements) ) || ( OptimizerPatterns.Read((QilNode) (local7)).MatchesPattern(
OptimizerPatternName
.FilterContentKind) )) && ( IsStepPattern(local7, QilNodeType.Content) )) {
2557
if ((( OptimizerPatterns.Read((QilNode) (local5)).MatchesPattern(
OptimizerPatternName
.FilterElements) ) || ( OptimizerPatterns.Read((QilNode) (local5)).MatchesPattern(
OptimizerPatternName
.FilterContentKind) )) && ( IsStepPattern(local5, QilNodeType.Content) )) {
2575
if ( !OptimizerPatterns.Read(local2).MatchesPattern(
OptimizerPatternName
.IsPositional) ) {
2576
if (((!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(
OptimizerPatternName
.FilterElements) )) && (!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(
OptimizerPatternName
.FilterContentKind) ))) && (!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(
OptimizerPatternName
.FilterAttributeKind) ))) {
2596
if ( !OptimizerPatterns.Read(local4).MatchesPattern(
OptimizerPatternName
.IsPositional) ) {
2598
if (((!( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(
OptimizerPatternName
.FilterElements) )) && (!( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(
OptimizerPatternName
.FilterContentKind) ))) && (!( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(
OptimizerPatternName
.FilterAttributeKind) ))) {
2618
if (( !OptimizerPatterns.Read(local2).MatchesPattern(
OptimizerPatternName
.IsPositional) ) && ( (local3).XmlType .IsSubtypeOf( XmlQueryTypeFactory.NodeNotRtfS ) )) {
2619
if (((!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(
OptimizerPatternName
.FilterElements) )) && (!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(
OptimizerPatternName
.FilterContentKind) ))) && (!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(
OptimizerPatternName
.FilterAttributeKind) ))) {
2661
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0),
OptimizerPatternName
.SameDepth); }
2667
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.DodReverse); OptimizerPatterns.Write((QilNode) (local0)).AddArgument(OptimizerPatternArgument.DodStep, local1); }
2680
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.JoinAndDod); OptimizerPatterns.Write((QilNode) (local0)).AddArgument(OptimizerPatternArgument.DodStep, local4); }
2693
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.DodMerge); }
2747
patt.AddPattern(
OptimizerPatternName
.EqualityIndex);
2786
patt.AddPattern(
OptimizerPatternName
.EqualityIndex);
2828
OptimizerPatterns.Inherit((QilNode) (local4), (QilNode) (local0),
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local4), (QilNode) (local0),
OptimizerPatternName
.SameDepth); }
2850
AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SameDepth); }
2877
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SameDepth); }
2895
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SameDepth); }
2913
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SameDepth); }
2931
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); }
2949
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); }
2967
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); }
2985
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); }
3003
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); }
3021
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SameDepth); }
3039
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SameDepth); }
3066
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); }
3314
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SingleTextRtf); OptimizerPatterns.Write((QilNode) (local0)).AddArgument(OptimizerPatternArgument.RtfText, local3);
3440
if ( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) ) {
3453
if ( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) ) {
3477
if (!( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) )) {
3490
if (!( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) )) {
3526
if (( !( (local1).XmlType ).MaybeEmpty ) && ( !OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects) )) {
3573
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); }
3591
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); }
3609
OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(
OptimizerPatternName
.SameDepth); }
4056
if (patt.MatchesPattern(
OptimizerPatternName
.FilterElements) || patt.MatchesPattern(
OptimizerPatternName
.FilterContentKind)) {
4074
if (patt.MatchesPattern(
OptimizerPatternName
.Axis) ||
4075
patt.MatchesPattern(
OptimizerPatternName
.FilterElements) ||
4076
patt.MatchesPattern(
OptimizerPatternName
.FilterContentKind)) {
4292
patt.AddPattern(
OptimizerPatternName
.Step);
4301
return OptimizerPatterns.Read(nd).MatchesPattern(
OptimizerPatternName
.IsDocOrderDistinct);
4315
return patt.MatchesPattern(
OptimizerPatternName
.Step) && ((QilNode) patt.GetArgument(OptimizerPatternArgument.StepNode)).NodeType == stepType;
4337
isUsed = optPatt.MatchesPattern(
OptimizerPatternName
.IsReferenced) || optPatt.MatchesPattern(
OptimizerPatternName
.MaybeSideEffects);
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (20)
1021
if (patt.MatchesPattern(
OptimizerPatternName
.MaxPosition)) {
1780
isFilterElements = patt.MatchesPattern(
OptimizerPatternName
.FilterElements);
1781
if (isFilterElements || patt.MatchesPattern(
OptimizerPatternName
.FilterContentKind)) {
1881
else if (patt.MatchesPattern(
OptimizerPatternName
.FilterAttributeKind)) {
1887
else if (patt.MatchesPattern(
OptimizerPatternName
.EqualityIndex)) {
1966
Debug.Assert(!patt.MatchesPattern(
OptimizerPatternName
.IsPositional));
1990
if (patt.MatchesPattern(
OptimizerPatternName
.IsPositional)) {
2014
if (patt.MatchesPattern(
OptimizerPatternName
.IsPositional)) {
2021
if (patt.MatchesPattern(
OptimizerPatternName
.MaxPosition)) {
2243
isJoinAndDod = pattDod.MatchesPattern(
OptimizerPatternName
.JoinAndDod);
2244
if (isJoinAndDod || pattDod.MatchesPattern(
OptimizerPatternName
.DodReverse)) {
2247
if (pattStep.MatchesPattern(
OptimizerPatternName
.FilterElements)) {
2252
else if (pattStep.MatchesPattern(
OptimizerPatternName
.FilterContentKind)) {
2258
Debug.Assert(pattStep.MatchesPattern(
OptimizerPatternName
.Axis), "Dod patterns should only match if step is FilterElements or FilterKindTest or Axis");
2322
else if (pattDod.MatchesPattern(
OptimizerPatternName
.DodMerge)) {
2380
if (OptimizerPatterns.Read(ndInvoke).MatchesPattern(
OptimizerPatternName
.TailCall))
2829
if (patt.MatchesPattern(
OptimizerPatternName
.SingleTextRtf)) {
4561
return patt.MatchesPattern(
OptimizerPatternName
.EqualityIndex);
4569
return !patt.MatchesPattern(
OptimizerPatternName
.JoinAndDod) && !patt.MatchesPattern(
OptimizerPatternName
.DodReverse);
System\Xml\Xsl\XmlIlGenerator.cs (1)
318
if (this.qil.IsDebug || OptimizerPatterns.Read(ndIter).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects)) {