1824 references to ILOpCode
Microsoft.AspNetCore.Http.Extensions.Tests (6)
RequestDelegateFactoryTests.cs (4)
335
new object[] { (Action<HttpContext,
ILOpCode
[]>)Store, new[] { "Nop" }, new[] {
ILOpCode
.Nop } },
386
new object[] { (Action<HttpContext,
ILOpCode
>)Store, "Nop",
ILOpCode
.Nop },
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (1)
142
new object[] { "ILOpCode[]", new[] { "Nop" }, new[] {
ILOpCode
.Nop } },
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (1)
53
new object[] { "ILOpCode", "Nop",
ILOpCode
.Nop },
Microsoft.CodeAnalysis (755)
CodeGen\BasicBlock.cs (53)
147
private
ILOpCode
_branchCode;
166
public
ILOpCode
BranchCode
178
public
ILOpCode
RevBranchCode
182
return (
ILOpCode
)_revBranchCode;
186
Debug.Assert((
ILOpCode
)(byte)value == value, "rev opcodes must fit in a byte");
208
public void SetBranchCode(
ILOpCode
newBranchCode)
216
public void SetBranch(object newLabel,
ILOpCode
branchCode,
ILOpCode
revBranchCode)
222
public void SetBranch(object newLabel,
ILOpCode
branchCode)
248
=> (this.BranchLabel != null) && (this.BranchCode !=
ILOpCode
.Nop);
314
var
curBranchCode = this.BranchCode;
363
Debug.Assert(BranchCode !=
ILOpCode
.Nop, "Nop branches should not have labels");
394
next.BranchCode ==
ILOpCode
.Nop &&
414
this.SetBranch(null,
ILOpCode
.Nop);
447
(next.BranchCode ==
ILOpCode
.Br || next.BranchCode ==
ILOpCode
.Br_s) &&
450
ILOpCode
revBrOp = this.GetReversedBranchOp();
452
if (revBrOp !=
ILOpCode
.Nop)
471
if (next.BranchCode ==
ILOpCode
.Br_s)
481
var
origBrOp = this.BranchCode;
493
var
curBranchCode = this.BranchCode;
494
if (curBranchCode ==
ILOpCode
.Br || curBranchCode ==
ILOpCode
.Br_s)
500
this.SetBranch(null,
ILOpCode
.Nop);
507
if (BranchBlock.HasNoRegularInstructions && BranchBlock.BranchCode ==
ILOpCode
.Ret)
509
this.SetBranch(null,
ILOpCode
.Ret);
522
var
curBranchCode = this.BranchCode;
532
this.SetBranch(null,
ILOpCode
.Nop);
533
this.Writer.WriteByte((byte)
ILOpCode
.Pop);
540
this.Writer.WriteByte((byte)
ILOpCode
.Pop);
575
private
ILOpCode
GetReversedBranchOp()
577
var
result = RevBranchCode;
579
if (result !=
ILOpCode
.Nop)
589
case
ILOpCode
.Brfalse:
590
case
ILOpCode
.Brfalse_s:
591
result =
ILOpCode
.Brtrue;
593
case
ILOpCode
.Brtrue:
594
case
ILOpCode
.Brtrue_s:
595
result =
ILOpCode
.Brfalse;
597
case
ILOpCode
.Beq:
598
case
ILOpCode
.Beq_s:
599
result =
ILOpCode
.Bne_un;
601
case
ILOpCode
.Bne_un:
602
case
ILOpCode
.Bne_un_s:
603
result =
ILOpCode
.Beq;
617
case
ILOpCode
.Nop:
621
case
ILOpCode
.Ret:
622
case
ILOpCode
.Throw:
623
case
ILOpCode
.Endfinally:
627
case
ILOpCode
.Rethrow:
628
case
ILOpCode
.Endfilter:
663
this.BranchCode =
ILOpCode
.Nop;
718
this.SetBranchCode(
ILOpCode
.Switch);
CodeGen\ILBuilder.cs (16)
157
_lastCompleteBlock.BranchCode ==
ILOpCode
.Nop &&
290
var
branchCode = block.BranchCode;
291
if (branchCode ==
ILOpCode
.Nop && block.Type == BlockType.Normal)
305
if (branchCode ==
ILOpCode
.Endfinally)
471
Debug.Assert(block.EnclosingHandler.LastFilterConditionBlock.BranchCode ==
ILOpCode
.Endfilter);
528
case
ILOpCode
.Br:
532
case
ILOpCode
.Nop:
588
case
ILOpCode
.Br:
592
case
ILOpCode
.Nop:
746
current.SetBranchCode(
ILOpCode
.Br_s);
751
current.SetBranch(null,
ILOpCode
.Nop);
767
if ((block.BranchCode !=
ILOpCode
.Nop) || (block.BranchLabel == null))
913
case
ILOpCode
.Nop:
916
case
ILOpCode
.Switch:
920
WriteOpCode(writer,
ILOpCode
.Switch);
1109
EmitOpCode(
ILOpCode
.Nop);
CodeGen\ILBuilderConversions.cs (56)
27
this.EmitOpCode(fromUnsigned ?
ILOpCode
.Conv_ovf_i1_un :
ILOpCode
.Conv_ovf_i1);
29
this.EmitOpCode(
ILOpCode
.Conv_i1);
41
this.EmitOpCode(fromUnsigned ?
ILOpCode
.Conv_ovf_u1_un :
ILOpCode
.Conv_ovf_u1);
43
this.EmitOpCode(
ILOpCode
.Conv_u1);
57
this.EmitOpCode(fromUnsigned ?
ILOpCode
.Conv_ovf_i2_un :
ILOpCode
.Conv_ovf_i2);
59
this.EmitOpCode(
ILOpCode
.Conv_i2);
74
this.EmitOpCode(fromUnsigned ?
ILOpCode
.Conv_ovf_u2_un :
ILOpCode
.Conv_ovf_u2);
76
this.EmitOpCode(
ILOpCode
.Conv_u2);
93
this.EmitOpCode(
ILOpCode
.Conv_ovf_i4_un);
97
this.EmitOpCode(fromUnsigned ?
ILOpCode
.Conv_ovf_i4_un :
ILOpCode
.Conv_ovf_i4);
99
this.EmitOpCode(
ILOpCode
.Conv_i4);
116
this.EmitOpCode(
ILOpCode
.Conv_ovf_u4);
120
this.EmitOpCode(fromUnsigned ?
ILOpCode
.Conv_ovf_u4_un :
ILOpCode
.Conv_ovf_u4);
122
this.EmitOpCode(
ILOpCode
.Conv_u4);
136
this.EmitOpCode(
ILOpCode
.Conv_i); // potentially widening, so not NOP
143
this.EmitOpCode(
ILOpCode
.Conv_u); // potentially widening, so not NOP
147
this.EmitOpCode(
ILOpCode
.Conv_ovf_i_un);
150
this.EmitOpCode(
ILOpCode
.Conv_u); // potentially widening, so not NOP
159
this.EmitOpCode(fromUnsigned ?
ILOpCode
.Conv_ovf_i_un :
ILOpCode
.Conv_ovf_i);
161
this.EmitOpCode(
ILOpCode
.Conv_i);
178
this.EmitOpCode(
ILOpCode
.Conv_u); // potentially widening, so not NOP
184
this.EmitOpCode(
ILOpCode
.Conv_ovf_u);
186
this.EmitOpCode(
ILOpCode
.Conv_i); // potentially widening, so not NOP
190
this.EmitOpCode(fromUnsigned ?
ILOpCode
.Conv_ovf_u_un :
ILOpCode
.Conv_ovf_u);
192
this.EmitOpCode(
ILOpCode
.Conv_u);
206
this.EmitOpCode(
ILOpCode
.Conv_i8); // sign extend
212
this.EmitOpCode(
ILOpCode
.Conv_u8); // 0 extend
218
this.EmitOpCode(
ILOpCode
.Conv_ovf_i8_un);
220
this.EmitOpCode(
ILOpCode
.Conv_u8); // 0 extend if unchecked
224
this.EmitOpCode(
ILOpCode
.Conv_ovf_i8_un);
229
this.EmitOpCode(
ILOpCode
.Conv_ovf_i8);
231
this.EmitOpCode(
ILOpCode
.Conv_i8);
248
this.EmitOpCode(
ILOpCode
.Conv_u8); // 0 extend
255
this.EmitOpCode(
ILOpCode
.Conv_ovf_u8);
257
this.EmitOpCode(
ILOpCode
.Conv_i8); // sign extend if unchecked
261
this.EmitOpCode(
ILOpCode
.Conv_ovf_u8);
266
this.EmitOpCode(
ILOpCode
.Conv_ovf_u8);
268
this.EmitOpCode(
ILOpCode
.Conv_u8);
279
this.EmitOpCode(
ILOpCode
.Conv_r_un);
282
this.EmitOpCode(
ILOpCode
.Conv_r4);
291
this.EmitOpCode(
ILOpCode
.Conv_r_un);
294
this.EmitOpCode(
ILOpCode
.Conv_r8);
306
this.EmitOpCode(
ILOpCode
.Conv_u);
309
this.EmitOpCode(
ILOpCode
.Conv_ovf_u_un);
315
this.EmitOpCode(
ILOpCode
.Conv_ovf_u);
318
this.EmitOpCode(
ILOpCode
.Conv_ovf_u);
335
this.EmitOpCode(
ILOpCode
.Conv_u);
342
this.EmitOpCode(
ILOpCode
.Conv_i);
CodeGen\ILBuilderEmit.cs (71)
27
internal void EmitOpCode(
ILOpCode
code)
32
internal void EmitOpCode(
ILOpCode
code, int stackAdjustment)
106
EmitOpCode(
ILOpCode
.Dup); //array
107
EmitOpCode(
ILOpCode
.Ldtoken);
109
EmitOpCode(
ILOpCode
.Call, -2);
173
internal void EmitBranch(
ILOpCode
code, object label,
ILOpCode
revOpCode =
ILOpCode
.Nop)
175
bool validOpCode = (code ==
ILOpCode
.Nop) || code.IsBranch();
178
Debug.Assert(revOpCode ==
ILOpCode
.Nop || revOpCode.IsBranch());
199
Debug.Assert((code !=
ILOpCode
.Nop) || (block == _labelInfos[label].bb));
203
if (code !=
ILOpCode
.Nop)
317
block.SetBranchCode(
ILOpCode
.Ret);
328
block.SetBranchCode(
ILOpCode
.Rethrow);
332
block.SetBranchCode(
ILOpCode
.Throw);
343
block.SetBranchCode(
ILOpCode
.Endfinally);
354
block.SetBranchCode(
ILOpCode
.Endfilter);
370
this.EmitOpCode(
ILOpCode
.Newobj, 1 - (int)arrayType.Rank);
384
this.EmitOpCode(
ILOpCode
.Call, -(int)arrayType.Rank);
398
this.EmitOpCode(
ILOpCode
.Call, -(int)arrayType.Rank);
412
this.EmitOpCode(
ILOpCode
.Call, -(2 + (int)arrayType.Rank));
446
case 0: EmitOpCode(
ILOpCode
.Ldloc_0); break;
447
case 1: EmitOpCode(
ILOpCode
.Ldloc_1); break;
448
case 2: EmitOpCode(
ILOpCode
.Ldloc_2); break;
449
case 3: EmitOpCode(
ILOpCode
.Ldloc_3); break;
453
EmitOpCode(
ILOpCode
.Ldloc_s);
458
EmitOpCode(
ILOpCode
.Ldloc);
471
case 0: EmitOpCode(
ILOpCode
.Stloc_0); break;
472
case 1: EmitOpCode(
ILOpCode
.Stloc_1); break;
473
case 2: EmitOpCode(
ILOpCode
.Stloc_2); break;
474
case 3: EmitOpCode(
ILOpCode
.Stloc_3); break;
478
EmitOpCode(
ILOpCode
.Stloc_s);
483
EmitOpCode(
ILOpCode
.Stloc);
502
EmitOpCode(
ILOpCode
.Ldloca_s);
507
EmitOpCode(
ILOpCode
.Ldloca);
518
case 0: EmitOpCode(
ILOpCode
.Ldarg_0); break;
519
case 1: EmitOpCode(
ILOpCode
.Ldarg_1); break;
520
case 2: EmitOpCode(
ILOpCode
.Ldarg_2); break;
521
case 3: EmitOpCode(
ILOpCode
.Ldarg_3); break;
525
EmitOpCode(
ILOpCode
.Ldarg_s);
530
EmitOpCode(
ILOpCode
.Ldarg);
541
EmitOpCode(
ILOpCode
.Ldarga_s);
546
EmitOpCode(
ILOpCode
.Ldarga);
556
EmitOpCode(
ILOpCode
.Starg_s);
561
EmitOpCode(
ILOpCode
.Starg);
624
ILOpCode
code =
ILOpCode
.Nop;
627
case -1: code =
ILOpCode
.Ldc_i4_m1; break;
628
case 0: code =
ILOpCode
.Ldc_i4_0; break;
629
case 1: code =
ILOpCode
.Ldc_i4_1; break;
630
case 2: code =
ILOpCode
.Ldc_i4_2; break;
631
case 3: code =
ILOpCode
.Ldc_i4_3; break;
632
case 4: code =
ILOpCode
.Ldc_i4_4; break;
633
case 5: code =
ILOpCode
.Ldc_i4_5; break;
634
case 6: code =
ILOpCode
.Ldc_i4_6; break;
635
case 7: code =
ILOpCode
.Ldc_i4_7; break;
636
case 8: code =
ILOpCode
.Ldc_i4_8; break;
639
if (code !=
ILOpCode
.Nop)
647
EmitOpCode(
ILOpCode
.Ldc_i4_s);
652
EmitOpCode(
ILOpCode
.Ldc_i4);
688
EmitOpCode(
ILOpCode
.Conv_i8);
693
EmitOpCode(
ILOpCode
.Conv_u8);
697
EmitOpCode(
ILOpCode
.Ldc_i8);
707
EmitOpCode(
ILOpCode
.Conv_i);
712
EmitOpCode(
ILOpCode
.Conv_u);
722
EmitOpCode(
ILOpCode
.Ldc_r4);
728
EmitOpCode(
ILOpCode
.Ldc_r8);
734
EmitOpCode(
ILOpCode
.Ldnull);
745
EmitOpCode(
ILOpCode
.Ldstr);
753
EmitOpCode(
ILOpCode
.Unaligned);
784
private static void WriteOpCode(BlobBuilder writer,
ILOpCode
code)
CodeGen\ILOpCodeExtensions.cs (516)
14
public static int Size(this
ILOpCode
opcode)
29
public static
ILOpCode
GetLeaveOpcode(this
ILOpCode
opcode)
33
case
ILOpCode
.Br:
34
return
ILOpCode
.Leave;
36
case
ILOpCode
.Br_s:
37
return
ILOpCode
.Leave_s;
43
public static bool HasVariableStackBehavior(this
ILOpCode
opcode)
47
case
ILOpCode
.Call:
48
case
ILOpCode
.Calli:
49
case
ILOpCode
.Callvirt:
50
case
ILOpCode
.Newobj:
51
case
ILOpCode
.Ret:
61
public static bool IsControlTransfer(this
ILOpCode
opcode)
70
case
ILOpCode
.Ret:
71
case
ILOpCode
.Throw:
72
case
ILOpCode
.Rethrow:
73
case
ILOpCode
.Endfilter:
74
case
ILOpCode
.Endfinally:
75
case
ILOpCode
.Switch:
76
case
ILOpCode
.Jmp:
82
public static bool IsConditionalBranch(this
ILOpCode
opcode)
86
case
ILOpCode
.Brtrue:
87
case
ILOpCode
.Brtrue_s:
88
case
ILOpCode
.Brfalse:
89
case
ILOpCode
.Brfalse_s:
90
case
ILOpCode
.Beq:
91
case
ILOpCode
.Beq_s:
92
case
ILOpCode
.Bne_un:
93
case
ILOpCode
.Bne_un_s:
94
case
ILOpCode
.Bge:
95
case
ILOpCode
.Bge_s:
96
case
ILOpCode
.Bge_un:
97
case
ILOpCode
.Bge_un_s:
98
case
ILOpCode
.Bgt:
99
case
ILOpCode
.Bgt_s:
100
case
ILOpCode
.Bgt_un:
101
case
ILOpCode
.Bgt_un_s:
102
case
ILOpCode
.Ble:
103
case
ILOpCode
.Ble_s:
104
case
ILOpCode
.Ble_un:
105
case
ILOpCode
.Ble_un_s:
106
case
ILOpCode
.Blt:
107
case
ILOpCode
.Blt_s:
108
case
ILOpCode
.Blt_un:
109
case
ILOpCode
.Blt_un_s:
125
public static bool IsRelationalBranch(this
ILOpCode
opcode)
129
case
ILOpCode
.Beq:
130
case
ILOpCode
.Beq_s:
131
case
ILOpCode
.Bne_un:
132
case
ILOpCode
.Bne_un_s:
133
case
ILOpCode
.Bge:
134
case
ILOpCode
.Bge_s:
135
case
ILOpCode
.Bge_un:
136
case
ILOpCode
.Bge_un_s:
137
case
ILOpCode
.Bgt:
138
case
ILOpCode
.Bgt_s:
139
case
ILOpCode
.Bgt_un:
140
case
ILOpCode
.Bgt_un_s:
141
case
ILOpCode
.Ble:
142
case
ILOpCode
.Ble_s:
143
case
ILOpCode
.Ble_un:
144
case
ILOpCode
.Ble_un_s:
145
case
ILOpCode
.Blt:
146
case
ILOpCode
.Blt_s:
147
case
ILOpCode
.Blt_un:
148
case
ILOpCode
.Blt_un_s:
158
public static bool CanFallThrough(this
ILOpCode
opcode)
164
case
ILOpCode
.Br:
165
case
ILOpCode
.Br_s:
166
case
ILOpCode
.Ret:
167
case
ILOpCode
.Jmp:
168
case
ILOpCode
.Throw:
173
case
ILOpCode
.Endfinally:
174
case
ILOpCode
.Leave:
175
case
ILOpCode
.Leave_s:
176
case
ILOpCode
.Rethrow:
183
public static int NetStackBehavior(this
ILOpCode
opcode)
189
public static int StackPopCount(this
ILOpCode
opcode)
193
case
ILOpCode
.Nop:
194
case
ILOpCode
.Break:
195
case
ILOpCode
.Ldarg_0:
196
case
ILOpCode
.Ldarg_1:
197
case
ILOpCode
.Ldarg_2:
198
case
ILOpCode
.Ldarg_3:
199
case
ILOpCode
.Ldloc_0:
200
case
ILOpCode
.Ldloc_1:
201
case
ILOpCode
.Ldloc_2:
202
case
ILOpCode
.Ldloc_3:
204
case
ILOpCode
.Stloc_0:
205
case
ILOpCode
.Stloc_1:
206
case
ILOpCode
.Stloc_2:
207
case
ILOpCode
.Stloc_3:
209
case
ILOpCode
.Ldarg_s:
210
case
ILOpCode
.Ldarga_s:
212
case
ILOpCode
.Starg_s:
214
case
ILOpCode
.Ldloc_s:
215
case
ILOpCode
.Ldloca_s:
217
case
ILOpCode
.Stloc_s:
219
case
ILOpCode
.Ldnull:
220
case
ILOpCode
.Ldc_i4_m1:
221
case
ILOpCode
.Ldc_i4_0:
222
case
ILOpCode
.Ldc_i4_1:
223
case
ILOpCode
.Ldc_i4_2:
224
case
ILOpCode
.Ldc_i4_3:
225
case
ILOpCode
.Ldc_i4_4:
226
case
ILOpCode
.Ldc_i4_5:
227
case
ILOpCode
.Ldc_i4_6:
228
case
ILOpCode
.Ldc_i4_7:
229
case
ILOpCode
.Ldc_i4_8:
230
case
ILOpCode
.Ldc_i4_s:
231
case
ILOpCode
.Ldc_i4:
232
case
ILOpCode
.Ldc_i8:
233
case
ILOpCode
.Ldc_r4:
234
case
ILOpCode
.Ldc_r8:
236
case
ILOpCode
.Dup:
237
case
ILOpCode
.Pop:
239
case
ILOpCode
.Jmp:
241
case
ILOpCode
.Call:
242
case
ILOpCode
.Calli:
243
case
ILOpCode
.Ret:
245
case
ILOpCode
.Br_s:
247
case
ILOpCode
.Brfalse_s:
248
case
ILOpCode
.Brtrue_s:
250
case
ILOpCode
.Beq_s:
251
case
ILOpCode
.Bge_s:
252
case
ILOpCode
.Bgt_s:
253
case
ILOpCode
.Ble_s:
254
case
ILOpCode
.Blt_s:
255
case
ILOpCode
.Bne_un_s:
256
case
ILOpCode
.Bge_un_s:
257
case
ILOpCode
.Bgt_un_s:
258
case
ILOpCode
.Ble_un_s:
259
case
ILOpCode
.Blt_un_s:
261
case
ILOpCode
.Br:
263
case
ILOpCode
.Brfalse:
264
case
ILOpCode
.Brtrue:
266
case
ILOpCode
.Beq:
267
case
ILOpCode
.Bge:
268
case
ILOpCode
.Bgt:
269
case
ILOpCode
.Ble:
270
case
ILOpCode
.Blt:
271
case
ILOpCode
.Bne_un:
272
case
ILOpCode
.Bge_un:
273
case
ILOpCode
.Bgt_un:
274
case
ILOpCode
.Ble_un:
275
case
ILOpCode
.Blt_un:
277
case
ILOpCode
.Switch:
278
case
ILOpCode
.Ldind_i1:
279
case
ILOpCode
.Ldind_u1:
280
case
ILOpCode
.Ldind_i2:
281
case
ILOpCode
.Ldind_u2:
282
case
ILOpCode
.Ldind_i4:
283
case
ILOpCode
.Ldind_u4:
284
case
ILOpCode
.Ldind_i8:
285
case
ILOpCode
.Ldind_i:
286
case
ILOpCode
.Ldind_r4:
287
case
ILOpCode
.Ldind_r8:
288
case
ILOpCode
.Ldind_ref:
290
case
ILOpCode
.Stind_ref:
291
case
ILOpCode
.Stind_i1:
292
case
ILOpCode
.Stind_i2:
293
case
ILOpCode
.Stind_i4:
294
case
ILOpCode
.Stind_i8:
295
case
ILOpCode
.Stind_r4:
296
case
ILOpCode
.Stind_r8:
297
case
ILOpCode
.Add:
298
case
ILOpCode
.Sub:
299
case
ILOpCode
.Mul:
300
case
ILOpCode
.Div:
301
case
ILOpCode
.Div_un:
302
case
ILOpCode
.Rem:
303
case
ILOpCode
.Rem_un:
304
case
ILOpCode
.And:
305
case
ILOpCode
.Or:
306
case
ILOpCode
.Xor:
307
case
ILOpCode
.Shl:
308
case
ILOpCode
.Shr:
309
case
ILOpCode
.Shr_un:
311
case
ILOpCode
.Neg:
312
case
ILOpCode
.Not:
313
case
ILOpCode
.Conv_i1:
314
case
ILOpCode
.Conv_i2:
315
case
ILOpCode
.Conv_i4:
316
case
ILOpCode
.Conv_i8:
317
case
ILOpCode
.Conv_r4:
318
case
ILOpCode
.Conv_r8:
319
case
ILOpCode
.Conv_u4:
320
case
ILOpCode
.Conv_u8:
322
case
ILOpCode
.Callvirt:
324
case
ILOpCode
.Cpobj:
326
case
ILOpCode
.Ldobj:
328
case
ILOpCode
.Ldstr:
330
case
ILOpCode
.Newobj:
332
case
ILOpCode
.Castclass:
333
case
ILOpCode
.Isinst:
334
case
ILOpCode
.Conv_r_un:
335
case
ILOpCode
.Unbox:
336
case
ILOpCode
.Throw:
337
case
ILOpCode
.Ldfld:
338
case
ILOpCode
.Ldflda:
340
case
ILOpCode
.Stfld:
342
case
ILOpCode
.Ldsfld:
343
case
ILOpCode
.Ldsflda:
345
case
ILOpCode
.Stsfld:
347
case
ILOpCode
.Stobj:
349
case
ILOpCode
.Conv_ovf_i1_un:
350
case
ILOpCode
.Conv_ovf_i2_un:
351
case
ILOpCode
.Conv_ovf_i4_un:
352
case
ILOpCode
.Conv_ovf_i8_un:
353
case
ILOpCode
.Conv_ovf_u1_un:
354
case
ILOpCode
.Conv_ovf_u2_un:
355
case
ILOpCode
.Conv_ovf_u4_un:
356
case
ILOpCode
.Conv_ovf_u8_un:
357
case
ILOpCode
.Conv_ovf_i_un:
358
case
ILOpCode
.Conv_ovf_u_un:
359
case
ILOpCode
.Box:
360
case
ILOpCode
.Newarr:
361
case
ILOpCode
.Ldlen:
363
case
ILOpCode
.Ldelema:
364
case
ILOpCode
.Ldelem_i1:
365
case
ILOpCode
.Ldelem_u1:
366
case
ILOpCode
.Ldelem_i2:
367
case
ILOpCode
.Ldelem_u2:
368
case
ILOpCode
.Ldelem_i4:
369
case
ILOpCode
.Ldelem_u4:
370
case
ILOpCode
.Ldelem_i8:
371
case
ILOpCode
.Ldelem_i:
372
case
ILOpCode
.Ldelem_r4:
373
case
ILOpCode
.Ldelem_r8:
374
case
ILOpCode
.Ldelem_ref:
376
case
ILOpCode
.Stelem_i:
377
case
ILOpCode
.Stelem_i1:
378
case
ILOpCode
.Stelem_i2:
379
case
ILOpCode
.Stelem_i4:
380
case
ILOpCode
.Stelem_i8:
381
case
ILOpCode
.Stelem_r4:
382
case
ILOpCode
.Stelem_r8:
383
case
ILOpCode
.Stelem_ref:
385
case
ILOpCode
.Ldelem:
387
case
ILOpCode
.Stelem:
389
case
ILOpCode
.Unbox_any:
390
case
ILOpCode
.Conv_ovf_i1:
391
case
ILOpCode
.Conv_ovf_u1:
392
case
ILOpCode
.Conv_ovf_i2:
393
case
ILOpCode
.Conv_ovf_u2:
394
case
ILOpCode
.Conv_ovf_i4:
395
case
ILOpCode
.Conv_ovf_u4:
396
case
ILOpCode
.Conv_ovf_i8:
397
case
ILOpCode
.Conv_ovf_u8:
398
case
ILOpCode
.Refanyval:
399
case
ILOpCode
.Ckfinite:
400
case
ILOpCode
.Mkrefany:
402
case
ILOpCode
.Ldtoken:
404
case
ILOpCode
.Conv_u2:
405
case
ILOpCode
.Conv_u1:
406
case
ILOpCode
.Conv_i:
407
case
ILOpCode
.Conv_ovf_i:
408
case
ILOpCode
.Conv_ovf_u:
410
case
ILOpCode
.Add_ovf:
411
case
ILOpCode
.Add_ovf_un:
412
case
ILOpCode
.Mul_ovf:
413
case
ILOpCode
.Mul_ovf_un:
414
case
ILOpCode
.Sub_ovf:
415
case
ILOpCode
.Sub_ovf_un:
417
case
ILOpCode
.Endfinally:
418
case
ILOpCode
.Leave:
419
case
ILOpCode
.Leave_s:
421
case
ILOpCode
.Stind_i:
423
case
ILOpCode
.Conv_u:
425
case
ILOpCode
.Arglist:
427
case
ILOpCode
.Ceq:
428
case
ILOpCode
.Cgt:
429
case
ILOpCode
.Cgt_un:
430
case
ILOpCode
.Clt:
431
case
ILOpCode
.Clt_un:
433
case
ILOpCode
.Ldftn:
435
case
ILOpCode
.Ldvirtftn:
437
case
ILOpCode
.Ldarg:
438
case
ILOpCode
.Ldarga:
440
case
ILOpCode
.Starg:
442
case
ILOpCode
.Ldloc:
443
case
ILOpCode
.Ldloca:
445
case
ILOpCode
.Stloc:
446
case
ILOpCode
.Localloc:
447
case
ILOpCode
.Endfilter:
449
case
ILOpCode
.Unaligned:
450
case
ILOpCode
.Volatile:
451
case
ILOpCode
.Tail:
453
case
ILOpCode
.Initobj:
455
case
ILOpCode
.Constrained:
457
case
ILOpCode
.Cpblk:
458
case
ILOpCode
.Initblk:
460
case
ILOpCode
.Rethrow:
461
case
ILOpCode
.Sizeof:
463
case
ILOpCode
.Refanytype:
465
case
ILOpCode
.Readonly:
472
public static int StackPushCount(this
ILOpCode
opcode)
476
case
ILOpCode
.Nop:
477
case
ILOpCode
.Break:
479
case
ILOpCode
.Ldarg_0:
480
case
ILOpCode
.Ldarg_1:
481
case
ILOpCode
.Ldarg_2:
482
case
ILOpCode
.Ldarg_3:
483
case
ILOpCode
.Ldloc_0:
484
case
ILOpCode
.Ldloc_1:
485
case
ILOpCode
.Ldloc_2:
486
case
ILOpCode
.Ldloc_3:
488
case
ILOpCode
.Stloc_0:
489
case
ILOpCode
.Stloc_1:
490
case
ILOpCode
.Stloc_2:
491
case
ILOpCode
.Stloc_3:
493
case
ILOpCode
.Ldarg_s:
494
case
ILOpCode
.Ldarga_s:
496
case
ILOpCode
.Starg_s:
498
case
ILOpCode
.Ldloc_s:
499
case
ILOpCode
.Ldloca_s:
501
case
ILOpCode
.Stloc_s:
503
case
ILOpCode
.Ldnull:
504
case
ILOpCode
.Ldc_i4_m1:
505
case
ILOpCode
.Ldc_i4_0:
506
case
ILOpCode
.Ldc_i4_1:
507
case
ILOpCode
.Ldc_i4_2:
508
case
ILOpCode
.Ldc_i4_3:
509
case
ILOpCode
.Ldc_i4_4:
510
case
ILOpCode
.Ldc_i4_5:
511
case
ILOpCode
.Ldc_i4_6:
512
case
ILOpCode
.Ldc_i4_7:
513
case
ILOpCode
.Ldc_i4_8:
514
case
ILOpCode
.Ldc_i4_s:
515
case
ILOpCode
.Ldc_i4:
516
case
ILOpCode
.Ldc_i8:
517
case
ILOpCode
.Ldc_r4:
518
case
ILOpCode
.Ldc_r8:
520
case
ILOpCode
.Dup:
522
case
ILOpCode
.Pop:
523
case
ILOpCode
.Jmp:
525
case
ILOpCode
.Call:
526
case
ILOpCode
.Calli:
528
case
ILOpCode
.Ret:
529
case
ILOpCode
.Br_s:
530
case
ILOpCode
.Brfalse_s:
531
case
ILOpCode
.Brtrue_s:
532
case
ILOpCode
.Beq_s:
533
case
ILOpCode
.Bge_s:
534
case
ILOpCode
.Bgt_s:
535
case
ILOpCode
.Ble_s:
536
case
ILOpCode
.Blt_s:
537
case
ILOpCode
.Bne_un_s:
538
case
ILOpCode
.Bge_un_s:
539
case
ILOpCode
.Bgt_un_s:
540
case
ILOpCode
.Ble_un_s:
541
case
ILOpCode
.Blt_un_s:
542
case
ILOpCode
.Br:
543
case
ILOpCode
.Brfalse:
544
case
ILOpCode
.Brtrue:
545
case
ILOpCode
.Beq:
546
case
ILOpCode
.Bge:
547
case
ILOpCode
.Bgt:
548
case
ILOpCode
.Ble:
549
case
ILOpCode
.Blt:
550
case
ILOpCode
.Bne_un:
551
case
ILOpCode
.Bge_un:
552
case
ILOpCode
.Bgt_un:
553
case
ILOpCode
.Ble_un:
554
case
ILOpCode
.Blt_un:
555
case
ILOpCode
.Switch:
557
case
ILOpCode
.Ldind_i1:
558
case
ILOpCode
.Ldind_u1:
559
case
ILOpCode
.Ldind_i2:
560
case
ILOpCode
.Ldind_u2:
561
case
ILOpCode
.Ldind_i4:
562
case
ILOpCode
.Ldind_u4:
563
case
ILOpCode
.Ldind_i8:
564
case
ILOpCode
.Ldind_i:
565
case
ILOpCode
.Ldind_r4:
566
case
ILOpCode
.Ldind_r8:
567
case
ILOpCode
.Ldind_ref:
569
case
ILOpCode
.Stind_ref:
570
case
ILOpCode
.Stind_i1:
571
case
ILOpCode
.Stind_i2:
572
case
ILOpCode
.Stind_i4:
573
case
ILOpCode
.Stind_i8:
574
case
ILOpCode
.Stind_r4:
575
case
ILOpCode
.Stind_r8:
577
case
ILOpCode
.Add:
578
case
ILOpCode
.Sub:
579
case
ILOpCode
.Mul:
580
case
ILOpCode
.Div:
581
case
ILOpCode
.Div_un:
582
case
ILOpCode
.Rem:
583
case
ILOpCode
.Rem_un:
584
case
ILOpCode
.And:
585
case
ILOpCode
.Or:
586
case
ILOpCode
.Xor:
587
case
ILOpCode
.Shl:
588
case
ILOpCode
.Shr:
589
case
ILOpCode
.Shr_un:
590
case
ILOpCode
.Neg:
591
case
ILOpCode
.Not:
592
case
ILOpCode
.Conv_i1:
593
case
ILOpCode
.Conv_i2:
594
case
ILOpCode
.Conv_i4:
595
case
ILOpCode
.Conv_i8:
596
case
ILOpCode
.Conv_r4:
597
case
ILOpCode
.Conv_r8:
598
case
ILOpCode
.Conv_u4:
599
case
ILOpCode
.Conv_u8:
601
case
ILOpCode
.Callvirt:
603
case
ILOpCode
.Cpobj:
605
case
ILOpCode
.Ldobj:
606
case
ILOpCode
.Ldstr:
607
case
ILOpCode
.Newobj:
608
case
ILOpCode
.Castclass:
609
case
ILOpCode
.Isinst:
610
case
ILOpCode
.Conv_r_un:
611
case
ILOpCode
.Unbox:
613
case
ILOpCode
.Throw:
615
case
ILOpCode
.Ldfld:
616
case
ILOpCode
.Ldflda:
618
case
ILOpCode
.Stfld:
620
case
ILOpCode
.Ldsfld:
621
case
ILOpCode
.Ldsflda:
623
case
ILOpCode
.Stsfld:
624
case
ILOpCode
.Stobj:
626
case
ILOpCode
.Conv_ovf_i1_un:
627
case
ILOpCode
.Conv_ovf_i2_un:
628
case
ILOpCode
.Conv_ovf_i4_un:
629
case
ILOpCode
.Conv_ovf_i8_un:
630
case
ILOpCode
.Conv_ovf_u1_un:
631
case
ILOpCode
.Conv_ovf_u2_un:
632
case
ILOpCode
.Conv_ovf_u4_un:
633
case
ILOpCode
.Conv_ovf_u8_un:
634
case
ILOpCode
.Conv_ovf_i_un:
635
case
ILOpCode
.Conv_ovf_u_un:
636
case
ILOpCode
.Box:
637
case
ILOpCode
.Newarr:
638
case
ILOpCode
.Ldlen:
639
case
ILOpCode
.Ldelema:
640
case
ILOpCode
.Ldelem_i1:
641
case
ILOpCode
.Ldelem_u1:
642
case
ILOpCode
.Ldelem_i2:
643
case
ILOpCode
.Ldelem_u2:
644
case
ILOpCode
.Ldelem_i4:
645
case
ILOpCode
.Ldelem_u4:
646
case
ILOpCode
.Ldelem_i8:
647
case
ILOpCode
.Ldelem_i:
648
case
ILOpCode
.Ldelem_r4:
649
case
ILOpCode
.Ldelem_r8:
650
case
ILOpCode
.Ldelem_ref:
652
case
ILOpCode
.Stelem_i:
653
case
ILOpCode
.Stelem_i1:
654
case
ILOpCode
.Stelem_i2:
655
case
ILOpCode
.Stelem_i4:
656
case
ILOpCode
.Stelem_i8:
657
case
ILOpCode
.Stelem_r4:
658
case
ILOpCode
.Stelem_r8:
659
case
ILOpCode
.Stelem_ref:
661
case
ILOpCode
.Ldelem:
663
case
ILOpCode
.Stelem:
665
case
ILOpCode
.Unbox_any:
666
case
ILOpCode
.Conv_ovf_i1:
667
case
ILOpCode
.Conv_ovf_u1:
668
case
ILOpCode
.Conv_ovf_i2:
669
case
ILOpCode
.Conv_ovf_u2:
670
case
ILOpCode
.Conv_ovf_i4:
671
case
ILOpCode
.Conv_ovf_u4:
672
case
ILOpCode
.Conv_ovf_i8:
673
case
ILOpCode
.Conv_ovf_u8:
674
case
ILOpCode
.Refanyval:
675
case
ILOpCode
.Ckfinite:
676
case
ILOpCode
.Mkrefany:
677
case
ILOpCode
.Ldtoken:
678
case
ILOpCode
.Conv_u2:
679
case
ILOpCode
.Conv_u1:
680
case
ILOpCode
.Conv_i:
681
case
ILOpCode
.Conv_ovf_i:
682
case
ILOpCode
.Conv_ovf_u:
683
case
ILOpCode
.Add_ovf:
684
case
ILOpCode
.Add_ovf_un:
685
case
ILOpCode
.Mul_ovf:
686
case
ILOpCode
.Mul_ovf_un:
687
case
ILOpCode
.Sub_ovf:
688
case
ILOpCode
.Sub_ovf_un:
690
case
ILOpCode
.Endfinally:
691
case
ILOpCode
.Leave:
692
case
ILOpCode
.Leave_s:
693
case
ILOpCode
.Stind_i:
695
case
ILOpCode
.Conv_u:
696
case
ILOpCode
.Arglist:
697
case
ILOpCode
.Ceq:
698
case
ILOpCode
.Cgt:
699
case
ILOpCode
.Cgt_un:
700
case
ILOpCode
.Clt:
701
case
ILOpCode
.Clt_un:
702
case
ILOpCode
.Ldftn:
703
case
ILOpCode
.Ldvirtftn:
704
case
ILOpCode
.Ldarg:
705
case
ILOpCode
.Ldarga:
707
case
ILOpCode
.Starg:
709
case
ILOpCode
.Ldloc:
710
case
ILOpCode
.Ldloca:
712
case
ILOpCode
.Stloc:
714
case
ILOpCode
.Localloc:
716
case
ILOpCode
.Endfilter:
717
case
ILOpCode
.Unaligned:
718
case
ILOpCode
.Volatile:
719
case
ILOpCode
.Tail:
720
case
ILOpCode
.Initobj:
721
case
ILOpCode
.Constrained:
722
case
ILOpCode
.Cpblk:
723
case
ILOpCode
.Initblk:
724
case
ILOpCode
.Rethrow:
726
case
ILOpCode
.Sizeof:
727
case
ILOpCode
.Refanytype:
729
case
ILOpCode
.Readonly:
CodeGen\LocalScopeManager.cs (2)
624
builder.EmitBranch(
ILOpCode
.Br, endLabel);
741
builder.EmitBranch(
ILOpCode
.Nop, _endLabel);
CodeGen\PrivateImplementationDetails.cs (7)
746
ilBuilder.EmitOpCode(
ILOpCode
.Ldsflda);
753
ilBuilder.EmitOpCode(
ILOpCode
.Call, -1);
757
ilBuilder.EmitOpCode(
ILOpCode
.Stsfld);
1169
ilBuilder.EmitOpCode(
ILOpCode
.Call, 1);
1173
ilBuilder.EmitOpCode(
ILOpCode
.Ldarg_0);
1176
ilBuilder.EmitOpCode(
ILOpCode
.Ldarg_1);
1179
ilBuilder.EmitOpCode(
ILOpCode
.Callvirt, -2);
CodeGen\SwitchIntegralJumpTableEmitter.cs (28)
133
_builder.EmitBranch(
ILOpCode
.Br, _fallThroughLabel);
301
_keyTypeCode.IsUnsigned() ?
ILOpCode
.Bgt_un :
ILOpCode
.Bgt,
352
_builder.EmitBranch(
ILOpCode
.Br, bucketFallThroughLabel);
414
private void EmitCondBranchForSwitch(
ILOpCode
branchCode, ConstantValue constant, object targetLabel)
442
_builder.EmitBranch(
ILOpCode
.Brfalse, targetLabel);
447
_builder.EmitBranch(
ILOpCode
.Beq, targetLabel);
462
_builder.EmitOpCode(
ILOpCode
.Sub);
487
_builder.EmitBranch(
ILOpCode
.Ble_un, targetLabel,
ILOpCode
.Bgt_un);
490
private static
ILOpCode
GetReverseBranchCode(
ILOpCode
branchCode)
494
case
ILOpCode
.Beq:
495
return
ILOpCode
.Bne_un;
497
case
ILOpCode
.Blt:
498
return
ILOpCode
.Bge;
500
case
ILOpCode
.Blt_un:
501
return
ILOpCode
.Bge_un;
503
case
ILOpCode
.Bgt:
504
return
ILOpCode
.Ble;
506
case
ILOpCode
.Bgt_un:
507
return
ILOpCode
.Ble_un;
525
_builder.EmitOpCode(
ILOpCode
.Sub);
552
_builder.EmitOpCode(
ILOpCode
.Dup);
554
_builder.EmitBranch(
ILOpCode
.Ble_un, inRangeLabel,
ILOpCode
.Bgt_un);
555
_builder.EmitOpCode(
ILOpCode
.Pop);
556
_builder.EmitBranch(
ILOpCode
.Br, bucketFallThroughLabel);
CodeGen\SwitchStringJumpTableEmitter.cs (1)
169
_builder.EmitBranch(
ILOpCode
.Br, _fallThroughLabel);
Emit\EditAndContinue\DeletedMethodBody.cs (1)
91
builder.EmitOpCode(
ILOpCode
.Newobj, stackAdjustment: -1);
PEWriter\MetadataWriter.cs (4)
91
(byte)
ILOpCode
.Ldnull,
92
(byte)
ILOpCode
.Throw);
3264
Debug.Assert(ReadByte(generatedIL, offset - 1) == (byte)
ILOpCode
.Ldtoken);
3266
writer.WriteByte((byte)
ILOpCode
.Ldc_i4);
Microsoft.CodeAnalysis.CSharp (345)
CodeGen\CodeGenerator.cs (6)
77
/// True if there was a <see cref="
ILOpCode
.Localloc"/> anywhere in the method. This will
79
/// affects <see cref="
ILOpCode
.Localloc"/>.
392
_builder.EmitOpCode(
ILOpCode
.Nop);
415
_builder.EmitOpCode(
ILOpCode
.Nop);
464
_builder.EmitBranch(
ILOpCode
.Brtrue, label);
466
_builder.EmitOpCode(
ILOpCode
.Nop);
CodeGen\EmitAddress.cs (13)
138
_builder.EmitOpCode(
ILOpCode
.Dup); // dup
139
_builder.EmitOpCode(
ILOpCode
.Initobj); // initobj <type>
223
_builder.EmitBranch(
ILOpCode
.Br, doneLabel);
246
_builder.EmitBranch(
ILOpCode
.Brtrue, whenValueTypeLabel);
250
_builder.EmitBranch(
ILOpCode
.Br, doneLabel);
303
_builder.EmitOpCode(
ILOpCode
.Dup);
317
_builder.EmitOpCode(
ILOpCode
.Refanyval);
400
_builder.EmitOpCode(
ILOpCode
.Readonly);
405
_builder.EmitOpCode(
ILOpCode
.Ldelema);
458
_builder.EmitOpCode(
ILOpCode
.Ldsflda);
558
_builder.EmitOpCode(field.RefKind == RefKind.None ?
ILOpCode
.Ldflda :
ILOpCode
.Ldfld);
581
_builder.EmitOpCode(
ILOpCode
.Ldflda);
CodeGen\EmitArrayInitializer.cs (24)
90
_builder.EmitOpCode(
ILOpCode
.Dup);
193
_builder.EmitOpCode(
ILOpCode
.Dup);
558
_builder.EmitOpCode(
ILOpCode
.Ldsflda);
566
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: -3);
572
_builder.EmitOpCode(
ILOpCode
.Newobj, stackAdjustment: -1);
619
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
621
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0);
656
_builder.EmitOpCode(
ILOpCode
.Ldsfld);
658
_builder.EmitOpCode(
ILOpCode
.Dup);
659
_builder.EmitBranch(
ILOpCode
.Brtrue, arrayNotNullLabel);
664
_builder.EmitOpCode(
ILOpCode
.Pop);
666
_builder.EmitOpCode(
ILOpCode
.Newarr);
669
_builder.EmitOpCode(
ILOpCode
.Dup);
670
_builder.EmitOpCode(
ILOpCode
.Stsfld);
676
_builder.EmitOpCode(
ILOpCode
.Newobj, 0);
716
_builder.EmitOpCode(
ILOpCode
.Ldsfld);
718
_builder.EmitOpCode(
ILOpCode
.Dup);
719
_builder.EmitBranch(
ILOpCode
.Brtrue, arrayNotNullLabel);
723
_builder.EmitOpCode(
ILOpCode
.Pop);
725
_builder.EmitOpCode(
ILOpCode
.Dup);
726
_builder.EmitOpCode(
ILOpCode
.Stsfld);
736
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: -2);
742
_builder.EmitOpCode(
ILOpCode
.Newobj, stackAdjustment: 0);
762
_builder.EmitOpCode(
ILOpCode
.Initobj);
CodeGen\EmitConversion.cs (11)
49
_builder.EmitOpCode(
ILOpCode
.Conv_u);
85
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0);
171
_builder.EmitOpCode(
ILOpCode
.Conv_u);
242
_builder.EmitOpCode(
ILOpCode
.Unbox_any);
274
_builder.EmitOpCode(
ILOpCode
.Castclass);
279
_builder.EmitOpCode(
ILOpCode
.Unbox_any);
336
_builder.EmitOpCode(
ILOpCode
.Constrained);
357
_builder.EmitOpCode(
ILOpCode
.Dup);
358
_builder.EmitOpCode(
ILOpCode
.Ldvirtftn);
365
_builder.EmitOpCode(
ILOpCode
.Ldftn);
371
_builder.EmitOpCode(
ILOpCode
.Newobj, -1); // pop 2 args and push delegate object
CodeGen\EmitExpression.cs (135)
180
_builder.EmitOpCode(
ILOpCode
.Ldarg_0);
389
_builder.EmitBranch(
ILOpCode
.Brtrue, whenValueTypeLabel);
392
_builder.EmitBranch(
ILOpCode
.Br, doneLabel);
473
_builder.EmitBranch(
ILOpCode
.Brtrue, whenNotNullLabel);
490
_builder.EmitOpCode(
ILOpCode
.Dup);
502
_builder.EmitOpCode(
ILOpCode
.Dup);
523
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0);
527
_builder.EmitBranch(
ILOpCode
.Brtrue, whenNotNullLabel);
539
_builder.EmitOpCode(
ILOpCode
.Pop);
552
_builder.EmitBranch(
ILOpCode
.Br, doneLabel);
679
_builder.EmitOpCode(
ILOpCode
.Mkrefany);
691
_builder.EmitOpCode(
ILOpCode
.Refanytype);
692
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0);
701
_builder.EmitOpCode(
ILOpCode
.Arglist);
760
_builder.EmitOpCode(
ILOpCode
.Conv_u);
784
_builder.EmitOpCode(
ILOpCode
.Dup);
789
_builder.EmitOpCode(
ILOpCode
.Dup);
811
_builder.EmitOpCode(
ILOpCode
.Ldarg_0);
1026
_builder.EmitOpCode(
ILOpCode
.Ldelem_i1);
1031
_builder.EmitOpCode(
ILOpCode
.Ldelem_u1);
1035
_builder.EmitOpCode(
ILOpCode
.Ldelem_i2);
1040
_builder.EmitOpCode(
ILOpCode
.Ldelem_u2);
1044
_builder.EmitOpCode(
ILOpCode
.Ldelem_i4);
1048
_builder.EmitOpCode(
ILOpCode
.Ldelem_u4);
1053
_builder.EmitOpCode(
ILOpCode
.Ldelem_i8);
1060
_builder.EmitOpCode(
ILOpCode
.Ldelem_i);
1064
_builder.EmitOpCode(
ILOpCode
.Ldelem_r4);
1068
_builder.EmitOpCode(
ILOpCode
.Ldelem_r8);
1074
_builder.EmitOpCode(
ILOpCode
.Ldelem_ref);
1080
_builder.EmitOpCode(
ILOpCode
.Ldelem);
1088
_builder.EmitOpCode(
ILOpCode
.Readonly);
1091
_builder.EmitOpCode(
ILOpCode
.Ldelema);
1115
_builder.EmitOpCode(
ILOpCode
.Pop);
1162
_builder.EmitOpCode(
ILOpCode
.Volatile);
1164
_builder.EmitOpCode(
ILOpCode
.Ldsfld);
1188
_builder.EmitOpCode(
ILOpCode
.Volatile);
1191
_builder.EmitOpCode(
ILOpCode
.Ldfld);
1237
_builder.EmitOpCode(
ILOpCode
.Unbox);
1251
_builder.EmitOpCode(
ILOpCode
.Ldflda);
1442
_builder.EmitOpCode(
ILOpCode
.Ldind_i1);
1447
_builder.EmitOpCode(
ILOpCode
.Ldind_u1);
1451
_builder.EmitOpCode(
ILOpCode
.Ldind_i2);
1456
_builder.EmitOpCode(
ILOpCode
.Ldind_u2);
1460
_builder.EmitOpCode(
ILOpCode
.Ldind_i4);
1464
_builder.EmitOpCode(
ILOpCode
.Ldind_u4);
1469
_builder.EmitOpCode(
ILOpCode
.Ldind_i8);
1476
_builder.EmitOpCode(
ILOpCode
.Ldind_i);
1480
_builder.EmitOpCode(
ILOpCode
.Ldind_r4);
1484
_builder.EmitOpCode(
ILOpCode
.Ldind_r8);
1490
_builder.EmitOpCode(
ILOpCode
.Ldind_ref);
1494
_builder.EmitOpCode(
ILOpCode
.Ldobj);
1649
_builder.EmitOpCode(
ILOpCode
.Initobj); // initobj <MyStruct>
1673
_builder.EmitOpCode(
ILOpCode
.Constrained);
1677
_builder.EmitOpCode(
ILOpCode
.Call, stackBehavior);
1999
_builder.EmitOpCode(
ILOpCode
.Call, stackBehavior);
2003
_builder.EmitOpCode(
ILOpCode
.Callvirt, stackBehavior);
2007
_builder.EmitOpCode(
ILOpCode
.Constrained);
2009
_builder.EmitOpCode(
ILOpCode
.Callvirt, stackBehavior);
2054
_builder.EmitBranch(
ILOpCode
.Brtrue, whenNotNullLabel);
2330
_builder.EmitOpCode(
ILOpCode
.Conv_ovf_i);
2334
_builder.EmitOpCode(
ILOpCode
.Conv_ovf_i_un);
2353
_builder.EmitOpCode(
ILOpCode
.Ldlen);
2380
_builder.EmitOpCode(
ILOpCode
.Newarr);
2452
_builder.EmitOpCode(
ILOpCode
.Newobj, stackAdjustment);
2677
_builder.EmitOpCode(
ILOpCode
.Initobj); // initobj <MyStruct>
2710
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment);
3027
_builder.EmitOpCode(
ILOpCode
.Dup);
3191
_builder.EmitOpCode(
ILOpCode
.Stobj);
3225
_builder.EmitOpCode(
ILOpCode
.Stelem_i1);
3231
_builder.EmitOpCode(
ILOpCode
.Stelem_i2);
3236
_builder.EmitOpCode(
ILOpCode
.Stelem_i4);
3241
_builder.EmitOpCode(
ILOpCode
.Stelem_i8);
3248
_builder.EmitOpCode(
ILOpCode
.Stelem_i);
3252
_builder.EmitOpCode(
ILOpCode
.Stelem_r4);
3256
_builder.EmitOpCode(
ILOpCode
.Stelem_r8);
3262
_builder.EmitOpCode(
ILOpCode
.Stelem_ref);
3266
_builder.EmitOpCode(
ILOpCode
.Stelem);
3279
_builder.EmitOpCode(
ILOpCode
.Volatile);
3290
_builder.EmitOpCode(field.IsStatic ?
ILOpCode
.Stsfld :
ILOpCode
.Stfld);
3323
_builder.EmitOpCode(
ILOpCode
.Stind_i1);
3329
_builder.EmitOpCode(
ILOpCode
.Stind_i2);
3334
_builder.EmitOpCode(
ILOpCode
.Stind_i4);
3339
_builder.EmitOpCode(
ILOpCode
.Stind_i8);
3346
_builder.EmitOpCode(
ILOpCode
.Stind_i);
3350
_builder.EmitOpCode(
ILOpCode
.Stind_r4);
3354
_builder.EmitOpCode(
ILOpCode
.Stind_r8);
3360
_builder.EmitOpCode(
ILOpCode
.Stind_ref);
3364
_builder.EmitOpCode(
ILOpCode
.Stobj);
3375
_builder.EmitOpCode(
ILOpCode
.Pop);
3391
_builder.EmitOpCode(
ILOpCode
.Isinst);
3396
_builder.EmitOpCode(
ILOpCode
.Ldnull);
3397
_builder.EmitOpCode(
ILOpCode
.Cgt_un);
3420
_builder.EmitOpCode(
ILOpCode
.Isinst);
3425
_builder.EmitOpCode(
ILOpCode
.Unbox_any);
3449
_builder.EmitOpCode(
ILOpCode
.Ldc_i4_0);
3450
_builder.EmitOpCode(
ILOpCode
.Conv_u);
3454
_builder.EmitOpCode(
ILOpCode
.Ldc_i4_0);
3455
_builder.EmitOpCode(
ILOpCode
.Conv_i);
3509
_builder.EmitOpCode(
ILOpCode
.Ldsfld);
3523
_builder.EmitOpCode(
ILOpCode
.Initobj); // initobj <MyStruct>
3532
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0); //argument off, return value on
3541
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
3549
_builder.EmitOpCode(
ILOpCode
.Sizeof);
3557
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
3604
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
3611
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
3617
_builder.EmitOpCode(
ILOpCode
.Ldsfld);
3623
_builder.EmitOpCode(
ILOpCode
.Stsfld);
3639
_builder.EmitOpCode(
ILOpCode
.Ldsflda);
3650
_builder.EmitOpCode(
ILOpCode
.Call, -1);
3661
_builder.EmitOpCode(
ILOpCode
.Ldsfld);
3670
_builder.EmitOpCode(
ILOpCode
.Ldstr);
3676
_builder.EmitOpCode(
ILOpCode
.Ldsfld);
3682
_builder.EmitOpCode(
ILOpCode
.Stsfld);
3694
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
3700
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
3708
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0); //argument off, return value on
3713
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
3715
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: -1); //2 arguments off, return value on
3721
_builder.EmitOpCode(
ILOpCode
.Castclass);
3728
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
3735
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0); //argument off, return value on
3740
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
3742
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: -1); //2 arguments off, return value on
3748
_builder.EmitOpCode(
ILOpCode
.Castclass);
3825
_builder.EmitBranch(
ILOpCode
.Br, doneLabel);
3885
_builder.EmitOpCode(
ILOpCode
.Dup);
3894
_builder.EmitBranch(
ILOpCode
.Brtrue, ifLeftNotNullLabel);
3898
_builder.EmitOpCode(
ILOpCode
.Pop);
4036
_builder.EmitOpCode(
ILOpCode
.Box);
4065
_builder.EmitOpCode(
ILOpCode
.Calli, stackBehavior);
4111
_builder.EmitOpCode(
ILOpCode
.Nop);
4137
_builder.EmitOpCode(
ILOpCode
.Constrained);
4141
_builder.EmitOpCode(
ILOpCode
.Ldftn);
CodeGen\EmitOperators.cs (60)
43
_builder.EmitOpCode(
ILOpCode
.Neg);
47
_builder.EmitOpCode(
ILOpCode
.Not);
180
_builder.EmitOpCode(
ILOpCode
.Mul);
184
_builder.EmitOpCode(
ILOpCode
.Add);
188
_builder.EmitOpCode(
ILOpCode
.Sub);
194
_builder.EmitOpCode(
ILOpCode
.Div_un);
198
_builder.EmitOpCode(
ILOpCode
.Div);
205
_builder.EmitOpCode(
ILOpCode
.Rem_un);
209
_builder.EmitOpCode(
ILOpCode
.Rem);
214
_builder.EmitOpCode(
ILOpCode
.Shl);
220
_builder.EmitOpCode(
ILOpCode
.Shr_un);
224
_builder.EmitOpCode(
ILOpCode
.Shr);
229
_builder.EmitOpCode(
ILOpCode
.Shr_un);
233
_builder.EmitOpCode(
ILOpCode
.And);
237
_builder.EmitOpCode(
ILOpCode
.Xor);
241
_builder.EmitOpCode(
ILOpCode
.Or);
277
_builder.EmitBranch(
ILOpCode
.Br, labEnd);
288
private static readonly
ILOpCode
[] s_compOpCodes = new
ILOpCode
[]
291
ILOpCode
.Clt,
ILOpCode
.Cgt,
ILOpCode
.Cgt,
ILOpCode
.Clt, // Signed
292
ILOpCode
.Clt_un,
ILOpCode
.Cgt_un,
ILOpCode
.Cgt_un,
ILOpCode
.Clt_un, // Unsigned
293
ILOpCode
.Clt,
ILOpCode
.Cgt_un,
ILOpCode
.Cgt,
ILOpCode
.Clt_un, // Float
333
EmitBinaryCondOperatorHelper(
ILOpCode
.And, binOp.Left, binOp.Right, sense);
339
EmitBinaryCondOperatorHelper(
ILOpCode
.Or, binOp.Left, binOp.Right, sense);
348
EmitBinaryCondOperatorHelper(
ILOpCode
.Xor, binOp.Left, binOp.Right, true);
350
EmitBinaryCondOperatorHelper(
ILOpCode
.Ceq, binOp.Left, binOp.Right, true);
384
_builder.EmitBranch(sense ?
ILOpCode
.Brtrue_s :
ILOpCode
.Brfalse_s, falseLabel);
386
_builder.EmitBranch(
ILOpCode
.Br, endLabel);
416
EmitBinaryCondOperatorHelper(
ILOpCode
.Ceq, binOp.Left, binOp.Right, sense);
465
_builder.EmitOpCode(
ILOpCode
.Cgt_un);
479
_builder.EmitOpCode(
ILOpCode
.Ceq);
482
private void EmitBinaryCondOperatorHelper(
ILOpCode
opCode, BoundExpression left, BoundExpression right, bool sense)
554
_builder.EmitOpCode(
ILOpCode
.Ldnull);
555
_builder.EmitOpCode(sense ?
ILOpCode
.Cgt_un :
ILOpCode
.Ceq);
563
_builder.EmitOpCode(
ILOpCode
.Ldc_i4_0);
564
_builder.EmitOpCode(sense ?
ILOpCode
.Cgt_un :
ILOpCode
.Ceq);
603
_builder.EmitOpCode(
ILOpCode
.Ldc_i4_0);
607
_builder.EmitOpCode(
ILOpCode
.Conv_i8);
611
_builder.EmitOpCode(
ILOpCode
.Conv_i);
615
_builder.EmitOpCode(
ILOpCode
.Sub_ovf);
705
_builder.EmitOpCode(
ILOpCode
.Mul_ovf_un);
709
_builder.EmitOpCode(
ILOpCode
.Mul_ovf);
716
_builder.EmitOpCode(
ILOpCode
.Add_ovf_un);
720
_builder.EmitOpCode(
ILOpCode
.Add_ovf);
727
_builder.EmitOpCode(
ILOpCode
.Sub_ovf_un);
731
_builder.EmitOpCode(
ILOpCode
.Sub_ovf);
758
_builder.EmitOpCode(
ILOpCode
.Ldc_i4_0);
759
_builder.EmitOpCode(
ILOpCode
.Ceq);
CodeGen\EmitStackAllocInitializer.cs (18)
51
_builder.EmitOpCode(
ILOpCode
.Dup);
54
_builder.EmitOpCode(
ILOpCode
.Initblk, -3);
60
_builder.EmitOpCode(
ILOpCode
.Dup);
61
_builder.EmitOpCode(
ILOpCode
.Ldsflda);
65
_builder.EmitOpCode(
ILOpCode
.Cpblk, -3);
78
_builder.EmitOpCode(
ILOpCode
.Dup);
83
_builder.EmitOpCode(
ILOpCode
.Ldtoken);
85
_builder.EmitOpCode(
ILOpCode
.Call, 0);
95
_builder.EmitOpCode(
ILOpCode
.Call, -1);
103
_builder.EmitOpCode(
ILOpCode
.Cpblk, -3);
125
_builder.EmitOpCode(
ILOpCode
.Localloc);
190
_builder.EmitOpCode(
ILOpCode
.Dup);
210
_builder.EmitOpCode(
ILOpCode
.Add);
215
_builder.EmitOpCode(
ILOpCode
.Add);
220
_builder.EmitOpCode(
ILOpCode
.Conv_i);
222
_builder.EmitOpCode(
ILOpCode
.Mul);
223
_builder.EmitOpCode(
ILOpCode
.Add);
231
_builder.EmitOpCode(
ILOpCode
.Sizeof);
CodeGen\EmitStatement.cs (77)
140
_builder.EmitOpCode(
ILOpCode
.Nop);
284
private static readonly
ILOpCode
[] s_condJumpOpCodes = new
ILOpCode
[]
287
ILOpCode
.Blt,
ILOpCode
.Ble,
ILOpCode
.Bgt,
ILOpCode
.Bge, // Signed
288
ILOpCode
.Bge,
ILOpCode
.Bgt,
ILOpCode
.Ble,
ILOpCode
.Blt, // Signed Invert
289
ILOpCode
.Blt_un,
ILOpCode
.Ble_un,
ILOpCode
.Bgt_un,
ILOpCode
.Bge_un, // Unsigned
290
ILOpCode
.Bge_un,
ILOpCode
.Bgt_un,
ILOpCode
.Ble_un,
ILOpCode
.Blt_un, // Unsigned Invert
291
ILOpCode
.Blt,
ILOpCode
.Ble,
ILOpCode
.Bgt,
ILOpCode
.Bge, // Float
292
ILOpCode
.Bge_un,
ILOpCode
.Bgt_un,
ILOpCode
.Ble_un,
ILOpCode
.Blt_un, // Float Invert
299
private static
ILOpCode
CodeForJump(BoundBinaryOperator op, bool sense, out
ILOpCode
revOpCode)
306
revOpCode = !sense ?
ILOpCode
.Beq :
ILOpCode
.Bne_un;
307
return sense ?
ILOpCode
.Beq :
ILOpCode
.Bne_un;
310
revOpCode = !sense ?
ILOpCode
.Bne_un :
ILOpCode
.Beq;
311
return sense ?
ILOpCode
.Bne_un :
ILOpCode
.Beq;
397
ILOpCode
ilcode;
406
_builder.EmitBranch(
ILOpCode
.Br, dest);
515
ILOpCode
revOpCode;
595
_builder.EmitOpCode(
ILOpCode
.Isinst);
597
ilcode = sense ?
ILOpCode
.Brtrue :
ILOpCode
.Brfalse;
616
ilcode = sense ?
ILOpCode
.Brtrue :
ILOpCode
.Brfalse;
640
_builder.EmitBranch(
ILOpCode
.Br, boundGotoStatement.Label);
765
_builder.EmitBranch(
ILOpCode
.Br, s_returnLabel);
890
_builder.EmitBranch(
ILOpCode
.Br, s_returnLabel);
1098
_builder.EmitOpCode(
ILOpCode
.Isinst);
1100
_builder.EmitOpCode(
ILOpCode
.Dup);
1101
_builder.EmitBranch(
ILOpCode
.Brtrue, typeCheckPassedLabel);
1102
_builder.EmitOpCode(
ILOpCode
.Pop);
1104
_builder.EmitBranch(
ILOpCode
.Br, typeCheckFailedLabel);
1130
_builder.EmitOpCode(
ILOpCode
.Unbox_any);
1187
_builder.EmitOpCode(
ILOpCode
.Pop);
1204
_builder.EmitOpCode(
ILOpCode
.Cgt_un);
1212
_builder.EmitOpCode(
ILOpCode
.Pop);
1389
_builder.EmitBranch(
ILOpCode
.Brfalse, lengthBasedSwitchInfo.LengthBasedJumpTable.NullCaseLabel ?? fallThroughLabel,
ILOpCode
.Brtrue);
1403
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0);
1436
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: -1);
1440
_builder.EmitOpCode(
ILOpCode
.Ldind_u2);
1515
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0);
1565
_builder.EmitBranch(
ILOpCode
.Brfalse, targetLabel,
ILOpCode
.Brtrue);
1581
_builder.EmitBranch(
ILOpCode
.Brfalse, skipToNext,
ILOpCode
.Brtrue);
1587
_builder.EmitOpCode(
ILOpCode
.Call, 0);
1593
_builder.EmitBranch(
ILOpCode
.Brfalse, targetLabel,
ILOpCode
.Brtrue);
1706
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: -1);
1710
_builder.EmitBranch(
ILOpCode
.Brtrue, targetLabel,
ILOpCode
.Brfalse);
1733
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0);
1735
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: -1);
1739
_builder.EmitBranch(
ILOpCode
.Brtrue, targetLabel,
ILOpCode
.Brfalse);
Compilation\CSharpCompilation.cs (1)
3667
ilBuilder.EmitOpCode(
ILOpCode
.Call, stackAdjustment: 0);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenFunctionPointersTests.cs (2)
12687
il.OpCode(
ILOpCode
.Ret);
12704
il.OpCode(
ILOpCode
.Ret);
Microsoft.CodeAnalysis.Test.Utilities (222)
Metadata\ILBuilderVisualizer.cs (220)
215
if (block.BranchCode !=
ILOpCode
.Nop)
271
private static string GetInstructionName(
ILOpCode
opcode)
275
case
ILOpCode
.Nop: return "nop";
276
case
ILOpCode
.Break: return "break";
277
case
ILOpCode
.Ldarg_0: return "ldarg.0";
278
case
ILOpCode
.Ldarg_1: return "ldarg.1";
279
case
ILOpCode
.Ldarg_2: return "ldarg.2";
280
case
ILOpCode
.Ldarg_3: return "ldarg.3";
281
case
ILOpCode
.Ldloc_0: return "ldloc.0";
282
case
ILOpCode
.Ldloc_1: return "ldloc.1";
283
case
ILOpCode
.Ldloc_2: return "ldloc.2";
284
case
ILOpCode
.Ldloc_3: return "ldloc.3";
285
case
ILOpCode
.Stloc_0: return "stloc.0";
286
case
ILOpCode
.Stloc_1: return "stloc.1";
287
case
ILOpCode
.Stloc_2: return "stloc.2";
288
case
ILOpCode
.Stloc_3: return "stloc.3";
289
case
ILOpCode
.Ldarg_s: return "ldarg.s";
290
case
ILOpCode
.Ldarga_s: return "ldarga.s";
291
case
ILOpCode
.Starg_s: return "starg.s";
292
case
ILOpCode
.Ldloc_s: return "ldloc.s";
293
case
ILOpCode
.Ldloca_s: return "ldloca.s";
294
case
ILOpCode
.Stloc_s: return "stloc.s";
295
case
ILOpCode
.Ldnull: return "ldnull";
296
case
ILOpCode
.Ldc_i4_m1: return "ldc.i4.m1";
297
case
ILOpCode
.Ldc_i4_0: return "ldc.i4.0";
298
case
ILOpCode
.Ldc_i4_1: return "ldc.i4.1";
299
case
ILOpCode
.Ldc_i4_2: return "ldc.i4.2";
300
case
ILOpCode
.Ldc_i4_3: return "ldc.i4.3";
301
case
ILOpCode
.Ldc_i4_4: return "ldc.i4.4";
302
case
ILOpCode
.Ldc_i4_5: return "ldc.i4.5";
303
case
ILOpCode
.Ldc_i4_6: return "ldc.i4.6";
304
case
ILOpCode
.Ldc_i4_7: return "ldc.i4.7";
305
case
ILOpCode
.Ldc_i4_8: return "ldc.i4.8";
306
case
ILOpCode
.Ldc_i4_s: return "ldc.i4.s";
307
case
ILOpCode
.Ldc_i4: return "ldc.i4";
308
case
ILOpCode
.Ldc_i8: return "ldc.i8";
309
case
ILOpCode
.Ldc_r4: return "ldc.r4";
310
case
ILOpCode
.Ldc_r8: return "ldc.r8";
311
case
ILOpCode
.Dup: return "dup";
312
case
ILOpCode
.Pop: return "pop";
313
case
ILOpCode
.Jmp: return "jmp";
314
case
ILOpCode
.Call: return "call";
315
case
ILOpCode
.Calli: return "calli";
316
case
ILOpCode
.Ret: return "ret";
317
case
ILOpCode
.Br_s: return "br.s";
318
case
ILOpCode
.Brfalse_s: return "brfalse.s";
319
case
ILOpCode
.Brtrue_s: return "brtrue.s";
320
case
ILOpCode
.Beq_s: return "beq.s";
321
case
ILOpCode
.Bge_s: return "bge.s";
322
case
ILOpCode
.Bgt_s: return "bgt.s";
323
case
ILOpCode
.Ble_s: return "ble.s";
324
case
ILOpCode
.Blt_s: return "blt.s";
325
case
ILOpCode
.Bne_un_s: return "bne.un.s";
326
case
ILOpCode
.Bge_un_s: return "bge.un.s";
327
case
ILOpCode
.Bgt_un_s: return "bgt.un.s";
328
case
ILOpCode
.Ble_un_s: return "ble.un.s";
329
case
ILOpCode
.Blt_un_s: return "blt.un.s";
330
case
ILOpCode
.Br: return "br";
331
case
ILOpCode
.Brfalse: return "brfalse";
332
case
ILOpCode
.Brtrue: return "brtrue";
333
case
ILOpCode
.Beq: return "beq";
334
case
ILOpCode
.Bge: return "bge";
335
case
ILOpCode
.Bgt: return "bgt";
336
case
ILOpCode
.Ble: return "ble";
337
case
ILOpCode
.Blt: return "blt";
338
case
ILOpCode
.Bne_un: return "bne.un";
339
case
ILOpCode
.Bge_un: return "bge.un";
340
case
ILOpCode
.Bgt_un: return "bgt.un";
341
case
ILOpCode
.Ble_un: return "ble.un";
342
case
ILOpCode
.Blt_un: return "blt.un";
343
case
ILOpCode
.Switch: return "switch";
344
case
ILOpCode
.Ldind_i1: return "ldind.i1";
345
case
ILOpCode
.Ldind_u1: return "ldind.u1";
346
case
ILOpCode
.Ldind_i2: return "ldind.i2";
347
case
ILOpCode
.Ldind_u2: return "ldind.u2";
348
case
ILOpCode
.Ldind_i4: return "ldind.i4";
349
case
ILOpCode
.Ldind_u4: return "ldind.u4";
350
case
ILOpCode
.Ldind_i8: return "ldind.i8";
351
case
ILOpCode
.Ldind_i: return "ldind.i";
352
case
ILOpCode
.Ldind_r4: return "ldind.r4";
353
case
ILOpCode
.Ldind_r8: return "ldind.r8";
354
case
ILOpCode
.Ldind_ref: return "ldind.ref";
355
case
ILOpCode
.Stind_ref: return "stind.ref";
356
case
ILOpCode
.Stind_i1: return "stind.i1";
357
case
ILOpCode
.Stind_i2: return "stind.i2";
358
case
ILOpCode
.Stind_i4: return "stind.i4";
359
case
ILOpCode
.Stind_i8: return "stind.i8";
360
case
ILOpCode
.Stind_r4: return "stind.r4";
361
case
ILOpCode
.Stind_r8: return "stind.r8";
362
case
ILOpCode
.Add: return "add";
363
case
ILOpCode
.Sub: return "sub";
364
case
ILOpCode
.Mul: return "mul";
365
case
ILOpCode
.Div: return "div";
366
case
ILOpCode
.Div_un: return "div.un";
367
case
ILOpCode
.Rem: return "rem";
368
case
ILOpCode
.Rem_un: return "rem.un";
369
case
ILOpCode
.And: return "and";
370
case
ILOpCode
.Or: return "or";
371
case
ILOpCode
.Xor: return "xor";
372
case
ILOpCode
.Shl: return "shl";
373
case
ILOpCode
.Shr: return "shr";
374
case
ILOpCode
.Shr_un: return "shr.un";
375
case
ILOpCode
.Neg: return "neg";
376
case
ILOpCode
.Not: return "not";
377
case
ILOpCode
.Conv_i1: return "conv.i1";
378
case
ILOpCode
.Conv_i2: return "conv.i2";
379
case
ILOpCode
.Conv_i4: return "conv.i4";
380
case
ILOpCode
.Conv_i8: return "conv.i8";
381
case
ILOpCode
.Conv_r4: return "conv.r4";
382
case
ILOpCode
.Conv_r8: return "conv.r8";
383
case
ILOpCode
.Conv_u4: return "conv.u4";
384
case
ILOpCode
.Conv_u8: return "conv.u8";
385
case
ILOpCode
.Callvirt: return "callvirt";
386
case
ILOpCode
.Cpobj: return "cpobj";
387
case
ILOpCode
.Ldobj: return "ldobj";
388
case
ILOpCode
.Ldstr: return "ldstr";
389
case
ILOpCode
.Newobj: return "newobj";
390
case
ILOpCode
.Castclass: return "castclass";
391
case
ILOpCode
.Isinst: return "isinst";
392
case
ILOpCode
.Conv_r_un: return "conv.r.un";
393
case
ILOpCode
.Unbox: return "unbox";
394
case
ILOpCode
.Throw: return "throw";
395
case
ILOpCode
.Ldfld: return "ldfld";
396
case
ILOpCode
.Ldflda: return "ldflda";
397
case
ILOpCode
.Stfld: return "stfld";
398
case
ILOpCode
.Ldsfld: return "ldsfld";
399
case
ILOpCode
.Ldsflda: return "ldsflda";
400
case
ILOpCode
.Stsfld: return "stsfld";
401
case
ILOpCode
.Stobj: return "stobj";
402
case
ILOpCode
.Conv_ovf_i1_un: return "conv.ovf.i1.un";
403
case
ILOpCode
.Conv_ovf_i2_un: return "conv.ovf.i2.un";
404
case
ILOpCode
.Conv_ovf_i4_un: return "conv.ovf.i4.un";
405
case
ILOpCode
.Conv_ovf_i8_un: return "conv.ovf.i8.un";
406
case
ILOpCode
.Conv_ovf_u1_un: return "conv.ovf.u1.un";
407
case
ILOpCode
.Conv_ovf_u2_un: return "conv.ovf.u2.un";
408
case
ILOpCode
.Conv_ovf_u4_un: return "conv.ovf.u4.un";
409
case
ILOpCode
.Conv_ovf_u8_un: return "conv.ovf.u8.un";
410
case
ILOpCode
.Conv_ovf_i_un: return "conv.ovf.i.un";
411
case
ILOpCode
.Conv_ovf_u_un: return "conv.ovf.u.un";
412
case
ILOpCode
.Box: return "box";
413
case
ILOpCode
.Newarr: return "newarr";
414
case
ILOpCode
.Ldlen: return "ldlen";
415
case
ILOpCode
.Ldelema: return "ldelema";
416
case
ILOpCode
.Ldelem_i1: return "ldelem.i1";
417
case
ILOpCode
.Ldelem_u1: return "ldelem.u1";
418
case
ILOpCode
.Ldelem_i2: return "ldelem.i2";
419
case
ILOpCode
.Ldelem_u2: return "ldelem.u2";
420
case
ILOpCode
.Ldelem_i4: return "ldelem.i4";
421
case
ILOpCode
.Ldelem_u4: return "ldelem.u4";
422
case
ILOpCode
.Ldelem_i8: return "ldelem.i8";
423
case
ILOpCode
.Ldelem_i: return "ldelem.i";
424
case
ILOpCode
.Ldelem_r4: return "ldelem.r4";
425
case
ILOpCode
.Ldelem_r8: return "ldelem.r8";
426
case
ILOpCode
.Ldelem_ref: return "ldelem.ref";
427
case
ILOpCode
.Stelem_i: return "stelem.i";
428
case
ILOpCode
.Stelem_i1: return "stelem.i1";
429
case
ILOpCode
.Stelem_i2: return "stelem.i2";
430
case
ILOpCode
.Stelem_i4: return "stelem.i4";
431
case
ILOpCode
.Stelem_i8: return "stelem.i8";
432
case
ILOpCode
.Stelem_r4: return "stelem.r4";
433
case
ILOpCode
.Stelem_r8: return "stelem.r8";
434
case
ILOpCode
.Stelem_ref: return "stelem.ref";
435
case
ILOpCode
.Ldelem: return "ldelem";
436
case
ILOpCode
.Stelem: return "stelem";
437
case
ILOpCode
.Unbox_any: return "unbox.any";
438
case
ILOpCode
.Conv_ovf_i1: return "conv.ovf.i1";
439
case
ILOpCode
.Conv_ovf_u1: return "conv.ovf.u1";
440
case
ILOpCode
.Conv_ovf_i2: return "conv.ovf.i2";
441
case
ILOpCode
.Conv_ovf_u2: return "conv.ovf.u2";
442
case
ILOpCode
.Conv_ovf_i4: return "conv.ovf.i4";
443
case
ILOpCode
.Conv_ovf_u4: return "conv.ovf.u4";
444
case
ILOpCode
.Conv_ovf_i8: return "conv.ovf.i8";
445
case
ILOpCode
.Conv_ovf_u8: return "conv.ovf.u8";
446
case
ILOpCode
.Refanyval: return "refanyval";
447
case
ILOpCode
.Ckfinite: return "ckfinite";
448
case
ILOpCode
.Mkrefany: return "mkrefany";
449
case
ILOpCode
.Ldtoken: return "ldtoken";
450
case
ILOpCode
.Conv_u2: return "conv.u2";
451
case
ILOpCode
.Conv_u1: return "conv.u1";
452
case
ILOpCode
.Conv_i: return "conv.i";
453
case
ILOpCode
.Conv_ovf_i: return "conv.ovf.i";
454
case
ILOpCode
.Conv_ovf_u: return "conv.ovf.u";
455
case
ILOpCode
.Add_ovf: return "add.ovf";
456
case
ILOpCode
.Add_ovf_un: return "add.ovf.un";
457
case
ILOpCode
.Mul_ovf: return "mul.ovf";
458
case
ILOpCode
.Mul_ovf_un: return "mul.ovf.un";
459
case
ILOpCode
.Sub_ovf: return "sub.ovf";
460
case
ILOpCode
.Sub_ovf_un: return "sub.ovf.un";
461
case
ILOpCode
.Endfinally: return "endfinally";
462
case
ILOpCode
.Leave: return "leave";
463
case
ILOpCode
.Leave_s: return "leave.s";
464
case
ILOpCode
.Stind_i: return "stind.i";
465
case
ILOpCode
.Conv_u: return "conv.u";
466
case
ILOpCode
.Arglist: return "arglist";
467
case
ILOpCode
.Ceq: return "ceq";
468
case
ILOpCode
.Cgt: return "cgt";
469
case
ILOpCode
.Cgt_un: return "cgt.un";
470
case
ILOpCode
.Clt: return "clt";
471
case
ILOpCode
.Clt_un: return "clt.un";
472
case
ILOpCode
.Ldftn: return "ldftn";
473
case
ILOpCode
.Ldvirtftn: return "ldvirtftn";
474
case
ILOpCode
.Ldarg: return "ldarg";
475
case
ILOpCode
.Ldarga: return "ldarga";
476
case
ILOpCode
.Starg: return "starg";
477
case
ILOpCode
.Ldloc: return "ldloc";
478
case
ILOpCode
.Ldloca: return "ldloca";
479
case
ILOpCode
.Stloc: return "stloc";
480
case
ILOpCode
.Localloc: return "localloc";
481
case
ILOpCode
.Endfilter: return "endfilter";
482
case
ILOpCode
.Unaligned: return "unaligned.";
483
case
ILOpCode
.Volatile: return "volatile.";
484
case
ILOpCode
.Tail: return "tail.";
485
case
ILOpCode
.Initobj: return "initobj";
486
case
ILOpCode
.Constrained: return "constrained.";
487
case
ILOpCode
.Cpblk: return "cpblk";
488
case
ILOpCode
.Initblk: return "initblk";
489
case
ILOpCode
.Rethrow: return "rethrow";
490
case
ILOpCode
.Sizeof: return "sizeof";
491
case
ILOpCode
.Refanytype: return "refanytype";
492
case
ILOpCode
.Readonly: return "readonly.";
Metadata\MetadataReaderUtils.cs (2)
503
static readonly byte[] ThrowNull = new[] { (byte)
ILOpCode
.Ldnull, (byte)
ILOpCode
.Throw };
Microsoft.CodeAnalysis.VisualBasic (289)
CodeGen\CodeGenerator.vb (2)
253
_builder.EmitOpCode(
ILOpCode
.Nop)
272
_builder.EmitOpCode(
ILOpCode
.Nop)
CodeGen\EmitAddress.vb (7)
66
_builder.EmitOpCode(
ILOpCode
.Dup)
92
_builder.EmitOpCode(
ILOpCode
.Ldarg_0)
95
_builder.EmitOpCode(
ILOpCode
.Ldarg_0)
414
_builder.EmitOpCode(
ILOpCode
.Readonly)
418
_builder.EmitOpCode(
ILOpCode
.Ldelema)
437
_builder.EmitOpCode(
ILOpCode
.Ldsflda)
511
_builder.EmitOpCode(
ILOpCode
.Ldflda)
CodeGen\EmitArrayInitializer.vb (2)
70
_builder.EmitOpCode(
ILOpCode
.Dup)
157
_builder.EmitOpCode(
ILOpCode
.Dup)
CodeGen\EmitConversion.vb (22)
82
_builder.EmitOpCode(
ILOpCode
.Ceq)
83
_builder.EmitOpCode(
ILOpCode
.Ldc_i4_0)
84
_builder.EmitOpCode(
ILOpCode
.Ceq)
86
_builder.EmitOpCode(
ILOpCode
.Cgt_un)
95
_builder.EmitOpCode(
ILOpCode
.Ldc_i4_0)
96
_builder.EmitOpCode(
ILOpCode
.Cgt_un)
97
_builder.EmitOpCode(
ILOpCode
.Neg)
126
_builder.EmitOpCode(
ILOpCode
.Conv_r4)
134
_builder.EmitOpCode(
ILOpCode
.Conv_r4)
181
_builder.EmitOpCode(
ILOpCode
.Castclass)
216
_builder.EmitOpCode(
ILOpCode
.Dup)
217
_builder.EmitBranch(
ILOpCode
.Brtrue_s, unboxLabel)
223
_builder.EmitOpCode(
ILOpCode
.Pop)
240
_builder.EmitBranch(
ILOpCode
.Br_s, resultLabel)
245
_builder.EmitOpCode(
ILOpCode
.Unbox_any)
339
_builder.EmitOpCode(
ILOpCode
.Unbox_any)
344
_builder.EmitOpCode(
ILOpCode
.Castclass)
364
_builder.EmitOpCode(
ILOpCode
.Unbox_any)
376
_builder.EmitOpCode(
ILOpCode
.Castclass)
419
_builder.EmitOpCode(
ILOpCode
.Castclass)
498
_builder.EmitOpCode(
ILOpCode
.Isinst)
502
_builder.EmitOpCode(
ILOpCode
.Unbox_any)
CodeGen\EmitExpression.vb (120)
134
_builder.EmitOpCode(
ILOpCode
.Ldarg_0)
235
_builder.EmitBranch(
ILOpCode
.Brtrue, whenValueTypeLabel)
238
_builder.EmitBranch(
ILOpCode
.Br, doneLabel)
274
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment:=0)
277
_builder.EmitBranch(
ILOpCode
.Brtrue, consequenceLabel)
285
_builder.EmitBranch(
ILOpCode
.Br, doneLabel)
343
_builder.EmitBranch(
ILOpCode
.Brtrue, whenNotNullLabel)
358
_builder.EmitOpCode(
ILOpCode
.Dup)
363
_builder.EmitOpCode(
ILOpCode
.Dup)
376
_builder.EmitBranch(
ILOpCode
.Brtrue, whenNotNullLabel)
379
_builder.EmitOpCode(
ILOpCode
.Pop)
388
_builder.EmitBranch(
ILOpCode
.Br, doneLabel)
434
_builder.EmitBranch(
ILOpCode
.Brtrue, whenValueTypeLabel)
438
_builder.EmitBranch(
ILOpCode
.Br, doneLabel)
494
_builder.EmitOpCode(
ILOpCode
.Dup)
495
_builder.EmitOpCode(
ILOpCode
.Ldvirtftn)
497
_builder.EmitOpCode(
ILOpCode
.Ldftn)
511
_builder.EmitOpCode(
ILOpCode
.Newobj, -1)
521
_builder.EmitOpCode(
ILOpCode
.Ldarg_0)
523
_builder.EmitOpCode(
ILOpCode
.Ldobj)
598
_builder.EmitOpCode(
ILOpCode
.Ldelem_i1)
602
_builder.EmitOpCode(
ILOpCode
.Ldelem_u1)
605
_builder.EmitOpCode(
ILOpCode
.Ldelem_i2)
609
_builder.EmitOpCode(
ILOpCode
.Ldelem_u2)
612
_builder.EmitOpCode(
ILOpCode
.Ldelem_i4)
615
_builder.EmitOpCode(
ILOpCode
.Ldelem_u4)
619
_builder.EmitOpCode(
ILOpCode
.Ldelem_i8)
624
_builder.EmitOpCode(
ILOpCode
.Ldelem_i)
627
_builder.EmitOpCode(
ILOpCode
.Ldelem_r4)
630
_builder.EmitOpCode(
ILOpCode
.Ldelem_r8)
634
_builder.EmitOpCode(
ILOpCode
.Ldelem_ref)
637
_builder.EmitOpCode(
ILOpCode
.Ldelem)
642
_builder.EmitOpCode(
ILOpCode
.Readonly)
645
_builder.EmitOpCode(
ILOpCode
.Ldelema)
685
_builder.EmitOpCode(
ILOpCode
.Dup)
689
_builder.EmitOpCode(
ILOpCode
.Dup)
699
_builder.EmitOpCode(
ILOpCode
.Ldsfld)
723
_builder.EmitOpCode(
ILOpCode
.Ldfld)
748
Me._builder.EmitOpCode(
ILOpCode
.Unbox)
757
Me._builder.EmitOpCode(
ILOpCode
.Ldflda)
844
_builder.EmitOpCode(
ILOpCode
.Ldind_i1)
848
_builder.EmitOpCode(
ILOpCode
.Ldind_u1)
851
_builder.EmitOpCode(
ILOpCode
.Ldind_i2)
855
_builder.EmitOpCode(
ILOpCode
.Ldind_u2)
858
_builder.EmitOpCode(
ILOpCode
.Ldind_i4)
861
_builder.EmitOpCode(
ILOpCode
.Ldind_u4)
865
_builder.EmitOpCode(
ILOpCode
.Ldind_i8)
870
_builder.EmitOpCode(
ILOpCode
.Ldind_i)
873
_builder.EmitOpCode(
ILOpCode
.Ldind_r4)
876
_builder.EmitOpCode(
ILOpCode
.Ldind_r8)
880
_builder.EmitOpCode(
ILOpCode
.Ldind_ref)
882
_builder.EmitOpCode(
ILOpCode
.Ldobj)
1106
_builder.EmitOpCode(
ILOpCode
.Call, stackBehavior)
1109
_builder.EmitOpCode(
ILOpCode
.Callvirt, stackBehavior)
1112
_builder.EmitOpCode(
ILOpCode
.Constrained)
1114
_builder.EmitOpCode(
ILOpCode
.Callvirt, stackBehavior)
1149
_builder.EmitOpCode(
ILOpCode
.Nop)
1244
_builder.EmitBranch(
ILOpCode
.Brtrue, whenNotNullLabel)
1343
_builder.EmitOpCode(
ILOpCode
.Isinst)
1349
_builder.EmitOpCode(
ILOpCode
.Ldnull)
1352
_builder.EmitOpCode(
ILOpCode
.Ceq)
1354
_builder.EmitOpCode(
ILOpCode
.Cgt_un)
1430
_builder.EmitBranch(
ILOpCode
.Br, doneLabel)
1480
_builder.EmitOpCode(
ILOpCode
.Dup)
1488
_builder.EmitBranch(
ILOpCode
.Brtrue, ifLeftNotNullLabel)
1491
_builder.EmitOpCode(
ILOpCode
.Pop)
1630
_builder.EmitOpCode(
ILOpCode
.Newarr)
1647
_builder.EmitOpCode(
ILOpCode
.Ldlen)
1677
_builder.EmitOpCode(
ILOpCode
.Initobj) ' initobj <MyStruct>
1693
_builder.EmitOpCode(
ILOpCode
.Newobj,
ILOpCode
.Newobj.StackPushCount() - arguments.Length)
1726
_builder.EmitOpCode(
ILOpCode
.Initobj)
1861
Me._builder.EmitOpCode(
ILOpCode
.Initobj) ' initobj <MyStruct>
1879
Me._builder.EmitOpCode(
ILOpCode
.[Call], -stackAdjustment)
1998
Me._builder.EmitOpCode(
ILOpCode
.Dup)
2022
_builder.EmitOpCode(
ILOpCode
.Dup)
2102
_builder.EmitOpCode(
ILOpCode
.Stobj)
2129
_builder.EmitOpCode(
ILOpCode
.Stelem_i1)
2134
_builder.EmitOpCode(
ILOpCode
.Stelem_i2)
2138
_builder.EmitOpCode(
ILOpCode
.Stelem_i4)
2142
_builder.EmitOpCode(
ILOpCode
.Stelem_i8)
2147
_builder.EmitOpCode(
ILOpCode
.Stelem_i)
2150
_builder.EmitOpCode(
ILOpCode
.Stelem_r4)
2153
_builder.EmitOpCode(
ILOpCode
.Stelem_r8)
2157
_builder.EmitOpCode(
ILOpCode
.Stelem_ref)
2159
_builder.EmitOpCode(
ILOpCode
.Stelem)
2170
_builder.EmitOpCode(
ILOpCode
.Stsfld)
2172
_builder.EmitOpCode(
ILOpCode
.Stfld)
2199
_builder.EmitOpCode(
ILOpCode
.Stind_i1)
2204
_builder.EmitOpCode(
ILOpCode
.Stind_i2)
2208
_builder.EmitOpCode(
ILOpCode
.Stind_i4)
2212
_builder.EmitOpCode(
ILOpCode
.Stind_i8)
2217
_builder.EmitOpCode(
ILOpCode
.Stind_i)
2220
_builder.EmitOpCode(
ILOpCode
.Stind_r4)
2223
_builder.EmitOpCode(
ILOpCode
.Stind_r8)
2227
_builder.EmitOpCode(
ILOpCode
.Stind_ref)
2229
_builder.EmitOpCode(
ILOpCode
.Stobj)
2238
_builder.EmitOpCode(
ILOpCode
.Pop)
2247
_builder.EmitOpCode(
ILOpCode
.Ldtoken)
2250
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment:=0) 'argument off, return value on
2258
_builder.EmitOpCode(
ILOpCode
.Ldtoken)
2264
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment:=0) ' argument off, return value on
2267
_builder.EmitOpCode(
ILOpCode
.Ldtoken)
2269
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment:=-1) ' 2 arguments off, return value on
2276
_builder.EmitOpCode(
ILOpCode
.Castclass)
2290
_builder.EmitOpCode(
ILOpCode
.Ldtoken)
2295
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment:=0) ' argument off, return value on
2300
_builder.EmitOpCode(
ILOpCode
.Ldtoken)
2302
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment:=-1) ' 2 arguments off, return value on
2307
_builder.EmitOpCode(
ILOpCode
.Castclass)
2315
_builder.EmitOpCode(
ILOpCode
.Box)
2320
_builder.EmitOpCode(
ILOpCode
.Unbox_any)
2327
_builder.EmitOpCode(
ILOpCode
.Ldtoken)
2343
_builder.EmitOpCode(
ILOpCode
.Ldtoken)
2348
_builder.EmitOpCode(
ILOpCode
.Ldsfld)
2353
_builder.EmitOpCode(
ILOpCode
.Stsfld)
2362
_builder.EmitOpCode(
ILOpCode
.Ldstr)
2367
_builder.EmitOpCode(
ILOpCode
.Ldsfld)
2372
_builder.EmitOpCode(
ILOpCode
.Stsfld)
2382
_builder.EmitOpCode(
ILOpCode
.Ldtoken)
CodeGen\EmitOperators.vb (60)
34
_builder.EmitOpCode(
ILOpCode
.Ldc_i4_0)
37
_builder.EmitOpCode(
ILOpCode
.Conv_i8)
44
_builder.EmitOpCode(
ILOpCode
.Sub_ovf)
46
_builder.EmitOpCode(
ILOpCode
.Neg)
61
_builder.EmitOpCode(
ILOpCode
.Not)
197
_builder.EmitOpCode(
ILOpCode
.And)
200
_builder.EmitOpCode(
ILOpCode
.Xor)
203
_builder.EmitOpCode(
ILOpCode
.Or)
220
_builder.EmitOpCode(
ILOpCode
.And)
225
_builder.EmitOpCode(
ILOpCode
.Xor)
230
_builder.EmitOpCode(
ILOpCode
.Or)
273
_builder.EmitOpCode(
ILOpCode
.Mul_ovf)
277
_builder.EmitOpCode(
ILOpCode
.Mul_ovf_un)
279
_builder.EmitOpCode(
ILOpCode
.Mul)
284
_builder.EmitOpCode(
ILOpCode
.Rem_un)
286
_builder.EmitOpCode(
ILOpCode
.[Rem])
292
_builder.EmitOpCode(
ILOpCode
.Add_ovf)
296
_builder.EmitOpCode(
ILOpCode
.Add_ovf_un)
298
_builder.EmitOpCode(
ILOpCode
.Add)
304
_builder.EmitOpCode(
ILOpCode
.Sub_ovf)
308
_builder.EmitOpCode(
ILOpCode
.Sub_ovf_un)
310
_builder.EmitOpCode(
ILOpCode
.Sub)
317
_builder.EmitOpCode(
ILOpCode
.Div_un)
319
_builder.EmitOpCode(
ILOpCode
.Div)
331
_builder.EmitOpCode(
ILOpCode
.And)
334
_builder.EmitOpCode(
ILOpCode
.Shl)
346
_builder.EmitOpCode(
ILOpCode
.And)
350
_builder.EmitOpCode(
ILOpCode
.Shr_un)
352
_builder.EmitOpCode(
ILOpCode
.Shr)
415
_builder.EmitBranch(
ILOpCode
.Br, labEnd)
426
Private Shared ReadOnly s_compOpCodes As
ILOpCode
() = New
ILOpCode
() {
ILOpCode
.Clt,
ILOpCode
.Cgt,
ILOpCode
.Cgt,
ILOpCode
.Clt,
ILOpCode
.Clt_un,
ILOpCode
.Cgt_un,
ILOpCode
.Cgt_un,
ILOpCode
.Clt_un,
ILOpCode
.Clt,
ILOpCode
.Cgt_un,
ILOpCode
.Cgt,
ILOpCode
.Clt_un}
511
EmitBinaryCondOperatorHelper(
ILOpCode
.Ceq, binOp.Left, binOp.Right, sense)
518
EmitBinaryCondOperatorHelper(
ILOpCode
.Or, binOp.Left, binOp.Right, sense)
525
EmitBinaryCondOperatorHelper(
ILOpCode
.And, binOp.Left, binOp.Right, sense)
534
EmitBinaryCondOperatorHelper(
ILOpCode
.Xor, binOp.Left, binOp.Right, True)
536
EmitBinaryCondOperatorHelper(
ILOpCode
.Ceq, binOp.Left, binOp.Right, True)
583
_builder.EmitOpCode(
ILOpCode
.Cgt_un)
595
_builder.EmitOpCode(
ILOpCode
.Ceq)
598
Private Sub EmitBinaryCondOperatorHelper(opCode As
ILOpCode
,
671
_builder.EmitOpCode(
ILOpCode
.Ldnull)
672
_builder.EmitOpCode(If(sense,
ILOpCode
.Cgt_un,
ILOpCode
.Ceq))
678
_builder.EmitOpCode(
ILOpCode
.Ldc_i4_0)
679
_builder.EmitOpCode(If(sense,
ILOpCode
.Cgt_un,
ILOpCode
.Ceq))
699
_builder.EmitOpCode(
ILOpCode
.Ldc_i4_0)
700
_builder.EmitOpCode(
ILOpCode
.Ceq)
CodeGen\EmitStatement.vb (76)
93
_builder.EmitOpCode(
ILOpCode
.Nop)
229
_builder.EmitOpCode(
ILOpCode
.Isinst)
231
_builder.EmitOpCode(
ILOpCode
.Ldnull)
232
_builder.EmitOpCode(
ILOpCode
.Cgt_un)
237
_builder.EmitOpCode(
ILOpCode
.Cgt_un)
240
_builder.EmitOpCode(
ILOpCode
.And)
245
_builder.EmitOpCode(
ILOpCode
.Ceq)
248
_builder.EmitOpCode(
ILOpCode
.And)
253
_builder.EmitOpCode(
ILOpCode
.Castclass)
259
_builder.EmitOpCode(
ILOpCode
.Pop)
280
_builder.EmitOpCode(
ILOpCode
.Isinst)
282
_builder.EmitOpCode(
ILOpCode
.Dup)
283
_builder.EmitBranch(
ILOpCode
.Brtrue, typeCheckPassedLabel)
284
_builder.EmitOpCode(
ILOpCode
.Pop)
286
_builder.EmitBranch(
ILOpCode
.Br, typeCheckFailedLabel)
302
_builder.EmitOpCode(
ILOpCode
.Dup)
310
_builder.EmitOpCode(
ILOpCode
.Unbox_any)
384
_builder.EmitOpCode(
ILOpCode
.Pop)
394
_builder.EmitOpCode(
ILOpCode
.Cgt_un)
401
_builder.EmitOpCode(
ILOpCode
.Pop)
436
_builder.EmitOpCode(
ILOpCode
.Call, -1)
441
_builder.EmitOpCode(
ILOpCode
.Call, -2)
452
_builder.EmitOpCode(
ILOpCode
.Call, 0)
554
Private Shared ReadOnly s_condJumpOpCodes As
ILOpCode
() = New
ILOpCode
() {
555
ILOpCode
.Blt,
ILOpCode
.Ble,
ILOpCode
.Bgt,
ILOpCode
.Bge,
556
ILOpCode
.Bge,
ILOpCode
.Bgt,
ILOpCode
.Ble,
ILOpCode
.Blt,
557
ILOpCode
.Blt_un,
ILOpCode
.Ble_un,
ILOpCode
.Bgt_un,
ILOpCode
.Bge_un,
558
ILOpCode
.Bge_un,
ILOpCode
.Bgt_un,
ILOpCode
.Ble_un,
ILOpCode
.Blt_un,
559
ILOpCode
.Blt,
ILOpCode
.Ble,
ILOpCode
.Bgt,
ILOpCode
.Bge,
560
ILOpCode
.Bge_un,
ILOpCode
.Bgt_un,
ILOpCode
.Ble_un,
ILOpCode
.Blt_un}
562
Private Function CodeForJump(expression As BoundBinaryOperator, sense As Boolean, <Out()> ByRef revOpCode As
ILOpCode
) As
ILOpCode
587
Return If(sense,
ILOpCode
.Bne_un,
ILOpCode
.Beq)
591
Return If(sense,
ILOpCode
.Beq,
ILOpCode
.Bne_un)
594
Return If(sense,
ILOpCode
.Beq,
ILOpCode
.Bne_un)
597
Return If(sense,
ILOpCode
.Bne_un,
ILOpCode
.Beq)
670
Dim ilcode As
ILOpCode
683
_builder.EmitBranch(
ILOpCode
.Br, lazyDest)
745
Dim revOpCode As
ILOpCode
777
ilcode = If(sense,
ILOpCode
.Brtrue,
ILOpCode
.Brfalse)
806
ilcode = If(sense,
ILOpCode
.Brtrue,
ILOpCode
.Brfalse)
859
_builder.EmitBranch(
ILOpCode
.Br, boundGotoStatement.Label)
1047
_builder.EmitBranch(
ILOpCode
.Br, fallThroughLabel)
1101
_builder.EmitOpCode(
ILOpCode
.[Call], stackAdjustment:=0)
1176
_builder.EmitOpCode(
ILOpCode
.Call, stackAdjustment:=-2)
1181
_builder.EmitBranch(
ILOpCode
.Brfalse, targetLabel,
ILOpCode
.Brtrue)
1209
_builder.EmitOpCode(
ILOpCode
.Nop)
1217
_builder.EmitBranch(
ILOpCode
.Br, exitLabel)
1473
_builder.EmitBranch(
ILOpCode
.Br_s, switchLabel)
1482
_builder.EmitOpCode(
ILOpCode
.Add)
System.Reflection.Emit (2)
System\Reflection\Emit\ILGeneratorImpl.cs (2)
289
_il.OpCode((
ILOpCode
)opcode.Value);
512
_il.Branch((
ILOpCode
)opcode.Value, labelInfo._metaLabel);
System.Reflection.Metadata (203)
System\Reflection\Metadata\Ecma335\Encoding\ControlFlowBuilder.cs (5)
27
internal readonly
ILOpCode
OpCode;
32
internal BranchInfo(int operandOffset, LabelHandle label, int instructionEndDisplacement, int ilOffset,
ILOpCode
opCode)
117
internal void AddBranch(int operandOffset, LabelHandle label, int instructionEndDisplacement, int ilOffset,
ILOpCode
opCode)
129
Debug.Assert(opCode ==
ILOpCode
.Switch || opCode.GetBranchOperandSize() == 4);
132
Debug.Assert(instructionEndDisplacement > 4 && instructionEndDisplacement % 4 == 0 && opCode ==
ILOpCode
.Switch);
System\Reflection\Metadata\Ecma335\Encoding\InstructionEncoder.cs (51)
33
/// such as <see cref="Branch(
ILOpCode
, LabelHandle)"/>, <see cref="DefineLabel"/>, <see cref="MarkLabel(LabelHandle)"/> etc.
54
public void OpCode(
ILOpCode
code)
93
OpCode(
ILOpCode
.Ldstr);
109
OpCode(
ILOpCode
.Call);
118
OpCode(
ILOpCode
.Call);
127
OpCode(
ILOpCode
.Call);
136
OpCode(
ILOpCode
.Call);
145
OpCode(
ILOpCode
.Calli);
154
ILOpCode
code;
157
case -1: code =
ILOpCode
.Ldc_i4_m1; break;
158
case 0: code =
ILOpCode
.Ldc_i4_0; break;
159
case 1: code =
ILOpCode
.Ldc_i4_1; break;
160
case 2: code =
ILOpCode
.Ldc_i4_2; break;
161
case 3: code =
ILOpCode
.Ldc_i4_3; break;
162
case 4: code =
ILOpCode
.Ldc_i4_4; break;
163
case 5: code =
ILOpCode
.Ldc_i4_5; break;
164
case 6: code =
ILOpCode
.Ldc_i4_6; break;
165
case 7: code =
ILOpCode
.Ldc_i4_7; break;
166
case 8: code =
ILOpCode
.Ldc_i4_8; break;
171
OpCode(
ILOpCode
.Ldc_i4_s);
176
OpCode(
ILOpCode
.Ldc_i4);
191
OpCode(
ILOpCode
.Ldc_i8);
200
OpCode(
ILOpCode
.Ldc_r4);
209
OpCode(
ILOpCode
.Ldc_r8);
222
case 0: OpCode(
ILOpCode
.Ldloc_0); break;
223
case 1: OpCode(
ILOpCode
.Ldloc_1); break;
224
case 2: OpCode(
ILOpCode
.Ldloc_2); break;
225
case 3: OpCode(
ILOpCode
.Ldloc_3); break;
230
OpCode(
ILOpCode
.Ldloc_s);
235
OpCode(
ILOpCode
.Ldloc);
256
case 0: OpCode(
ILOpCode
.Stloc_0); break;
257
case 1: OpCode(
ILOpCode
.Stloc_1); break;
258
case 2: OpCode(
ILOpCode
.Stloc_2); break;
259
case 3: OpCode(
ILOpCode
.Stloc_3); break;
264
OpCode(
ILOpCode
.Stloc_s);
269
OpCode(
ILOpCode
.Stloc);
290
OpCode(
ILOpCode
.Ldloca_s);
295
OpCode(
ILOpCode
.Ldloca);
313
case 0: OpCode(
ILOpCode
.Ldarg_0); break;
314
case 1: OpCode(
ILOpCode
.Ldarg_1); break;
315
case 2: OpCode(
ILOpCode
.Ldarg_2); break;
316
case 3: OpCode(
ILOpCode
.Ldarg_3); break;
321
OpCode(
ILOpCode
.Ldarg_s);
326
OpCode(
ILOpCode
.Ldarg);
347
OpCode(
ILOpCode
.Ldarga_s);
352
OpCode(
ILOpCode
.Ldarga);
370
OpCode(
ILOpCode
.Starg_s);
375
OpCode(
ILOpCode
.Starg);
394
internal void LabelOperand(
ILOpCode
code, LabelHandle label, int instructionEndDisplacement, int ilOffset)
420
public void Branch(
ILOpCode
code, LabelHandle label)
456
OpCode(
ILOpCode
.Switch);
System\Reflection\Metadata\Ecma335\Encoding\SwitchInstructionEncoder.cs (1)
37
_encoder.LabelOperand(
ILOpCode
.Switch, label, _instructionEnd - _encoder.Offset, _ilOffset);
System\Reflection\Metadata\IL\ILOpCodeExtensions.cs (146)
11
public static bool IsBranch(this
ILOpCode
opCode)
15
case
ILOpCode
.Br:
16
case
ILOpCode
.Br_s:
17
case
ILOpCode
.Brtrue:
18
case
ILOpCode
.Brtrue_s:
19
case
ILOpCode
.Brfalse:
20
case
ILOpCode
.Brfalse_s:
21
case
ILOpCode
.Beq:
22
case
ILOpCode
.Beq_s:
23
case
ILOpCode
.Bne_un:
24
case
ILOpCode
.Bne_un_s:
25
case
ILOpCode
.Bge:
26
case
ILOpCode
.Bge_s:
27
case
ILOpCode
.Bge_un:
28
case
ILOpCode
.Bge_un_s:
29
case
ILOpCode
.Bgt:
30
case
ILOpCode
.Bgt_s:
31
case
ILOpCode
.Bgt_un:
32
case
ILOpCode
.Bgt_un_s:
33
case
ILOpCode
.Ble:
34
case
ILOpCode
.Ble_s:
35
case
ILOpCode
.Ble_un:
36
case
ILOpCode
.Ble_un_s:
37
case
ILOpCode
.Blt:
38
case
ILOpCode
.Blt_s:
39
case
ILOpCode
.Blt_un:
40
case
ILOpCode
.Blt_un_s:
41
case
ILOpCode
.Leave:
42
case
ILOpCode
.Leave_s:
55
public static int GetBranchOperandSize(this
ILOpCode
opCode)
59
case
ILOpCode
.Br_s:
60
case
ILOpCode
.Brfalse_s:
61
case
ILOpCode
.Brtrue_s:
62
case
ILOpCode
.Beq_s:
63
case
ILOpCode
.Bge_s:
64
case
ILOpCode
.Bgt_s:
65
case
ILOpCode
.Ble_s:
66
case
ILOpCode
.Blt_s:
67
case
ILOpCode
.Bne_un_s:
68
case
ILOpCode
.Bge_un_s:
69
case
ILOpCode
.Bgt_un_s:
70
case
ILOpCode
.Ble_un_s:
71
case
ILOpCode
.Blt_un_s:
72
case
ILOpCode
.Leave_s:
75
case
ILOpCode
.Br:
76
case
ILOpCode
.Brfalse:
77
case
ILOpCode
.Brtrue:
78
case
ILOpCode
.Beq:
79
case
ILOpCode
.Bge:
80
case
ILOpCode
.Bgt:
81
case
ILOpCode
.Ble:
82
case
ILOpCode
.Blt:
83
case
ILOpCode
.Bne_un:
84
case
ILOpCode
.Bge_un:
85
case
ILOpCode
.Bgt_un:
86
case
ILOpCode
.Ble_un:
87
case
ILOpCode
.Blt_un:
88
case
ILOpCode
.Leave:
101
public static
ILOpCode
GetShortBranch(this
ILOpCode
opCode)
105
case
ILOpCode
.Br_s:
106
case
ILOpCode
.Brfalse_s:
107
case
ILOpCode
.Brtrue_s:
108
case
ILOpCode
.Beq_s:
109
case
ILOpCode
.Bge_s:
110
case
ILOpCode
.Bgt_s:
111
case
ILOpCode
.Ble_s:
112
case
ILOpCode
.Blt_s:
113
case
ILOpCode
.Bne_un_s:
114
case
ILOpCode
.Bge_un_s:
115
case
ILOpCode
.Bgt_un_s:
116
case
ILOpCode
.Ble_un_s:
117
case
ILOpCode
.Blt_un_s:
118
case
ILOpCode
.Leave_s:
121
case
ILOpCode
.Br:
122
return
ILOpCode
.Br_s;
124
case
ILOpCode
.Brfalse:
125
return
ILOpCode
.Brfalse_s;
127
case
ILOpCode
.Brtrue:
128
return
ILOpCode
.Brtrue_s;
130
case
ILOpCode
.Beq:
131
return
ILOpCode
.Beq_s;
133
case
ILOpCode
.Bge:
134
return
ILOpCode
.Bge_s;
136
case
ILOpCode
.Bgt:
137
return
ILOpCode
.Bgt_s;
139
case
ILOpCode
.Ble:
140
return
ILOpCode
.Ble_s;
142
case
ILOpCode
.Blt:
143
return
ILOpCode
.Blt_s;
145
case
ILOpCode
.Bne_un:
146
return
ILOpCode
.Bne_un_s;
148
case
ILOpCode
.Bge_un:
149
return
ILOpCode
.Bge_un_s;
151
case
ILOpCode
.Bgt_un:
152
return
ILOpCode
.Bgt_un_s;
154
case
ILOpCode
.Ble_un:
155
return
ILOpCode
.Ble_un_s;
157
case
ILOpCode
.Blt_un:
158
return
ILOpCode
.Blt_un_s;
160
case
ILOpCode
.Leave:
161
return
ILOpCode
.Leave_s;
173
public static
ILOpCode
GetLongBranch(this
ILOpCode
opCode)
177
case
ILOpCode
.Br:
178
case
ILOpCode
.Brfalse:
179
case
ILOpCode
.Brtrue:
180
case
ILOpCode
.Beq:
181
case
ILOpCode
.Bge:
182
case
ILOpCode
.Bgt:
183
case
ILOpCode
.Ble:
184
case
ILOpCode
.Blt:
185
case
ILOpCode
.Bne_un:
186
case
ILOpCode
.Bge_un:
187
case
ILOpCode
.Bgt_un:
188
case
ILOpCode
.Ble_un:
189
case
ILOpCode
.Blt_un:
190
case
ILOpCode
.Leave:
193
case
ILOpCode
.Br_s:
194
return
ILOpCode
.Br;
196
case
ILOpCode
.Brfalse_s:
197
return
ILOpCode
.Brfalse;
199
case
ILOpCode
.Brtrue_s:
200
return
ILOpCode
.Brtrue;
202
case
ILOpCode
.Beq_s:
203
return
ILOpCode
.Beq;
205
case
ILOpCode
.Bge_s:
206
return
ILOpCode
.Bge;
208
case
ILOpCode
.Bgt_s:
209
return
ILOpCode
.Bgt;
211
case
ILOpCode
.Ble_s:
212
return
ILOpCode
.Ble;
214
case
ILOpCode
.Blt_s:
215
return
ILOpCode
.Blt;
217
case
ILOpCode
.Bne_un_s:
218
return
ILOpCode
.Bne_un;
220
case
ILOpCode
.Bge_un_s:
221
return
ILOpCode
.Bge_un;
223
case
ILOpCode
.Bgt_un_s:
224
return
ILOpCode
.Bgt_un;
226
case
ILOpCode
.Ble_un_s:
227
return
ILOpCode
.Ble_un;
229
case
ILOpCode
.Blt_un_s:
230
return
ILOpCode
.Blt_un;
232
case
ILOpCode
.Leave_s:
233
return
ILOpCode
.Leave;