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

◆ CompileUnaryExpression()

void System.Linq.Expressions.Interpreter.LightCompiler.CompileUnaryExpression ( Expression expr)
inlineprivate

Definition at line 883 of file LightCompiler.cs.

884 {
885 UnaryExpression unaryExpression = (UnaryExpression)expr;
886 if (unaryExpression.Method != null)
887 {
889 return;
890 }
891 switch (unaryExpression.NodeType)
892 {
893 case ExpressionType.Not:
894 case ExpressionType.OnesComplement:
896 break;
897 case ExpressionType.TypeAs:
899 break;
900 case ExpressionType.ArrayLength:
901 Compile(unaryExpression.Operand);
903 break;
904 case ExpressionType.NegateChecked:
905 Compile(unaryExpression.Operand);
907 break;
908 case ExpressionType.Negate:
909 Compile(unaryExpression.Operand);
911 break;
912 case ExpressionType.Increment:
913 Compile(unaryExpression.Operand);
915 break;
916 case ExpressionType.Decrement:
917 Compile(unaryExpression.Operand);
919 break;
920 case ExpressionType.UnaryPlus:
921 Compile(unaryExpression.Operand);
922 break;
923 case ExpressionType.IsTrue:
924 case ExpressionType.IsFalse:
926 break;
927 default:
928 throw new PlatformNotSupportedException(System.SR.Format(System.SR.UnsupportedExpressionType, unaryExpression.NodeType));
929 }
930 }
void Compile(Expression expr, bool asVoid)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string UnsupportedExpressionType
Definition SR.cs:180
Definition SR.cs:7

References System.Linq.Expressions.Interpreter.LightCompiler._instructions, System.Linq.Expressions.Interpreter.LightCompiler.Compile(), System.Linq.Expressions.Interpreter.LightCompiler.CompileNotExpression(), System.Linq.Expressions.Interpreter.LightCompiler.CompileTypeAsExpression(), System.Linq.Expressions.Interpreter.InstructionList.EmitArrayLength(), System.Linq.Expressions.Interpreter.InstructionList.EmitDecrement(), System.Linq.Expressions.Interpreter.InstructionList.EmitIncrement(), System.Linq.Expressions.Interpreter.InstructionList.EmitNegate(), System.Linq.Expressions.Interpreter.InstructionList.EmitNegateChecked(), System.Linq.Expressions.Interpreter.LightCompiler.EmitUnaryBoolCheck(), System.Linq.Expressions.Interpreter.LightCompiler.EmitUnaryMethodCall(), System.SR.Format(), and System.SR.UnsupportedExpressionType.

Referenced by System.Linq.Expressions.Interpreter.LightCompiler.CompileNoLabelPush().