25 instantiations of StackSlot
illink (25)
Linker.Dataflow\MethodBodyScanner.cs (25)
66
stack.Push (new
StackSlot
()); // Push dummy values to avoid crashes.
73
stack.Push (new
StackSlot
());
100
return new
StackSlot
(MultiValueLattice.Meet (a.Value, b.Value));
110
a.Push (new
StackSlot
());
113
b.Push (new
StackSlot
());
338
currentStack.Push (new
StackSlot
(NullValue.Instance));
353
StackSlot slot = new
StackSlot
(civ);
360
StackSlot slot = new
StackSlot
(civ);
368
StackSlot slot = new
StackSlot
(civ);
376
StackSlot slot = new
StackSlot
(civ);
418
StackSlot slot = new
StackSlot
(new KnownStringValue ((string) operation.Operand));
503
currentStack.Push (new
StackSlot
(ArrayValue.Create (count.Value, (TypeReference) operation.Operand)));
707
catchStack.Push (new
StackSlot
());
735
StackSlot slot = new
StackSlot
(
774
newSlot = new
StackSlot
(new LocalVariableReferenceValue (localDef));
776
newSlot = new
StackSlot
(localValue.Value);
778
newSlot = new
StackSlot
(UnknownValue.Instance);
787
currentStack.Push (new
StackSlot
(param));
796
currentStack.Push (new
StackSlot
(nullableDam));
800
currentStack.Push (new
StackSlot
(nullableType));
808
currentStack.Push (new
StackSlot
(typeHandle));
813
currentStack.Push (new
StackSlot
(method));
928
currentStack.Push (new
StackSlot
(value));
1104
currentStack.Push (new
StackSlot
(methodReturnValue));
1187
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)
71
private static void PushUnknown (Stack<
StackSlot
> stack)
76
private void PushUnknownAndWarnAboutInvalidIL (Stack<
StackSlot
> stack, MethodBody methodBody, int offset)
82
private
StackSlot
PopUnknown (Stack<
StackSlot
> stack, int count, MethodBody method, int ilOffset)
87
StackSlot
topOfStack = default;
91
StackSlot
slot = stack.Pop ();
98
private static
StackSlot
MergeStackElement (
StackSlot
a,
StackSlot
b)
104
private static Stack<
StackSlot
> MergeStack (Stack<
StackSlot
> a, Stack<
StackSlot
> b)
116
Stack<
StackSlot
> newStack = new Stack<
StackSlot
> (a.Count);
117
Stack<
StackSlot
>.Enumerator aEnum = a.GetEnumerator ();
118
Stack<
StackSlot
>.Enumerator bEnum = b.GetEnumerator ();
124
return new Stack<
StackSlot
> (newStack);
127
private static void ClearStack (ref Stack<
StackSlot
>? stack)
132
private static void NewKnownStack (Dictionary<int, Stack<
StackSlot
>> knownStacks, int newOffset, Stack<
StackSlot
> newStack)
139
if (knownStacks.TryGetValue (newOffset, out Stack<
StackSlot
>? value)) {
142
knownStacks.Add (newOffset, new Stack<
StackSlot
> (newStack.Reverse ()));
283
Dictionary<int, Stack<
StackSlot
>> knownStacks = new Dictionary<int, Stack<
StackSlot
>> ();
284
Stack<
StackSlot
>? currentStack = new Stack<
StackSlot
> (methodBody.MaxStackSize);
293
if (knownStacks.TryGetValue (operation.Offset, out Stack<
StackSlot
>? knownValue)) {
296
currentStack = new Stack<
StackSlot
> (knownValue.Reverse ());
302
currentStack ??= new Stack<
StackSlot
> (methodBody.MaxStackSize);
353
StackSlot
slot = new StackSlot (civ);
360
StackSlot
slot = new StackSlot (civ);
368
StackSlot
slot = new StackSlot (civ);
376
StackSlot
slot = new StackSlot (civ);
418
StackSlot
slot = new StackSlot (new KnownStringValue ((string) operation.Operand));
502
StackSlot
count = PopUnknown (currentStack, 1, methodBody, operation.Offset);
637
NewKnownStack (knownStacks, ((Instruction) operation.Operand).Offset, new Stack<
StackSlot
> (methodBody.MaxStackSize));
655
StackSlot
retStackSlot = PopUnknown (currentStack, 1, methodBody, operation.Offset);
703
private static void ScanExceptionInformation (Dictionary<int, Stack<
StackSlot
>> knownStacks, MethodIL methodIL)
706
Stack<
StackSlot
> catchStack = new Stack<
StackSlot
> (1);
723
private void ScanLdarg (Instruction operation, Stack<
StackSlot
> currentStack, MethodDefinition thisMethod)
735
StackSlot
slot = new StackSlot (
744
Stack<
StackSlot
> currentStack,
748
var
valueToStore = PopUnknown (currentStack, 1, methodBody, operation.Offset);
760
Stack<
StackSlot
> currentStack,
772
StackSlot
newSlot;
782
void ScanLdtoken (Instruction operation, Stack<
StackSlot
> currentStack)
823
Stack<
StackSlot
> currentStack,
828
StackSlot
valueToStore = PopUnknown (currentStack, 1, methodIL.Body, operation.Offset);
840
Stack<
StackSlot
> currentStack,
846
StackSlot
valueToStore = PopUnknown (currentStack, 1, methodBody, operation.Offset);
847
StackSlot
destination = PopUnknown (currentStack, 1, methodBody, operation.Offset);
904
Stack<
StackSlot
> currentStack,
945
Stack<
StackSlot
> currentStack,
951
StackSlot
valueToStoreSlot = PopUnknown (currentStack, 1, methodBody, operation.Offset);
988
Stack<
StackSlot
> currentStack,
1000
StackSlot
slot = PopUnknown (currentStack, 1, containingMethodBody, ilOffset);
1084
Stack<
StackSlot
> currentStack,
1140
Stack<
StackSlot
> currentStack,
1144
StackSlot
valueToStore = PopUnknown (currentStack, 1, methodBody, operation.Offset);
1145
StackSlot
indexToStoreAt = PopUnknown (currentStack, 1, methodBody, operation.Offset);
1146
StackSlot
arrayToStoreIn = PopUnknown (currentStack, 1, methodBody, operation.Offset);
1162
Stack<
StackSlot
> currentStack,
1166
StackSlot
indexToLoadFrom = PopUnknown (currentStack, 1, methodBody, operation.Offset);
1167
StackSlot
arrayToLoadFrom = PopUnknown (currentStack, 1, methodBody, operation.Offset);