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

◆ Create()

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

Definition at line 169 of file AddInstruction.cs.

170 {
171 return type.GetNonNullableType().GetTypeCode() switch
172 {
173 TypeCode.Int16 => s_Int16 ?? (s_Int16 = new AddInt16()),
174 TypeCode.Int32 => s_Int32 ?? (s_Int32 = new AddInt32()),
175 TypeCode.Int64 => s_Int64 ?? (s_Int64 = new AddInt64()),
176 TypeCode.UInt16 => s_UInt16 ?? (s_UInt16 = new AddUInt16()),
177 TypeCode.UInt32 => s_UInt32 ?? (s_UInt32 = new AddUInt32()),
178 TypeCode.UInt64 => s_UInt64 ?? (s_UInt64 = new AddUInt64()),
179 TypeCode.Single => s_Single ?? (s_Single = new AddSingle()),
180 TypeCode.Double => s_Double ?? (s_Double = new AddDouble()),
181 _ => throw ContractUtils.Unreachable,
182 };
183 }

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

Referenced by System.Linq.Expressions.Interpreter.AddOvfInstruction.Create(), and System.Linq.Expressions.Interpreter.InstructionList.EmitAdd().