26 instantiations of StackSlot
illink (26)
Linker.Dataflow\MethodBodyScanner.cs (26)
67
stack.Push(new
StackSlot
()); // Push dummy values to avoid crashes.
74
stack.Push(new
StackSlot
());
102
return new
StackSlot
(MultiValueLattice.Meet(a.Value, b.Value));
113
a.Push(new
StackSlot
());
116
b.Push(new
StackSlot
());
369
currentStack.Push(new
StackSlot
(NullValue.Instance));
385
StackSlot slot = new
StackSlot
(civ);
393
StackSlot slot = new
StackSlot
(civ);
402
StackSlot slot = new
StackSlot
(civ);
411
StackSlot slot = new
StackSlot
(civ);
454
StackSlot slot = new
StackSlot
(new KnownStringValue((string)operation.Operand));
540
currentStack.Push(new
StackSlot
(ArrayValue.Create(count.Value, (TypeReference)operation.Operand)));
752
catchStack.Push(new
StackSlot
());
782
StackSlot slot = new
StackSlot
(
822
newSlot = new
StackSlot
(new LocalVariableReferenceValue(localDef));
825
newSlot = new
StackSlot
(localValue.Value);
827
newSlot = new
StackSlot
(UnknownValue.Instance);
837
currentStack.Push(new
StackSlot
(param));
848
currentStack.Push(new
StackSlot
(nullableDam));
852
currentStack.Push(new
StackSlot
(nullableType));
862
currentStack.Push(new
StackSlot
(typeHandle));
867
currentStack.Push(new
StackSlot
(method));
991
currentStack.Push(new
StackSlot
(value));
1178
currentStack.Push(new
StackSlot
(methodReturnValue));
1270
currentStack.Push(new
StackSlot
(arrayOfAnnotated.GetAnyElementValue()));
1297
currentStack.Push(new
StackSlot
(arrayIndexValue.Value));
66 references to StackSlot
illink (66)
Linker.Dataflow\MethodBodyScanner.cs (66)
61
private void CheckForInvalidStack(Stack<
StackSlot
> stack, int depthRequired, MethodIL methodIL, int ilOffset)
72
private static void PushUnknown(Stack<
StackSlot
> stack)
77
private void PushUnknownAndWarnAboutInvalidIL(Stack<
StackSlot
> stack, MethodIL methodIL, int offset)
83
private
StackSlot
PopUnknown(Stack<
StackSlot
> stack, int count, MethodIL methodIL, int ilOffset)
88
StackSlot
topOfStack = default;
93
StackSlot
slot = stack.Pop();
100
private static
StackSlot
MergeStackElement(
StackSlot
a,
StackSlot
b)
106
private static Stack<
StackSlot
> MergeStack(Stack<
StackSlot
> a, Stack<
StackSlot
> b)
119
Stack<
StackSlot
> newStack = new Stack<
StackSlot
>(a.Count);
120
Stack<
StackSlot
>.Enumerator aEnum = a.GetEnumerator();
121
Stack<
StackSlot
>.Enumerator bEnum = b.GetEnumerator();
128
return new Stack<
StackSlot
>(newStack);
131
private static void ClearStack(ref Stack<
StackSlot
>? stack)
136
private static void NewKnownStack(Dictionary<int, Stack<
StackSlot
>> knownStacks, int newOffset, Stack<
StackSlot
> newStack)
144
if (knownStacks.TryGetValue(newOffset, out Stack<
StackSlot
>? value))
150
knownStacks.Add(newOffset, new Stack<
StackSlot
>(newStack.Reverse()));
308
Dictionary<int, Stack<
StackSlot
>> knownStacks = new Dictionary<int, Stack<
StackSlot
>>();
309
Stack<
StackSlot
>? currentStack = new Stack<
StackSlot
>(methodBody.MaxStackSize);
319
if (knownStacks.TryGetValue(operation.Offset, out Stack<
StackSlot
>? knownValue))
324
currentStack = new Stack<
StackSlot
>(knownValue.Reverse());
332
currentStack ??= new Stack<
StackSlot
>(methodBody.MaxStackSize);
385
StackSlot
slot = new StackSlot(civ);
393
StackSlot
slot = new StackSlot(civ);
402
StackSlot
slot = new StackSlot(civ);
411
StackSlot
slot = new StackSlot(civ);
454
StackSlot
slot = new StackSlot(new KnownStringValue((string)operation.Operand));
539
StackSlot
count = PopUnknown(currentStack, 1, methodIL, operation.Offset);
676
NewKnownStack(knownStacks, ((Instruction)operation.Operand).Offset, new Stack<
StackSlot
>(methodBody.MaxStackSize));
697
StackSlot
retStackSlot = PopUnknown(currentStack, 1, methodIL, operation.Offset);
747
private static void ScanExceptionInformation(Dictionary<int, Stack<
StackSlot
>> knownStacks, MethodIL methodIL)
751
Stack<
StackSlot
> catchStack = new Stack<
StackSlot
>(1);
770
private void ScanLdarg(Instruction operation, Stack<
StackSlot
> currentStack, MethodDefinition thisMethod)
782
StackSlot
slot = new StackSlot(
792
Stack<
StackSlot
> currentStack)
794
var
valueToStore = PopUnknown(currentStack, 1, methodIL, operation.Offset);
807
Stack<
StackSlot
> currentStack,
819
StackSlot
newSlot;
831
void ScanLdtoken(Instruction operation, Stack<
StackSlot
> currentStack)
878
Stack<
StackSlot
> currentStack,
882
StackSlot
valueToStore = PopUnknown(currentStack, 1, methodIL, operation.Offset);
896
Stack<
StackSlot
> currentStack,
901
StackSlot
valueToStore = PopUnknown(currentStack, 1, methodIL, operation.Offset);
902
StackSlot
destination = PopUnknown(currentStack, 1, methodIL, operation.Offset);
962
Stack<
StackSlot
> currentStack,
1009
Stack<
StackSlot
> currentStack,
1013
StackSlot
valueToStoreSlot = PopUnknown(currentStack, 1, methodIL, operation.Offset);
1053
Stack<
StackSlot
> currentStack,
1066
StackSlot
slot = PopUnknown(currentStack, 1, containingMethodIL, ilOffset);
1158
Stack<
StackSlot
> currentStack,
1222
Stack<
StackSlot
> currentStack,
1226
StackSlot
valueToStore = PopUnknown(currentStack, 1, methodIL, operation.Offset);
1227
StackSlot
indexToStoreAt = PopUnknown(currentStack, 1, methodIL, operation.Offset);
1228
StackSlot
arrayToStoreIn = PopUnknown(currentStack, 1, methodIL, operation.Offset);
1253
Stack<
StackSlot
> currentStack,
1257
StackSlot
indexToLoadFrom = PopUnknown(currentStack, 1, methodIL, operation.Offset);
1258
StackSlot
arrayToLoadFrom = PopUnknown(currentStack, 1, methodIL, operation.Offset);