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

◆ EmitUnaryMethod()

void System.Linq.Expressions.Compiler.LambdaCompiler.EmitUnaryMethod ( UnaryExpression node,
CompilationFlags flags )
inlineprivate

Definition at line 3682 of file LambdaCompiler.cs.

3683 {
3684 if (node.IsLifted)
3685 {
3686 ParameterExpression parameterExpression = Expression.Variable(node.Operand.Type.GetNonNullableType(), null);
3687 MethodCallExpression methodCallExpression = Expression.Call(node.Method, parameterExpression);
3688 Type nullableType = methodCallExpression.Type.GetNullableType();
3689 EmitLift(node.NodeType, nullableType, methodCallExpression, new ParameterExpression[1] { parameterExpression }, new Expression[1] { node.Operand });
3690 _ilg.EmitConvertToType(nullableType, node.Type, isChecked: false, this);
3691 }
3692 else
3693 {
3694 EmitMethodCallExpression(Expression.Call(node.Method, node.Operand), flags);
3695 }
3696 }
void EmitLift(ExpressionType nodeType, Type resultType, MethodCallExpression mc, ParameterExpression[] paramList, Expression[] argList)
void EmitMethodCallExpression(Expression expr, CompilationFlags flags)

References System.Linq.Expressions.Compiler.LambdaCompiler._ilg, System.Linq.Expressions.Expression< TDelegate >.Call(), System.Linq.Expressions.Compiler.LambdaCompiler.EmitLift(), System.Linq.Expressions.Compiler.LambdaCompiler.EmitMethodCallExpression(), and System.Linq.Expressions.Expression< TDelegate >.Variable().

Referenced by System.Linq.Expressions.Compiler.LambdaCompiler.EmitConvert(), and System.Linq.Expressions.Compiler.LambdaCompiler.EmitUnary().