Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetBranchOperandSize()

static int System.Reflection.Metadata.ILOpCodeExtensions.GetBranchOperandSize ( this ILOpCode opCode)
inlinestatic

Definition at line 14 of file ILOpCodeExtensions.cs.

15 {
16 switch (opCode)
17 {
18 case ILOpCode.Br_s:
19 case ILOpCode.Brfalse_s:
20 case ILOpCode.Brtrue_s:
21 case ILOpCode.Beq_s:
22 case ILOpCode.Bge_s:
23 case ILOpCode.Bgt_s:
24 case ILOpCode.Ble_s:
25 case ILOpCode.Blt_s:
26 case ILOpCode.Bne_un_s:
27 case ILOpCode.Bge_un_s:
28 case ILOpCode.Bgt_un_s:
29 case ILOpCode.Ble_un_s:
30 case ILOpCode.Blt_un_s:
31 case ILOpCode.Leave_s:
32 return 1;
33 case ILOpCode.Br:
34 case ILOpCode.Brfalse:
35 case ILOpCode.Brtrue:
36 case ILOpCode.Beq:
37 case ILOpCode.Bge:
38 case ILOpCode.Bgt:
39 case ILOpCode.Ble:
40 case ILOpCode.Blt:
41 case ILOpCode.Bne_un:
42 case ILOpCode.Bge_un:
43 case ILOpCode.Bgt_un:
44 case ILOpCode.Ble_un:
45 case ILOpCode.Blt_un:
46 case ILOpCode.Leave:
47 return 4;
48 default:
49 throw new ArgumentException(System.SR.Format(System.SR.UnexpectedOpCode, opCode), "opCode");
50 }
51 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string UnexpectedOpCode
Definition SR.cs:22
Definition SR.cs:7

References System.SR.Format(), and System.SR.UnexpectedOpCode.