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

◆ Create()

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

Definition at line 317 of file GreaterThanOrEqualInstruction.cs.

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

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

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