37 writes to OpCode
Microsoft.Maui.Controls.Build.Tasks (1)
MethodBodyExtensions.cs (1)
24
instruction.
OpCode
= opcode;
Mono.Cecil.Rocks (36)
Mono.Cecil.Rocks\MethodBodyRocks.cs (36)
69
instruction.
OpCode
= OpCodes.Ldarg;
72
instruction.
OpCode
= OpCodes.Ldarga;
75
instruction.
OpCode
= OpCodes.Starg;
78
instruction.
OpCode
= OpCodes.Ldloc;
81
instruction.
OpCode
= OpCodes.Ldloca;
84
instruction.
OpCode
= OpCodes.Stloc;
120
instruction.
OpCode
= OpCodes.Br;
123
instruction.
OpCode
= OpCodes.Brfalse;
126
instruction.
OpCode
= OpCodes.Brtrue;
129
instruction.
OpCode
= OpCodes.Beq;
132
instruction.
OpCode
= OpCodes.Bge;
135
instruction.
OpCode
= OpCodes.Bgt;
138
instruction.
OpCode
= OpCodes.Ble;
141
instruction.
OpCode
= OpCodes.Blt;
144
instruction.
OpCode
= OpCodes.Bne_Un;
147
instruction.
OpCode
= OpCodes.Bge_Un;
150
instruction.
OpCode
= OpCodes.Bgt_Un;
153
instruction.
OpCode
= OpCodes.Ble_Un;
156
instruction.
OpCode
= OpCodes.Blt_Un;
159
instruction.
OpCode
= OpCodes.Leave;
167
instruction.
OpCode
= opcode;
173
instruction.
OpCode
= opcode;
357
instruction.
OpCode
= OpCodes.Br_S;
360
instruction.
OpCode
= OpCodes.Brfalse_S;
363
instruction.
OpCode
= OpCodes.Brtrue_S;
366
instruction.
OpCode
= OpCodes.Beq_S;
369
instruction.
OpCode
= OpCodes.Bge_S;
372
instruction.
OpCode
= OpCodes.Bgt_S;
375
instruction.
OpCode
= OpCodes.Ble_S;
378
instruction.
OpCode
= OpCodes.Blt_S;
381
instruction.
OpCode
= OpCodes.Bne_Un_S;
384
instruction.
OpCode
= OpCodes.Bge_Un_S;
387
instruction.
OpCode
= OpCodes.Bgt_Un_S;
390
instruction.
OpCode
= OpCodes.Ble_Un_S;
393
instruction.
OpCode
= OpCodes.Blt_Un_S;
396
instruction.
OpCode
= OpCodes.Leave_S;
90 references to OpCode
illink (76)
Linker.Dataflow\CompilerGeneratedState.cs (4)
172
switch (instruction.
OpCode
.OperandType)
214
if (instruction.
OpCode
.Code is not (Code.Stsfld or Code.Ldsfld))
463
switch (instr.
OpCode
.Code)
491
if (!handled && instr.
OpCode
.OperandType is OperandType.InlineMethod)
Linker.Dataflow\FlowAnnotations.cs (1)
558
switch (instruction.
OpCode
.Code)
Linker.Dataflow\HandleCallAction.cs (2)
38
_isNewObj = operation.
OpCode
== OpCodes.Newobj;
74
if (_operation.
OpCode
== OpCodes.Newobj)
Linker.Dataflow\MethodBodyScanner.cs (11)
183
if (op.
OpCode
.IsControlFlowInstruction())
334
switch (operation.
OpCode
.Code)
383
int value = operation.
OpCode
.Code - Code.Ldc_I4_0;
782
Code code = operation.
OpCode
.Code;
827
bool isByRef = operation.
OpCode
.Code == Code.Ldloca || operation.
OpCode
.Code == Code.Ldloca_S;
986
Code code = operation.
OpCode
.Code;
1041
if (operation.
OpCode
.Code == Code.Stfld)
1071
Code code = operation.
OpCode
.Code;
1193
bool isNewObj = operation.
OpCode
.Code == Code.Newobj;
1288
bool isByRef = operation.
OpCode
.Code == Code.Ldelema;
Linker.Dataflow\ReflectionMethodBodyScanner.cs (1)
234
bool isNewObj = operation.
OpCode
.Code == Code.Newobj;
Linker.Dataflow\ScannerExtensions.cs (1)
24
if (!operation.
OpCode
.IsControlFlowInstruction())
Linker.Steps\MarkStep.cs (9)
2910
return body.Instructions[0].
OpCode
.Code != Code.Ret;
3893
switch (instruction.
OpCode
.OperandType)
4003
=> instruction.
OpCode
.Code switch
4020
var ret = instruction.
OpCode
.Code switch
4034
switch (instruction.
OpCode
.OperandType)
4045
(DependencyKind dependencyKind, bool markForReflectionAccess) = instruction.
OpCode
.Code switch
4053
_ => throw new InvalidOperationException($"unexpected opcode {instruction.
OpCode
}")
4076
Debug.Assert(instruction.
OpCode
.Code == Code.Ldtoken);
4103
switch (instruction.
OpCode
.Code)
Linker.Steps\UnreachableBlocksOptimizer.cs (37)
103
switch (instr.
OpCode
.FlowControl)
160
switch (instr.
OpCode
.Code)
395
switch (instr.
OpCode
.Code)
423
switch (instruction.
OpCode
.Code)
510
switch (instr.
OpCode
.Code)
610
if (instructions[index - 1].
OpCode
.Code == Code.Ldarg_0)
693
switch (instr.
OpCode
.Code)
780
switch (instruction.
OpCode
.StackBehaviourPop)
810
if (ms.HasThis && instruction.
OpCode
!= OpCodes.Newobj)
817
if (instruction.
OpCode
== OpCodes.Ret)
827
Debug.Fail(instruction.
OpCode
.StackBehaviourPop.ToString());
832
switch (instruction.
OpCode
.StackBehaviourPush)
860
Debug.Fail(instruction.
OpCode
.StackBehaviourPush.ToString());
917
switch (instr.
OpCode
.Code)
1006
if (index == Instructions.Count - 1 && Instructions[index].
OpCode
== OpCodes.Ret &&
1007
index > 0 && IsConditionalBranch(Instructions[index - 1].
OpCode
))
1036
var opcode = instr.
OpCode
;
1121
if (FoldedInstructions[i - 1].
OpCode
!= OpCodes.Sub)
1140
switch (instr.
OpCode
.Code)
1156
if (IsComparisonAlwaysTrue(instr.
OpCode
, lint, rint))
1226
switch (instr.
OpCode
.FlowControl)
1296
if (filterEnd >= 0 && FoldedInstructions[filterEnd].
OpCode
== OpCodes.Endfilter)
1379
switch (first.
OpCode
.Code)
1382
return second.
OpCode
.Code == Code.Ldloc_0;
1384
return second.
OpCode
.Code == Code.Ldloc_1;
1386
return second.
OpCode
.Code == Code.Ldloc_2;
1388
return second.
OpCode
.Code == Code.Ldloc_3;
1391
if (second.
OpCode
.Code == Code.Ldloc_S || second.
OpCode
.Code == Code.Ldloc)
1455
switch (instr.
OpCode
.Code)
1485
switch (instr.
OpCode
.StackBehaviourPop)
1549
switch (instr.
OpCode
.StackBehaviourPop)
1649
switch (instruction.
OpCode
.Code)
1738
switch (instr.
OpCode
.Code)
2072
switch (instr.
OpCode
.Code)
2097
if (IsComparisonAlwaysTrue(instr.
OpCode
, lint, rint))
2120
switch (instr.
OpCode
.Code)
Linker\LinkerILProcessor.cs (1)
111
switch (instr.
OpCode
.FlowControl)
Linker\MethodBodyScanner.cs (6)
24
if (ins.
OpCode
.Code == Code.Nop)
29
if (meaningfulCount == 1 && ins.
OpCode
.Code == Code.Ret)
32
if (meaningfulCount == 2 && ins.
OpCode
.Code == Code.Ret && previousMeaningful != null)
34
if (previousMeaningful.
OpCode
.StackBehaviourPop == StackBehaviour.Pop0)
36
switch (previousMeaningful.
OpCode
.StackBehaviourPush)
45
switch (previousMeaningful.
OpCode
.Code)
Linker\ParameterHelpers.cs (2)
18
Code code = operation.
OpCode
.Code;
35
_ => throw new ArgumentException($"{nameof(GetParameterIndex)} expected an ldarg or starg instruction, got {operation.
OpCode
.Name}")
Linker\TypeReferenceWalker.cs (1)
201
switch (instr.
OpCode
.OperandType)
Microsoft.Maui.Controls.Build.Tasks (7)
MethodBodyExtensions.cs (6)
34
if (instruction.
OpCode
.Code != Code.Ldc_I8)
50
if (instruction.
OpCode
.Code != Code.Stloc)
57
if (next.
OpCode
.Code != Code.Ldloc || num != ((VariableDefinition)next.Operand).Index)
70
if (instruction.
OpCode
.Code != Code.Ldloc)
83
var instruction = (from instr in self.Instructions where instr.
OpCode
.Code == Code.Stloc && instr.Operand == varDef select instr).First();
86
if (instruction.Previous.
OpCode
.Code != Code.Dup)
NodeILExtensions.cs (1)
632
if (pushParentIl[pushParentIl.Count - 1].
OpCode
!= Ldnull)
Mono.Cecil.Rocks (7)
Mono.Cecil.Rocks\MethodBodyRocks.cs (7)
28
if (instruction.
OpCode
.OpCodeType != OpCodeType.Macro)
31
switch (instruction.
OpCode
.Code) {
190
if (instruction.
OpCode
.Code != Code.Ldc_I8)
209
switch (instruction.
OpCode
.Code) {
341
if (instruction.
OpCode
.OperandType != OperandType.InlineBrTarget)
351
var offset = ((Instruction) instruction.Operand).Offset - (instruction.Offset + instruction.
OpCode
.Size + 4);
355
switch (instruction.
OpCode
.Code) {