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

◆ Create()

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

Definition at line 536 of file NotEqualInstruction.cs.

537 {
538 if (liftedToNull)
539 {
540 return type.GetNonNullableType().GetTypeCode() switch
541 {
542 TypeCode.Boolean => ExclusiveOrInstruction.Create(type),
543 TypeCode.SByte => s_SByteLiftedToNull ?? (s_SByteLiftedToNull = new NotEqualSByteLiftedToNull()),
544 TypeCode.Int16 => s_Int16LiftedToNull ?? (s_Int16LiftedToNull = new NotEqualInt16LiftedToNull()),
545 TypeCode.Char => s_CharLiftedToNull ?? (s_CharLiftedToNull = new NotEqualCharLiftedToNull()),
546 TypeCode.Int32 => s_Int32LiftedToNull ?? (s_Int32LiftedToNull = new NotEqualInt32LiftedToNull()),
547 TypeCode.Int64 => s_Int64LiftedToNull ?? (s_Int64LiftedToNull = new NotEqualInt64LiftedToNull()),
548 TypeCode.Byte => s_ByteLiftedToNull ?? (s_ByteLiftedToNull = new NotEqualByteLiftedToNull()),
549 TypeCode.UInt16 => s_UInt16LiftedToNull ?? (s_UInt16LiftedToNull = new NotEqualUInt16LiftedToNull()),
550 TypeCode.UInt32 => s_UInt32LiftedToNull ?? (s_UInt32LiftedToNull = new NotEqualUInt32LiftedToNull()),
551 TypeCode.UInt64 => s_UInt64LiftedToNull ?? (s_UInt64LiftedToNull = new NotEqualUInt64LiftedToNull()),
552 TypeCode.Single => s_SingleLiftedToNull ?? (s_SingleLiftedToNull = new NotEqualSingleLiftedToNull()),
553 _ => s_DoubleLiftedToNull ?? (s_DoubleLiftedToNull = new NotEqualDoubleLiftedToNull()),
554 };
555 }
556 return type.GetNonNullableType().GetTypeCode() switch
557 {
558 TypeCode.Boolean => s_Boolean ?? (s_Boolean = new NotEqualBoolean()),
559 TypeCode.SByte => s_SByte ?? (s_SByte = new NotEqualSByte()),
560 TypeCode.Int16 => s_Int16 ?? (s_Int16 = new NotEqualInt16()),
561 TypeCode.Char => s_Char ?? (s_Char = new NotEqualChar()),
562 TypeCode.Int32 => s_Int32 ?? (s_Int32 = new NotEqualInt32()),
563 TypeCode.Int64 => s_Int64 ?? (s_Int64 = new NotEqualInt64()),
564 TypeCode.Byte => s_Byte ?? (s_Byte = new NotEqualByte()),
565 TypeCode.UInt16 => s_UInt16 ?? (s_UInt16 = new NotEqualUInt16()),
566 TypeCode.UInt32 => s_UInt32 ?? (s_UInt32 = new NotEqualUInt32()),
567 TypeCode.UInt64 => s_UInt64 ?? (s_UInt64 = new NotEqualUInt64()),
568 TypeCode.Single => s_Single ?? (s_Single = new NotEqualSingle()),
569 TypeCode.Double => s_Double ?? (s_Double = new NotEqualDouble()),
570 _ => s_reference ?? (s_reference = new NotEqualReference()),
571 };
572 }

References System.Linq.Expressions.Interpreter.ExclusiveOrInstruction.Create(), System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Boolean, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Byte, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_ByteLiftedToNull, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Char, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_CharLiftedToNull, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Double, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_DoubleLiftedToNull, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Int16, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Int16LiftedToNull, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Int32, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Int32LiftedToNull, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Int64, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Int64LiftedToNull, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_reference, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_SByte, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_SByteLiftedToNull, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_Single, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_SingleLiftedToNull, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_UInt16, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_UInt16LiftedToNull, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_UInt32, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_UInt32LiftedToNull, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_UInt64, System.Linq.Expressions.Interpreter.NotEqualInstruction.s_UInt64LiftedToNull, and System.type.

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