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

◆ Create()

static Instruction System.Linq.Expressions.Interpreter.NegateInstruction.Create ( Type type)
inlinestaticinherited

Definition at line 112 of file NegateInstruction.cs.

113 {
114 return type.GetNonNullableType().GetTypeCode() switch
115 {
116 TypeCode.Int16 => s_Int16 ?? (s_Int16 = new NegateInt16()),
117 TypeCode.Int32 => s_Int32 ?? (s_Int32 = new NegateInt32()),
118 TypeCode.Int64 => s_Int64 ?? (s_Int64 = new NegateInt64()),
119 TypeCode.Single => s_Single ?? (s_Single = new NegateSingle()),
120 TypeCode.Double => s_Double ?? (s_Double = new NegateDouble()),
121 _ => throw ContractUtils.Unreachable,
122 };
123 }

References System.Linq.Expressions.Interpreter.NegateInstruction.s_Double, System.Linq.Expressions.Interpreter.NegateInstruction.s_Int16, System.Linq.Expressions.Interpreter.NegateInstruction.s_Int32, System.Linq.Expressions.Interpreter.NegateInstruction.s_Int64, System.Linq.Expressions.Interpreter.NegateInstruction.s_Single, System.type, and System.Dynamic.Utils.ContractUtils.Unreachable.

Referenced by System.Linq.Expressions.Interpreter.NegateCheckedInstruction.Create(), and System.Linq.Expressions.Interpreter.InstructionList.EmitNegate().