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

◆ Create()

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

Definition at line 169 of file SubInstruction.cs.

170 {
171 return type.GetNonNullableType().GetTypeCode() switch
172 {
173 TypeCode.Int16 => s_Int16 ?? (s_Int16 = new SubInt16()),
174 TypeCode.Int32 => s_Int32 ?? (s_Int32 = new SubInt32()),
175 TypeCode.Int64 => s_Int64 ?? (s_Int64 = new SubInt64()),
176 TypeCode.UInt16 => s_UInt16 ?? (s_UInt16 = new SubUInt16()),
177 TypeCode.UInt32 => s_UInt32 ?? (s_UInt32 = new SubUInt32()),
178 TypeCode.UInt64 => s_UInt64 ?? (s_UInt64 = new SubUInt64()),
179 TypeCode.Single => s_Single ?? (s_Single = new SubSingle()),
180 TypeCode.Double => s_Double ?? (s_Double = new SubDouble()),
181 _ => throw ContractUtils.Unreachable,
182 };
183 }

References System.Linq.Expressions.Interpreter.SubInstruction.s_Double, System.Linq.Expressions.Interpreter.SubInstruction.s_Int16, System.Linq.Expressions.Interpreter.SubInstruction.s_Int32, System.Linq.Expressions.Interpreter.SubInstruction.s_Int64, System.Linq.Expressions.Interpreter.SubInstruction.s_Single, System.Linq.Expressions.Interpreter.SubInstruction.s_UInt16, System.Linq.Expressions.Interpreter.SubInstruction.s_UInt32, System.Linq.Expressions.Interpreter.SubInstruction.s_UInt64, System.type, and System.Dynamic.Utils.ContractUtils.Unreachable.

Referenced by System.Linq.Expressions.Interpreter.SubOvfInstruction.Create(), and System.Linq.Expressions.Interpreter.InstructionList.EmitSub().