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)
2872
return body.Instructions[0].
OpCode
.Code != Code.Ret;
3855
switch (instruction.
OpCode
.OperandType)
3965
=> instruction.
OpCode
.Code switch
3982
var ret = instruction.
OpCode
.Code switch
3996
switch (instruction.
OpCode
.OperandType)
4007
(DependencyKind dependencyKind, bool markForReflectionAccess) = instruction.
OpCode
.Code switch
4015
_ => throw new InvalidOperationException($"unexpected opcode {instruction.
OpCode
}")
4038
Debug.Assert(instruction.
OpCode
.Code == Code.Ldtoken);
4065
switch (instruction.
OpCode
.Code)
Linker.Steps\UnreachableBlocksOptimizer.cs (37)
103
switch (instr.
OpCode
.FlowControl)
160
switch (instr.
OpCode
.Code)
388
switch (instr.
OpCode
.Code)
416
switch (instruction.
OpCode
.Code)
503
switch (instr.
OpCode
.Code)
603
if (instructions[index - 1].
OpCode
.Code == Code.Ldarg_0)
686
switch (instr.
OpCode
.Code)
773
switch (instruction.
OpCode
.StackBehaviourPop)
803
if (ms.HasThis && instruction.
OpCode
!= OpCodes.Newobj)
810
if (instruction.
OpCode
== OpCodes.Ret)
820
Debug.Fail(instruction.
OpCode
.StackBehaviourPop.ToString());
825
switch (instruction.
OpCode
.StackBehaviourPush)
853
Debug.Fail(instruction.
OpCode
.StackBehaviourPush.ToString());
910
switch (instr.
OpCode
.Code)
999
if (index == Instructions.Count - 1 && Instructions[index].
OpCode
== OpCodes.Ret &&
1000
index > 0 && IsConditionalBranch(Instructions[index - 1].
OpCode
))
1029
var opcode = instr.
OpCode
;
1114
if (FoldedInstructions[i - 1].
OpCode
!= OpCodes.Sub)
1133
switch (instr.
OpCode
.Code)
1149
if (IsComparisonAlwaysTrue(instr.
OpCode
, lint, rint))
1219
switch (instr.
OpCode
.FlowControl)
1289
if (filterEnd >= 0 && FoldedInstructions[filterEnd].
OpCode
== OpCodes.Endfilter)
1372
switch (first.
OpCode
.Code)
1375
return second.
OpCode
.Code == Code.Ldloc_0;
1377
return second.
OpCode
.Code == Code.Ldloc_1;
1379
return second.
OpCode
.Code == Code.Ldloc_2;
1381
return second.
OpCode
.Code == Code.Ldloc_3;
1384
if (second.
OpCode
.Code == Code.Ldloc_S || second.
OpCode
.Code == Code.Ldloc)
1448
switch (instr.
OpCode
.Code)
1478
switch (instr.
OpCode
.StackBehaviourPop)
1542
switch (instr.
OpCode
.StackBehaviourPop)
1642
switch (instruction.
OpCode
.Code)
1731
switch (instr.
OpCode
.Code)
2065
switch (instr.
OpCode
.Code)
2090
if (IsComparisonAlwaysTrue(instr.
OpCode
, lint, rint))
2113
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) {