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
(
823
newSlot = new
StackSlot
(new LocalVariableReferenceValue(localDef));
826
newSlot = new
StackSlot
(localValue.Value);
828
newSlot = new
StackSlot
(UnknownValue.Instance);
838
currentStack.Push(new
StackSlot
(param));
849
currentStack.Push(new
StackSlot
(nullableDam));
853
currentStack.Push(new
StackSlot
(nullableType));
863
currentStack.Push(new
StackSlot
(typeHandle));
868
currentStack.Push(new
StackSlot
(method));
992
currentStack.Push(new
StackSlot
(value));
1180
currentStack.Push(new
StackSlot
(methodReturnValue));
1272
currentStack.Push(new
StackSlot
(arrayOfAnnotated.GetAnyElementValue()));
1299
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, MethodBody method, int ilOffset)
72
private static void PushUnknown(Stack<
StackSlot
> stack)
77
private void PushUnknownAndWarnAboutInvalidIL(Stack<
StackSlot
> stack, MethodBody methodBody, int offset)
83
private
StackSlot
PopUnknown(Stack<
StackSlot
> stack, int count, MethodBody method, 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, methodBody, operation.Offset);
676
NewKnownStack(knownStacks, ((Instruction)operation.Operand).Offset, new Stack<
StackSlot
>(methodBody.MaxStackSize));
697
StackSlot
retStackSlot = PopUnknown(currentStack, 1, methodBody, 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(
791
Stack<
StackSlot
> currentStack,
795
var
valueToStore = PopUnknown(currentStack, 1, methodBody, operation.Offset);
807
Stack<
StackSlot
> currentStack,
820
StackSlot
newSlot;
832
void ScanLdtoken(Instruction operation, Stack<
StackSlot
> currentStack)
878
Stack<
StackSlot
> currentStack,
883
StackSlot
valueToStore = PopUnknown(currentStack, 1, methodIL.Body, operation.Offset);
896
Stack<
StackSlot
> currentStack,
902
StackSlot
valueToStore = PopUnknown(currentStack, 1, methodBody, operation.Offset);
903
StackSlot
destination = PopUnknown(currentStack, 1, methodBody, operation.Offset);
962
Stack<
StackSlot
> currentStack,
1009
Stack<
StackSlot
> currentStack,
1015
StackSlot
valueToStoreSlot = PopUnknown(currentStack, 1, methodBody, operation.Offset);
1055
Stack<
StackSlot
> currentStack,
1068
StackSlot
slot = PopUnknown(currentStack, 1, containingMethodBody, ilOffset);
1160
Stack<
StackSlot
> currentStack,
1224
Stack<
StackSlot
> currentStack,
1228
StackSlot
valueToStore = PopUnknown(currentStack, 1, methodBody, operation.Offset);
1229
StackSlot
indexToStoreAt = PopUnknown(currentStack, 1, methodBody, operation.Offset);
1230
StackSlot
arrayToStoreIn = PopUnknown(currentStack, 1, methodBody, operation.Offset);
1255
Stack<
StackSlot
> currentStack,
1259
StackSlot
indexToLoadFrom = PopUnknown(currentStack, 1, methodBody, operation.Offset);
1260
StackSlot
arrayToLoadFrom = PopUnknown(currentStack, 1, methodBody, operation.Offset);