3 writes to _iterCurr
System.Private.Xml (3)
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (3)
4668
_iterCurr
= new IteratorDescriptor(_helper);
4673
_iterCurr
= new IteratorDescriptor(iterParent);
4723
_iterCurr
= _iterCurr.ParentIterator!;
235 references to _iterCurr
System.Private.Xml (235)
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (235)
76
Debug.Assert(
_iterCurr
.Storage.Location == ItemLocation.None, "Root expression should have been pushed to the writer.");
318
Debug.Assert(nd.XmlType!.IsSingleton || CachesResult(nd) ||
_iterCurr
.HasLabelNext,
353
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XPathItem), true);
374
_iterCurr
.EnsureItemStorageType(nd.XmlType!, typeof(XPathItem));
380
_iterCurr
.EnsureItemStorageType(nd.XmlType!, typeof(XPathItem));
383
_iterCurr
.EnsureNoStackNoCache("$$$copyTemp");
389
_iterCurr
.EnsureStackNoCache();
416
_helper.Emit(OpCodes.Brfalse,
_iterCurr
.GetLabelNext());
418
_iterCurr
.Storage = StorageDescriptor.Local(locNav, typeof(XPathNavigator), false);
451
_iterCurr
.Storage = StorageDescriptor.None();
457
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XPathItem), false);
474
_iterCurr
.Storage = StorageDescriptor.None();
491
if (
_iterCurr
.CurrentBranchingContext != BranchingContext.None)
495
_helper.EmitUnconditionalBranch(
_iterCurr
.CurrentBranchingContext == BranchingContext.OnTrue ?
496
OpCodes.Brtrue : OpCodes.Brfalse,
_iterCurr
.LabelBranch);
498
_iterCurr
.Storage = StorageDescriptor.None();
504
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(bool), false);
520
if (
_iterCurr
.CurrentBranchingContext != BranchingContext.None)
524
_helper.EmitUnconditionalBranch(
_iterCurr
.CurrentBranchingContext == BranchingContext.OnFalse ?
525
OpCodes.Brtrue : OpCodes.Brfalse,
_iterCurr
.LabelBranch);
527
_iterCurr
.Storage = StorageDescriptor.None();
533
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(bool), false);
545
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(string), false);
555
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(int), false);
565
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(long), false);
575
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(double), false);
585
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(decimal), false);
595
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XmlQualifiedName), false);
624
IteratorDescriptor iterParent =
_iterCurr
;
657
_iterCurr
.SetBranching(BranchingContext.OnFalse, lblBranch);
665
_iterCurr
.SetBranching(BranchingContext.OnFalse, lblOnFalse);
679
_iterCurr
.SetBranching(BranchingContext.OnTrue, lblBranch);
685
_iterCurr
.SetBranching(BranchingContext.OnFalse, lblOnFalse);
703
_iterCurr
.Storage = StorageDescriptor.None();
709
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(bool), false);
742
switch (
_iterCurr
.CurrentBranchingContext)
753
NestedVisitWithBranch(ndOr.Left, BranchingContext.OnTrue,
_iterCurr
.LabelBranch);
758
Debug.Assert(
_iterCurr
.CurrentBranchingContext == BranchingContext.None);
765
switch (
_iterCurr
.CurrentBranchingContext)
769
NestedVisitWithBranch(ndOr.Right, BranchingContext.OnFalse,
_iterCurr
.LabelBranch);
774
NestedVisitWithBranch(ndOr.Right, BranchingContext.OnTrue,
_iterCurr
.LabelBranch);
785
switch (
_iterCurr
.CurrentBranchingContext)
793
_iterCurr
.Storage = StorageDescriptor.None();
799
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(bool), false);
831
switch (
_iterCurr
.CurrentBranchingContext)
834
NestedVisitWithBranch(ndNot.Child, BranchingContext.OnTrue,
_iterCurr
.LabelBranch);
838
NestedVisitWithBranch(ndNot.Child, BranchingContext.OnFalse,
_iterCurr
.LabelBranch);
843
Debug.Assert(
_iterCurr
.CurrentBranchingContext == BranchingContext.None);
849
if (
_iterCurr
.CurrentBranchingContext == BranchingContext.None)
853
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(bool), false);
857
_iterCurr
.Storage = StorageDescriptor.None();
901
_iterCurr
.Storage = StorageDescriptor.None();
964
_iterCurr
.SetIterator(lblNext, StorageDescriptor.Local(locCond!, itemStorageType, false));
984
if (
_iterCurr
.IsBranching)
987
NestedVisitWithBranch(ndBranch,
_iterCurr
.CurrentBranchingContext,
_iterCurr
.LabelBranch);
997
NestedVisit(ndBranch,
_iterCurr
.GetLabelNext());
998
_iterCurr
.EnsureItemStorageType(ndBranch.XmlType!, itemStorageType);
999
_iterCurr
.EnsureLocalNoCache(locResult);
1056
_iterCurr
.Storage = StorageDescriptor.None();
1090
_iterCurr
.EnsureNoCache();
1091
_iterCurr
.DiscardStack();
1106
_iterCurr
.LoopToEnd(lblOnEnd);
1111
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(int), false);
1148
_helper.EmitUnconditionalBranch(OpCodes.Brtrue,
_iterCurr
.GetLabelNext());
1152
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XPathItem), false);
1181
_iterCurr
.DiscardStack();
1185
_iterCurr
.Storage = StorageDescriptor.Stack(itemStorageType, false);
1206
lblOnEnd =
_iterCurr
.GetLabelNext();
1218
_iterCurr
.EnsureItemStorageType(ndSeq[i].XmlType!, itemStorageType);
1219
_iterCurr
.EnsureLocalNoCache(locList);
1243
_iterCurr
.SetIterator(lblNext, StorageDescriptor.Local(locList, itemStorageType, false));
1298
_iterCurr
.EnsureLocal(locNav);
1307
_iterCurr
.EnsureLocal(locNav);
1332
_iterCurr
.Storage = StorageDescriptor.Current(locIter, methCurrent, typeof(XPathNavigator));
1336
_helper.Emit(OpCodes.Switch, new Label[] {
_iterCurr
.GetLabelNext(), lblInitRight, lblNextLeft, lblNextRight });
1337
_iterCurr
.SetIterator(lblNext, StorageDescriptor.Current(locIter, methCurrent, typeof(XPathNavigator)));
1400
_iterCurr
.EnsureStackNoCache();
1401
_iterCurr
.EnsureItemStorageType(ndAgg.XmlType!, GetItemStorageType(ndAgg));
1406
_iterCurr
.LoopToEnd(lblOnEnd);
1416
_helper.Emit(OpCodes.Brtrue,
_iterCurr
.GetLabelNext());
1422
_iterCurr
.Storage = StorageDescriptor.Stack(GetItemStorageType(ndAgg), false);
1434
_iterCurr
.Storage = StorageDescriptor.Stack(GetItemStorageType(ndNeg), false);
1485
_iterCurr
.Storage = StorageDescriptor.Stack(GetItemStorageType(ndOp), false);
1496
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(int), false);
1573
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(string), false);
1591
_iterCurr
.EnsureStackNoCache();
1592
_iterCurr
.EnsureItemStorageType(ndStr.XmlType!, typeof(string));
1599
_iterCurr
.LoopToEnd(lblOnEnd);
1649
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XmlQualifiedName), false);
1833
_iterCurr
.Storage = iterInfo.Storage;
1836
if (
_iterCurr
.Storage.Location == ItemLocation.Global)
1839
_iterCurr
.EnsureStack();
1897
_iterCurr
.SetIterator(_iterNested!);
1901
_iterCurr
.SetBranching(BranchingContext.OnFalse,
_iterCurr
.ParentIterator!.GetLabelNext());
2073
_iterCurr
.EnsureStackNoCache();
2075
_iterCurr
.EnsureStackNoCache();
2076
_iterCurr
.EnsureItemStorageType(nodes.XmlType!, typeof(XPathNavigator));
2081
_iterCurr
.LoopToEnd(lblOnEnd);
2094
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XPathNavigator), true);
2144
if (
_iterCurr
.HasLabelNext)
2145
StartNestedIterator(
_iterCurr
.GetLabelNext());
2167
_iterCurr
.EnsureLocalNoCache("$$$for");
2172
_iterCurr
.EnsureNoStackNoCache("$$$for");
2188
_helper.Emit(OpCodes.Bgt,
_iterCurr
.ParentIterator!.GetLabelNext());
2191
_iterCurr
.LocalPosition = locPos;
2195
_iterCurr
.SetIterator(_iterNested!);
2218
_iterCurr
.EnsureLocal("$$$cache");
2223
_iterCurr
.EnsureNoStack("$$$cache");
2252
_iterCurr
.Storage = StorageDescriptor.Local(locPos, typeof(int), false);
2289
_iterCurr
.EnsureStackNoCache();
2290
_iterCurr
.EnsureItemStorageType(ndSort.Variable.XmlType!, GetItemStorageType(ndSort.Variable));
2304
_iterCurr
.LoopToEnd(lblOnEndSort);
2316
_iterCurr
.Storage = StorageDescriptor.Local(locCache, itemStorageType, true);
2319
_iterCurr
.SetIterator(_iterNested);
2359
_iterCurr
.EnsureStackNoCache();
2360
_iterCurr
.EnsureItemStorageType(ndKey.Key.XmlType, GetItemStorageType(ndKey.Key));
2399
_iterCurr
.EnsureStack();
2523
Debug.Assert(
_iterCurr
.Storage.IsCached, "DodMerge pattern should only be matched when cached sequences are returned from loop");
2524
_iterCurr
.EnsureStack();
2529
_iterCurr
.LoopToEnd(lblOnEnd);
2536
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XPathNavigator), true);
2575
_iterCurr
.Storage = StorageDescriptor.Stack(GetItemStorageType(ndInvoke), !ndInvoke.XmlType!.IsSingleton);
2579
_iterCurr
.Storage = StorageDescriptor.None();
2613
_helper.Emit(OpCodes.Brfalse,
_iterCurr
.GetLabelNext());
2615
_iterCurr
.Storage = StorageDescriptor.Local(locNav, typeof(XPathNavigator), false);
2633
_helper.Emit(OpCodes.Brfalse,
_iterCurr
.GetLabelNext());
2635
_iterCurr
.Storage = StorageDescriptor.Local(locNav, typeof(XPathNavigator), false);
2654
_iterCurr
.Storage = StorageDescriptor.Local(locNav, typeof(XPathNavigator), false);
2669
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XPathNavigator), false);
2818
_iterCurr
.Storage = StorageDescriptor.None();
2855
_iterCurr
.Storage = StorageDescriptor.None();
2875
_iterCurr
.Storage = StorageDescriptor.None();
2897
_iterCurr
.Storage = StorageDescriptor.None();
2975
_iterCurr
.Storage = StorageDescriptor.None();
2995
_iterCurr
.Storage = StorageDescriptor.None();
3031
_iterCurr
.Storage = StorageDescriptor.None();
3063
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XPathNavigator), false);
3115
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XmlQualifiedName), false);
3121
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(string), false);
3127
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(string), false);
3133
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(string), false);
3149
if (!ndTypeAssert.Source.XmlType!.IsSingleton && ndTypeAssert.XmlType!.IsSingleton && !
_iterCurr
.HasLabelNext)
3167
_iterCurr
.EnsureItemStorageType(ndTypeAssert.Source.XmlType, GetItemStorageType(ndTypeAssert));
3187
Debug.Assert(
_iterCurr
.Storage.ItemStorageType == typeof(XPathItem), "If !IsNode, then storage type should be Item");
3362
switch (
_iterCurr
.CurrentBranchingContext)
3366
_helper.TestAndBranch(0,
_iterCurr
.LabelBranch, OpCodes.Bne_Un);
3371
_helper.TestAndBranch(0,
_iterCurr
.LabelBranch, OpCodes.Beq);
3375
Debug.Assert(
_iterCurr
.CurrentBranchingContext == BranchingContext.None);
3389
IteratorDescriptor iterParent =
_iterCurr
;
3393
StartNestedIterator(
_iterCurr
.LabelBranch);
3400
_iterCurr
.EnsureNoCache();
3401
_iterCurr
.DiscardStack();
3425
if (
_iterCurr
.IsBranching)
3426
_iterCurr
.Storage = StorageDescriptor.None();
3428
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(bool), false);
3457
_iterCurr
.EnsureStackNoCache();
3473
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(string), false);
3532
_iterCurr
.EnsureStackNoCache();
3533
_iterCurr
.EnsureItemStorageType(ndGenId.Child.XmlType, typeof(XPathNavigator));
3550
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(string), false);
3586
_iterCurr
.EnsureStack();
3596
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(XPathItem), true);
3734
_iterCurr
.Storage = StorageDescriptor.Stack(GetItemStorageType(ndInvoke), !ndInvoke.XmlType.IsSingleton);
3770
_iterCurr
.Storage = StorageDescriptor.None();
3787
_iterCurr
.Storage = StorageDescriptor.None();
3818
_iterCurr
.Storage = StorageDescriptor.Stack(GetItemStorageType(typDst), !typDst.IsSingleton);
4003
_iterCurr
.Storage = _iterNested!.Storage;
4029
_helper.Emit(OpCodes.Brfalse,
_iterCurr
.GetLabelNext());
4031
_iterCurr
.SetIterator(lblNext, StorageDescriptor.Current(locIter, methCurrent, itemStorageType));
4059
_iterCurr
.EnsureNoStackNoCache(nd.XmlType!.IsNode ? "$$$navInput" : "$$$itemInput");
4061
_iterCurr
.PushValue();
4082
_iterCurr
.Storage = StorageDescriptor.Current(locIter, methCurrent, itemStorageType);
4090
_helper.Emit(OpCodes.Switch, new Label[] {
_iterCurr
.GetLabelNext(), _iterNested!.GetLabelNext() });
4092
_iterCurr
.SetIterator(lblOnEndNested, StorageDescriptor.Current(locIter, methCurrent, itemStorageType));
4294
switch (
_iterCurr
.CurrentBranchingContext)
4325
_helper.Emit(opcode,
_iterCurr
.LabelBranch);
4326
_iterCurr
.Storage = StorageDescriptor.None();
4340
_helper.Emit(opcode,
_iterCurr
.LabelBranch);
4341
_iterCurr
.Storage = StorageDescriptor.None();
4345
Debug.Assert(
_iterCurr
.CurrentBranchingContext == BranchingContext.None);
4366
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(bool), false);
4381
switch (
_iterCurr
.CurrentBranchingContext)
4386
_helper.Emit((relOp == QilNodeType.Eq) ? OpCodes.Brfalse : OpCodes.Brtrue,
_iterCurr
.LabelBranch);
4387
_iterCurr
.Storage = StorageDescriptor.None();
4393
_helper.Emit((relOp == QilNodeType.Eq) ? OpCodes.Brtrue : OpCodes.Brfalse,
_iterCurr
.LabelBranch);
4394
_iterCurr
.Storage = StorageDescriptor.None();
4398
Debug.Assert(
_iterCurr
.CurrentBranchingContext == BranchingContext.None);
4410
_iterCurr
.Storage = StorageDescriptor.Stack(typeof(bool), false);
4431
if (!
_iterCurr
.HasLabelNext)
4436
_iterCurr
.SetIterator(lblOnEnd, StorageDescriptor.None());
4453
_iterCurr
.Storage = StorageDescriptor.None();
4462
_iterCurr
.LoopToEnd(lblOnEnd);
4659
[MemberNotNull(nameof(
_iterCurr
))]
4662
IteratorDescriptor? iterParent =
_iterCurr
;
4686
_iterCurr
.SetIterator(lblOnEnd, StorageDescriptor.None());
4694
Debug.Assert(
_iterCurr
.Storage.Location == ItemLocation.None ||
4695
_iterCurr
.Storage.ItemStorageType == GetItemStorageType(nd) ||
4696
_iterCurr
.Storage.ItemStorageType == typeof(XPathItem) ||
4698
$"QilNodeType {nd.NodeType} cannot be stored using type {
_iterCurr
.Storage.ItemStorageType}."
4702
if (
_iterCurr
.IsBranching)
4705
if (
_iterCurr
.Storage.Location != ItemLocation.None)
4707
_iterCurr
.EnsureItemStorageType(nd.XmlType!, typeof(bool));
4708
_iterCurr
.EnsureStackNoCache();
4710
if (
_iterCurr
.CurrentBranchingContext == BranchingContext.OnTrue)
4711
_helper.Emit(OpCodes.Brtrue,
_iterCurr
.LabelBranch);
4713
_helper.Emit(OpCodes.Brfalse,
_iterCurr
.LabelBranch);
4715
_iterCurr
.Storage = StorageDescriptor.None();
4720
_iterNested =
_iterCurr
;
4723
_iterCurr =
_iterCurr
.ParentIterator!;
4740
_iterCurr
.Storage = StorageDescriptor.None();
4747
_iterCurr
.EnsureNoCache();
4748
_iterCurr
.EnsureItemStorageType(nd.XmlType, itemStorageType);
4750
_iterCurr
.Storage = _iterNested!.Storage;
4775
_iterCurr
.EnsureNoCache();
4776
_iterCurr
.EnsureItemStorageType(nd.XmlType!, GetItemStorageType(nd));
4778
_iterCurr
.Storage = _iterNested!.Storage;
4788
_iterCurr
.EnsureStack();
4807
_iterCurr
.EnsureStack();
4817
_iterCurr
.EnsureLocal(loc);
4827
_iterCurr
.SetBranching(brctxt, lblBranch);
4830
_iterCurr
.Storage = StorageDescriptor.None();
4852
_iterCurr
.Storage = _iterNested!.Storage;
4853
Debug.Assert(
_iterCurr
.Storage.IsCached, "Expression result should be cached. CachesResult() might have a bug in it.");
4856
if (
_iterCurr
.Storage.ItemStorageType == itemStorageType)
4861
if (
_iterCurr
.Storage.ItemStorageType == typeof(XPathNavigator) || itemStorageType == typeof(XPathNavigator))
4863
_iterCurr
.EnsureItemStorageType(nd.XmlType!, itemStorageType);
4867
_iterCurr
.EnsureNoStack("$$$cacheResult");
4897
_iterCurr
.Storage =
_iterCurr
.ParentIterator!.Storage;
4902
_iterCurr
.EnsureItemStorageType(nd.XmlType, cacheType);
4903
_iterCurr
.EnsureStackNoCache();
4908
_iterCurr
.LoopToEnd(lblOnEnd);
4916
_iterCurr
.Storage = StorageDescriptor.Local(locCache, itemStorageType, true);