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

◆ Create()

static Instruction System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.Create ( Type type,
bool liftedToNull = false )
inlinestaticinherited

Definition at line 317 of file LessThanOrEqualInstruction.cs.

318 {
319 if (liftedToNull)
320 {
321 return type.GetNonNullableType().GetTypeCode() switch
322 {
323 TypeCode.SByte => s_liftedToNullSByte ?? (s_liftedToNullSByte = new LessThanOrEqualSByte(null)),
324 TypeCode.Int16 => s_liftedToNullInt16 ?? (s_liftedToNullInt16 = new LessThanOrEqualInt16(null)),
325 TypeCode.Char => s_liftedToNullChar ?? (s_liftedToNullChar = new LessThanOrEqualChar(null)),
326 TypeCode.Int32 => s_liftedToNullInt32 ?? (s_liftedToNullInt32 = new LessThanOrEqualInt32(null)),
327 TypeCode.Int64 => s_liftedToNullInt64 ?? (s_liftedToNullInt64 = new LessThanOrEqualInt64(null)),
328 TypeCode.Byte => s_liftedToNullByte ?? (s_liftedToNullByte = new LessThanOrEqualByte(null)),
329 TypeCode.UInt16 => s_liftedToNullUInt16 ?? (s_liftedToNullUInt16 = new LessThanOrEqualUInt16(null)),
330 TypeCode.UInt32 => s_liftedToNullUInt32 ?? (s_liftedToNullUInt32 = new LessThanOrEqualUInt32(null)),
331 TypeCode.UInt64 => s_liftedToNullUInt64 ?? (s_liftedToNullUInt64 = new LessThanOrEqualUInt64(null)),
332 TypeCode.Single => s_liftedToNullSingle ?? (s_liftedToNullSingle = new LessThanOrEqualSingle(null)),
333 TypeCode.Double => s_liftedToNullDouble ?? (s_liftedToNullDouble = new LessThanOrEqualDouble(null)),
334 _ => throw ContractUtils.Unreachable,
335 };
336 }
337 return type.GetNonNullableType().GetTypeCode() switch
338 {
339 TypeCode.SByte => s_SByte ?? (s_SByte = new LessThanOrEqualSByte(Utils.BoxedFalse)),
340 TypeCode.Int16 => s_Int16 ?? (s_Int16 = new LessThanOrEqualInt16(Utils.BoxedFalse)),
341 TypeCode.Char => s_Char ?? (s_Char = new LessThanOrEqualChar(Utils.BoxedFalse)),
342 TypeCode.Int32 => s_Int32 ?? (s_Int32 = new LessThanOrEqualInt32(Utils.BoxedFalse)),
343 TypeCode.Int64 => s_Int64 ?? (s_Int64 = new LessThanOrEqualInt64(Utils.BoxedFalse)),
344 TypeCode.Byte => s_Byte ?? (s_Byte = new LessThanOrEqualByte(Utils.BoxedFalse)),
345 TypeCode.UInt16 => s_UInt16 ?? (s_UInt16 = new LessThanOrEqualUInt16(Utils.BoxedFalse)),
346 TypeCode.UInt32 => s_UInt32 ?? (s_UInt32 = new LessThanOrEqualUInt32(Utils.BoxedFalse)),
347 TypeCode.UInt64 => s_UInt64 ?? (s_UInt64 = new LessThanOrEqualUInt64(Utils.BoxedFalse)),
348 TypeCode.Single => s_Single ?? (s_Single = new LessThanOrEqualSingle(Utils.BoxedFalse)),
349 TypeCode.Double => s_Double ?? (s_Double = new LessThanOrEqualDouble(Utils.BoxedFalse)),
350 _ => throw ContractUtils.Unreachable,
351 };
352 }

References System.Linq.Expressions.Utils.BoxedFalse, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_Byte, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_Char, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_Double, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_Int16, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_Int32, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_Int64, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullByte, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullChar, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullDouble, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullInt16, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullInt32, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullInt64, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullSByte, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullSingle, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullUInt16, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullUInt32, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_liftedToNullUInt64, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_SByte, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_Single, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_UInt16, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_UInt32, System.Linq.Expressions.Interpreter.LessThanOrEqualInstruction.s_UInt64, System.type, and System.Dynamic.Utils.ContractUtils.Unreachable.

Referenced by System.Linq.Expressions.Interpreter.InstructionList.EmitLessThanOrEqual().