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);
456
StackSlot slot = new
StackSlot
(new KnownStringValue((string)operation.Operand));
549
currentStack.Push(new
StackSlot
(ArrayValue.Create(count.Value, arrayElementType)));
761
catchStack.Push(new
StackSlot
());
791
StackSlot slot = new
StackSlot
(
831
newSlot = new
StackSlot
(new LocalVariableReferenceValue(localDef));
834
newSlot = new
StackSlot
(localValue.Value);
836
newSlot = new
StackSlot
(UnknownValue.Instance);
846
currentStack.Push(new
StackSlot
(param));
857
currentStack.Push(new
StackSlot
(nullableDam));
861
currentStack.Push(new
StackSlot
(nullableType));
871
currentStack.Push(new
StackSlot
(typeHandle));
879
currentStack.Push(new
StackSlot
(method));
1011
currentStack.Push(new
StackSlot
(value));
1205
currentStack.Push(new
StackSlot
(methodReturnValue));
1297
currentStack.Push(new
StackSlot
(arrayOfAnnotated.GetAnyElementValue()));
1324
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);
456
StackSlot
slot = new StackSlot(new KnownStringValue((string)operation.Operand));
546
StackSlot
count = PopUnknown(currentStack, 1, methodIL, operation.Offset);
685
NewKnownStack(knownStacks, ((Instruction)operation.Operand).Offset, new Stack<
StackSlot
>(methodBody.MaxStackSize));
706
StackSlot
retStackSlot = PopUnknown(currentStack, 1, methodIL, operation.Offset);
756
private static void ScanExceptionInformation(Dictionary<int, Stack<
StackSlot
>> knownStacks, MethodIL methodIL)
760
Stack<
StackSlot
> catchStack = new Stack<
StackSlot
>(1);
779
private void ScanLdarg(Instruction operation, Stack<
StackSlot
> currentStack, MethodDefinition thisMethod)
791
StackSlot
slot = new StackSlot(
801
Stack<
StackSlot
> currentStack)
803
var
valueToStore = PopUnknown(currentStack, 1, methodIL, operation.Offset);
816
Stack<
StackSlot
> currentStack,
828
StackSlot
newSlot;
840
void ScanLdtoken(MethodIL methodIL, Instruction operation, Stack<
StackSlot
> currentStack)
898
Stack<
StackSlot
> currentStack,
902
StackSlot
valueToStore = PopUnknown(currentStack, 1, methodIL, operation.Offset);
916
Stack<
StackSlot
> currentStack,
921
StackSlot
valueToStore = PopUnknown(currentStack, 1, methodIL, operation.Offset);
922
StackSlot
destination = PopUnknown(currentStack, 1, methodIL, operation.Offset);
982
Stack<
StackSlot
> currentStack,
1035
Stack<
StackSlot
> currentStack,
1039
StackSlot
valueToStoreSlot = PopUnknown(currentStack, 1, methodIL, operation.Offset);
1080
Stack<
StackSlot
> currentStack,
1093
StackSlot
slot = PopUnknown(currentStack, 1, containingMethodIL, ilOffset);
1185
Stack<
StackSlot
> currentStack,
1249
Stack<
StackSlot
> currentStack,
1253
StackSlot
valueToStore = PopUnknown(currentStack, 1, methodIL, operation.Offset);
1254
StackSlot
indexToStoreAt = PopUnknown(currentStack, 1, methodIL, operation.Offset);
1255
StackSlot
arrayToStoreIn = PopUnknown(currentStack, 1, methodIL, operation.Offset);
1280
Stack<
StackSlot
> currentStack,
1284
StackSlot
indexToLoadFrom = PopUnknown(currentStack, 1, methodIL, operation.Offset);
1285
StackSlot
arrayToLoadFrom = PopUnknown(currentStack, 1, methodIL, operation.Offset);